/* 생존 일지 : 온라인 좀비 아포칼립스 앱 셸 스타일.
   무채색 근흑 팔레트: 순수 #000 은 쓰지 않는다. 이미지 에셋 0개, 질감은 인라인 SVG 노이즈. 인라인 스타일과 스크립트 금지(CSP). 최소 뷰포트 360px. */
:root {
  /* 배경 5단계, 텍스트 4단계, 경계선 (다크 기본, 무채색) */
  --bg-0: #050505; --bg-1: #0B0B0B; --bg-2: #111111; --bg-3: #181818; --bg-4: #202020;
  --text-1: #EDE9E0; --text-2: #CFCAC0; --text-3: #9B978F; --text-4: #6E6B65;
  --line-1: #1C1C1C; --line-2: #292929; --line-3: #3F3F3F; --focus: #E6D9B8;
  /* 축 식별색, 의미색 */
  --vital-hp: #DA6559; --vital-mind: #9B8CDE; --vital-hunger: #E67E22;
  --positive: #27AE60; --negative: #DA6559; --warning: #E67E22; --info: #3591CF;
  /* 구간색 */
  --band-ok: #27AE60; --band-calm: #17A589; --band-mid: #9BA5A6; --band-warn: #E67E22; --band-danger: #DA6559; --raw-crimson: #C0392B;
  /* 등급 */
  --grade-common: #9BA5A6; --grade-fine: #27AE60; --grade-superior: #3591CF; --grade-rare: #AF72C8; --grade-legend: #E67E22;
  /* 포인트 컬러 12 */
  --clr-crimson: #DA6559; --clr-amber: #E67E22; --clr-mustard: #D4AC0D; --clr-moss: #27AE60; --clr-teal: #17A589; --clr-sky: #3591CF; --clr-violet: #AF72C8; --clr-rose: #EE4C83; --clr-apricot: #F5B7B1; --clr-silver: #AAB7B8; --clr-ivory: #E6D9B8; --clr-russet: #B97C59;
  /* 호환 별칭 */
  --fg-0: var(--text-1); --fg-1: var(--text-2); --ash: var(--text-4); --silver: var(--clr-silver); --moss: var(--clr-moss); --mustard: var(--clr-mustard); --amber: var(--clr-amber); --teal: var(--clr-teal); --crimson: var(--clr-crimson); --line: var(--line-2); --accent: var(--clr-ivory);
  --accent-ink: #0B0B0B; --accent-dim: rgba(230,217,184,.12); --accent-line: rgba(230,217,184,.35);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .55 0 0 0 0 .55 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-opacity: .035;
  /* 타이포, 간격, 라운드, 그림자, z, 모션 */
  --font-body: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* 글꼴은 프리텐다드로 통일한다(자체 호스팅 /fonts/pretendard.css, 다이내믹 서브셋). 예외는 코드, ID 표기(--font-code)와 랜딩 표제(--font-impact) 둘뿐이다. */
  --font-mono: var(--font-body);
  --font-title: var(--font-body);
  --font-journal: var(--font-body);
  --font-code: "D2Coding", "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
  --font-impact: "Black Han Sans", "Do Hyeon", Impact, "Arial Black", var(--font-body);
  --fs-scale: 1;
  --fs-micro: .733rem; --fs-caption: .8rem; --fs-log: .867rem; --fs-ui: .933rem; --fs-h3: 1.067rem; --fs-h2: 1.133rem; --fs-h1: 1.267rem; --fs-display: 1.467rem;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --r-1: 2px; --r-2: 4px; --r-3: 6px; --r-4: 10px;
  --sh-c-1: rgba(0,0,0,.6); --sh-c-2: rgba(0,0,0,.55); --sh-c-3: rgba(0,0,0,.7); --sh-1: 0 1px 0 var(--sh-c-1); --sh-2: 0 6px 18px var(--sh-c-2); --sh-3: 0 18px 48px var(--sh-c-3);
  --z-sticky: 100; --z-sheet: 200; --z-modal: 500; --z-popover: 520; --z-toast: 560; --z-force: 600; --z-banner: 700; --z-maint: 800;
  --dur-1: 90ms; --dur-2: 160ms; --dur-3: 240ms; --dur-4: 400ms; --dur-bar: 600ms; --ease-std: cubic-bezier(.2,.6,.2,1);
  --top-h: 48px;
  /* 부품별 토큰: 기본값은 위 기초 토큰을 따라가고, 설정 > 테마에서 낱개로 덮어쓴다(<html> 인라인 변수) */
  --page-top: var(--bg-2); --page-mid: var(--bg-1); --page-bottom: var(--bg-0);
  --link: var(--info); --selection-bg: rgba(230,217,184,.3); --selection-text: var(--text-1);
  --lh-body: 1.55; --lh-prose: 1.75;
  --topbar-bg: var(--bg-1); --topbar-line: var(--line-2); --topbar-text: var(--text-3); --topbar-clock: var(--clr-ivory);
  --tabbar-bg: var(--bg-1); --tabbar-line: var(--line-2); --tabbar-text: var(--text-4); --tabbar-active: var(--text-1); --tabbar-active-line: var(--accent);
  --card-bg: var(--bg-2); --card-line: var(--line-2); --card-title: var(--text-3); --card-raised-bg: var(--bg-3); --card-accent: var(--accent); --card-radius: var(--r-3);
  --btn-bg: var(--bg-3); --btn-text: var(--text-1); --btn-line: var(--line-3); --btn-hover-bg: var(--bg-4); --btn-hover-line: var(--text-4); --btn-primary-bg: var(--accent); --btn-primary-text: var(--accent-ink); --btn-danger: var(--negative); --btn-danger-hover-bg: rgba(218,101,89,.1); --btn-ghost-text: var(--text-3); --btn-active-bg: var(--accent-dim); --btn-active-line: var(--accent); --btn-active-text: var(--text-1); --btn-radius: var(--r-2);
  --input-bg: var(--bg-1); --input-text: var(--text-1); --input-line: var(--line-3); --input-focus-line: var(--accent); --input-focus-ring: var(--accent-dim); --input-placeholder: var(--text-4); --input-radius: var(--r-2);
  --tab-line: var(--line-2); --tab-text: var(--text-3); --tab-active-text: var(--text-1); --tab-active-line: var(--accent);
  --tag-bg: var(--bg-1); --tag-line: var(--line-3); --tag-text: var(--text-2); --chip-bg: var(--bg-3); --chip-line: var(--line-2); --chip-text: var(--text-2);
  --badge-bg: var(--negative); --badge-text: #FFFFFF; --banner-bg: var(--warning); --banner-text: #141414; --banner-ws-bg: var(--info); --banner-ws-text: #FFFFFF;
  --table-head-bg: var(--bg-1); --table-head-text: var(--text-4); --table-line: var(--line-1); --table-stripe: rgba(255,255,255,.015);
  --gauge-track: var(--bg-1); --gauge-line: var(--line-2); --gauge-tick: var(--bg-2); --progress-fill: var(--accent); --stat-bg: var(--bg-1); --stat-line: var(--line-1); --hpbar-text: #FFFFFF; --hpbar-shadow: #000000;
  --map-bg: var(--bg-1); --map-grid: var(--line-1); --map-edge: var(--line-3); --map-node: var(--bg-3); --map-node-line: var(--line-3); --map-text: var(--text-2); --map-text-halo: var(--bg-1); --map-here: var(--clr-ivory); --map-here-fill: var(--bg-4); --map-land: var(--bg-2); --map-land-line: var(--line-3);
  --chat-bg: var(--bg-1); --chat-line: var(--line-2); --chat-hover: var(--bg-3); --chat-time: var(--text-4); --chat-sys: var(--text-4); --chat-gm: #D4AC0D; --chat-badge-bg: var(--accent); --chat-badge-text: var(--bg-1);
  --ch-local: #AAB7B8; --ch-radio: #17A589; --ch-camp: #27AE60; --ch-party: #3591CF; --ch-whisper: #AF72C8; --ch-notice: #D4AC0D;
  --ntf-bg: var(--bg-3); --ntf-line: var(--line-1); --ntf-unread-bg: var(--bg-2); --ntf-unread-mark: var(--accent); --ntf-critical-bg: rgba(218,101,89,.16); --ntf-action-bg: rgba(230,126,34,.16);
  --notif-bg: var(--bg-1); --notif-pos-bg: rgba(39,174,96,.08); --notif-neg-bg: rgba(218,101,89,.08);
  --toast-bg: var(--bg-3); --toast-text: var(--text-1); --toast-line: var(--line-3); --toast-accent: var(--accent);
  --modal-backdrop: rgba(0,0,0,.72); --modal-bg: var(--bg-2); --modal-top: var(--accent); --side-bg: var(--bg-1); --side-line: var(--line-2); --guide-dim: rgba(0,0,0,.62);
  --rl-narr: var(--text-3); --rl-combat: var(--text-2); --rl-gain: var(--positive); --rl-result: var(--text-1); --rl-emph: var(--negative);
  --journal-hover: var(--bg-3); --journal-memo-line: var(--accent); --journal-memo-bg: var(--bg-1);
  --stchip-pos-bg: rgba(39,174,96,.12); --stchip-neg-bg: rgba(218,101,89,.12); --vig-hp: rgba(218,101,89,.32); --vig-mind: rgba(155,140,222,.28);
  --scene-combat-sky: #171A1F; --scene-combat-ground: #0B0C0E; --scene-combat-fig: #06070A; --scene-combat-enemy: #0C0709; --scene-combat-eye: #D64545;
  --scene-camp-sky: #14161B; --scene-camp-ground: #1D1A14; --scene-camp-tent: #2F3A33; --scene-camp-flame: #E8892B; --scene-camp-flame-inner: #F7D36A; --scene-sun: #F0D9A8; --scene-moon: #D8DDE8;
  --avatar-bg: var(--bg-3); --avatar-line: var(--line-3); --avatar-text: var(--text-1); --scrollbar: var(--line-3);
  color-scheme: dark;
}
/* 라이트 테마: 무채색 순백. 의미색(생존치, 등급, 상태)은 유지 */
[data-theme="light"] {
  --bg-0: #FFFFFF; --bg-1: #FFFFFF; --bg-2: #FFFFFF; --bg-3: #F5F5F5; --bg-4: #ECECEC;
  --text-1: #111111; --text-2: #222222; --text-3: #555555; --text-4: #767676;
  --line-1: #EBEBEB; --line-2: #D6D6D6; --line-3: #8C8C8C; --focus: #111111;
  --vital-hp: #9E2A1E; --vital-mind: #4A3E8C; --vital-hunger: #8F4507;
  --positive: #176B3B; --negative: #9E2A1E; --warning: #8F4507; --info: #1F5679;
  --band-ok: #176B3B; --band-calm: #0D6455; --band-mid: #5C6566; --band-warn: #8F4507; --band-danger: #9E2A1E;
  --grade-common: #5C6566; --grade-fine: #176B3B; --grade-superior: #1F5679; --grade-rare: #5E2B73; --grade-legend: #8F4507;
  --clr-crimson: #9E2A1E; --clr-amber: #8F4507; --clr-mustard: #6F5906; --clr-moss: #176B3B; --clr-teal: #0D6455; --clr-sky: #1F5679; --clr-violet: #5E2B73; --clr-rose: #9C1240; --clr-apricot: #8A4F49; --clr-silver: #5F5F5F; --clr-ivory: #3D3D3D; --clr-russet: #5F3B29;
  --accent: #1E1E1E; --accent-ink: #FFFFFF; --accent-dim: rgba(0,0,0,.06); --accent-line: rgba(0,0,0,.3);
  --noise-opacity: 0;
  --sh-c-1: rgba(0,0,0,.06); --sh-c-2: rgba(0,0,0,.1); --sh-c-3: rgba(0,0,0,.14);
  /* 부품별 토큰의 라이트 값(기초 토큰을 따라가지 않는 것만) */
  --selection-bg: rgba(0,0,0,.15); --banner-text: #FFFFFF; --table-stripe: rgba(0,0,0,.02); --btn-danger-hover-bg: rgba(158,42,30,.08);
  --chat-gm: #6F5906; --ch-local: #5F5F5F; --ch-radio: #0D6455; --ch-camp: #176B3B; --ch-party: #1F5679; --ch-whisper: #5E2B73; --ch-notice: #6F5906;
  --ntf-critical-bg: rgba(158,42,30,.12); --ntf-action-bg: rgba(143,69,7,.12); --notif-pos-bg: rgba(23,107,59,.08); --notif-neg-bg: rgba(158,42,30,.08); --stchip-pos-bg: rgba(23,107,59,.12); --stchip-neg-bg: rgba(158,42,30,.12);
  --modal-backdrop: rgba(0,0,0,.45); --guide-dim: rgba(0,0,0,.5);
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) { :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; --dur-4: 0ms; --dur-bar: 0ms; } .pulse, .mnode.here .ring, .mnode.exploring .sweep, .dot.here.exploring, .mapstate i, .g-track.zero { animation: none !important; } }

/* ---------- 기초 ---------- */
* { box-sizing: border-box; }
html { font-size: calc(15px * var(--fs-scale)); }
@media (max-width: 767px) { html { font-size: calc(14px * var(--fs-scale)); } }
html, body { margin: 0; background: var(--bg-1); color: var(--text-2); font-family: var(--font-body); line-height: var(--lh-body); letter-spacing: -0.01em; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; position: relative; background: radial-gradient(120% 80% at 50% 0%, var(--page-top) 0%, var(--page-mid) 55%, var(--page-bottom) 100%) fixed; }
body::before { content: ""; position: fixed; inset: 0; background-image: var(--noise); opacity: var(--noise-opacity); pointer-events: none; z-index: 0; }
body > * { position: relative; z-index: 1; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: currentColor; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
h1, h2, h3 { color: var(--text-1); margin: 0; }
h1 { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-h1); line-height: 1.35; letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
h2 { font-family: var(--font-title); font-weight: 600; font-size: var(--fs-h2); line-height: 1.4; margin: var(--sp-5) 0 var(--sp-2); }
h3 { font-weight: 700; font-size: var(--fs-h3); line-height: 1.45; margin: var(--sp-3) 0 var(--sp-2); }
.display { font-family: var(--font-impact); font-size: var(--fs-display); letter-spacing: -0.02em; }
.prose, .journal, .desc { font-family: var(--font-journal); font-size: var(--fs-h3); line-height: var(--lh-prose); letter-spacing: 0; }
.log, .rl, .pvp-line, .clines { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono, pre, code { font-family: var(--font-code); font-variant-numeric: tabular-nums; }
.num, .barrow, .tag, .countdown, td, .gauge, .clock, .stat { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-4); }
.small { font-size: var(--fs-caption); line-height: 1.5; }
.caption { font-size: var(--fs-caption); color: var(--text-3); }
.row { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: .55rem; }
.stack.small { gap: .38rem; }
.center { text-align: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 767px) { .grid2 { grid-template-columns: 1fr; } }
p { margin: 0; }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.lg { width: 1.35em; height: 1.35em; }
.ico.xl { width: 2em; height: 2em; }

/* ---------- 상단 바 ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); height: var(--top-h); background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-line); box-shadow: var(--sh-1); padding: 0 var(--sp-4); display: flex; gap: var(--sp-4); align-items: center; }
.topbar .brand { display: flex; align-items: center; gap: .5rem; color: var(--text-1); font-family: var(--font-title); font-weight: 700; white-space: nowrap; letter-spacing: -.01em; cursor: pointer; background: none; border: none; padding: 0; min-height: 0; font-size: var(--fs-ui); }
.topbar .brand:hover { background: none; }
.topbar .brand .mark { width: 26px; height: 26px; }
.topbar .path { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; font-size: var(--fs-caption); color: var(--text-3); overflow: hidden; white-space: nowrap; }
.topbar .path .seg { display: inline-flex; align-items: center; gap: .25rem; overflow: hidden; text-overflow: ellipsis; }
.topbar .path .seg:last-child { color: var(--text-1); font-weight: 600; }
.topbar .path .sep { color: var(--line-3); }
.topbar .spacer { flex: 1; }
.topbar .clock { display: flex; align-items: baseline; gap: .55rem; font-family: var(--font-mono); font-size: var(--fs-log); color: var(--text-2); white-space: nowrap; padding: 0 .6rem; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.topbar .clock .lbl { font-family: var(--font-body); font-size: var(--fs-micro); color: var(--text-4); letter-spacing: .06em; }
.topbar .clock .tick { color: var(--topbar-clock); }
.topbar nav { display: flex; gap: .15rem; align-items: center; }
.topbar nav button { min-height: 32px; padding: 0 .55rem; background: transparent; border-color: transparent; color: var(--topbar-text); display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-caption); }
.topbar nav button:hover { color: var(--text-1); background: var(--bg-3); border-color: var(--line-2); }
.topbar nav button.iconbtn { position: relative; }
.topbar nav button .badge { position: absolute; top: 2px; right: 2px; margin: 0; }
.badge { background: var(--badge-bg); color: var(--badge-text); border-radius: 999px; padding: 0 .36rem; font-size: var(--fs-micro); font-family: var(--font-mono); font-weight: 700; margin-left: .3rem; line-height: 1.45; }
.banner { background: var(--banner-bg); color: var(--banner-text); padding: .45rem var(--sp-4); text-align: center; font-weight: 600; z-index: var(--z-banner); position: sticky; top: 0; font-size: var(--fs-caption); }
.banner.ws { background: var(--banner-ws-bg); color: var(--banner-ws-text); }
/* 유튜브 배경음악 작은 플레이어: 상단 바 바로 아래 오른쪽, 본문 밖 고정. 접으면 음표 버튼만 남는다 */
.ytbar { position: fixed; top: calc(var(--top-h) + 4px); right: 6px; z-index: var(--z-sticky); display: flex; align-items: center; gap: .3rem; height: 36px; padding: 2px 4px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--sh-1); max-width: min(340px, calc(100vw - 12px)); }
.ytbar .frame { width: 56px; height: 32px; overflow: hidden; border-radius: 4px; background: #000; flex: none; }
.ytbar .frame iframe { width: 96px; height: 54px; margin: -11px 0 0 -20px; display: block; border: 0; pointer-events: none; }
.ytbar .ttl { flex: 1; min-width: 0; font-size: var(--fs-micro); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytbar button.mini { min-height: 26px; height: 26px; width: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ytbar button.mini .ico { width: 14px; height: 14px; vertical-align: 0; }
.ytbar.mini { max-width: none; gap: 0; }
/* PC 게임 화면: 왼쪽 본인 패널 아래에 같은 폭으로(좌표는 app.js ytPlace 가 준다) */
.ytbar.dock { right: auto; max-width: none; box-sizing: border-box; }
.ytbar.dock .ttl { max-width: none; }
.ytbar.mini .frame, .ytbar.mini .ttl, .ytbar.mini button.mini:not(:first-child) { display: none; }
/* 관리 유튜브 편집 창: 미리 듣기 플레이어와 칸별 볼륨 줄 */
.ytprevrow { align-items: flex-start; gap: .6rem; }
.ytprev { width: 240px; height: 135px; flex: none; background: #000; border-radius: var(--r-2); overflow: hidden; }
.ytprev iframe { display: block; border: 0; }
.ytfield .row { gap: .4rem; align-items: center; }
.ytfield input[type="range"] { flex: 1; min-width: 80px; }
@media (max-width: 767px) { .ytbar { top: calc(var(--top-h) + 2px); max-width: calc(100vw - 12px); } .ytbar .ttl { max-width: 110px; } }
@media (max-width: 1023px) { .topbar .path { display: none; } }
@media (max-width: 767px) { .topbar { padding: 0 var(--sp-3); gap: var(--sp-2); } .topbar .clock { padding: 0 .4rem; } .topbar .clock .lbl { display: none; } .topbar nav button .txt { display: none; } .topbar nav button { padding: 0 .45rem; } .topbar .brand .txt { display: none; } }

/* ---------- 셸, 게임 화면 그리드 ---------- */
.shell { width: 100%; max-width: 46rem; margin: 0 auto; padding: var(--sp-4) var(--sp-4) 6rem; flex: 1; }
.gamegrid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); align-items: start; }
.pnl-self { display: contents; }
.pnl-main { min-width: 0; }
.side { display: none; }
@media (min-width: 768px) {
  body[data-screen="game"] .shell { max-width: 1160px; }
  /* 관리 탭: 표가 잘리지 않게 본문을 넓히고 칸 글을 줄바꿈한다 */
  body[data-screen="admin"] .shell { max-width: 1400px; }
  .gamegrid { grid-template-columns: 250px minmax(0, 1fr); gap: var(--sp-4); }
  .pnl-self { display: flex; flex-direction: column; gap: var(--sp-3); position: sticky; top: calc(var(--top-h) + 12px); }
}
@media (min-width: 1024px) {
  body[data-screen="game"] { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "banner banner" "top top" "main side"; align-content: start; }
  body[data-screen="game"] > .banner { grid-area: banner; }
  body[data-screen="game"] > .topbar { grid-area: top; }
  body[data-screen="game"] > .shell { grid-area: main; }
  body[data-screen="game"] > .side { grid-area: side; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); border-left: 1px solid var(--side-line); background: var(--side-bg); min-height: 0; }
  .gamegrid { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (min-width: 1440px) { body[data-screen="game"] { grid-template-columns: minmax(0, 1fr) 340px; } body[data-screen="game"] .shell { max-width: 1240px; } .gamegrid { grid-template-columns: 280px minmax(0, 1fr); } }

/* ---------- 하단 탭 바 (모바일 전용) ---------- */
.tabbar { display: none; }
@media (max-width: 767px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--tabbar-bg); border-top: 1px solid var(--tabbar-line); z-index: calc(var(--z-sheet) + 1); }
  .tabbar button { background: none; border: none; border-radius: 0; color: var(--tabbar-text); font-size: var(--fs-micro); min-height: 56px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-top: 2px solid transparent; }
  .tabbar button .ico { width: 1.35rem; height: 1.35rem; }
  .tabbar button.active { color: var(--tabbar-active); border-top-color: var(--tabbar-active-line); }
  .shell { padding-bottom: calc(5rem + 56px); }
}

/* ---------- 카드, 입력, 버튼 ---------- */
.card { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: var(--card-radius); padding: var(--sp-3) var(--sp-4); margin: 0; box-shadow: var(--sh-1); }
@media (max-width: 767px) { .card { padding: var(--sp-3); } }
.card > h3:first-child, .card > .row:first-child > h3:first-child { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--card-title); margin: 0 0 .55rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line-1); display: flex; align-items: center; gap: .4rem; }
.card > .row:first-child > h3:first-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.card > .row:first-child { padding-bottom: .4rem; border-bottom: 1px solid var(--line-1); margin-bottom: .2rem; }
.card .card { border: none; border-top: 1px solid var(--line-1); border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; box-shadow: none; }
.card .card > h3:first-child { border-bottom: none; padding-bottom: 0; }
.card.accent { border-left: 3px solid var(--card-accent); }
.card.raised { background: var(--card-raised-bg); }
label { display: block; font-size: var(--fs-caption); color: var(--text-3); margin-bottom: .2rem; }
input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; background: var(--input-bg); color: var(--input-text); border: 1px solid var(--input-line); border-radius: var(--input-radius); padding: .4rem .65rem; min-height: 36px; transition: border-color var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std);
}
input:hover, select:hover, textarea:hover { border-color: var(--text-4); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--input-focus-line); box-shadow: 0 0 0 3px var(--input-focus-ring); }
input::placeholder, textarea::placeholder { color: var(--input-placeholder); }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-line); border-radius: var(--btn-radius); padding: .35rem .8rem; min-height: 34px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; line-height: 1.2; transition: background var(--dur-1) var(--ease-std), border-color var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std); }
button:hover { border-color: var(--btn-hover-line); background: var(--btn-hover-bg); }
button:active { transform: translateY(1px); }
button.primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); font-weight: 700; }
button.primary:hover { filter: brightness(1.06); }
button.danger { background: transparent; border-color: var(--btn-danger); color: var(--btn-danger); }
button.danger:hover { background: var(--btn-danger-hover-bg); }
button.ghost { background: transparent; border-color: transparent; color: var(--btn-ghost-text); }
button.ghost:hover { color: var(--text-1); background: var(--bg-3); }
button:disabled, button[aria-disabled="true"] { opacity: 1; color: var(--text-4); border-color: var(--line-2); background: transparent; cursor: not-allowed; transform: none; }
button.mini { min-height: 26px; padding: .05rem .5rem; font-size: var(--fs-caption); }
button.mini.danger { border-color: var(--btn-danger); color: var(--btn-danger); }
button.mini.active, button.active { border-color: var(--btn-active-line); color: var(--btn-active-text); background: var(--btn-active-bg); font-weight: 600; }
@media (max-width: 767px) { button { min-height: 44px; } button.mini { min-height: 30px; } input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea { min-height: 44px; } }
/* iOS Safari 는 글자 16px 미만인 입력칸에 포커스가 가면 화면을 확대한다. 모바일 폭에서는 모든 입력칸을 16px 로 */
@media (max-width: 767px) { input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea { font-size: max(16px, 1em); } .chatdock .cinput textarea.chatline { height: 40px; min-height: 40px; padding-top: .45rem; padding-bottom: .45rem; } }
.err { color: var(--negative); font-size: var(--fs-caption); min-height: 1.2em; }
.okmsg { color: var(--positive); font-size: var(--fs-caption); }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
hr { border: none; border-top: 1px solid var(--line-1); margin: var(--sp-2) 0; }
::selection { background: var(--selection-bg); color: var(--selection-text); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-2); overflow: hidden; background: var(--bg-1); }
.seg button { border: none; border-radius: 0; min-height: 28px; padding: 0 .7rem; background: transparent; color: var(--text-3); font-size: var(--fs-caption); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- 배지, 태그 ---------- */
.tag { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .42rem; height: 1.3rem; border-radius: var(--r-1); font-size: var(--fs-micro); font-family: var(--font-mono); letter-spacing: .02em; border: 1px solid var(--tag-line); color: var(--tag-text); white-space: nowrap; background: var(--tag-bg); }
.tag.moss { color: var(--positive); border-color: var(--positive); }
.tag.crimson, .tag.rust { color: var(--negative); border-color: var(--negative); }
.tag.mustard { color: var(--clr-mustard); border-color: var(--clr-mustard); }
.tag.ash { color: var(--text-4); border-color: var(--line-2); }
/* 장소 유형 태그: 유형 배지(ash)보다 한 단계 진하게, 보조 태그는 그 사이 */
.tag.ptag { color: var(--text-2); border-color: var(--line-3); }
.tag.ptag.sub { color: var(--text-3); border-color: var(--line-2); }
.tag.sky { color: var(--info); border-color: var(--info); }
.tag.solid { background: var(--bg-4); border-color: transparent; }
.glyph { font-family: var(--font-mono); }
.swatch { display: inline-block; width: 1.05em; height: 1.05em; border-radius: 999px; border: 1px solid var(--line-2); vertical-align: middle; flex: none; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem .1rem .4rem; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--chip-line); font-size: var(--fs-caption); color: var(--chip-text); }
.chip .ico { color: var(--text-3); }
.stars { font-family: var(--font-mono); letter-spacing: -.05em; color: var(--clr-mustard); font-size: var(--fs-caption); }
.stars .off { color: var(--line-3); }
.stars.zone { color: var(--clr-crimson); letter-spacing: 0; font-weight: 600; }

/* ---------- 아바타 (이니셜 + 포인트 컬러 링) ---------- */
.avatar { position: relative; width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: var(--fs-h3); color: var(--avatar-text); background: var(--avatar-bg); border: 2px solid var(--avatar-line); flex: none; box-shadow: 0 0 0 3px var(--bg-2); }
.avatar.lg { width: 64px; height: 64px; font-size: var(--fs-h1); }
.avatar.sm { width: 26px; height: 26px; font-size: var(--fs-micro); border-width: 1.5px; box-shadow: none; }
.avatar.pic { overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 999px; user-select: none; -webkit-user-drag: none; }
.avatar.editable { cursor: pointer; }
.avatar.editable:hover, .avatar.editable:focus-visible { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--accent); outline: none; }
.profileavatar { justify-content: center; }
/* 프로필 사진 편집기 */
.avedit .avcrop { display: block; width: 100%; max-width: 280px; aspect-ratio: 1; margin: 0 auto; border-radius: var(--r-3); background: var(--bg-3); touch-action: none; cursor: grab; }
.avedit .avcrop:active { cursor: grabbing; }
.avedit .avctl { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.avedit .avctl label { display: flex; flex-direction: column; gap: .2rem; font-size: var(--fs-caption); }
.avedit .avctl input[type=range] { width: 100%; }
.avedit .avprevs { align-items: center; }
.avedit .avprev { border-radius: 999px; border: 2px solid var(--line-3); background: var(--bg-3); }

/* ---------- 생존치 게이지 (구간색) ---------- */
.gauge { display: grid; grid-template-columns: 1fr; gap: 3px; --gc: var(--band-mid); }
.gauge .g-head { display: flex; align-items: baseline; gap: .4rem; font-size: var(--fs-caption); }
.gauge .g-head .lbl { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-2); font-weight: 600; }
.gauge .g-head .lbl .ico { color: var(--gv); }
.gauge .g-head .band { color: var(--gc); font-weight: 600; }
.gauge .g-head .val { margin-left: auto; font-family: var(--font-mono); color: var(--text-1); }
.gauge .g-head .val .max { color: var(--text-4); }
.g-track { position: relative; height: 8px; background: var(--gauge-track); border: 1px solid var(--gauge-line); border-radius: 2px; overflow: hidden; }
.g-track::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--gauge-tick) calc(10% - 1px) 10%); pointer-events: none; }
.g-fill { display: block; height: 100%; background: var(--gc); transition: width var(--dur-bar) var(--ease-std), background-color var(--dur-3) var(--ease-std); }
.gauge.band-ok { --gc: var(--band-ok); } .gauge.band-calm { --gc: var(--band-calm); } .gauge.band-mid { --gc: var(--band-mid); } .gauge.band-warn { --gc: var(--band-warn); }
.gauge.band-danger { --gc: var(--band-danger); } .gauge.band-danger .g-track { border-color: var(--band-danger); }
.gauge.band-zero { --gc: var(--band-danger); } .gauge.band-zero .g-track { border-color: var(--band-danger); animation: pulseDanger 1.2s ease-in-out infinite; }
.gauge.vital-hp { --gv: var(--vital-hp); } .gauge.vital-mind { --gv: var(--vital-mind); } .gauge.vital-hunger { --gv: var(--vital-hunger); }
@keyframes pulseDanger { 0%, 100% { box-shadow: 0 0 0 0 rgba(218,101,89,0); } 50% { box-shadow: 0 0 0 3px rgba(218,101,89,.35); } }
/* 구형 barrow (직업 미리보기 등) */
.barrow { display: grid; grid-template-columns: 5rem 1fr auto; gap: .5rem; align-items: center; }
.bar { height: 6px; background: var(--gauge-track); border-radius: 2px; overflow: hidden; border: 1px solid var(--gauge-line); }
.bar span { display: block; height: 100%; background: var(--band-mid); transition: width var(--dur-bar) var(--ease-std); }
.band-ok .bar span { background: var(--band-ok); } .band-calm .bar span { background: var(--band-calm); } .band-warn .bar span { background: var(--band-warn); } .band-danger .bar span, .band-zero .bar span { background: var(--band-danger); }
.vital-hp .lbl { color: var(--vital-hp); } .vital-mind .lbl { color: var(--vital-mind); } .vital-hunger .lbl { color: var(--vital-hunger); }
.progress { position: relative; height: 6px; background: var(--gauge-track); border: 1px solid var(--gauge-line); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--progress-fill); transition: width var(--dur-bar) var(--ease-std); }

/* ---------- 본인 패널 ---------- */
.pnl-self-card { padding: var(--sp-3) var(--sp-4); }
.selfhead { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; }
.selfhead .name { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-h2); color: var(--text-1); line-height: 1.25; letter-spacing: -.01em; }
.selfhead .title { display: block; font-size: var(--fs-caption); color: var(--clr-ivory); font-weight: 400; font-family: var(--font-body); }
.selfhead .chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.selfpath { display: flex; flex-wrap: wrap; gap: .15rem .3rem; font-size: var(--fs-caption); color: var(--text-3); margin: .6rem 0 .5rem; padding: .4rem .5rem; background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-2); }
.selfpath .seg { display: inline-flex; align-items: center; gap: .2rem; }
.selfpath .seg:last-child { color: var(--text-1); font-weight: 600; }
.selfpath .sep { color: var(--line-3); }
.gauges { display: grid; gap: .5rem; margin: .5rem 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: .4rem; margin-top: .5rem; }
.stat { background: var(--stat-bg); border: 1px solid var(--stat-line); border-radius: var(--r-2); padding: .35rem .55rem; display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.stat .k { font-size: var(--fs-micro); color: var(--text-4); letter-spacing: .06em; display: flex; align-items: center; gap: .3rem; text-transform: uppercase; }
.stat .v { font-family: var(--font-mono); font-size: var(--fs-ui); color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v.small { font-family: var(--font-body); font-size: var(--fs-caption); }
.equiplist { display: grid; gap: .2rem; margin-top: .35rem; }
.equiplist .eq { display: grid; grid-template-columns: 1.2rem 4rem 1fr; gap: .35rem; align-items: center; font-size: var(--fs-caption); padding: .2rem .35rem; border-radius: var(--r-1); }
.equiplist .eq:hover { background: var(--bg-3); }
.equiplist .eq .ico { color: var(--text-4); }
.equiplist .eq .k { color: var(--text-4); }
.equiplist .eq .v { color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equiplist .eq .v.none { color: var(--text-4); }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: .1rem; margin: 0 0 var(--sp-3); overflow-x: auto; border-bottom: 1px solid var(--tab-line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.wrap { flex-wrap: wrap; overflow-x: visible; }
.tabs button { min-height: 38px; padding: .3rem .75rem; border: none; background: transparent; color: var(--tab-text); border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; white-space: nowrap; gap: .4rem; }
.tabs button:hover { color: var(--text-1); background: transparent; }
.tabs button.active { color: var(--tab-active-text); border-bottom-color: var(--tab-active-line); background: transparent; font-weight: 600; }
.tabs button .ico { color: var(--text-4); }
.tabs button.active .ico { color: var(--accent); }
.tabs.sub { border-bottom: none; gap: .25rem; margin-bottom: var(--sp-2); }
.tabs.sub button { min-height: 28px; padding: .1rem .6rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--fs-caption); }
.tabs.sub button.active { border-color: var(--accent); background: var(--accent-dim); }

/* ---------- 장소 헤더, 세계 화면 ---------- */
.placehead { position: relative; overflow: hidden; padding: var(--sp-4) var(--sp-4) var(--sp-3); }
.placehead .ph-top { display: flex; align-items: flex-start; gap: .8rem; }
.placehead .ph-glyph { width: 46px; height: 46px; border-radius: var(--r-3); background: var(--bg-1); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--clr-ivory); flex: none; }
.placehead .ph-glyph .ico { width: 24px; height: 24px; stroke-width: 1.5; }
.placehead .ph-name { font-family: var(--font-title); font-size: var(--fs-h1); font-weight: 700; color: var(--text-1); line-height: 1.25; letter-spacing: -.02em; }
.placehead .ph-sub { font-size: var(--fs-caption); color: var(--text-3); margin-top: .15rem; }
.placehead .ph-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.placehead .ph-prose { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line-1); }
.placehead .ph-prose p { font-family: var(--font-journal); font-size: var(--fs-h3); line-height: 1.8; color: var(--text-2); }
.placehead .ph-prose p + p { margin-top: .5rem; }
.placehead .ph-prose p.small { font-size: var(--fs-ui); color: var(--text-3); }
.placehead .ph-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.placehead .ph-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line-1); }
.placehead .ph-actions button { min-height: 30px; padding: .2rem .6rem; font-size: var(--fs-caption); background: transparent; }
.placehead .ph-actions button .ico { color: var(--text-4); }

/* ---------- 지도 ---------- */
.mapcard { padding: 0; overflow: hidden; }
.mapcard .maphead { display: flex; align-items: center; gap: .6rem; padding: .5rem var(--sp-3); border-bottom: 1px solid var(--line-1); }
.mapcard .maphead h3 { margin: 0; padding: 0; border: none; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: .4rem; }
.mapcard .maphead .seg { margin-left: auto; }
.map { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--map-bg); }
@media (max-width: 767px) { .map { aspect-ratio: 4 / 3.4; } }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: var(--font-body); }
.map .mgrid line { stroke: var(--map-grid); stroke-width: 1; }
.map .medge { stroke: var(--map-edge); stroke-width: 1.4; stroke-dasharray: 3 4; fill: none; }
.map .medge.here { stroke: var(--map-here); stroke-dasharray: none; stroke-opacity: .7; }
.map .mnode { cursor: default; }
.map .mnode .core { fill: var(--map-node); stroke: var(--map-node-line); stroke-width: 1.5; }
.map .mnode .glyph { stroke: var(--text-3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.map .mnode text { fill: var(--map-text); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--map-text-halo); stroke-width: 3px; stroke-linejoin: round; }
.map .mnode .sub { fill: var(--text-4); font-size: 9.5px; font-weight: 400; }
.map .mnode.can { cursor: pointer; }
.map .mnode.can .core { stroke: var(--text-2); }
.map .mnode.can:hover .core { fill: var(--map-here-fill); stroke: var(--map-here); }
.map .mnode.can:hover text { fill: var(--text-1); }
.map .mnode.can.far .core { fill: var(--bg-2); stroke: var(--text-3); stroke-dasharray: 3 3; }
.map .mnode.can.far text { fill: var(--text-3); }
.map .mnode.dim .core { fill: var(--bg-2); stroke: var(--line-2); }
.map .mnode.dim .glyph { stroke: var(--line-3); }
.map .mnode.dim text { fill: var(--text-4); }
.map .mnode.here .core { fill: var(--map-here-fill); stroke: var(--map-here); stroke-width: 2; }
.map .mnode.here .glyph { stroke: var(--map-here); }
.map .mnode.here text { fill: var(--text-1); }
.map .mnode .ring { fill: none; stroke: var(--map-here); stroke-width: 1.2; opacity: .6; transform-origin: center; transform-box: fill-box; animation: mapPing 2.4s ease-out 3; }
@keyframes mapPing { 0% { transform: scale(.8); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
.map .mnode.hub .core { stroke: var(--clr-teal); }
.map .mnode.gate .core { stroke: var(--clr-mustard); } /* 범례의 관문 노란 외곽선이 큰 지도 노드에도 붙게 한다 */
.map .mnode.horde .core { stroke: var(--negative); stroke-width: 2; }
.map .mnode.horde .hatch { fill: none; stroke: var(--negative); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
.map .mnode.announced .hatch { stroke: var(--warning); }
.map .mnode .cnt { fill: var(--text-1); font-size: 9px; font-family: var(--font-mono); font-weight: 700; }
.map .mnode .cntbg { fill: var(--bg-1); stroke: var(--line-3); stroke-width: 1; }
.map .land { fill: var(--map-land); stroke: var(--map-land-line); stroke-width: 1.2; stroke-dasharray: 7 5; opacity: .9; }
.map .inset .ibox { fill: var(--bg-1); stroke: var(--line-3); stroke-width: 1; }
.map .inset .ititle { fill: var(--text-3); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.map .inset .ispoke { stroke: var(--line-2); stroke-width: 1; }
.map .inset .icenter { fill: var(--line-3); }
.map .inset .dot { fill: var(--bg-3); stroke: var(--line-3); stroke-width: 1.2; }
.map .inset .dot.camp { fill: var(--clr-mustard); } /* 캠프 있는 장소. here, hover 채움보다 앞에 둔다 */
.map .inset .dot.can { cursor: pointer; stroke: var(--text-2); }
.map .inset .dot.can:hover { stroke: var(--clr-ivory); fill: var(--bg-4); }
.map .inset .dot.here { fill: var(--clr-ivory); stroke: var(--clr-ivory); }
.map .inset .dot.haven { stroke: var(--clr-teal); }
.map .inset .dot.gate { stroke: var(--clr-mustard); }
.map .inset text { fill: var(--text-3); font-size: 9.5px; paint-order: stroke; stroke: var(--bg-1); stroke-width: 3px; }
.map .inset text.here { fill: var(--text-1); font-weight: 600; }
.map .sat .dot { fill: var(--bg-3); stroke: var(--line-3); stroke-width: 1; cursor: pointer; }
.map .sat .dot.here { fill: var(--clr-ivory); stroke: var(--clr-ivory); cursor: default; }
.map .sat .dot.can:hover { stroke: var(--clr-ivory); fill: var(--bg-4); }
.map .sat .dot.haven { stroke: var(--clr-teal); }
.map .sat .dot.gate { stroke: var(--clr-mustard); }
.map .sat text { fill: var(--text-3); font-size: 9px; paint-order: stroke; stroke: var(--bg-1); stroke-width: 3px; }
.map .compass text { fill: var(--text-4); font-size: 9px; font-family: var(--font-mono); letter-spacing: .1em; }
.map .compass path, .map .compass circle { stroke: var(--line-3); fill: none; stroke-width: 1; }
.map .mtitle { fill: var(--text-4); font-size: 10px; letter-spacing: .12em; font-family: var(--font-mono); }
.map .mtitle.big { fill: var(--text-3); font-size: 12px; font-family: var(--font-title); letter-spacing: .04em; }
.maplegend { display: flex; flex-wrap: wrap; gap: .3rem .8rem; padding: .45rem var(--sp-3); border-top: 1px solid var(--line-1); font-size: var(--fs-micro); color: var(--text-4); }
.maplegend span { display: inline-flex; align-items: center; gap: .3rem; }
.maplegend i { display: inline-block; width: 9px; height: 9px; border-radius: 999px; border: 1.5px solid var(--line-3); background: var(--bg-3); }
.maplegend i.here { border-color: var(--clr-ivory); background: var(--bg-4); }
.maplegend i.far { border: 1.5px dashed var(--text-3); background: var(--bg-2); }
.maplegend i.can { border-color: var(--text-2); }
.maplegend i.hub { border-color: var(--clr-teal); }
.maplegend i.horde { border-color: var(--negative); }
.maplegend i.camp { border-color: var(--clr-mustard); background: var(--clr-mustard); } /* 캠프 있는 장소 */
.maplegend i.gate { border-color: var(--clr-mustard); }
.maplist { padding: .3rem var(--sp-3) .6rem; }
.maplist details { border-top: 1px solid var(--line-1); }
.maplist summary { cursor: pointer; font-size: var(--fs-caption); color: var(--text-3); padding: .45rem 0; display: flex; align-items: center; gap: .4rem; list-style: none; }
.maplist summary::-webkit-details-marker { display: none; }
.maplist summary .ico { transition: transform var(--dur-2) var(--ease-std); color: var(--text-4); }
.maplist details[open] summary .ico.chev { transform: rotate(90deg); }
.maplist summary strong { color: var(--text-2); font-weight: 600; }
.maplist summary .meta { margin-left: auto; color: var(--text-4); font-family: var(--font-mono); font-size: var(--fs-micro); }
.movebtn { display: flex; flex-wrap: wrap; width: 100%; text-align: left; margin: .12rem 0; justify-content: flex-start; gap: .5rem; padding: .35rem .6rem; min-height: 34px; background: var(--bg-1); border-color: var(--line-2); font-size: var(--fs-caption); }
.movebtn .ico { color: var(--text-4); }
.movebtn .nm { color: var(--text-1); font-weight: 600; }
.movebtn .meta { color: var(--text-4); font-family: var(--font-mono); font-size: var(--fs-micro); margin-left: auto; white-space: nowrap; }
.movebtn.current { border-left: 3px solid var(--accent); font-weight: 600; }
.movebtn:disabled { background: transparent; }

/* ---------- 능력치 레이더, 파생치 ---------- */
.radarwrap { display: grid; grid-template-columns: 180px 1fr; gap: var(--sp-3); align-items: center; }
@media (max-width: 767px) { .radarwrap { grid-template-columns: 1fr; justify-items: center; } }
.radar { width: 180px; height: 180px; display: block; }
.radar .web { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar .axis { stroke: var(--line-2); stroke-width: 1; }
.radar .area { fill: rgba(230,217,184,.16); stroke: var(--clr-ivory); stroke-width: 1.6; stroke-linejoin: round; }
.radar .area.eff { fill: none; stroke: var(--clr-teal); stroke-dasharray: 3 3; }
.radar .pt { fill: var(--clr-ivory); }
.radar text { fill: var(--text-3); font-size: 10.5px; font-family: var(--font-body); }
.radar text.v { fill: var(--text-1); font-family: var(--font-mono); font-weight: 700; font-size: 10px; }
.attrgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; width: 100%; }
.attrgrid .stat .v { font-size: var(--fs-h3); }
.attrgrid .stat .v .eff { color: var(--clr-teal); font-size: var(--fs-caption); margin-left: .2rem; }
.derived { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .3rem; }

/* ---------- 아이템, 등급 테두리 ---------- */
.item { padding: .45rem .6rem; border: 1px solid var(--line-1); border-left: 3px solid var(--line-2); border-radius: 0 var(--r-2) var(--r-2) 0; background: var(--bg-1); transition: background var(--dur-1) var(--ease-std); }
.item + .item { margin-top: .3rem; }
.item:hover { background: var(--bg-3); }
.item .row { gap: .4rem; }
.item.grade-common { border-left-color: var(--line-3); }
.item.grade-fine { border-left-color: var(--grade-fine); }
.item.grade-superior { border-left-color: var(--grade-superior); }
.item.grade-rare { border-left-color: var(--grade-rare); border-left-width: 4px; }
/* 전설: 상단 1px 하이라이트는 왼쪽 바와 만나는 모서리에서 색이 카드 위로 번져 보이므로 쓰지 않고, 희귀와 같은 왼쪽 4px 만 둔다 */
.item.grade-legendary, .item.grade-legend { border-left-color: var(--grade-legend); border-left-width: 4px; }
.item.muted { color: var(--text-4); }
.grade-badge.common { color: var(--grade-common); } .grade-badge.fine { color: var(--grade-fine); } .grade-badge.superior { color: var(--grade-superior); } .grade-badge.rare { color: var(--grade-rare); } .grade-badge.legendary { color: var(--grade-legend); }
.itemico { width: 1.5rem; height: 1.5rem; border-radius: var(--r-1); background: var(--bg-3); border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); flex: none; }

/* ---------- 토스트, 모달, 시트 ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--toast-bg); border: 1px solid var(--toast-line); border-left: 3px solid var(--toast-accent); color: var(--toast-text); padding: .6rem .9rem; border-radius: var(--r-2); z-index: var(--z-toast); max-width: min(90vw, 32rem); box-shadow: var(--sh-2); font-size: var(--fs-ui); animation: toastIn var(--dur-3) var(--ease-std); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 767px) { .toast { bottom: calc(64px + env(safe-area-inset-bottom)); } }
@media (max-width: 767px) { .toast.top { bottom: auto; top: calc(10px + env(safe-area-inset-top)); animation-name: toastInTop; } }
@keyframes toastInTop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; background: var(--modal-backdrop); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal); padding: var(--sp-4); }
.modal .card { width: 100%; max-width: 30rem; max-height: 92vh; overflow-y: auto; margin: 0; padding: var(--sp-4) var(--sp-5) var(--sp-4); border-radius: var(--r-4); box-shadow: var(--sh-3); animation: modalIn var(--dur-3) var(--ease-std); border-top: 2px solid var(--modal-top); background: var(--modal-bg); }
.modal .card > h3:first-child, .modal .card > .mhead h3 { font-size: var(--fs-h2); font-family: var(--font-title); letter-spacing: -.01em; text-transform: none; color: var(--text-1); border-bottom: 1px solid var(--line-2); padding-bottom: .5rem; margin-bottom: .6rem; }
.modal .card > .row:last-child { justify-content: flex-end; margin-top: .4rem; padding-top: .6rem; border-top: 1px solid var(--line-1); }
.modal .card.wide { max-width: 60rem; }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) { .modal { align-items: flex-end; padding: 0; } .modal .card { max-height: 88vh; border-radius: var(--r-4) var(--r-4) 0 0; animation: sheetIn var(--dur-4) var(--ease-std); } }
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 표, 알림, 기타 ---------- */
.tablebox { overflow-x: auto; border: 1px solid var(--line-1); border-radius: var(--r-2); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-caption); }
th, td { text-align: left; padding: .35rem .55rem; border-bottom: 1px solid var(--table-line); vertical-align: top; white-space: nowrap; }
th { color: var(--table-head-text); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; background: var(--table-head-bg); position: sticky; top: 0; }
tbody tr:nth-child(even) { background: var(--table-stripe); }
tbody tr:hover { background: var(--bg-3); }
td.wrap { white-space: normal; }
/* 관리 탭: 칸 글을 줄바꿈해 가로로 넘친 글이 잘리지 않게 한다. 단추는 한 줄 유지 */
body[data-screen="admin"] td { white-space: normal; overflow-wrap: anywhere; }
body[data-screen="admin"] td > button, body[data-screen="admin"] td > .row { white-space: nowrap; }
.notif { border-left: 3px solid var(--clr-silver); padding: .4rem .6rem; margin: .25rem 0; background: var(--notif-bg); border-radius: 0 var(--r-2) var(--r-2) 0; border-top: 1px solid var(--line-1); border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.notif.urg_critical { border-left-color: var(--negative); }
.notif.urg_action { border-left-color: var(--warning); }
.notif.urg_quiet { border-left-color: transparent; color: var(--text-4); }
.notif.read { opacity: .55; }
.notif.pos { border-left-color: var(--positive); background: var(--notif-pos-bg); }
.notif.neg { border-left-color: var(--negative); background: var(--notif-neg-bg); }
.notif.pos > strong { color: var(--positive); }
.notif.neg > strong { color: var(--negative); }
pre { background: var(--bg-1); border: 1px solid var(--line-1); padding: .6rem; border-radius: var(--r-2); overflow-x: auto; font-size: var(--fs-caption); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; font-size: var(--fs-caption); margin: 0; }
.kv dt { color: var(--text-4); }
.kv dd { margin: 0; color: var(--text-2); }
.empty { text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--text-2); }
.empty .sub { color: var(--text-4); font-size: var(--fs-caption); margin-top: .3rem; }
.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-2) 37%, var(--bg-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-2); min-height: 1em; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.countdown.warn { color: var(--warning); } .countdown.danger { color: var(--negative); font-weight: 700; }
.loading { display: flex; align-items: center; gap: .5rem; color: var(--text-4); padding: var(--sp-6) 0; justify-content: center; font-size: var(--fs-caption); }
.loading::before { content: ""; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--line-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-title { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--text-4); margin: var(--sp-3) 0 var(--sp-2); }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line-1); }

/* ---------- 진입, 계정 ---------- */
body[data-screen="auth"] .shell { max-width: 30rem; display: flex; flex-direction: column; justify-content: center; padding-top: var(--sp-8); }
body[data-screen="landing"] .shell { max-width: 50rem; display: flex; flex-direction: column; justify-content: center; padding-top: var(--sp-4); }
.authcard { padding: var(--sp-6) var(--sp-6) var(--sp-5); border-top: 2px solid var(--accent); }
.authcard h1 { font-size: var(--fs-h1); display: flex; align-items: center; gap: .5rem; }
.authcard h1 .mark { width: 28px; height: 28px; }
.authcard .lead { color: var(--text-3); font-size: var(--fs-caption); margin-bottom: var(--sp-2); }
.authcard .row.actions { margin-top: var(--sp-2); }
.landing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-6) 0 var(--sp-6); gap: var(--sp-4); }
.landing .skyline { width: min(100%, 720px); height: auto; display: block; }
.landing .logo { width: min(100%, 560px); height: auto; display: block; margin-top: -1.5rem; }
.landing .tagline { font-family: var(--font-journal); color: var(--text-3); font-size: var(--fs-h3); letter-spacing: .02em; }
.landing .cta { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.landing .cta button { min-width: 9rem; min-height: 40px; }
.landing .tiles { display: grid; grid-template-columns: repeat(3, minmax(6rem, 9rem)); gap: .5rem; width: 100%; justify-content: center; }
.landing .tiles .stat { text-align: center; align-items: center; background: var(--bg-2); border-color: var(--line-2); }
.landing .foot { font-size: var(--fs-caption); color: var(--text-4); }
.hero { padding: var(--sp-10) 0 var(--sp-6); }
.hero h1 { font-size: var(--fs-display); }
.survivorcard { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: center; padding: var(--sp-5); border-top: 2px solid var(--accent); }
.survivorcard .name { font-family: var(--font-title); font-size: var(--fs-h1); color: var(--text-1); font-weight: 700; }
.survivorcard .kv { margin-top: .4rem; }
.survivorcard .actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; padding-top: var(--sp-3); border-top: 1px solid var(--line-1); }
@media (max-width: 767px) { .landing .tiles { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 캐릭터 생성, 상태 ---------- */
.colorbtn { width: 20px; height: 20px; min-height: 20px; min-width: 20px; border-radius: 999px; padding: 0; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-3); }
.colorbtn.active { border-color: var(--bg-1); box-shadow: 0 0 0 2px var(--text-1); }
/* 색상 원으로 직접 고르기 */
.cwheel-wrap { display: inline-flex; align-items: center; gap: .5rem; }
input.cwheel { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 2px solid var(--line-3); border-radius: 999px; background: transparent; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--bg-1) inset; }
input.cwheel::-webkit-color-swatch-wrapper { padding: 0; }
input.cwheel::-webkit-color-swatch { border: none; border-radius: 999px; }
input.cwheel::-moz-color-swatch { border: none; border-radius: 999px; }
input.cwheel:hover, input.cwheel:focus-visible { border-color: var(--text-1); outline: none; }
.cwheel-wrap.empty input.cwheel { opacity: .35; }
.cwheel-hex { font-size: var(--fs-caption); color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 4.2em; }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .4rem; }
.attr { display: flex; align-items: center; gap: .4rem; background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-2); padding: .25rem .4rem; }
.attr .lbl { flex: 1; font-size: var(--fs-caption); }
.attr .val { min-width: 1.5rem; text-align: center; font-weight: 700; font-family: var(--font-mono); color: var(--text-1); }
.attr button { min-height: 28px; min-width: 28px; padding: 0 .4rem; }
.journal { padding: .4rem .5rem; border-bottom: 1px solid var(--line-1); font-size: var(--fs-ui); display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; }
.journal:hover { background: var(--journal-hover); }
.journal.memo { border-left: 3px solid var(--journal-memo-line); background: var(--journal-memo-bg); }
.journal button.mini { min-height: 22px; padding: 0 .35rem; font-size: var(--fs-micro); }
.journal .row { margin-left: auto; gap: .2rem; }
.daysep { display: flex; align-items: center; gap: .5rem; color: var(--text-4); font-size: var(--fs-micro); font-family: var(--font-mono); letter-spacing: .1em; margin: .6rem 0 .2rem; }
.daysep::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* 빈사 화면 */
.dying { border-color: var(--raw-crimson); border-top: 3px solid var(--raw-crimson); background: linear-gradient(180deg, rgba(192,57,43,.08), transparent 40%), var(--bg-2); }
.dying h2 { color: var(--negative); font-family: var(--font-impact); font-size: var(--fs-display); letter-spacing: -.01em; margin-top: 0; }
.dying .deadline { font-family: var(--font-mono); font-size: var(--fs-h1); color: var(--text-1); }

/* ---------- 우 컬럼: 사람, 채팅 ---------- */
.people { display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--line-2); }
.people .phead { display: flex; align-items: center; gap: .4rem; padding: .5rem var(--sp-3); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); cursor: pointer; min-height: 38px; user-select: none; }
.people .phead .cnt { margin-left: auto; font-family: var(--font-mono); color: var(--text-4); letter-spacing: 0; }
.people .plist { overflow-y: auto; max-height: 32vh; padding: 0 .4rem .4rem; display: flex; flex-direction: column; gap: 1px; }
.people.collapsed .plist, .people.collapsed .popts { display: none; }
.prow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .45rem; padding: .28rem .5rem; border-radius: var(--r-2); font-size: var(--fs-caption); }
.prow:hover { background: var(--bg-3); }
.prow .pname { color: var(--text-1); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .ptitle { color: var(--clr-ivory); font-weight: 400; font-size: var(--fs-micro); }
.prow .pmeta { color: var(--text-4); font-size: var(--fs-micro); display: flex; gap: .3rem; align-items: center; white-space: nowrap; }
.prow .pres { width: 7px; height: 7px; border-radius: 999px; background: var(--text-4); flex: none; }
.prow .pres.online { background: var(--positive); } .prow .pres.away { background: var(--warning); }
.prow.self .pname { color: var(--clr-ivory); }
.chatdock { display: flex; flex-direction: column; min-height: 0; flex: 1; font-size: var(--fs-caption); background: var(--chat-bg); }
.chatdock .chead { display: flex; justify-content: space-between; align-items: center; gap: .3rem; padding: .3rem .5rem; border-bottom: 1px solid var(--chat-line); cursor: pointer; min-height: 40px; }
.chatdock .ctabs { display: flex; gap: .1rem; flex-wrap: wrap; }
.chatdock .ctabs button { min-height: 26px; padding: 0 .45rem; border-color: transparent; background: transparent; color: var(--text-4); font-size: var(--fs-micro); gap: .25rem; }
.chatdock .ctabs button::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--cc, var(--text-4)); opacity: .55; }
.chatdock .ctabs button.active { color: var(--text-1); background: var(--bg-3); border-color: var(--line-2); }
.chatdock .ctabs button.active::before { opacity: 1; }
.chatdock .cbody { padding: .4rem .5rem; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chatdock .clines { flex: 1; min-height: 0; height: 32vh; overflow-y: auto; display: flex; flex-direction: column; gap: .1rem; font-family: var(--font-mono); font-size: var(--fs-caption); padding-right: 2px; }
.chatdock .cline { line-height: 1.45; word-break: break-word; padding: .1rem .2rem; border-radius: 2px; }
.chatdock .cline:hover { background: var(--chat-hover); }
.chatdock .cline.act { cursor: pointer; }
.notiflist { max-height: none; overflow: visible; gap: .25rem; }
/* 알림 창: 헤더에 모두 확인, 아이콘 동그라미, 날짜 구분, 읽지 않음 띠 */
.modal .card.ntfm { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.ntfm > .mhead { gap: .4rem; }
.ntfm > .mhead .ntf-count { font-size: var(--fs-caption); color: var(--text-3); background: var(--bg-4); border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; }
.ntfm > .mhead .mact { flex: none; min-height: 28px; padding: .2rem .7rem; }
.ntf-day { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-caption); color: var(--text-4); margin: .55rem 0 .15rem; letter-spacing: .02em; }
.ntf-day:first-child { margin-top: 0; }
.ntf-day::after { content: ""; flex: 1; border-top: 1px solid var(--line-1); }
.ntf { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: .55rem; align-items: center; padding: .5rem .6rem .5rem .65rem; border-radius: var(--r-3); background: var(--ntf-bg); border: 1px solid var(--ntf-line); overflow: hidden; }
.ntf .ntf-ico { grid-row: 1 / span 3; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--bg-4); color: var(--text-3); align-self: start; }
.ntf .ntf-ico .ico { width: 15px; height: 15px; }
.ntf .ntf-title { font-weight: 600; font-size: var(--fs-ui); color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntf .ntf-time { font-size: var(--fs-caption); color: var(--text-4); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ntf .ntf-body { grid-column: 2 / span 2; font-size: var(--fs-caption); color: var(--text-2); line-height: 1.45; margin-top: .1rem; overflow-wrap: anywhere; }
.ntf .ntf-act { grid-column: 2 / span 2; margin-top: .35rem; }
.ntf.unread { background: var(--ntf-unread-bg); border-color: var(--line-2); cursor: pointer; }
.ntf.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ntf-unread-mark); }
.ntf.unread:hover { border-color: var(--line-3); }
.ntf.read { opacity: .58; }
.ntf.read .ntf-title { font-weight: 500; }
.ntf.urg_critical .ntf-ico { background: var(--ntf-critical-bg); color: var(--negative); }
.ntf.urg_critical.unread::before { background: var(--negative); }
.ntf.urg_action .ntf-ico { background: var(--ntf-action-bg); color: var(--warning); }
.ntf.urg_action.unread::before { background: var(--warning); }
.ntf.urg_quiet .ntf-ico { background: transparent; color: var(--text-4); }
.ntf-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.6rem 0; color: var(--text-4); font-size: var(--fs-caption); }
.ntf-empty .ico { width: 26px; height: 26px; opacity: .5; }
.chatdock .cline .t { color: var(--chat-time); font-size: var(--fs-micro); margin-right: .3rem; }
.chatdock .cline.sys { color: var(--chat-sys); font-style: italic; }
.chatdock .cline.blocked { opacity: .5; }
.chatdock .cline .who { font-weight: 700; }
.chatdock .cthreads { display: flex; gap: .2rem; flex-wrap: wrap; margin-bottom: .3rem; }
.chatdock .cinput { margin-top: .4rem; flex-wrap: nowrap; }
.chatdock .cinput input, .chatdock .cinput textarea.chatline { min-height: 34px; flex: 1; }
.chatdock .cinput textarea.chatline { height: 34px; resize: none; overflow: hidden; white-space: nowrap; line-height: 1.4; padding-top: .35rem; padding-bottom: .35rem; }
.chatdock .cinput button { min-height: 34px; }
.chatdock.collapsed .cbody { display: none; }
.chatdock.collapsed { flex: none; }
@media (min-width: 1024px) { .chatdock .clines { height: auto; } }
@media (max-width: 1023px) {
  .side { position: fixed; right: .5rem; bottom: 0; width: min(100vw - 1rem, 26rem); background: var(--side-bg); border: 1px solid var(--side-line); border-bottom: none; border-radius: var(--r-4) var(--r-4) 0 0; z-index: var(--z-sheet); box-shadow: var(--sh-2); }
  .side .people { display: none; }
  /* 모바일에서는 .side 높이가 정해져 있지 않아 flex: 1 이 내용만큼 늘어나 스크롤이 안 되므로 고정 높이로 둔다 */
  .chatdock .clines { flex: none; height: 34vh; max-height: calc(100vh - 12rem); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .side { max-height: calc(100vh - 1rem); }
}
@media (max-width: 767px) { .side { right: 0; width: 100vw; bottom: calc(56px + env(safe-area-inset-bottom)); border-radius: 0; max-height: calc(100vh - 56px - env(safe-area-inset-bottom)); } .chatdock .clines { flex: none; height: 30vh; } }
body[data-screen="game"] .side { display: flex; flex-direction: column; }
.tradecols { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 767px) { .tradecols { grid-template-columns: 1fr; } }

/* ---------- 탐사, 전투 로그 ---------- */
.replay { max-height: 50vh; overflow-y: auto; padding-right: 4px; font-family: var(--font-mono); font-size: var(--fs-log); line-height: 1.5; background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-2); padding: .4rem .5rem; gap: .1rem; }
/* 탐사 실시간 창: 일지처럼 촘촘하게. 왼쪽 시각 칸, 오른쪽 줄. 분위기 줄(효과 없음)은 한 단계 옅게, 실제 줄은 묶음 사이를 조금 띄운다 */
.lv { display: flex; flex-direction: column; gap: .45rem; }
.lv-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.lv-head strong { font-size: var(--fs-ui); font-weight: 600; color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-clock { font-size: var(--fs-caption); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-bar { height: 2px; background: var(--line-2); overflow: hidden; margin-top: -.15rem; }
.lv-bar span { display: block; height: 100%; background: var(--text-3); transition: width 1s linear; }
.lv-log { max-height: 58vh; min-height: 10rem; overflow-y: auto; overscroll-behavior: contain; font-family: var(--font-mono); font-size: var(--fs-log); line-height: 1.45; border-bottom: 1px solid var(--line-1); padding: .45rem 0 .4rem; }
.lv-ev { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: .45rem; }
.lv-ev:not(.amb) { margin: .3rem 0; }
.lv-ev:first-child { margin-top: 0; }
.lv-t { font-size: var(--fs-micro); line-height: 1.95; color: var(--text-4); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lv-lines .rl { padding: 0 0 0 .5rem; border-left-width: 2px; }
.lv-lines .rl.narr { color: var(--text-2); }
.lv-lines .rl.amb { color: var(--text-3); }
.lv-ev.amb:has(.cine) { margin: .3rem 0; }
.lv-lines .rl.amb.cine { color: var(--text-2); letter-spacing: .01em; }
.lv-lines .rl.fresh { animation: lvIn var(--dur-4) var(--ease-std); }
@keyframes lvIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.lv-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; font-size: var(--fs-caption); color: var(--text-3); }
.lv-state.wait::after { content: ''; display: inline-block; width: .42em; height: .9em; margin-left: .4em; vertical-align: -.1em; background: currentColor; animation: lvCaret 1.1s steps(1) infinite; }
@keyframes lvCaret { 50% { opacity: 0; } }
.lv-hp { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-auto { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-caption); color: var(--text-3); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .lv-lines .rl.fresh, .lv-state.wait::after { animation: none; } }
.rl { padding: 1px 0 1px 8px; border-left: 3px solid transparent; }
.rl.narr { color: var(--rl-narr); }
.rl.combat { color: var(--rl-combat); }
/* 내가 준 피해와 입은 피해를 색으로 가른다 */
.rl.combat.side-me { color: var(--info); }
.rl.combat.side-foe { color: var(--negative); }
.rl.gain { color: var(--rl-gain); }
.rl.result { font-weight: 700; color: var(--rl-result); border-left-color: var(--line-3); }
.rl.emph { border-left-color: var(--raw-crimson); color: var(--rl-emph); }
.pvp-lines { max-height: 50vh; overflow-y: auto; font-family: var(--font-mono); font-size: var(--fs-log); }
.pvp-line { margin: .15rem 0; }
.pvp-line.narr { color: var(--text-4); }
.pvp-line.result { color: var(--clr-mustard); }
.pvp-line.emph { font-weight: 700; }
/* 관전 띠: 알림 토스트 위에 뜬다 */
.toast.tap { cursor: pointer; }
.toast.tap::after { content: '  ›'; color: var(--text-3); }
.toast.pvpwatch { bottom: 4.8rem; display: flex; gap: .5rem; align-items: center; width: max-content; max-width: min(92vw, 32rem); }
.toast.pvpwatch button { flex: none; white-space: nowrap; }
@media (max-width: 767px) { .toast.pvpwatch { bottom: calc(64px + 3.6rem + env(safe-area-inset-bottom)); } }
.activity { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; }
.activity .ringwrap { position: relative; width: 56px; height: 56px; }
.activity .ringwrap svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.activity .ringwrap .bg { fill: none; stroke: var(--line-2); stroke-width: 4; }
.activity .ringwrap .fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.activity .ringwrap .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-1); }
.activity .what { font-weight: 600; color: var(--text-1); }
.activity .when { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-3); }

/* 행상인, 라이선스 */
.merchant .grid2 { align-items: start; }
.merchant-card { border-left: 3px solid var(--clr-mustard); }
.doctor-card { border-left: 3px solid var(--clr-russet); }
.license pre { white-space: pre-wrap; font-size: var(--fs-caption); }

/* 스크롤바 */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 4px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--accent-dim); color: var(--text-1); }
/* 설정 소리 탭 */
input[type="range"] { accent-color: var(--accent); flex: 1 1 140px; min-width: 120px; }
.sndrow { align-items: center; }
.sndrow label, .sndrow .lbl { min-width: 5.5em; }

/* 관리 시트 폼 편집기 */
.fld { display: flex; flex-direction: column; gap: .15rem; }
input.num { width: 6.5rem; }
input.pick { min-width: 14rem; flex: 1; }
.tag .mini.ghost { min-height: 20px; padding: 0 .3rem; margin-left: .2rem; }

/* ---------- 장소 장면 레이어 (시간대 하늘, 지형 실루엣, 날씨 입자) ---------- */
.placehead > * { position: relative; z-index: 1; }
.placehead .ph-scene { position: absolute; left: 0; top: 0; width: 100%; height: 150px; z-index: 0; pointer-events: none; opacity: .62; -webkit-mask-image: linear-gradient(#000 45%, transparent 100%); mask-image: linear-gradient(#000 45%, transparent 100%); }
.placehead .ph-name { text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.placehead .ph-glyph { background: rgba(11,11,12,.7); }
.ph-scene .land path { fill: #000; opacity: .72; }
.ph-scene .land path + path { opacity: .9; }
.ph-scene .sun { fill: var(--scene-sun); opacity: .85; filter: drop-shadow(0 0 6px rgba(240,217,168,.7)); }
.ph-scene .moon { fill: var(--scene-moon); opacity: .8; filter: drop-shadow(0 0 5px rgba(216,221,232,.5)); }
.ph-scene .stars circle { fill: #fff; opacity: .7; animation: twinkle 4s ease-in-out infinite; }
.ph-scene .drop { stroke: rgba(200,215,235,.55); stroke-width: .8; animation: rainfall 1s linear infinite; }
.ph-scene .flake { fill: rgba(255,255,255,.75); animation: snowfall 8s linear infinite; }
.ph-scene .fog { fill: rgba(190,195,205,.16); animation: fogdrift 30s ease-in-out infinite alternate; }
.ph-scene .cloud { fill: rgba(120,128,140,.28); animation: clouddrift 70s linear infinite; }
.ph-scene .gust { stroke: rgba(200,205,215,.35); stroke-width: .8; animation: gust 1.4s linear infinite; }
.ph-scene .gust.sand { stroke: rgba(214,178,120,.45); }
.ph-scene .flash { fill: #fff; opacity: 0; animation: lightning 9s linear infinite; }
.ph-scene .heat { fill: rgba(240,170,90,.12); animation: heat 3s ease-in-out infinite alternate; }
.ph-scene.w-sandstorm .sky { filter: sepia(.4) brightness(.9); }
.ph-scene.w-coldsnap .sky, .ph-scene.w-snow .sky, .ph-scene.w-blizzard .sky { filter: saturate(.6) brightness(1.05); }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
/* 빗줄기 기울기(가로 1 : 세로 4)와 떨어지는 방향을 맞춘다. 줄은 오른쪽 40px 밖에서도 시작해 왼쪽으로 흘러든다 */
@keyframes rainfall { from { transform: translate(4px, -16px); } to { transform: translate(-37.5px, 150px); } }
@keyframes snowfall { from { transform: translate(0, -6px); } 50% { transform: translate(8px, 70px); } to { transform: translate(-4px, 150px); } }
@keyframes fogdrift { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
@keyframes clouddrift { from { transform: translateX(-120px); } to { transform: translateX(420px); } }
@keyframes gust { from { transform: translateX(-40px); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(440px); opacity: 0; } }
@keyframes lightning { 0%, 88%, 100% { opacity: 0; } 89% { opacity: .55; } 90% { opacity: 0; } 92% { opacity: .35; } 93% { opacity: 0; } }
@keyframes heat { from { opacity: .4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ph-scene * { animation: none !important; } }

/* 상단 바 낮밤 다이얼 */
.topbar .clock .daydial { display: inline-flex; align-items: flex-end; margin-right: .1rem; }
.topbar .clock .daydial svg { width: 30px; height: 18px; overflow: visible; display: block; }
.daydial .arc { fill: none; stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 2 2; }
.daydial .hz { stroke: var(--line-2); stroke-width: 1; }
.daydial .body.sun { fill: var(--scene-sun); filter: drop-shadow(0 0 3px rgba(240,217,168,.8)); }
.daydial .body.moon { fill: var(--scene-moon); }

/* ---------- 상태 스택, 위험 비네트, 선택 사건 ---------- */
.ststack { display: flex; flex-wrap: wrap; gap: .25rem; margin: .1rem 0 .4rem; }
.stchip { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .45rem 0 .35rem; height: 1.35rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-1); font-size: var(--fs-micro); color: var(--text-2); --sc: var(--band-warn); white-space: nowrap; }
.stchip.pos { --sc: var(--positive); color: var(--positive); border-color: var(--positive); background: var(--stchip-pos-bg); }
.stchip.neg { --sc: var(--negative); color: var(--negative); border-color: var(--negative); background: var(--stchip-neg-bg); }
.stchip.pos .left, .stchip.neg .left { color: inherit; opacity: .8; }
.stchip .dot { width: .45rem; height: .45rem; border-radius: 999px; background: var(--sc); box-shadow: 0 0 6px var(--sc); flex: none; }
.stchip .left { color: var(--text-4); font-family: var(--font-mono); }
.stchip.more { color: var(--text-4); }
body.vig-hp::after, body.vig-mind::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 4; animation: vigPulse 2.8s ease-in-out infinite; }
body.vig-hp::after { box-shadow: inset 0 0 140px 20px var(--vig-hp); }
body.vig-mind::after { box-shadow: inset 0 0 140px 20px var(--vig-mind); }
body.vig-hp.vig-mind::after { box-shadow: inset 0 0 140px 20px var(--vig-hp), inset 0 0 60px 10px var(--vig-mind); }
@keyframes vigPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.evcard { border-left: 3px solid var(--clr-mustard); }
.evcard .evname { font-family: var(--font-title); font-size: var(--fs-h3); font-weight: 700; color: var(--text-1); }
.evcard .evintro { font-family: var(--font-journal); line-height: 1.7; color: var(--text-2); }
.evcard .evchoice { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; width: 100%; text-align: left; justify-content: flex-start; background: var(--bg-1); border-color: var(--line-2); padding: .45rem .7rem; min-height: 38px; }
.evcard .evchoice:disabled { opacity: .55; }
.evcard .evfx { gap: .25rem; }
@media (prefers-reduced-motion: reduce) { body.vig-hp::after, body.vig-mind::after { animation: none; } }

/* 이동수단, 연속 감소 */
.decayline { margin: .1rem 0 .3rem; line-height: 1.4; }
.vehcard .veh { border-left-color: var(--line-3); }
.vehcard .veh.mine { border-left-color: var(--clr-moss); }
.vehcard .veh.broken { border-left-color: var(--clr-crimson); }
.vehcard .veh.abandoned { border-left-color: var(--clr-mustard); }
.vehcard .veh .row + .row { margin-top: .3rem; }
.vehopt { background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-2); padding: .4rem .6rem; }
.vehopt label { display: flex; align-items: center; gap: .4rem; cursor: pointer; }

/* 탐사 중 지도: 열람만 가능, 현재 위치에 탐사 표식 */
.map.locked .mnode.can { cursor: default; }
.map.locked .mnode.can:hover .core { fill: var(--bg-3); stroke: var(--text-2); }
.map.locked .mnode.can:hover text { fill: var(--text-2); }
.map .mnode.exploring .core { stroke: var(--clr-mustard); }
.map .mnode.exploring .sweep { fill: none; stroke: var(--clr-mustard); stroke-width: 2.2; stroke-dasharray: 14 70; stroke-linecap: round; opacity: .9; transform-origin: center; transform-box: fill-box; animation: mapSweep 2.8s linear infinite; }
.map .dot.here.exploring { stroke: var(--clr-mustard); stroke-width: 2; animation: mapBlink 1.6s ease-in-out infinite; }
.map .mapstate { position: absolute; top: .5rem; right: .5rem; display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .6rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--clr-mustard); color: var(--text-1); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .1em; pointer-events: none; }
.map .mapstate i { width: 7px; height: 7px; border-radius: 999px; background: var(--clr-mustard); animation: mapBlink 1.6s ease-in-out infinite; }
.maplegend i.exploring { border-color: var(--clr-mustard); background: var(--clr-mustard); }
@keyframes mapSweep { to { transform: rotate(360deg); } }
@keyframes mapBlink { 50% { opacity: .3; } }

/* 포트레잇(외모 커스텀): 13개 캔버스 레이어, 눈 깜빡임은 CSS step 애니메이션 */
.portrait-wrap { position: relative; width: 100%; aspect-ratio: 345 / 235; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.portrait-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.portrait-wrap .pl-eyeline-closed { opacity: 0; animation: ptBlink 4.5s step-end infinite; }
.portrait-wrap .pl-sclera, .portrait-wrap .pl-iris-l, .portrait-wrap .pl-iris-r, .portrait-wrap .pl-eyeline-open, .portrait-wrap .pl-sheen { animation: ptBlinkInv 4.5s step-end infinite; }
@keyframes ptBlink { 0%, 93% { opacity: 0; } 93.1%, 96.5% { opacity: 1; } 96.6%, 100% { opacity: 0; } }
@keyframes ptBlinkInv { 0%, 93% { opacity: 1; } 93.1%, 96.5% { opacity: 0; } 96.6%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .portrait-wrap canvas { animation: none !important; } }
.selfportrait { margin: 0 0 .6rem; }
.profileportrait { max-width: 280px; margin: 0 auto .4rem; }
.pt-editor { display: grid; gap: .6rem; }
.pt-editor .portrait-wrap { max-width: 280px; margin: 0 auto; }
.pt-grid { display: grid; gap: .3rem; max-height: 46vh; overflow-y: auto; padding-right: .2rem; }
.pt-row { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.pt-row label { display: inline-block; min-width: 6.2rem; margin: 0; font-size: var(--fs-caption); color: var(--text-3); }
.pt-row .pt-val { min-width: 3.4rem; text-align: center; font-size: var(--fs-caption); color: var(--text-1); }
.pt-row input[type=color] { width: 40px; height: 26px; padding: 0; border: 1px solid var(--line-3); border-radius: 6px; background: var(--bg-3); cursor: pointer; }

/* == 실루엣, 단기 탐사 == */
.silhcard { display: flex; align-items: center; gap: .6rem; padding: .2rem .4rem; }
.silh { width: 92px; height: 116px; flex: none; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.silhcap { display: flex; flex-direction: column; gap: .15rem; }
.silh .ground { fill: var(--text-4); opacity: .25; }
.silh .head, .silh .torso, .silh .chest { fill: var(--text-2); }
.silh .limb { fill: none; stroke: var(--text-2); stroke-linecap: round; stroke-linejoin: round; }
.silh .bag { fill: var(--text-3); }
.silh .weapon { fill: none; stroke: var(--text-1); stroke-linecap: round; }
.silh .bandage { fill: none; stroke: #ECE8DE; stroke-width: 3.5; stroke-linecap: round; opacity: .95; }
.silh .breath { fill: var(--text-3); opacity: 0; animation: breathpuff 2.7s ease-out infinite; }
.silh .body { transform-box: fill-box; transform-origin: 50% 100%; animation: silhbob 4.2s ease-in-out infinite; }
.silh .chest { transform-box: fill-box; transform-origin: 50% 90%; animation: breathe 4.2s ease-in-out infinite; }
.silh .head { transform-box: fill-box; transform-origin: 50% 100%; animation: headnod 4.2s ease-in-out infinite; }
@keyframes headnod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.5deg) translateY(.6px); } }
.silh.tired .body, .silh.tired .chest { animation-duration: 1.4s; }
.silh.hurt .head, .silh.hurt .torso, .silh.hurt .chest { fill: var(--text-3); }
.silh.hurt .limb { stroke: var(--text-3); }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07, 1.1); } }
@keyframes silhbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes breathpuff { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: .35; } 100% { opacity: 0; transform: translate(16px, -18px) scale(1.7); } }
/* 소지품 탭 */
.invtabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.invtabs button.active { border-color: var(--accent); color: var(--text-1); }
/* 장면, 전투 */
.cscene svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.cscene .sky { fill: var(--scene-combat-sky); }
.cscene .ground { fill: var(--scene-combat-ground); }
.cscene .fog { fill: #cfd3d6; opacity: .07; animation: fogdrift 10s ease-in-out infinite alternate; }
.cscene .fig .head, .cscene .fig .torso, .cscene .fig .chest, .cscene .fig ellipse, .cscene .fig circle { fill: var(--scene-combat-fig); }
.cscene .fig .limb { fill: none; stroke: var(--scene-combat-fig); stroke-linecap: round; stroke-linejoin: round; }
.cscene .fig .weapon { fill: none; stroke: #1c1f25; stroke-linecap: round; }
.cscene .fig .eye { fill: var(--scene-combat-eye); }
.cscene .fig.enemy .head, .cscene .fig.enemy .torso, .cscene .fig.enemy .chest, .cscene .fig.enemy ellipse, .cscene .fig.enemy circle { fill: var(--scene-combat-enemy); }
.cscene .fig.enemy .limb { stroke: var(--scene-combat-enemy); }
.cscene .fig.gone { opacity: .18; }
.cscene .lurch { transform-box: fill-box; transform-origin: 50% 100%; animation: lurch 1.5s ease-in-out infinite; }
.cscene .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 3s ease-in-out infinite; }
.cscene .body { transform-box: fill-box; transform-origin: 50% 100%; animation: silhbob 3.6s ease-in-out infinite; }
.cscene .crate { fill: #2a2418; stroke: #4a3f2a; }
.cscene .crate-line { stroke: #4a3f2a; fill: none; }
.cscene .door { fill: #1d1f24; } .cscene .door-in { fill: #08090b; }
@keyframes lurch { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-4px) rotate(-3deg); } }
@keyframes sway { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes fogdrift { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
.combat-card { width: min(560px, 100%); }
.hpbar { position: relative; flex: 1; min-width: 80px; height: 12px; background: var(--bg-4); border-radius: 6px; overflow: hidden; }
.hpbar span { position: absolute; inset: 0 auto 0 0; background: var(--vital-hp); transition: width .35s ease; }
.hpbar.enemy span { background: var(--clr-russet); }
.hpbar i { position: absolute; inset: 0; font-style: normal; font-size: 9px; line-height: 12px; text-align: center; color: var(--hpbar-text); text-shadow: 0 0 2px var(--hpbar-shadow); }
.erow { display: flex; align-items: center; gap: .5rem; }
.erow.gone { opacity: .45; }
.clog { max-height: 150px; overflow: auto; border-top: 1px solid var(--line-1); padding-top: .3rem; }
.clog p { margin: .15rem 0; }
.cacts { align-items: center; }
.shake-hit { animation: shakeHit 140ms ease-out; }
.shake-crit { animation: shakeCrit 280ms ease-out; }
.flash-hurt { animation: flashHurt 340ms ease-out; }
@keyframes shakeHit { 0% { transform: translate(0, 0); } 25% { transform: translate(-6px, 2px); } 50% { transform: translate(6px, -2px); } 75% { transform: translate(-3px, 1px); } 100% { transform: translate(0, 0); } }
@keyframes shakeCrit { 0% { transform: translate(0, 0) scale(1); } 20% { transform: translate(-10px, 4px) scale(1.02); } 40% { transform: translate(10px, -4px); } 60% { transform: translate(-6px, 3px); } 80% { transform: translate(4px, -2px); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes flashHurt { 0% { box-shadow: inset 0 0 0 999px rgba(218, 101, 89, .45); } 100% { box-shadow: inset 0 0 0 999px rgba(218, 101, 89, 0); } }
/* 캠프 */
.camp-art svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.camp-art .sky { fill: var(--scene-camp-sky); }
.camp-art .ground { fill: var(--scene-camp-ground); }
.camp-art .fence { fill: #3b3227; }
.camp-art .tent { fill: var(--scene-camp-tent); }
.camp-art .tent-door { fill: #0d1210; }
.camp-art .log { stroke: #4a3520; fill: none; stroke-linecap: round; }
.camp-art .flame { fill: var(--scene-camp-flame); transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .45s ease-in-out infinite alternate; }
.camp-art .flame.inner { fill: var(--scene-camp-flame-inner); animation-duration: .32s; }
.camp-art .ember { fill: #f3b04a; animation: emberRise 2.4s linear infinite; opacity: 0; }
.camp-art .glow { fill: var(--scene-camp-flame); opacity: .12; }
@keyframes flicker { from { transform: scaleY(1) skewX(-3deg); } to { transform: scaleY(1.18) skewX(4deg); } }
@keyframes emberRise { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .8; } 100% { opacity: 0; transform: translateY(-40px) translateX(6px); } }
/* 지도 라벨 가독 */
.mnode text, .inset text { paint-order: stroke; stroke: var(--bg-1); stroke-width: 3px; stroke-linejoin: round; }
/* 처음 안내 */
.guide { position: fixed; inset: 0; z-index: 1000; }
.ghole { position: absolute; border-radius: 8px; box-shadow: 0 0 0 9999px var(--guide-dim); border: 2px solid var(--accent); transition: all .3s ease; pointer-events: none; }
.gtip { position: absolute; width: 296px; max-width: calc(100vw - 16px); max-height: calc(100vh - 80px); overflow-y: auto; z-index: 1001; }
.gtip .garrow { position: absolute; top: -8px; left: 20px; width: 14px; height: 14px; background: var(--bg-2); transform: rotate(45deg); border-left: 1px solid var(--line-1); border-top: 1px solid var(--line-1); }
.gtip.up .garrow { top: auto; bottom: -8px; transform: rotate(225deg); }
.tabs .ghelp { margin-left: auto; min-width: 34px; }
@media (prefers-reduced-motion: reduce) { .silh *, .cscene *, .camp-art *, .shake-hit, .shake-crit, .flash-hurt { animation: none !important; } }
.goals .row.done { opacity: .55; text-decoration: line-through; }

/* 새 무전, 호명 강조 */
.chatflash { animation: chatFlash 1.2s ease-out 1; }
@keyframes chatFlash { 0% { box-shadow: inset 0 0 0 2px var(--accent); } 60% { box-shadow: inset 0 0 0 2px var(--accent); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
.chatdock .ctabs button .badge { background: var(--chat-badge-bg); color: var(--chat-badge-text); border-radius: 999px; padding: 0 .3rem; font-size: var(--fs-micro); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .chatflash { animation: none; } }

/* 공지 접고 펼치기 */
.noticehead { cursor: pointer; justify-content: space-between; align-items: baseline; }
.noticehead:hover strong { text-decoration: underline; }
.noticebody { white-space: pre-wrap; word-break: break-word; }
/* 캠프 공지, 게시글, 설명의 줄바꿈 보존 */
.prewrap { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

.card.folded > :not(.fhead) { display: none; }
.fhead .fold { margin-left: auto; }
.noticehead { cursor: pointer; user-select: none; }
.noticehead .nchev { margin-left: auto; color: var(--text-3); display: inline-flex; align-items: center; gap: .25rem; }
.noticehead .nchev .ico { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-std); }
.noticehead .nchev.folded .ico { transform: rotate(-90deg); }
.tiny { font-size: .78em; }
td, .cline, .card p, .msg { overflow-wrap: anywhere; word-break: break-word; }
.thread .admin { border-left: 3px solid var(--moss, #27AE60); padding-left: 6px; }
.chatdock .cbody { position: relative; }
.chatdock .scrolldown { position: absolute; right: .8rem; bottom: 3.2rem; z-index: 3; box-shadow: var(--sh-2); }
.chatdock .scrolldown[hidden] { display: none; }
.chatdock .clines .more { align-self: center; }
.people .popts { gap: 4px; padding: 2px .5rem 4px; flex-wrap: wrap; }
.people .popts .pfilter { min-height: 22px; padding: 0 .45rem; font-size: var(--fs-micro); background: transparent; border-color: var(--line-2); color: var(--text-4); font-weight: 400; }
.people .popts .pfilter:hover { color: var(--text-2); border-color: var(--line-3); background: var(--bg-3); }
.people .popts .pfilter.active { background: var(--bg-3); border-color: var(--text-3); color: var(--text-1); font-weight: 600; }
.cline.gm .who { color: var(--chat-gm); font-weight: 600; }
/* 바탕과 밝기가 가까운 이름색은 얇은 상자로 구분한다(밝은 테마의 흰색, 회색, 밝은 노랑). 색 자체는 그대로 */
.cline .who.hi { background: rgba(0, 0, 0, 0.58); padding: 0 0.3em; border-radius: 0.3em; box-decoration-break: clone; }
:root[data-theme="dark"] .cline .who.hi { background: rgba(255, 255, 255, 0.82); }
.gmbody { white-space: pre-wrap; }
.linkish { cursor: pointer; text-decoration: underline dotted; }
.stchip.act, .notif.act { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* 무기로 끝내기(상태 탭 끝내기 카드의 둘째 블록) */
.endweapon { margin-top: .5rem; padding-top: .55rem; border-top: 1px solid var(--line-1); }
.endweapon h4 { margin: 0; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.endweapon label { cursor: pointer; margin-bottom: 0; color: var(--text-2); }
.endweapon label.muted { cursor: default; }
.endweapon label strong { color: var(--text-1); }

/* ---------- 평면 무채색(그라데이션 없음), 카드 문법(아이콘 헤더 + 색띠 + 접기), 구역/벤토, 본인 패널, 프로필, 지도 지형, 캠프 게시판 ---------- */
body { background: var(--bg-1); }
.tag { font-family: var(--font-body); height: 1.35rem; padding: 0 .45rem; letter-spacing: 0; }
.tag.moss { color: var(--clr-moss); border-color: color-mix(in srgb, var(--clr-moss) 40%, transparent); background: color-mix(in srgb, var(--clr-moss) 9%, var(--bg-1)); }
.tag.mustard { color: var(--clr-mustard); border-color: color-mix(in srgb, var(--clr-mustard) 40%, transparent); background: color-mix(in srgb, var(--clr-mustard) 9%, var(--bg-1)); }
.tag.crimson { color: var(--clr-crimson); border-color: color-mix(in srgb, var(--clr-crimson) 40%, transparent); background: color-mix(in srgb, var(--clr-crimson) 9%, var(--bg-1)); }
.tag.sky { color: var(--clr-sky); border-color: color-mix(in srgb, var(--clr-sky) 40%, transparent); background: color-mix(in srgb, var(--clr-sky) 9%, var(--bg-1)); }
.tag.violet { color: var(--clr-violet); border-color: color-mix(in srgb, var(--clr-violet) 40%, transparent); background: color-mix(in srgb, var(--clr-violet) 9%, var(--bg-1)); }
.tag.teal { color: var(--clr-teal); border-color: color-mix(in srgb, var(--clr-teal) 40%, transparent); background: color-mix(in srgb, var(--clr-teal) 9%, var(--bg-1)); }
.tag.ivory { color: var(--clr-ivory); border-color: var(--accent-line); background: var(--accent-dim); }
.card > h3:first-child, .card > .row:first-child > h3:first-child { font-size: var(--fs-ui); font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text-1); gap: .5rem; border-bottom: none; padding-bottom: .15rem; margin-bottom: .45rem; }
.card > .row:first-child { border-bottom: none; }
.card[data-k] { --ac: var(--text-3); }
.card[data-k] > h3:first-child > .ico:first-child, .card[data-k] > .row:first-child > h3:first-child > .ico:first-child, .mapcard .maphead h3 > .ico:first-child { width: 26px; height: 26px; padding: 5px; border-radius: var(--r-2); background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line-2); stroke-width: 1.7; }
.card > h3:first-child .cmeta { margin-left: auto; font-size: var(--fs-micro); color: var(--text-4); font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; letter-spacing: 0; }
.card > h3:first-child .cmeta .ico.chev { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-std); }
.card.collapsible > h3:first-child { cursor: pointer; user-select: none; }
.card.collapsed > :not(h3:first-child) { display: none !important; }
.card.collapsed > h3:first-child { margin-bottom: 0; padding-bottom: 0; }
.card.collapsed > h3:first-child .cmeta .ico.chev { transform: rotate(-90deg); }
.mapcard .maphead h3 { font-size: var(--fs-ui); font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text-1); gap: .5rem; }
.mapcard .maphead .mzoom { min-height: 28px; padding: 0 .45rem; }
.zone { display: flex; align-items: center; gap: .6rem; margin: var(--sp-4) 0 var(--sp-2); }
.zone h4 { font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 700; display: flex; gap: .4rem; align-items: center; margin: 0; }
.zone hr { flex: 1; border: none; border-top: 1px solid var(--line-2); margin: 0; }
.zone .cnt { font-size: var(--fs-micro); color: var(--text-4); font-variant-numeric: tabular-nums; }
.pnl-main { container-type: inline-size; }
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.bento > .span2 { grid-column: span 2; }
.bento > p { grid-column: span 2; margin: 0; }
@container (max-width: 620px) { .bento { grid-template-columns: 1fr; } .bento > .span2, .bento > p { grid-column: auto; } }
/* 본인 패널 */
.pnl-self-card .selfportrait { border-radius: var(--r-3); background: var(--bg-3); border: 1px solid var(--line-2); overflow: hidden; margin-bottom: .6rem; }
@media (min-width: 768px) {
.pnl-self-card .gauges { gap: .45rem; }
.pnl-self-card .gauge { grid-template-columns: 24px 1fr auto; grid-template-areas: "lbl track val"; align-items: center; gap: .5rem; }
.pnl-self-card .gauge .g-head { display: contents; }
.pnl-self-card .gauge .g-head .lbl { grid-area: lbl; width: 24px; height: 24px; border-radius: var(--r-2); background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 0; }
.pnl-self-card .gauge .g-head .lbl .ico { width: 14px; height: 14px; color: var(--gv); }
.pnl-self-card .gauge .g-head .band { display: none; }
.pnl-self-card .gauge .g-head .val { grid-area: val; font-family: var(--font-body); font-weight: 700; font-size: var(--fs-caption); min-width: 3.6rem; text-align: right; }
.pnl-self-card .g-track { grid-area: track; height: 9px; border-radius: 2px; }
.pnl-self-card .g-fill { border-radius: 2px; }
}
.stat { background: var(--bg-2); }
.stat .v { font-family: var(--font-body); font-weight: 700; }
/* 지도: 종이 무늬, 불규칙 지형 등고선, 연한 실선 길 */
.map .mpaper { fill: var(--map-bg); } .map .mdot { fill: var(--line-2); } .map .mhatch { stroke: var(--line-1); stroke-width: 1.2; } .map .mtex { stroke: var(--line-2); stroke-width: 1; stroke-linecap: round; fill: none; }
.map .medge { stroke: var(--map-edge); stroke-width: 1.2; stroke-dasharray: none; stroke-linecap: round; stroke-opacity: 1; }
.map .medge.here { stroke: var(--map-here); stroke-dasharray: none; stroke-width: 1.6; stroke-opacity: .85; }
.map .land { fill: var(--map-land); stroke: var(--map-land-line); stroke-width: 1.2; stroke-dasharray: none; opacity: 1; }
.map .land.c2 { fill: var(--bg-3); stroke: var(--line-2); stroke-width: .8; }
.map .land.c3 { fill: url(#mtex); stroke: var(--line-2); stroke-width: .7; }
.map .land.shadow { fill: none; stroke: var(--map-here); stroke-width: .6; stroke-opacity: .12; }
.map .mnode .halo { fill: var(--map-here); fill-opacity: .07; }
.map .mnode .ring { stroke-dasharray: none; }
.map .mnode .core { fill: var(--map-node); }
.map.big { aspect-ratio: 16 / 10; border-radius: var(--r-3); overflow: hidden; border: 1px solid var(--line-2); }
.modal .card.mapmodal { padding: var(--sp-3) var(--sp-4); }
/* 캠프 게시판 */
.btabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.btab { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .45rem; border-radius: var(--r-3); border: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--fs-caption); color: var(--text-2); cursor: pointer; --ac: var(--text-3); min-height: 0; }
.btab .bic { width: 22px; height: 22px; border-radius: var(--r-2); display: flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--text-2); }
.btab .bic .ico { width: 13px; height: 13px; }
.btab .n { color: var(--text-4); font-size: var(--fs-micro); font-variant-numeric: tabular-nums; }
.btab.active { border-color: var(--accent); background: var(--accent-dim); color: var(--text-1); font-weight: 600; }
.btab.locked { opacity: .55; }
.postlist { --ac: var(--text-3); }
.post { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px 10px 16px; border: 1px solid var(--line-2); background: var(--bg-2); border-radius: var(--r-3); cursor: pointer; overflow: hidden; transition: border-color .12s, background .12s, transform .12s; }
.post::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ac); opacity: .55; }
.post:hover, .post:focus-visible { border-color: var(--line-3); background: var(--bg-3); outline: none; transform: translateX(1px); }
.post:hover::before, .post:focus-visible::before { opacity: 1; }
.post .av { width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h, 30) 28% 30%); color: var(--text-1); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-caption); flex-shrink: 0; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.post.sys .av { background: var(--bg-4); color: var(--text-3); border-radius: var(--r-3); }
.post .pb { min-width: 0; }
.post .t { font-weight: 600; color: var(--text-1); font-size: var(--fs-ui); display: flex; gap: .4rem; align-items: center; min-width: 0; }
.post .t .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post .s { font-size: var(--fs-micro); color: var(--text-4); margin-top: 3px; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.post .s .who { color: var(--text-3); }
.post .s .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); display: inline-block; }
.post .s .ed, .post .s .vw { color: var(--text-4); opacity: .8; }
.post .cm { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-micro); color: var(--text-4); padding: .25rem .55rem; border-radius: 999px; background: var(--bg-1); border: 1px solid var(--line-1); }
.post .cm .ico { width: 12px; height: 12px; }
.post .cm b { color: var(--text-3); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.post .cm.has { color: var(--text-2); border-color: var(--line-2); }
.post .cm.has b { color: var(--text-1); }
.post.pin { --ac: var(--clr-mustard); background: color-mix(in srgb, var(--clr-mustard) 6%, var(--bg-2)); }
.post.pin::before { opacity: 1; }
.pre.pin { background: color-mix(in srgb, var(--clr-mustard) 35%, var(--bg-4)); color: var(--text-1); }
/* 캠프 창고 카드 */
.store .shead { display: flex; flex-direction: column; gap: 4px; }
.store .sname { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.store .sname h3 { margin: 0; }
.store .sname { cursor: pointer; }
.long-explore h3 .hist-btn { margin-left: auto; font-size: var(--fs-micro); min-height: 24px; }
.row > .grow { flex: 1 1 auto; }
.winfo-btn { cursor: pointer; }
.winfo-btn .wname, strong.winfo-btn { text-decoration: underline dotted var(--text-4); text-underline-offset: 3px; }
.winfo { margin: 2px 0 8px; padding: 8px 12px; border-left: 2px solid var(--line-3); background: var(--bg-3); border-radius: var(--r-2); }
.winfo ul { margin: 2px 0 0; padding-left: 1.1rem; }
.winfo p { margin: 0; }
.dep-row > input { margin-left: auto; }
.store .sctl { margin-left: auto; display: flex; gap: 2px; }
.store .sctl button { min-height: 26px; min-width: 28px; padding: 0 .35rem; color: var(--text-3); }
.store .sctl .sfold svg { transition: transform var(--dur-2, .2s) var(--ease-std, ease); }
.store.sfolded .sctl .sfold svg { transform: rotate(-90deg); }
/* 접어 놓아도 반입은 되게 .sactions 는 남긴다. 검색 중이면 접힌 창고도 품목을 보인다 */
.store.sfolded .sdesc, .store.sfolded .smeta, .store.sfolded .sitems, .store.sfolded .sempty { display: none; }
.searching .store.sfolded .sitems { display: flex; }
.store .sactions .mini:not(:first-child) { }
.ssearch { flex: 1 1 10em; min-width: 8em; min-height: 0; padding: 4px 8px; font-size: var(--fs-caption); }
.store .sitem .qwrap { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.store .sitem .qbtns { display: inline-flex; gap: 2px; }
.store .sitem .qbtns .mini { padding: 1px 6px; min-height: 0; font-size: var(--fs-micro); }
.store .sitem .sn .nm.plink { cursor: pointer; }
.store .sdesc { margin: 0; font-size: var(--fs-caption); line-height: 1.45; color: var(--text-3); }
.store .smeta { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: var(--fs-micro); color: var(--text-4); margin-top: 2px; }
.store .smeta .lbl { margin-right: .1rem; }
.store .sfill { height: 4px; border-radius: 2px; background: var(--bg-4); overflow: hidden; margin-top: 4px; }
.store .sfill i { display: block; height: 100%; background: var(--accent); opacity: .7; border-radius: 2px; }
.store.locked .sfill i { background: var(--negative); }
.store .sitems { display: flex; flex-direction: column; border: 1px solid var(--line-1); border-radius: var(--r-2); overflow: hidden; }
.store .sitem { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; font-size: var(--fs-ui); border-top: 1px solid var(--line-1); background: var(--bg-2); }
.store .sitem:first-child { border-top: 0; }
.store .sitem:nth-child(even) { background: var(--bg-1); }
.store .sitem.picked { background: var(--accent-dim); }
.store .sitem .sn { display: flex; align-items: baseline; gap: .35rem; min-width: 0; }
.store .sitem .sn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.store .sitem .sn .qty { color: var(--text-3); font-family: var(--font-mono); font-size: var(--fs-micro); }
.store .sitem .sm { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: var(--fs-caption); min-width: 0; }
.store .sitem input[type=number] { width: 4.2em; min-height: 0; padding: 2px 4px; font-size: var(--fs-caption); text-align: right; }
.store .sempty { margin: 0; padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-2); text-align: center; }
.store .sactions { border-top: 1px solid var(--line-1); padding-top: 8px; }
@media (max-width: 480px) { .store .sitem { grid-template-columns: minmax(0, 1fr) auto; } .store .sitem .sm { grid-column: 1 / -1; } }
.post-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; color: var(--text-4); font-size: var(--fs-caption); border: 1px dashed var(--line-2); border-radius: var(--r-3); }
.post-empty .ico { width: 20px; height: 20px; opacity: .6; }
.cmt { padding: 8px 10px; border-radius: var(--r-2); background: var(--bg-2); border: 1px solid var(--line-1); }
.cmt .ch { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: var(--fs-caption); }
.cmt .cb { margin-top: 3px; font-size: var(--fs-ui); color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.cmtform { display: flex; gap: var(--sp-2); align-items: stretch; } /* 모바일 댓글 단추 가림 방지 */
.cmtform input[type="text"] { flex: 1 1 auto; min-width: 0; width: auto; }
.cmtform button { flex: none; white-space: nowrap; }
.pre { font-size: var(--fs-micro); padding: 0 .4rem; border-radius: 4px; background: var(--bg-4); color: var(--text-2); font-weight: 700; }
/* ---------- 프로필 모달: 상자 중첩 없이 하나의 면, 가는 구분선, 한 열 정렬 ---------- */
.modal .card.pfm > h3:first-child { display: none; }
.modal .card.pfm { padding: var(--sp-4) var(--sp-4) var(--sp-3); max-width: 26rem; }
.pf { --pf-gap: 10px; container-type: inline-size; }
.pf.stack.small { gap: 0; }
.pf-hd { display: flex; gap: 12px; align-items: center; padding-bottom: var(--pf-gap); }
.pf-por { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; flex: none; }
.pf-por.framed { border-radius: var(--r-3); background: var(--bg-3); border: 1px solid var(--line-2); overflow: hidden; align-items: flex-end; }
.pf-por > * { width: 100%; height: 100%; }
.pf-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-who .t { font-size: var(--fs-micro); color: var(--clr-ivory); letter-spacing: .02em; }
.pf-who .n { font-size: var(--fs-h2); font-weight: 800; color: var(--text-1); letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-who .meta { display: flex; flex-wrap: wrap; align-items: center; font-size: var(--fs-caption); color: var(--text-2); }
.pf-who .meta span { padding: 0 .45rem; border-left: 1px solid var(--line-3); line-height: 1.1; }
.pf-who .meta span:first-child { padding-left: 0; border-left: 0; }
.pf-who .meta b { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-who .tg { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: 2px; }
.pf-who .tg:empty { display: none; }
.pf-vit { margin: 0; padding: var(--pf-gap) 0; border-top: 1px solid var(--line-1); gap: 5px; }
.pf-vit .gauge { display: grid; grid-template-columns: 56px 1fr 70px 36px; column-gap: 8px; align-items: center; }
.pf-vit .gauge .g-head { display: contents; }
.pf-vit .gauge .lbl { grid-column: 1; grid-row: 1; }
.pf-vit .gauge .g-track { grid-column: 2; grid-row: 1; height: 6px; }
.pf-vit .gauge .val { grid-column: 3; grid-row: 1; margin: 0; text-align: right; font-size: var(--fs-caption); }
.pf-vit .gauge .band { grid-column: 4; grid-row: 1; text-align: right; font-size: var(--fs-micro); }
.pf-sec { padding: var(--pf-gap) 0; border-top: 1px solid var(--line-1); }
.pf-stat .stchip { height: 1.25rem; }
.modal .card.pfm > .row:last-child { margin-top: 0; padding-top: var(--pf-gap); }
.pf-sec h5 { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-micro); letter-spacing: .1em; color: var(--text-4); margin: 0 0 7px; font-weight: 700; }
.pf-sec h5::after { content: ""; flex: 1; height: 1px; background: var(--line-1); }
.pf-two { display: grid; grid-template-columns: 1fr 136px; gap: 0 12px; align-items: start; border-top: 1px solid var(--line-1); }
.pf-two > .pf-sec { border-top: 0; }
.pf-two > .pf-sec + .pf-sec { padding-left: 12px; border-left: 1px solid var(--line-1); }
.pf-facts { display: grid; grid-template-columns: 30px 1fr; gap: .3rem .6rem; align-items: baseline; font-size: var(--fs-caption); }
.pf-facts .k { font-size: var(--fs-micro); color: var(--text-4); letter-spacing: .05em; }
.pf-facts .v { color: var(--text-1); font-weight: 600; }
.pf-facts .v.tags { display: flex; flex-wrap: wrap; gap: .25rem; font-weight: 400; }
.pf-look { margin: .45rem 0 0; font-size: var(--fs-caption); line-height: 1.65; color: var(--text-2); }
.pf-rad { display: flex; justify-content: center; }
.pf-rad .radarwrap { display: block; width: 136px; }
.pf-rad .radarwrap svg { width: 100%; height: auto; display: block; }
.pf-stat { display: flex; flex-wrap: wrap; gap: .3rem; }
.pf-acts { display: flex; flex-wrap: wrap; gap: 5px; padding-top: var(--pf-gap); border-top: 1px solid var(--line-1); }
.pf-acts:empty { display: none; }
.pf-acts button { flex-direction: row; gap: 4px; font-size: var(--fs-caption); min-height: 28px; background: transparent; border-color: var(--line-2); border-radius: var(--r-3); padding: 0 .55rem 0 .45rem; line-height: 1; color: var(--text-2); }
.pf-acts button:hover { background: var(--bg-3); color: var(--text-1); }
.pf-acts button .ico { width: 14px; height: 14px; color: var(--text-3); }
.pf-acts button.danger { color: var(--negative); }
.pf-acts button.danger .ico { color: var(--negative); }
@container (max-width: 400px) { .pf-two { grid-template-columns: 1fr; } .pf-two > .pf-sec + .pf-sec { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-1); } .pf-vit .gauge { grid-template-columns: 52px 1fr 64px 34px; } }
/* 모바일 사람 목록 모달: 사이드 패널과 같은 행 */
.modal .card.pplm { padding: var(--sp-4) var(--sp-3) var(--sp-3); }
.modal .card.pplm > h3:first-child { font-size: var(--fs-h3); margin-bottom: .4rem; padding-bottom: .4rem; }
/* 모바일 사람 창에서 닫기 단추가 목록과 같이 밀려 올라가지 않게 단추 줄을 카드 아래에 붙여 둔다 */
.modal .card.pplm > .row:last-child { position: sticky; bottom: calc(-1 * var(--sp-3)); z-index: 2; background: var(--bg-2); margin: 0 calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)); padding: .5rem var(--sp-3) var(--sp-3); }
/* PC: 사람이 적으면 창이 작게 가운데 떠 닫기 줄이 화면 중간에 오므로, 사람 목록 창은 같은 높이로 두고 닫기 줄을 창 바닥에 둔다. 모바일은 아래에서 올라오는 시트라 그대로 */
@media (min-width: 768px) { .modal .card.pplm { height: min(86vh, 760px); } .modal .card.pplm > .row:last-child { margin-top: auto; } }
.people.inmodal { border-bottom: 0; }
.people.inmodal .popts { padding: 0 0 6px; }
.people.inmodal .plist { max-height: none; padding: 0; overflow: visible; }
.people.inmodal .prow { padding: .38rem .4rem; border-bottom: 1px solid var(--line-1); border-radius: 0; }
.people.inmodal .prow:last-child { border-bottom: 0; }
.people.inmodal .prow .pmeta { white-space: normal; }

/* 모달 고정 헤더와 닫기, 레시피 필터, 상태 창, 사람 검색 */
.modal .card > .mhead { position: sticky; top: calc(-1 * var(--sp-4)); z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--bg-2); margin: calc(-1 * var(--sp-4)) 0 .6rem; padding: var(--sp-4) 0 .5rem; border-bottom: 1px solid var(--line-2); }
.modal .card > .mhead h3 { margin: 0; padding: 0; border: 0; flex: 1 1 auto; min-width: 0; }
.modal .card > .mhead .mclose { flex: none; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 999px; background: transparent; border-color: transparent; color: var(--text-3); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.modal .card > .mhead .mclose:hover { background: var(--bg-4); color: var(--text-1); border-color: var(--line-3); }
.modal .card.mapmodal > .mhead { top: calc(-1 * var(--sp-3)); margin-top: calc(-1 * var(--sp-3)); padding-top: var(--sp-3); }
.cmat .ok { color: var(--text-1); font-weight: 600; }
.cmat .lack { color: var(--text-3); }
.item.muted .cmat .ok { font-weight: 500; }
textarea.oneline { height: 36px; min-height: 36px; resize: none; overflow: hidden; white-space: nowrap; line-height: 1.4; padding-top: .4rem; padding-bottom: .4rem; }
.modal textarea.cq { flex: 1 1 100%; }
.popts textarea.pq { flex: 1 1 7rem; min-width: 6rem; height: 28px; min-height: 28px; padding: .15rem .5rem; font-size: inherit; }
@media (max-width: 767px) { textarea.oneline { height: 44px; min-height: 44px; padding-top: .6rem; padding-bottom: .6rem; } .popts textarea.pq { height: 36px; min-height: 36px; padding-top: .35rem; padding-bottom: .35rem; } }
.stinfo .stsec { display: grid; grid-template-columns: 5.5rem 1fr; gap: .3rem .6rem; align-items: start; }
.stinfo .stlbl { color: var(--text-3); }
.prow.dying .pname { color: var(--text-1); }
.prow .pname .tag { margin-left: .3rem; }

.item.tappable { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.item.tappable:hover { border-color: var(--text-4); }

/* 감염 3단계: 일어난 시신 카드 */
.item.risen { border-left: 2px solid var(--negative); padding-left: 8px; }

/* 여객선 카드 */
.ferrycard { border-left: 3px solid var(--clr-teal); }
.ferrycard h3 .muted { margin-left: auto; font-weight: 400; }
/* 여객선 그림: 선 없이 면, 그라데이션, 오버레이, 입자 모션. 색은 app.js ferryArt 의 시간대 팔레트 */
.ferry-art { max-width: 220px; }
.ferry-art svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.ferry-art .tint { mix-blend-mode: soft-light; }
.ferry-art .wave { animation: ferrywave 7s linear infinite; }
.ferry-art .wave.w2 { animation-duration: 10s; animation-direction: reverse; }
.ferry-art .wave.w3 { animation-duration: 13s; }
.ferry-art .shim { animation: ferryshim 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ferry-art .mist { animation: ferrymist 16s ease-in-out infinite alternate; }
.ferry-art .star { animation: ferrytwinkle 3s ease-in-out infinite; }
.ferry-art .ship { animation: ferrybob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ferry-art .away .ship { opacity: .9; animation-duration: 7s; }
.ferry-art .win { fill: #1a2028; }
.ferry-art .winglow { opacity: 0; }
.ferry-art .night .win, .ferry-art .dusk .win, .ferry-art .boarding .win, .ferry-art .aboard .win { fill: #ffd58a; }
.ferry-art .night .winglow, .ferry-art .dusk .winglow, .ferry-art .boarding .winglow, .ferry-art .aboard .winglow { opacity: .28; }
.ferry-art .lampglow { opacity: 0; }
.ferry-art .lamp { opacity: .35; }
.ferry-art .boarding .lampglow, .ferry-art .aboard .lampglow, .ferry-art .night .lampglow { opacity: 1; animation: ferrylamp 2.8s ease-in-out infinite; }
.ferry-art .boarding .lamp, .ferry-art .aboard .lamp, .ferry-art .night .lamp { opacity: 1; }
.ferry-art .smoke { opacity: 0; animation: ferrysmoke 3.6s ease-out infinite; }
.ferry-art .spray { opacity: 0; animation: ferryspray 2.4s ease-in-out infinite; }
.ferry-art .ember { opacity: 0; animation: ferryember 3.4s ease-out infinite; }
.ferry-art .bird { animation: ferrybird 30s linear infinite; }
@keyframes ferrywave { from { transform: translateX(0); } to { transform: translateX(-40px); } }
@keyframes ferryshim { 0%, 100% { opacity: .7; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.25); } }
@keyframes ferrymist { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
@keyframes ferrytwinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ferrybob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-1.6px) rotate(-.4deg); } }
@keyframes ferrylamp { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes ferrysmoke { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .28; } 100% { transform: translate(14px, -26px) scale(2); opacity: 0; } }
@keyframes ferryspray { 0%, 100% { transform: translateY(0); opacity: 0; } 30% { opacity: .75; } 60% { transform: translateY(-3px); opacity: .4; } }
@keyframes ferryember { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translate(10px, -22px); opacity: 0; } }
@keyframes ferrybird { from { transform: translate(-20px, 0); } 50% { transform: translate(160px, -6px); } to { transform: translate(340px, 2px); } }
@media (prefers-reduced-motion: reduce) { .ferry-art .wave, .ferry-art .smoke, .ferry-art .ship, .ferry-art .shim, .ferry-art .mist, .ferry-art .star, .ferry-art .spray, .ferry-art .ember, .ferry-art .bird, .ferry-art .lampglow { animation: none !important; } .ferry-art .smoke, .ferry-art .spray, .ferry-art .ember { opacity: .3; } }
.ferry-times { display: flex; flex-wrap: wrap; gap: .4rem; }
.ferry-time { padding: .12rem .65rem; border: 1px solid var(--line-3); border-radius: 999px; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: .92em; }
.ferry-time.next { border-color: var(--clr-teal); color: var(--text-1); background: color-mix(in srgb, var(--clr-teal) 14%, var(--bg-1)); font-weight: 600; }
.ferry-time.passed { opacity: .45; text-decoration: line-through; }
.ferry-status .ferry-clock { font-variant-numeric: tabular-nums; font-size: 1.15em; color: var(--clr-teal); }
.ferry-board { border: 1px solid var(--line-3); border-radius: 8px; padding: .5rem .6rem; }
.ferry-board.open { border-style: solid; border-color: color-mix(in srgb, var(--clr-teal) 55%, transparent); background: color-mix(in srgb, var(--clr-teal) 6%, var(--bg-1)); }
.ferry-board select { min-width: 12rem; flex: 1 1 auto; }


/* 이동 중 카운트다운 태그가 왼쪽 카드 밖으로 넘치지 않게 */
.tag.moving { white-space: normal; max-width: 100%; height: auto; min-height: 1.35rem; padding: .1rem .45rem; overflow-wrap: anywhere; line-height: 1.25; }
.chips { flex-wrap: wrap; }

/* 거래 UI(행상인, 상점): 아이콘 타일, 등급 색, 스테퍼, 장바구니. 게임 상점 관례(탭, 타일 목록, 하단 요약) */
.modal .card:has(> .merchant), .modal .card:has(> .shopui) { max-width: 40rem; padding-bottom: 0; }
.modal .card:has(> .merchant) > .row:last-child, .modal .card:has(> .shopui) > .row:last-child { padding: .5rem 0 .8rem; }
.whead { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .1rem 0 .4rem; }
.wseg { border-radius: 999px; padding: 2px; background: var(--bg-3); border-color: var(--line-2); }
.wseg button { border: 0; border-radius: 999px; padding: .28rem .95rem; background: transparent; color: var(--text-3); font-weight: 600; }
.wseg button.active { background: var(--bg-1); color: var(--text-1); }
.wchips { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.wchip { display: inline-flex; align-items: baseline; gap: .35rem; padding: .18rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-1); font-size: var(--fs-micro); }
.wchip strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-ui); color: var(--text-1); }
.wlist { display: flex; flex-direction: column; gap: .3rem; max-height: 52vh; overflow-y: auto; padding: .1rem .15rem .3rem 0; overscroll-behavior: contain; }
.wsec { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .6rem .2rem .25rem; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.wsec:first-child { padding-top: .2rem; }
.wempty { margin: .2rem 0; padding: .9rem; text-align: center; color: var(--text-4); border: 1px dashed var(--line-2); border-radius: var(--r-3); font-size: var(--fs-caption); }
.ware { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; gap: .2rem .7rem; align-items: center; padding: .45rem .6rem .45rem .45rem; border: 1px solid var(--line-1); border-radius: var(--r-3); background: var(--bg-1); transition: border-color var(--dur-1) var(--ease-std); }
.ware:hover { border-color: var(--line-3); }
.ware.spec { border-left: 2px solid var(--clr-mustard); }
.ware.star { border-left: 2px solid var(--clr-mustard); }
.ware.off { opacity: .5; }
.wtile { position: relative; width: 2.6rem; height: 2.6rem; border-radius: var(--r-3); display: flex; align-items: center; justify-content: center; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text-2); }
.wtile svg { width: 1.25rem; height: 1.25rem; }
/* 등급은 색을 쓰지 않고 메타 글자로만 알린다 */
.wtile.g-rare, .wtile.g-legendary, .wtile.g-legend { border-color: var(--line-3); }
.wtile .wstar { position: absolute; top: -5px; right: -5px; font-style: normal; font-size: .7rem; color: var(--clr-mustard); }
.wmain { min-width: 0; }
.wname { display: block; font-size: var(--fs-ui); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-1); }
.wmeta { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; margin-top: .15rem; font-size: var(--fs-micro); color: var(--text-3); }
.wmeta .tag { height: 1.1rem; padding: 0 .35rem; }
.wprice { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.wprice .cur { color: var(--text-4); font-size: var(--fs-micro); margin-right: 1px; }
.wprice .num { font-size: var(--fs-h3); font-weight: 600; color: var(--text-1); }
.wprice .wnote { font-size: var(--fs-micro); color: var(--text-4); font-family: var(--font-body); }
.wctl { display: flex; gap: .3rem; align-items: center; justify-content: flex-end; }
.wctl button.mini { white-space: nowrap; }
button.ghost, .wctl button.mini.ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-2); overflow: hidden; background: var(--bg-1); }
.stepper button.st { width: 1.7rem; min-width: 1.7rem; border: 0; border-radius: 0; background: var(--bg-3); color: var(--text-1); font-family: var(--font-mono); font-size: var(--fs-ui); padding: 0; }
.stepper button.st:disabled { color: var(--text-4); }
.stepper input.qty { width: 2.6rem; border: 0; border-radius: 0; text-align: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; background: transparent; padding: .2rem 0; -moz-appearance: textfield; }
.stepper input.qty::-webkit-outer-spin-button, .stepper input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 480px) { .ware { grid-template-columns: 2.3rem minmax(0, 1fr) auto; } .wctl { grid-column: 2 / -1; justify-content: flex-end; } }
.merchant { gap: .55rem; }
.mer-head { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; align-items: center; padding: .1rem 0 .2rem; }
.mer-avatar { width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-size: var(--fs-h2); color: var(--text-1); grid-row: span 2; }
.mer-who strong { font-size: var(--fs-h3); font-family: var(--font-title); }
.mer-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.mer-bar { height: 3px; border-radius: 2px; background: var(--line-1); overflow: hidden; }
.mer-bar i { display: block; height: 100%; width: 100%; background: var(--clr-mustard); transition: width 1s linear; }
.mer-quote { border-left: 2px solid var(--clr-mustard); padding: .15rem .7rem; color: var(--text-2); font-style: italic; }
.mer-quote p { margin: .1rem 0; font-size: var(--fs-caption); }
.cart { position: sticky; bottom: 0; margin: .2rem 0 0; padding: .55rem 0 .5rem; background: var(--bg-2); border-top: 1px solid var(--line-2); }
.cart-items { display: flex; flex-wrap: wrap; gap: .3rem; min-height: 1.5rem; margin-bottom: .4rem; }
.cchip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .2rem .12rem .55rem; border-radius: 999px; font-size: var(--fs-micro); border: 1px solid var(--line-2); background: var(--bg-1); }
.cchip { height: 1.55rem; }
.cchip button { border: 0; background: transparent; color: var(--text-3); padding: 0 .35rem; min-width: 0; min-height: 0; height: 1.2rem; line-height: 1; font-size: var(--fs-ui); }
.cart-foot { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.cart-total { display: flex; align-items: baseline; gap: .4rem; flex: 1 1 auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cart-total strong { font-size: var(--fs-display); color: var(--text-1); }
.cart-foot .row { border: 0; margin: 0; padding: 0; gap: .35rem; }
.cart > p { margin: .35rem 0 0; }
/* 표 한 줄(유저 간 거래 창) */
.tlist { gap: .15rem; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .35rem .7rem; align-items: center; padding: .42rem .5rem; border-radius: var(--r-2); border: 1px solid transparent; }
.trow .tmain { min-width: 0; }
.trow .tmain strong { display: block; font-size: var(--fs-ui); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.trow .tmeta { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; font-size: var(--fs-micro); color: var(--text-3); margin-top: .1rem; }
.trow .tmeta .tag { height: 1.15rem; }
.trow .tprice { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.trow .tctl { display: flex; gap: .3rem; align-items: center; justify-content: flex-end; }
/* 유저 간 거래 창 정돈 */
.modal .card:has(> .tradeui) { max-width: 46rem; }
.tradeui { gap: .6rem; }
.tr-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-bottom: .5rem; border-bottom: 1px solid var(--line-2); }
.tr-peer { display: flex; align-items: center; gap: .6rem; flex: 1 1 auto; min-width: 0; }
.tr-peer strong { font-family: var(--font-title); font-size: var(--fs-h3); }
.tr-side { padding: .3rem .5rem .5rem; border: 1px solid var(--line-1); border-radius: var(--r-3); background: var(--bg-2); max-height: none; overflow: visible; gap: .3rem; }
.tr-side .wsec { padding-top: .2rem; }
.tr-side.mine { border-left: 2px solid var(--clr-mustard); }
.tr-side > h3 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .2rem; font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tr-state { display: inline-flex; gap: .25rem; }
.tr-side .trow { grid-template-columns: minmax(0, 1fr) auto; padding: .35rem .5rem; border: 1px solid var(--line-1); background: var(--bg-2); margin-bottom: .2rem; }
.tr-side .trow .tprice { display: none; }
.tr-empty { padding: .55rem .4rem; border: 1px dashed var(--line-2); border-radius: var(--r-2); text-align: center; font-size: var(--fs-caption); }
.tr-sum { margin: .35rem 0 0; padding-top: .4rem; border-top: 1px solid var(--line-1); margin-left: 0; }
.tr-memo { border-left: 2px solid var(--line-3); padding: .1rem .5rem; color: var(--text-2); font-style: italic; font-size: var(--fs-caption); }
.tr-ctl { display: grid; gap: .35rem; padding: .5rem .6rem; border: 1px solid var(--line-1); border-radius: var(--r-3); background: var(--bg-1); }
.tr-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .4rem; align-items: center; }
.tr-row:first-child { grid-template-columns: 2.4rem minmax(0, 1fr) 4.6rem auto; }
.tr-row .lbl { text-align: right; }
.tr-row select, .tr-row input { min-width: 0; width: 100%; }
.tr-row input[type=number] { font-family: var(--font-mono); text-align: right; }
.tradecols { gap: .5rem; }

.modal .card.nofx { animation: none; }

/* 행상인과 유저 거래 창을 촘촘하게: 글자 한 단계 작게, 여백 줄임 */
.merchant, .tradeui, .shopui { font-size: var(--fs-caption); }
.merchant .ware, .tradeui .ware, .shopui .ware { grid-template-columns: 2.1rem minmax(0, 1fr) auto auto; gap: .1rem .5rem; padding: .3rem .45rem .3rem .35rem; }
.merchant .wtile, .tradeui .wtile, .shopui .wtile { width: 2.1rem; height: 2.1rem; }
.merchant .wtile svg, .tradeui .wtile svg, .shopui .wtile svg { width: 1.05rem; height: 1.05rem; }
.merchant .wname, .tradeui .wname, .shopui .wname { font-size: var(--fs-caption); }
.merchant .wmeta, .tradeui .wmeta, .shopui .wmeta { font-size: .68rem; gap: .2rem .4rem; margin-top: .05rem; }
.merchant .wprice .num, .tradeui .wprice .num, .shopui .wprice .num { font-size: var(--fs-ui); }
.merchant .wlist, .shopui .wlist { gap: .2rem; }
.merchant .wsec, .tradeui .wsec, .shopui .wsec { padding: .45rem .15rem .15rem; font-size: .68rem; }
.merchant .stepper button.st, .shopui .stepper button.st { width: 1.5rem; min-width: 1.5rem; font-size: var(--fs-caption); }
.merchant .stepper input.qty, .shopui .stepper input.qty { width: 2.2rem; font-size: var(--fs-caption); padding: .12rem 0; }
.merchant .wctl button.mini, .tradeui .wctl button.mini, .shopui .wctl button.mini { font-size: .72rem; padding: .15rem .5rem; min-height: 1.6rem; }
.merchant .wchip, .tradeui .wchip, .shopui .wchip { padding: .12rem .5rem; font-size: .68rem; }
.merchant .wchip strong, .tradeui .wchip strong, .shopui .wchip strong { font-size: var(--fs-caption); }
.merchant .wseg button, .shopui .wseg button { padding: .2rem .8rem; font-size: var(--fs-caption); }
.merchant .mer-avatar { width: 2.3rem; height: 2.3rem; font-size: var(--fs-h3); }
.merchant .mer-who strong { font-size: var(--fs-ui); }
.merchant .mer-tags .tag { font-size: .68rem; height: 1.2rem; }
/* 모바일 행상인 창: 창 전체와 목록이 따로 스크롤하면 바닥의 확정 줄이 목록 끝을 덮는다. 창을 세로 flex 로 두고 목록만 스크롤, 확정 줄은 목록 아래 제자리에 둔다(사람 창 .pplm 과 같은 방식) */
@media (max-width: 767px) {
  .modal .card:has(> .merchant) { display: flex; flex-direction: column; overflow: hidden; max-height: 88vh; max-height: 88dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal .card:has(> .merchant) > .mhead { flex: none; }
  .modal .card:has(> .merchant) > .merchant { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal .card:has(> .merchant) > .merchant > * { flex: none; }
  .modal .card:has(> .merchant) > .merchant > .wlist { flex: 1 1 auto; min-height: 7rem; max-height: none; overflow-y: auto; }
  .modal .card:has(> .merchant) .cart { position: static; }
  .modal .card:has(> .merchant) > .row:last-child:empty { display: none; }
}
.merchant .mer-quote p { font-size: var(--fs-micro); }
.merchant { gap: .4rem; }
.merchant .cart { padding: .4rem 0 .4rem; }
.merchant .cart-items { margin-bottom: .3rem; }
.merchant .cart-total strong { font-size: var(--fs-h1); }
.merchant .cchip { font-size: .68rem; height: 1.4rem; }
.tradeui { gap: .45rem; }
.tradeui .tr-peer strong { font-size: var(--fs-ui); }
.tradeui .tr-side { padding: .2rem .4rem .4rem; gap: .2rem; }
.tradeui .tr-ctl { gap: .25rem; padding: .4rem .5rem; }
.tradeui .tr-row select, .tradeui .tr-row input, .tradeui .tr-row button { font-size: var(--fs-caption); min-height: 1.8rem; padding-top: .15rem; padding-bottom: .15rem; }
.tradeui .tr-row { grid-template-columns: 2.2rem minmax(0, 1fr) auto; }
.tradeui .tr-row:first-child { grid-template-columns: 2.2rem minmax(0, 1fr) 4rem auto; }
.tradeui .tr-empty, .tradeui .wempty { padding: .5rem; font-size: var(--fs-micro); }

/* 캠프원, 가입 신청 줄의 프로필 클릭 대상: 밑줄과 색 변화 없이 커서만 */
.plink { cursor: pointer; }
/* 왼쪽 카드에서 누를 수 있는 곳(이름, 장비)은 색으로 구분한다 */
.pnl-self-card .selflink { color: var(--accent); }
.pnl-self-card .selflink:hover, .pnl-self-card .selflink:focus-visible { color: var(--accent-ink, var(--accent)); text-decoration: underline; }
.plink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-2); }

/* 무전 탭 유저 채팅 ON/OFF 알약 스위치 */
.chatdock .cpills { display: flex; justify-content: flex-start; margin-bottom: .25rem; }
.swpill { font-size: var(--fs-micro); display: inline-flex; align-items: center; gap: .25rem; min-height: 20px; flex: none; white-space: nowrap; width: auto; padding: 0 .2rem 0 .5rem; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text-3); line-height: 1; cursor: pointer; }
.swpill span, .swpill b { white-space: nowrap; }
.swpill b { font-weight: 700; font-size: var(--fs-micro); letter-spacing: .04em; padding: .1rem .3rem; border-radius: 999px; background: var(--bg-1); color: var(--text-4); border: 1px solid var(--line-1); }
.swpill.on { color: var(--text-1); border-color: var(--accent); }
.swpill.on b { background: var(--accent); color: var(--bg-1); border-color: var(--accent); }
.swpill:hover { border-color: var(--line-3); }

/* 안개, 구름, 연기는 흐리게(SVG 요소에 CSS filter) */
.ph-scene .fog { filter: blur(7px); opacity: .9; }
.ph-scene .cloud { filter: blur(5px); }
.cscene .fog { filter: blur(4px); }
.ferry-art .mist { filter: blur(3px); }
.ferry-art .smoke { filter: blur(2px); }
/* 캠프 창고 품목 표를 오밀조밀하게. 넓은 화면에서는 두 줄, 이름은 한 줄로 자르고 수량 칸은 작게 */
.store .ssort { align-items: center; gap: .4rem; }
.store .ssort select { font-size: var(--fs-caption); padding: 2px 6px; }
.store .sitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.store .sitem { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sn q" "sm q"; row-gap: 1px; column-gap: 8px; padding: 5px 8px; border-top: 1px solid var(--line-1); border-left: 1px solid var(--line-1); margin-left: -1px; }
.store .sitem:first-child { border-top: 1px solid var(--line-1); }
.store .sitem .sn { grid-area: sn; display: flex; gap: .35rem; align-items: baseline; min-width: 0; }
.store .sitem .sn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store .sitem .sn .qty { color: var(--text-3); flex: none; }
.store .sitem .sm { grid-area: sm; font-size: var(--fs-micro); display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; min-width: 0; }
.store .sitem input { grid-area: q; width: 3.4rem; text-align: center; }
.store .sitem.picked { background: rgba(120, 160, 90, .14); }
.post .av.avatar { display: inline-flex; }

/* ---------- 후원자 특전 ---------- */
.sp-wrap { max-width: 560px; margin: 0 auto; } /* 넓은 화면에서도 좁은 화면(폰) 배치 그대로. 한 줄 배치, 폭 560 */
.sp-hero { background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); border-color: var(--accent-line); }
.sp-hero-top { display: flex; flex-direction: column; gap: var(--sp-3); align-items: stretch; }
.sp-title { display: flex; align-items: center; gap: .45rem; margin: 0 0 .35rem; font-size: var(--fs-display); }
.sp-title .ico { color: var(--clr-rose); }
.sp-balance { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: .5rem .8rem; border: 1px solid var(--accent-line); border-radius: var(--r-3); background: var(--accent-dim); }
.sp-balance .lbl { font-size: var(--fs-micro); letter-spacing: .1em; color: var(--text-3); }
.sp-balance strong { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sp-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.sp-steps li { display: flex; gap: .45rem; align-items: flex-start; font-size: var(--fs-caption); color: var(--text-2); padding: .5rem .55rem; border: 1px solid var(--line-1); border-radius: var(--r-2); background: var(--bg-1); }
.sp-steps b { flex: 0 0 auto; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: var(--fs-micro); display: inline-flex; align-items: center; justify-content: center; }
.sp-tabs button { font-weight: 500; }
.sp-form .sp-fields, .sp-form .sp-fields.four { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.sp-preview { margin: 0; padding: .45rem .6rem; border-left: 3px solid var(--accent); background: var(--accent-dim); border-radius: var(--r-1); }
.sp-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.sp-item { display: flex; flex-direction: column; gap: .5rem; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--bg-2); box-shadow: var(--sh-1); position: relative; transition: border-color var(--dur-2) var(--ease-std), transform var(--dur-2) var(--ease-std); }
.sp-item:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.sp-item.locked { opacity: .78; }
.sp-item-head { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; }
.sp-ico { width: 2.3rem; height: 2.3rem; border-radius: var(--r-2); display: inline-flex; align-items: center; justify-content: center; background: var(--accent-dim); border: 1px solid var(--accent-line); color: var(--accent); }
.sp-ico .ico { width: 1.25rem; height: 1.25rem; }
.sp-item-name strong { font-size: var(--fs-h3); }
.sp-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.sp-price strong { color: var(--clr-mustard); font-variant-numeric: tabular-nums; }
.sp-tag { margin: 0; color: var(--text-2); font-size: var(--fs-ui); line-height: 1.45; }
.sp-details { margin: 0; padding-left: 1.1rem; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.5; }
.sp-details li { margin: .1rem 0; }
.sp-caution { margin: 0; font-size: var(--fs-micro); color: var(--warning); border-top: 1px dashed var(--line-2); padding-top: .4rem; }
.sp-buy { margin-top: auto; padding-top: .3rem; }
.sp-code { font-family: var(--font-code); letter-spacing: .12em; text-transform: uppercase; }
.sp-codechip { font-family: var(--font-code); font-size: var(--fs-caption); padding: .15rem .45rem; border: 1px dashed var(--accent-line); border-radius: var(--r-1); background: var(--accent-dim); letter-spacing: .08em; }
.sp-codechip.used { opacity: .55; text-decoration: line-through; }
.sp-list { display: flex; flex-direction: column; gap: .35rem; }
.sp-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line-1); font-size: var(--fs-ui); }
.sp-row:last-child { border-bottom: none; }
.sp-row .sp-main { flex: 1 1 200px; }
.sp-adm-money { width: 7.5rem; }
.sp-kakao { display: inline-flex; align-items: center; gap: .4rem; background: #FAE100; color: #191919; border-color: #E5CE00; font-weight: 700; }
.sp-kakao:hover { background: #F2D900; color: #191919; }
.ln-page[contenteditable="false"] { cursor: default; }

/* ---------- 가죽 노트 ---------- */
.ln-modal { max-width: min(1080px, 96vw) !important; width: 100%; }
.ln-wrap { display: flex; flex-direction: column; gap: .6rem; }
.ln-toolbar { display: flex; flex-wrap: wrap; gap: .35rem .55rem; align-items: center; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--bg-3); position: sticky; top: 0; z-index: 2; }
.ln-group { display: inline-flex; align-items: center; gap: .2rem; padding-right: .55rem; border-right: 1px solid var(--line-2); }
.ln-group:last-child { border-right: none; padding-right: 0; }
.ln-tb { min-height: 30px; min-width: 30px; padding: .1rem .5rem; border: 1px solid transparent; background: transparent; color: var(--text-2); border-radius: var(--r-2); font-size: var(--fs-caption); }
.ln-tb:hover { background: var(--bg-4); border-color: var(--line-2); color: var(--text-1); }
.ln-tb.b { font-weight: 800; font-family: Georgia, serif; } .ln-tb.i { font-style: italic; font-family: Georgia, serif; } .ln-tb.u { text-decoration: underline; } .ln-tb.s { text-decoration: line-through; }
.ln-tb.al, .ln-tb.ac, .ln-tb.ar { font-size: 1.05rem; line-height: 1; letter-spacing: -.05em; } .ln-tb.al { text-align: left; } .ln-tb.ar { text-align: right; }
.ln-tb.add { border-color: var(--accent-line); color: var(--accent); }
.ln-sel { min-height: 30px; padding: .1rem .5rem; font-size: var(--fs-caption); max-width: 8.5rem; border-radius: var(--r-2); }
.ln-colorwrap { position: relative; display: inline-flex; align-items: center; gap: .3rem; height: 30px; padding: 0 .5rem; border: 1px solid transparent; border-radius: var(--r-2); font-size: var(--fs-caption); font-weight: 700; cursor: pointer; color: var(--text-2); }
.ln-colorwrap:hover { background: var(--bg-4); border-color: var(--line-2); }
.ln-colorwrap.bg { font-weight: 500; }
.ln-swatch { width: 1rem; height: 1rem; border-radius: 3px; border: 1px solid var(--line-3); }
.ln-color { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ln-filelbl { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; }
.ln-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ln-nav { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: center; }
.ln-nav-label { min-width: 8rem; text-align: center; font-size: var(--fs-caption); color: var(--text-2); font-variant-numeric: tabular-nums; }
.ln-book { display: grid; grid-template-columns: 1fr 14px 1fr; gap: 0; padding: 14px; border-radius: 12px; background: radial-gradient(ellipse at 30% 20%, #5a3b26, #3a2416 55%, #26160d); box-shadow: inset 0 0 40px rgba(0,0,0,.6), var(--sh-2); border: 1px solid #1d1008; }
.ln-spine { background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.05) 50%, rgba(0,0,0,.45)); }
.ln-leaf { background: #f4ecd8; color: #2b2419; display: flex; flex-direction: column; min-height: 440px; box-shadow: inset 0 0 30px rgba(120, 90, 40, .18); }
.ln-leaf.left { border-radius: 4px 0 0 4px; } .ln-leaf.right { border-radius: 0 4px 4px 0; }
.ln-page { flex: 1; padding: 22px 24px 8px; outline: none; font-size: 15px; line-height: 1.7; word-break: break-word; overflow-wrap: anywhere; overflow-y: auto; max-height: 560px; caret-color: #2b2419; background-image: repeating-linear-gradient(transparent 0, transparent 24.5px, rgba(90, 70, 40, .13) 25.5px); background-attachment: local; }
.ln-page:focus { box-shadow: inset 0 0 0 2px rgba(120, 90, 40, .25); }
/* 종이 위 선택 영역: 전역 ::selection(밝은 글자색)이 종이에서는 글씨를 지워 보이게 해 종이색 계열로 따로 둔다 */
.ln-page ::selection, .ln-page::selection { background: rgba(150, 110, 50, .35); color: #1a140c; }
.ln-page .ln-p { min-height: 1.7em; margin: 0; }
.ln-page hr { border: none; border-top: 1px solid rgba(60, 40, 20, .45); margin: .5em 0; }
.ln-page .ln-img { margin: .3em 0; text-align: center; }
.ln-page img { max-width: 100%; height: auto; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.35); display: inline-block; }
.ln-foot { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 10px; font-size: 11px; color: #7a6a52; font-family: var(--font-code); }
.ln-count.over { color: #a3271c; font-weight: 700; }
.ln-status { flex: 1; }
@media (max-width: 767px) { .ln-book { grid-template-columns: 1fr; gap: 10px; padding: 10px; } .ln-spine { display: none; } .ln-leaf { min-height: 300px; border-radius: 4px !important; } .ln-page { max-height: 380px; padding: 16px 16px 6px; } .ln-group { border-right: none; padding-right: 0; } }

/* ---------- 테마 커스텀 편집기 (설정 > 테마) ---------- */
:root { --th-checker: repeating-conic-gradient(#8a8a8a 0 25%, #c8c8c8 0 50%) 0 0 / 12px 12px; }
.theme-edit .th-group.collapsed .th-rows, .theme-edit .th-group.collapsed > p { display: none; }
.theme-edit .th-gh { cursor: pointer; user-select: none; }
.theme-edit .th-gh .th-gn { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 400; }
.theme-edit .th-gh::after { content: '−'; margin-left: .4rem; color: var(--text-4); }
.theme-edit .th-group.collapsed .th-gh::after { content: '+'; }
.th-rows { display: grid; gap: .25rem; }
.th-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .6rem; align-items: center; padding: .25rem .4rem; border-radius: var(--r-2); border: 1px solid transparent; }
.th-row.over { border-color: var(--accent-line); background: var(--accent-dim); }
.th-lab { display: flex; flex-direction: column; min-width: 0; }
.th-lab .th-name { font-size: var(--fs-caption); color: var(--text-1); }
.th-lab code { font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-ctl { display: flex; align-items: center; gap: .35rem; }
.th-sw { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 999px; border: 2px solid var(--line-3); background: var(--th-checker); overflow: hidden; flex: none; }
.th-sw .th-swc { display: block; width: 100%; height: 100%; }
.th-sw:hover { border-color: var(--text-1); background: var(--th-checker); }
.th-hex { width: 7.4em; min-height: 30px; padding: .2rem .4rem; font-size: var(--fs-caption); }
.th-num { width: 5.2em; min-height: 30px; padding: .2rem .4rem; font-size: var(--fs-caption); }
.th-text { width: min(20em, 60vw); min-height: 30px; padding: .2rem .4rem; font-size: var(--fs-caption); }
.th-ctl input[type="range"] { width: 7em; }
.th-reset { min-height: 26px; padding: 0 .4rem; visibility: hidden; }
.th-row.over .th-reset { visibility: visible; }
@media (max-width: 520px) { .th-row { grid-template-columns: 1fr; } .th-ctl { flex-wrap: wrap; } }
.th-presets { display: flex; flex-wrap: wrap; gap: .3rem; }
.th-presets .th-pp { display: inline-block; width: 12px; height: 12px; border-radius: 999px; border: 1px solid var(--line-3); }
.th-contrast .th-cr { justify-content: space-between; padding: .15rem 0; border-bottom: 1px solid var(--line-1); }
.th-contrast .th-cr.bad { color: var(--warning); }
.th-saved-name { font-weight: 600; }
.th-preview .gauges { margin: 0; }
.th-preview .cline { font-family: var(--font-mono); font-size: var(--fs-caption); }
.th-preview .cline .t { color: var(--chat-time); font-size: var(--fs-micro); margin-right: .3rem; }
.th-preview .cline.sys { color: var(--chat-sys); font-style: italic; }
.th-preview .stchip { display: inline-flex; align-items: center; padding: 0 .45rem; height: 1.4rem; border-radius: 999px; border: 1px solid var(--line-3); font-size: var(--fs-micro); }
/* 색 고르기 창 */
.thpick { position: fixed; z-index: var(--z-popover); width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; padding: .6rem; box-shadow: var(--sh-3); margin: 0; }
.thp-top { display: flex; gap: .7rem; flex-wrap: wrap; }
.thp-wheel { position: relative; width: 200px; height: 200px; flex: none; touch-action: none; user-select: none; }
.thp-ring { position: absolute; inset: 0; border-radius: 50%; cursor: crosshair; background: conic-gradient(from 0deg, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%)); -webkit-mask: radial-gradient(circle, transparent 73px, #000 74px); mask: radial-gradient(circle, transparent 73px, #000 74px); }
.thp-sv { position: absolute; left: 40px; top: 40px; width: 120px; height: 120px; border-radius: 4px; cursor: crosshair; }
.thp-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #000; transform: translate(-50%, -50%); pointer-events: none; }
.thp-side { flex: 1; min-width: 130px; }
.thp-prev { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--th-checker); overflow: hidden; flex: none; display: inline-block; }
.thp-prev span { display: block; width: 100%; height: 100%; }
.thp-hex { width: 7.6em; min-height: 30px; padding: .2rem .4rem; }
.thp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
.thp-l { display: flex; flex-direction: column; gap: 1px; }
.thp-n { min-height: 28px; padding: .1rem .3rem; font-size: var(--fs-caption); width: 100%; }
.thp-alpha { width: 100%; height: 14px; border-radius: 7px; }
.thp-pal { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line-1); }
.thp-ps { width: 22px; height: 22px; min-height: 22px; padding: 0; border-radius: 4px; border: 1px solid var(--line-3); }
/* 후원 오픈카톡 단추 닫힘 */
.sp-kakao.closed { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
/* 캠프 시설, 농장: 칩, 색 띠, 상자를 걷고 목록과 글자 위계로 정돈한다. 색은 상태 점과 경고 글자에만 쓴다 */
.cf { display: flex; flex-direction: column; gap: var(--sp-5); }
.cf-stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.cf-stack.gap { gap: var(--sp-6); }
.cf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr)); gap: var(--sp-4) var(--sp-5); padding: .15rem 0 var(--sp-4); border-bottom: 1px solid var(--line-2); }
.cf-fact { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cf-fact .k { font-size: var(--fs-micro); color: var(--text-4); letter-spacing: .04em; }
.cf-fact .v { font-size: var(--fs-h2); line-height: 1.15; color: var(--text-1); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-fact .v small { font-size: var(--fs-caption); color: var(--text-4); margin-left: 2px; }
.cf-fact .cf-line { margin-top: .2rem; }
.cf-notes { display: flex; flex-direction: column; gap: .25rem; margin-top: calc(var(--sp-3) * -1); }
.cf-note { margin: 0; font-size: var(--fs-caption); line-height: 1.6; color: var(--text-4); }
.cf-note.bad { color: var(--negative); }
.cf-label { margin: 0; font-size: var(--fs-micro); line-height: 1.5; color: var(--text-4); }
.cf-sec { display: flex; flex-direction: column; }
.cf-h { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line-2); }
.cf-h h4 { margin: 0; font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); }
.cf-h span { font-size: var(--fs-caption); color: var(--text-4); font-variant-numeric: tabular-nums; }
.cf-sec > .cf-stack { padding-top: var(--sp-3); }
.cf-list { display: flex; flex-direction: column; }
.cf-item { border-bottom: 1px solid var(--line-1); }
.cf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 1rem; gap: .35rem 1.25rem; align-items: center; padding: .85rem .1rem; }
summary.cf-row { cursor: pointer; list-style: none; }
details.cfold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; font-size: var(--fs-ui); font-weight: 700; color: var(--text-1); }
details.cfold > summary::-webkit-details-marker { display: none; }
details.cfold > summary .cfold-hint { margin-left: auto; font-size: var(--fs-micro); font-weight: 400; color: var(--text-4); }
details.cfold[open] > summary .cfold-hint { display: none; }
details.cfold > summary .chev { width: .9rem; height: .9rem; color: var(--text-4); transition: transform var(--dur-2) var(--ease-std), color var(--dur-2) var(--ease-std); }
details.cfold[open] > summary .chev { margin-left: auto; transform: rotate(90deg); }
details.cfold > summary:hover .chev { color: var(--text-2); }
details.cfold[open] > summary { margin-bottom: .7rem; }
summary.cf-row::-webkit-details-marker { display: none; }
summary.cf-row .chev { width: .9rem; height: .9rem; color: var(--text-4); justify-self: end; transition: transform var(--dur-2) var(--ease-std), color var(--dur-2) var(--ease-std); }
summary.cf-row:hover .chev { color: var(--text-2); }
.cf-item[open] > summary .chev { transform: rotate(90deg); }
.cf-row.plain { grid-template-columns: 1.4rem minmax(0, 1fr) auto; align-items: start; border-bottom: 1px solid var(--line-1); }
.cf-row.plain.nonum { grid-template-columns: minmax(0, 1fr) auto; }
.cf-row.dim .cf-main, .cf-item.dim > summary .cf-main { opacity: .5; }
.cf-no { padding-top: .05rem; font-size: var(--fs-caption); color: var(--text-4); font-variant-numeric: tabular-nums; }
.cf-main { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.cf-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; font-size: var(--fs-ui); font-weight: 600; line-height: 1.3; color: var(--text-1); }
.cf-name.muted { font-weight: 400; color: var(--text-3); }
.cf-flag { font-size: var(--fs-micro); font-weight: 400; color: var(--text-4); }
.cf-desc { font-size: var(--fs-caption); line-height: 1.55; color: var(--text-3); }
.cf-desc.bad { color: var(--negative); }
.cf-desc.warn { color: var(--clr-amber); }
.cf-desc.ok { color: var(--positive); }
.cf-state { display: inline-flex; align-items: center; gap: .45rem; justify-self: end; font-size: var(--fs-caption); color: var(--text-2); white-space: nowrap; }
.cf-state.bad { color: var(--negative); }
.cf-state .sub { color: var(--text-4); font-variant-numeric: tabular-nums; }
.cf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-3); flex: none; }
.cf-dot.ok { background: var(--positive); }
.cf-dot.busy { background: var(--clr-mustard); }
.cf-dot.bad { background: var(--negative); }
.cf-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; font-size: var(--fs-caption); white-space: nowrap; }
.cf-side .cost { color: var(--text-2); font-variant-numeric: tabular-nums; }
.cf-side .why { color: var(--text-4); }
.cf-side .why.ok { color: var(--positive); }
.cf-side .why.warn { color: var(--clr-amber); }
.cf-line { position: relative; display: block; height: 2px; background: var(--line-2); overflow: hidden; }
.cf-row > .cf-line { grid-column: 1 / -1; }
.cf-line i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--text-3); transition: width var(--dur-bar) var(--ease-std); }
.cf-line.busy i { background: var(--clr-mustard); }
.cf-line.ok i { background: var(--positive); }
.cf-line.warn i { background: var(--clr-amber); }
.cf-line.bad i { background: var(--negative); }
.cf-prog { display: flex; align-items: center; gap: .75rem; }
.cf-prog .cf-desc { flex: none; min-width: 6.5rem; }
.cf-prog .cf-line { flex: 0 1 9rem; }
.cf-more { display: flex; flex-direction: column; gap: .7rem; padding: 0 .1rem 1rem; }
.cf-more .kv { gap: .3rem 1.25rem; }
.cf-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0 1.5rem; }
.cf-mat { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-bottom: 1px solid var(--line-1); font-size: var(--fs-caption); color: var(--text-3); }
.cf-mat b { font-weight: 500; color: var(--text-1); font-variant-numeric: tabular-nums; }
.cf-mat.short b { color: var(--negative); }
.cf-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .4rem; }
.cf-acts.start, .cf-more .cf-acts { justify-content: flex-start; }
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.cf-empty { margin: 0; padding: var(--sp-4) .1rem; font-size: var(--fs-caption); color: var(--text-4); }
.cf-nav { display: flex; gap: 1.5rem; margin-bottom: calc(var(--sp-2) * -1); border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.cf-nav::-webkit-scrollbar { display: none; }
.cf-nav button { position: relative; min-height: 34px; padding: .25rem 0; margin-bottom: -1px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--text-4); font-size: var(--fs-caption); white-space: nowrap; }
.cf-nav button:hover { background: transparent; color: var(--text-2); }
.cf-nav button.active { color: var(--text-1); border-bottom-color: var(--text-1); }
.cf-nav .att { display: inline-block; width: 5px; height: 5px; margin-left: .35rem; border-radius: 50%; background: var(--clr-amber); vertical-align: .25em; }
.cf-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .15rem; }
.cf-form select { width: auto; flex: 1 1 9rem; min-width: 0; max-width: 14rem; }
.cf-form input.qty { width: 4.5em; flex: none; }
.cf-form button { flex: none; }
.cf-picks { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; border-top: 1px solid var(--line-1); }
.cf-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: baseline; width: 100%; min-height: 0; padding: .65rem .5rem; border: 0; border-bottom: 1px solid var(--line-1); border-radius: 0; background: transparent; color: var(--text-2); text-align: left; justify-content: stretch; cursor: pointer; }
.cf-pick:hover { background: var(--bg-3); }
.cf-pick.active { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.cf-pick .nm { display: flex; align-items: baseline; gap: .5rem; font-weight: 600; color: var(--text-1); }
.cf-pick .nm small { font-size: var(--fs-micro); font-weight: 400; color: var(--text-4); }
.cf-pick .meta { grid-column: 1 / -1; font-size: var(--fs-micro); color: var(--text-3); }
.cf-pick .seed { font-size: var(--fs-micro); color: var(--text-3); font-variant-numeric: tabular-nums; }
.cf-pick .seed.lack { color: var(--negative); }
label.cf-pick.check { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.cf-dutywrap { overflow-x: auto; }
.cf-duty { --roles: 5; display: grid; grid-template-columns: 2rem repeat(var(--roles), minmax(3.8rem, 1fr)); min-width: 21rem; }
.cf-duty > * { border-bottom: 1px solid var(--line-1); }
.cf-duty .dh { padding: .35rem .4rem .5rem; font-size: var(--fs-micro); color: var(--text-4); border-bottom-color: var(--line-2); }
.cf-duty .dd { display: flex; align-items: center; padding: .5rem .2rem; font-size: var(--fs-caption); color: var(--text-3); }
.cf-duty .dc { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 2.5rem; padding: .4rem; margin: 0; border: 0; border-bottom: 1px solid var(--line-1); border-radius: 0; background: transparent; font-size: var(--fs-caption); color: var(--text-2); text-align: left; }
.cf-duty button.dc { cursor: pointer; }
.cf-duty button.dc:hover { background: var(--bg-3); }
.cf-duty .today { background: var(--bg-2); color: var(--text-1); }
.cf-duty .dd.today { font-weight: 600; }
.cf-duty .who { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-ev { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: .7rem .1rem; border-bottom: 1px solid var(--line-1); font-size: var(--fs-caption); line-height: 1.6; }
.cf-ev .t { color: var(--text-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-ev .x { color: var(--text-2); }
@media (max-width: 600px) {
  .cf-row { gap: .35rem .9rem; }
  .cf-row.plain { grid-template-columns: 1.2rem minmax(0, 1fr); }
  .cf-row.plain > .cf-acts { grid-column: 2; justify-content: flex-start; }
  .cf-row.plain.nonum { grid-template-columns: minmax(0, 1fr); }
  .cf-row.plain.nonum > .cf-acts { grid-column: 1; }
  .cf-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cf-acts button.ghost:not(.active) { border-color: transparent; background: transparent; color: var(--text-4); }
.cf-acts button.ghost:not(.active):hover { color: var(--text-2); border-color: var(--line-2); }
.cf-form select { min-height: 34px; padding-top: .2rem; padding-bottom: .2rem; }

/* ---- 공지: 지난 공지 사이 구분선, 공지 채팅 탭만 줄 사이 여백 ---- */
.pastnotices > .notice + .notice { border-top: 1px solid var(--line-2); padding-top: .85rem; margin-top: .35rem; }
.chatdock .clines.ntc-lines { gap: 0; }
.chatdock .clines.ntc-lines .cline { padding: .55rem .35rem; }
.chatdock .clines.ntc-lines .cline + .cline { border-top: 1px dashed var(--line-2); }

/* ---- 칭호 목록: 조밀한 타일 격자 ---- */
.ttl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .4rem 1rem; }
.ttl-score { display: flex; align-items: baseline; gap: .15rem; white-space: nowrap; }
.ttl-score b { font-size: var(--fs-display); font-family: var(--font-mono); color: var(--text-1); line-height: 1; }
.ttl-score .tag { margin-left: .4rem; align-self: center; }
.ttl-eq { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.ttl-eqname { --rc: var(--grade-common); color: var(--rc); font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.ttl-p-track { position: relative; height: 4px; background: var(--gauge-track); border-radius: 999px; overflow: hidden; flex: 1; min-width: 3rem; }
.ttl-p-track.big { height: 6px; }
.ttl-p-track > span { display: block; height: 100%; background: var(--rc, var(--accent)); border-radius: 999px; }
.ttl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.ttl-filters select { width: auto; min-height: 30px; padding-top: .1rem; padding-bottom: .1rem; font-size: var(--fs-caption); }
.ttl-chk { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-caption); color: var(--text-3); cursor: pointer; }
.ttl-sec { display: flex; align-items: center; gap: .5rem; margin: .55rem 0 .1rem; font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); letter-spacing: .04em; }
.ttl-sec::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.ttl-sec .n { font-family: var(--font-mono); font-weight: 400; color: var(--text-4); }
/* 카드 색 통일(등급 색 띠 없음), 등급별 묶음, 조밀한 상자, 장착 불가는 통째로 회색 */
.ttl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: .25rem; }
.ttl-grid > .ttl { padding: .28rem .45rem .3rem; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-2); min-width: 0; }
.ttl-eqname.r-uncommon { --rc: var(--grade-fine); }
.ttl-eqname.r-rare { --rc: var(--grade-superior); }
.ttl-eqname.r-epic { --rc: var(--grade-rare); }
.ttl-eqname.r-legend { --rc: var(--grade-legend); }
.ttl-main { min-width: 0; display: grid; gap: .06rem; }
.ttl-top { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .3rem; line-height: 1.3; }
.ttl-n { color: var(--text-1); font-weight: 600; font-size: var(--fs-caption); overflow-wrap: anywhere; }
.ttl-chips { display: inline-flex; flex-wrap: wrap; gap: .2rem; }
.ttl-chips .tag { height: 1.1rem; padding: 0 .28rem; }
.ttl-c { font-size: var(--fs-micro); color: var(--text-3); line-height: 1.35; overflow-wrap: anywhere; }
.ttl-c.dim { color: var(--text-4); }
.ttl-c.warnline { color: var(--warning); }
.ttl-p { display: flex; align-items: center; gap: .4rem; }
.ttl-p-v { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-4); white-space: nowrap; }
.ttl-k { font-size: var(--fs-micro); color: var(--text-2); line-height: 1.35; }
.ttl-k span { color: var(--accent); font-weight: 600; }
.ttl-side { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; }
.ttl-side .mini { min-height: 22px; padding: 0 .45rem; }
.ttl-d { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-4); white-space: nowrap; }
.ttl-grid > .ttl.equipped { background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-1)); }
.ttl-grid > .ttl.off { background: var(--bg-1); border-color: var(--line-2); }
.ttl-grid > .ttl.off .ttl-n { color: var(--text-4); font-weight: 500; }
.ttl-grid > .ttl.off .ttl-c, .ttl-grid > .ttl.off .ttl-k, .ttl-grid > .ttl.off .ttl-k span { color: var(--text-4); }
.ttl-grid > .ttl.off .tag { color: var(--text-4); border-color: var(--line-2); background: transparent; }
.ttl-grid > .ttl.off .ttl-p-track > span { background: var(--text-4); }
.ttl-grid > .ttl.lost .ttl-n { text-decoration: line-through; text-decoration-color: var(--text-4); }
@media (max-width: 600px) {
  .ttl-head { grid-template-columns: auto minmax(0, 1fr); }
  .ttl-eq { grid-column: 1 / -1; justify-content: flex-start; }
  .ttl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- 무리 카드: 사람마다 네모 상자(미니 프로필), 영역은 테두리 패널, 단추는 모두 테두리 단추, 색은 위험에만 ---- */
.card.pt { display: flex; flex-direction: column; gap: .6rem; }
.pt-intro { margin: 0; font-size: var(--fs-caption); line-height: 1.55; color: var(--text-3); }
.pt-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); }
.pt-sum > div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; padding: .4rem .65rem; }
.pt-sum > div + div { border-left: 1px solid var(--line-2); }
.pt-sum .k { font-size: var(--fs-micro); color: var(--text-4); }
.pt-sum .v { font-size: var(--fs-ui); font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pt-sum .v small { margin-left: .1rem; font-size: var(--fs-caption); font-weight: 400; color: var(--text-4); }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: .5rem; }
.pt-mc { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-3); border-radius: var(--r-2); background: var(--bg-2); }
.pt-mc.self { border-color: var(--text-4); }
.pt-mc.down { border-color: var(--negative); }
.pt-mc-b { display: flex; flex-direction: column; gap: .3rem; padding: .5rem .6rem .45rem; }
.pt-mc-n { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.pt-mc-n .sw { flex: none; width: 9px; height: 9px; border-radius: 1px; background: var(--line-3); }
.pt-mc-n b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-ui); font-weight: 600; color: var(--text-1); }
.pt-tag { flex: none; padding: 0 .35rem; border: 1px solid var(--line-3); border-radius: var(--r-1); font-size: var(--fs-micro); line-height: 1.5; color: var(--text-2); }
.pt-mc-l { font-size: var(--fs-micro); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-hp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .45rem; font-size: var(--fs-micro); color: var(--text-3); font-variant-numeric: tabular-nums; }
.pt-hp .bar2 { height: 5px; overflow: hidden; background: var(--gauge-track); border: 1px solid var(--gauge-line); }
.pt-hp .bar2 i { display: block; height: 100%; background: var(--text-3); transition: width var(--dur-bar) var(--ease-std); }
.pt-hp.bad, .pt-mc.down .pt-mc-s .st { color: var(--negative); }
.pt-hp.bad .bar2 i { background: var(--negative); }
.pt-mc-s { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: var(--fs-caption); color: var(--text-2); }
.pt-mc-s .r { font-size: var(--fs-micro); color: var(--text-4); }
.pt-mc-s .r.ok { color: var(--text-1); font-weight: 600; }
.pt-mc-s .r.no { color: var(--negative); }
.pt-mc-a { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem .6rem; border-top: 1px solid var(--line-2); }
.pt-mc-a button { flex: 1 1 0; min-width: 0; min-height: 26px; padding: 0 .3rem; font-size: var(--fs-micro); }
.pt-panel { border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); }
.pt-panel > header { display: flex; align-items: center; gap: .5rem; padding: .35rem .65rem; background: var(--bg-3); border-bottom: 1px solid var(--line-2); font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); }
.pt-panel > header span { margin-left: auto; font-weight: 400; color: var(--text-4); font-variant-numeric: tabular-nums; }
.pt-prow { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .45rem .65rem; font-size: var(--fs-caption); }
.pt-prow + .pt-prow { border-top: 1px solid var(--line-1); }
.pt-prow b { font-weight: 600; color: var(--text-1); }
.pt-prow .m { color: var(--text-4); }
.pt-prow .q { color: var(--text-3); }
.pt-prow .note { flex-basis: 100%; font-size: var(--fs-micro); color: var(--text-2); }
.pt-prow .end { margin-left: auto; display: inline-flex; gap: .3rem; }
.pt-tally { display: inline-flex; flex-wrap: wrap; gap: .1rem .9rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pt-tally b { color: var(--text-1); }
.pt-tally .no, .pt-tally .no b { color: var(--negative); }
.pt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding-top: .55rem; border-top: 1px solid var(--line-2); }
.pt-foot .grow { flex: 1; }
.pt button.mini { min-height: 28px; }
@media (max-width: 600px) {
  .pt-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-sum > div:nth-child(3) { border-left: none; }
  .pt-sum > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .pt-mc-b { padding: .45rem .5rem .4rem; }
  .pt-mc-a { padding: .35rem .5rem; gap: .25rem; }
}

/* ---- 시작 화면: 장소 날씨 장면, 서버 상태, 대륙 지도 ---- */
.landing .land-scene { position: relative; width: min(100%, 720px); margin: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-1); }
.landing .land-scene .ph-scene { display: block; width: 100%; height: 170px; }
.landing .land-scene figcaption { position: absolute; left: .65rem; bottom: .45rem; font-size: var(--fs-micro); color: var(--text-2); text-align: left; text-shadow: 0 1px 2px rgba(0, 0, 0, .75); }
.landing .land-scene + .logo { margin-top: .2rem; }
.landing .tiles .srvstat .v { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.landing .tiles .srvstat .sub { font-size: var(--fs-micro); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); flex: none; }
.sdot.ok { background: var(--positive); }
.sdot.warn { background: var(--clr-amber); }
.sdot.bad { background: var(--negative); }
.landing .land-map { width: min(100%, 720px); display: grid; gap: .35rem; text-align: left; }
.land-map-h { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); }
.land-map-h .muted { font-weight: 400; font-size: var(--fs-micro); }
@media (max-width: 600px) {
  .landing .land-scene .ph-scene { height: 120px; }
  .landing .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 대륙 지도: 색 없이 바다, 격자, 땅. 고른 대륙은 강조선, 봉쇄 구역은 빗금 */
.cmap { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-1); }
.cmap .sea { fill: var(--bg-1); }
.cmap .grid line { stroke: var(--line-1); stroke-width: 1; }
.cmap .shape { fill: var(--bg-3); stroke: var(--line-3); stroke-width: 1; }
.cmap .hatch { stroke: var(--line-3); stroke-width: 1.2; }
.cmap .nm { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.cmap .ct { fill: var(--text-4); font-size: 10px; }
.cmap .cland.pick { cursor: pointer; }
.cmap .cland.pick:hover .shape { fill: var(--bg-4); stroke: var(--text-4); }
.cmap .cland.sel .shape { fill: var(--bg-4); stroke: var(--accent); stroke-width: 1.6; }
.cmap .cland.sel .nm { fill: var(--text-1); }
.cmap .cland.zone .shape { fill: url(#cmapHatch); stroke-dasharray: 3 3; }
.cmap .cland.shut { opacity: .45; }
.cmap .cland:focus { outline: none; }
.cmap .cland:focus-visible .shape { stroke: var(--accent); stroke-width: 2; }

/* ---- 캐릭터 생성 화면: 번호 패널 다섯 개 ---- */
.cc { max-width: 760px; margin: 0 auto; }
.cc-head h1 { margin: 0; }
.cc-head p { margin: .2rem 0 0; }
.cc-sec { border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--card-bg); }
.cc-sec > header { display: flex; align-items: center; gap: .55rem; padding: .45rem .75rem; background: var(--bg-3); border-bottom: 1px solid var(--line-2); }
.cc-sec > header .no { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border: 1px solid var(--line-3); border-radius: var(--r-1); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-2); }
.cc-sec > header h3 { margin: 0; font-size: var(--fs-ui); font-weight: 600; color: var(--text-1); }
.cc-sec > header .hint { margin-left: auto; font-size: var(--fs-micro); color: var(--text-4); }
.cc-body { display: flex; flex-direction: column; gap: .6rem; padding: .7rem .75rem .8rem; }
.cc-body label { display: block; margin-bottom: .2rem; font-size: var(--fs-caption); color: var(--text-3); }
.cc-grid3 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, 1.2fr); gap: .6rem; }
.cc-desc { margin: 0; line-height: 1.6; color: var(--text-2); }
.cc-occ { display: flex; flex-direction: column; gap: .5rem; padding: .6rem .7rem; border: 1px solid var(--line-1); border-radius: var(--r-2); background: var(--bg-2); font-size: var(--fs-caption); }
.cc-occ .kv { margin: 0; }
.cc-bars { display: grid; gap: .3rem; }
.cc-sub { font-size: var(--fs-caption); font-weight: 600; color: var(--text-3); padding-top: .2rem; border-top: 1px solid var(--line-1); }
.cc-preview { font-size: var(--fs-caption); }
.cc-preview .kv { margin: 0; grid-template-columns: repeat(3, max-content minmax(3rem, 1fr)); gap: .25rem .8rem; }
.cc-preview .kv dd { color: var(--text-1); font-variant-numeric: tabular-nums; }
.cc .radarwrap > .attrs { width: 100%; }
.cc-colors { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.cc-colors .swatch { width: 22px; height: 22px; margin-right: .3rem; }
.cc-cont { display: flex; flex-direction: column; gap: .2rem; font-size: var(--fs-caption); }
.cc-cont p { margin: 0; line-height: 1.55; }
.cc-foot { display: flex; flex-direction: column; gap: .5rem; padding-top: .2rem; }
@media (max-width: 600px) {
  .cc-grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cc-grid3 > :first-child { grid-column: 1 / -1; }
  .cc-preview .kv { grid-template-columns: repeat(2, max-content minmax(2.5rem, 1fr)); }
}

/* ---- 탐사 중 무리원 상태(탐사 카드와 탐사 내역 창), 동작 단추 한 줄 ---- */
.xm-wrap { display: flex; flex-direction: column; gap: .3rem; }
.xm-h { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.xm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .3rem; }
.xm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .15rem .4rem; padding: .3rem .45rem; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); font-size: var(--fs-micro); }
.xm .n { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-caption); font-weight: 600; color: var(--text-1); }
.xm .b { height: 4px; overflow: hidden; background: var(--gauge-track); border: 1px solid var(--gauge-line); }
.xm .b i { display: block; height: 100%; background: var(--text-3); transition: width var(--dur-bar) var(--ease-std); }
.xm .v { color: var(--text-3); font-variant-numeric: tabular-nums; }
.xm .s { grid-column: 1 / -1; color: var(--negative); }
.xm.self { border-color: var(--text-4); }
.xm.bad { border-color: var(--negative); }
.xm.bad .b i { background: var(--negative); }
.xm.bad .v { color: var(--negative); }
.xp-acts { gap: .4rem; }
.xp-acts > button { flex: 1 1 auto; }
.lv-party { margin: .35rem 0 .1rem; }
.lv-party .xm-list { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .25rem; }

/* 모바일 사람 창에서 닫기 줄이 목록 위를 떠다녀 겹친 사람을 못 누르지 않게, 창을 세로 flex 로 두고 목록만 스크롤, 닫기 줄은 창 바닥에 고정 */
.modal .card.pplm { display: flex; flex-direction: column; overflow: hidden; }
.modal .card.pplm > .people.inmodal { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal .card.pplm > .row:last-child { position: static; margin: 0; padding: .5rem 0 0; flex: none; }
.eq .eqstat { margin-left: .35rem; font-family: var(--font-mono); }

/* 차량 좌석 배치: 위에서 내려다본 차체. 다인승은 2+통로+2, 자동차 2열, 오토바이 1열. 채움과 테두리로만 구분 */
.veh-top { position: relative; display: inline-grid; gap: 4px 5px; padding: 22px 10px 12px; border: 1.5px solid var(--text-4); background: var(--bg-1); border-radius: 18px 18px 8px 8px; margin: .2rem 0; max-width: 100%; }
.veh-top::before { content: ''; position: absolute; left: 14px; right: 14px; top: 9px; border-top: 1.5px solid var(--line-3); }
.veh-top::after { content: ''; position: absolute; right: -2px; top: 44px; width: 3px; height: 22px; background: var(--text-4); border-radius: 2px; }
/* 자전거처럼 칸이 한 줄이면 문이 아래로 삐져나오므로(모바일), 한두 열 차량은 문을 세로 가운데에 둔다 */
.veh-top.c1::after, .veh-top.c2::after { top: 50%; margin-top: -11px; }
.veh-top.limo { border-radius: 14px 14px 8px 8px; padding-top: 26px; row-gap: 5px; }
.veh-top.limo::after { top: auto; bottom: 34px; height: 30px; }
.veh-top.c4 { grid-template-columns: auto auto 14px auto auto; }
.veh-top.c2 { grid-template-columns: auto auto; }
.veh-top.c1 { grid-template-columns: auto; border-radius: 18px 18px 12px 12px; }
.veh-top .aisle { width: 14px; }
.veh-top .seat { width: 84px; min-height: 32px; border: 1px solid var(--line-2); border-radius: 3px 3px 6px 6px; background: var(--bg-1); display: flex; align-items: center; padding: 2px 6px; font-size: .78rem; line-height: 1.15; word-break: break-all; position: relative; color: var(--text-1); }
/* 탔다(실선, 초록 테두리, "탔다")와 아직 안 탐(점선, 주황 테두리, "아직")을 한눈에. 칸 안에 이름과 상태 두 줄 */
.veh-top .seat { min-height: 38px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 3px 7px; }
.veh-top .seat .nm { font-weight: 600; }
.veh-top .seat .sub { font-size: .66rem; line-height: 1; margin-top: 2px; color: var(--text-3); }
.veh-top .seat.boarded { background: var(--bg-4); border-color: var(--band-ok); }
.veh-top .seat.boarded .sub { color: var(--band-ok); }
.veh-top .seat.auto { border-style: dashed; border-color: var(--band-warn); }
.veh-top .seat.auto .nm { color: var(--text-2); font-weight: 400; }
.veh-top .seat.auto .sub { color: var(--band-warn); }
.veh-top .seat.empty { color: var(--text-4); border-color: var(--line-1); justify-content: center; align-items: center; }
.veh-top .seat.empty .nm { font-weight: 400; font-size: .72rem; }
.veh-top .seat.driver { flex-direction: row; align-items: center; }
.ride-sum { display: flex; gap: 10px 14px; flex-wrap: wrap; font-size: .82rem; align-items: baseline; }
.ride-sum b { font-family: var(--font-mono); font-size: 1rem; margin-right: 2px; }
.ride-sum .on { color: var(--band-ok); }
.ride-sum .wait { color: var(--band-warn); }
.ride-sum .free { color: var(--text-4); }
.ride-sum > .muted { margin-left: auto; }
.ride-me { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line-2); border-left: 3px solid var(--band-ok); background: var(--bg-3); font-size: .85rem; border-radius: 3px; }
.ride-me.wait { border-left-color: var(--band-warn); }
.ride-me .st { font-weight: 700; }
.veh-top .seat.driver { background: var(--bg-3); border-color: var(--text-3); }
.veh-top .seat.me { outline: 2px solid var(--text-1); outline-offset: 1px; }
.veh-top .seat.me .nm::after { content: ' 나'; font-size: .62rem; color: var(--text-1); background: var(--bg-0); border: 1px solid var(--text-3); border-radius: 2px; padding: 0 3px; margin-left: 3px; vertical-align: 1px; }
.veh-top .seat.can { cursor: pointer; }
.veh-top .seat.can:hover { border-color: var(--text-2); }
.veh-top .seat.empty.can { color: var(--text-4); }
.veh-top .seat .wheel { width: 10px; height: 10px; border: 2px solid var(--text-2); border-radius: 50%; flex: none; margin-right: 4px; }
.veh-top .seat .nm { overflow: hidden; }
.seat-legend { display: flex; gap: .7rem; flex-wrap: wrap; }
.seat-legend span { display: inline-flex; align-items: center; gap: 4px; }
.seat-legend .k { width: 14px; height: 10px; border: 1px solid var(--line-3); border-radius: 2px; display: inline-block; }
.seat-legend .k.d { background: var(--bg-3); border-color: var(--text-3); }
.seat-legend .k.b { background: var(--bg-4); border-color: var(--band-ok); }
.seat-legend .k.a { border-style: dashed; border-color: var(--band-warn); }
.seat-legend .k.e { border-color: var(--line-1); }
.nonriders { gap: .25rem .5rem; }
.vehcard .linkish { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 480px) { .veh-top { gap: 3px 4px; padding: 18px 8px 10px; } .veh-top .seat { width: 66px; min-height: 30px; font-size: .7rem; padding: 2px 4px; } .veh-top.c4 { grid-template-columns: auto auto 10px auto auto; } .veh-top .aisle { width: 10px; } }
.svc .svc-line { border-top: 1px solid var(--line-1); padding-top: .35rem; display: grid; gap: .2rem; }
.svc .svc-line:first-of-type { border-top: 0; }

/* 관계 창: 상단 "관계". 탭 3개, 한 줄에 사진(접속 점), 이름, 칭호, 칩, 둘째 줄 위치와 메모 */
.rel-tabs { display: flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--bg-1); }
.rel-tabs button { flex: 1; border: none; border-radius: 0; min-height: 30px; background: transparent; color: var(--text-3); font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 .3rem; }
.rel-tabs button b { font-family: var(--font-mono); font-size: .8rem; color: var(--text-2); }
.rel-tabs button.active { background: var(--bg-3); color: var(--text-1); box-shadow: inset 0 -2px 0 var(--text-2); }
.rel-cap { display: flex; justify-content: space-between; color: var(--text-4); font-size: .72rem; font-family: var(--font-mono); margin: 0 2px; }
.rel-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 6px 9px; align-items: center; padding: 6px 8px; border: 1px solid var(--line-1); border-left: 3px solid var(--line-2); border-radius: 0 4px 4px 0; background: var(--bg-1); }
.rel-row.bond { border-left-color: var(--positive); }
.rel-row.nemesis { border-left-color: var(--clr-crimson); }
.rel-row.capped { border-left-color: var(--clr-mustard); }
.rel-row.gone { opacity: .6; }
.rel-row .rel-av { width: 34px; height: 34px; font-size: .8rem; overflow: visible; }
.rel-row .rel-av .dot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-4); border: 2px solid var(--bg-1); z-index: 1; }
.rel-row .rel-av .dot.on { background: var(--band-ok); }
.rel-row .rel-av .dot.away { background: var(--band-warn); }
.rel-row .main { min-width: 0; }
.rel-row .l1 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; line-height: 1.2; }
.rel-row .l1 strong { font-size: .9rem; }
.rel-row .l1 .ttl { color: var(--text-3); font-size: .74rem; }
.rel-row .l2 { color: var(--text-3); font-size: .74rem; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.rel-row .l2 .memo { color: var(--text-2); font-style: italic; }
.rel-row .l2 .dir { font-family: var(--font-mono); color: var(--text-4); }
.rel-row .l3 { font-size: .72rem; margin-top: 3px; }
.rel-row .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 9rem; }
.rel-row .acts button { min-height: 24px; height: 24px; padding: 0 .45rem; font-size: .7rem; }
.tag.t { height: 1.15rem; padding: 0 .35rem; font-size: .62rem; }
.tag.camp { color: var(--clr-teal); border-color: color-mix(in srgb, var(--clr-teal) 40%, transparent); }
.tag.party { color: var(--clr-mustard); border-color: color-mix(in srgb, var(--clr-mustard) 40%, transparent); }
.rel-empty { color: var(--text-4); font-size: .8rem; padding: 14px 4px; text-align: center; }
@media (max-width: 480px) { .rel-row { grid-template-columns: 30px 1fr; } .rel-row .acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } .rel-row .rel-av { width: 30px; height: 30px; } }

.sactions .smove { gap: 4px; align-items: center; }
.sactions .smove select { min-height: 26px; height: 26px; font-size: .74rem; padding: 0 .35rem; max-width: 11rem; }
/* 버그 제보 관리: 관리자 개인 구분선과 북마크 카드 */
.bug-divider { display: flex; align-items: center; gap: .6rem; margin: .35rem 0; cursor: pointer; color: var(--clr-mustard); font-size: var(--fs-micro); letter-spacing: .08em; }
.bug-divider::before, .bug-divider::after { content: ''; flex: 1; border-top: 2px dashed var(--clr-mustard); opacity: .7; }
.card.marked { border-left: 3px solid var(--clr-mustard); }
/* 채팅 기록 맨 위 줄 제거 때 스크롤은 app.js 가 직접 보정하므로 브라우저 자동 보정을 끈다 */
.clines { overflow-anchor: none; }

/* 운영진 캐릭터 이름 */
.gmtag { display: inline-block; margin-right: 0.35em; padding: 0 0.4em; border: 1px solid var(--chat-gm, #d4ac0d); border-radius: 3px; color: var(--chat-gm, #d4ac0d); font-size: 0.72em; font-weight: 700; letter-spacing: 0.04em; vertical-align: 0.1em; }
.gmname { font-weight: 700; text-shadow: 0 0 6px color-mix(in srgb, var(--chat-gm, #d4ac0d) 55%, transparent); }

/* 캠프 상징색 점 */
.campdots { margin: 0 0.3em; font-size: 0.6em; letter-spacing: 0.12em; vertical-align: 0.25em; }
