:root {
  --bg: #121311;
  --bg2: #1a1c19;
  --card: #1f221e;
  --card2: #272b26;
  --line: #353a33;
  --text: #e6e4dc;
  --muted: #9a9b90;
  --accent: #d9a441;
  --accent2: #f0c46a;
  --danger: #d0574a;
  --ok: #79b36a;
  --blue: #6aa0c8;
  --purple: #a48ad0;
  --radius: 10px;
  font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
/* 글자 크기: 설정에서 기본 14px / 크게 16px / 더 크게 18px. 나머지 글자는 모두 rem(기본 14px 기준) */
html { font-size: 1rem; }
html.fs-l { font-size: 1.1429rem; }
html.fs-xl { font-size: 1.2857rem; }
body { font-size: 1rem; }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.8571rem; }
.error { color: var(--danger); min-height: 1.4em; margin: 8px 0 0; }

.btn { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: .15s; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1406; font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: var(--accent2); }
.btn.danger { border-color: var(--danger); color: #f1b3aa; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 0.8571rem; }
.btn.wide { width: 100%; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 0.8571rem; }

input, select { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 0.9286rem; }
label input { margin-top: 4px; color: var(--text); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs.small button { padding: 6px 10px; font-size: 0.9286rem; }

/* 로그인 */
#screen-auth { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at top, #2a2618 0%, var(--bg) 60%); }
.auth-box { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.logo { margin: 0 0 8px; font-size: 2.1429rem; letter-spacing: -1px; }
.logo span { display: block; font-size: 0.9286rem; color: var(--accent); letter-spacing: 0; font-weight: 500; }

/* 캐릭터 생성 */
#screen-create { min-height: 100vh; padding: 16px; }
.create-wrap { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.create-head h1 { margin: 8px 0; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.steps li { padding: 4px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 0.9286rem; }
.steps li.on { border-color: var(--accent); color: var(--text); }
.steps li.done { color: var(--ok); }
.create-body { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-height: 420px; }
.create-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.q-card { max-width: 560px; margin: 20px auto; text-align: center; }
.q-num { color: var(--accent); font-size: 0.9286rem; }
.q-text { font-size: 1.4286rem; margin: 12px 0 24px; }
.q-opts { display: grid; gap: 10px; }
.q-opts button { text-align: left; padding: 16px; font-size: 1.0714rem; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.q-opts button:hover { border-color: var(--accent); }
.progress { height: 4px; background: var(--card2); border-radius: 4px; overflow: hidden; margin-top: 24px; }
.progress > div { height: 100%; background: var(--accent); transition: width .2s; }
.mbti-big { font-size: 4rem; font-weight: 800; letter-spacing: 6px; text-align: center; margin: 8px 0; color: var(--accent2); }
.axis-row { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 10px; margin: 10px 0; }
.axis-row .l { text-align: right; } .axis-row .r { text-align: left; }
.seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.seg button { padding: 6px 0; border: 1px solid var(--line); background: var(--card2); border-radius: 6px; cursor: pointer; font-size: 0.8571rem; color: var(--muted); }
.seg button.on { background: var(--accent); color: #1a1406; border-color: var(--accent); font-weight: 700; }
.stat-row { display: grid; grid-template-columns: 90px 36px 1fr 36px 60px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.stat-row .v { text-align: center; font-size: 1.4286rem; font-weight: 700; }
.stat-row .d { font-size: 0.8571rem; color: var(--muted); grid-column: 1 / -1; margin-top: -4px; }
.stat-row .final { color: var(--accent2); font-size: 0.8571rem; text-align: right; }
.points { font-size: 1.2857rem; margin-bottom: 12px; }
.points b { color: var(--accent2); }
.tag-cat { margin-bottom: 18px; }
.tag-cat h3 { margin: 0 0 6px; font-size: 1.0714rem; }
.tag-cat h3 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card2); padding: 6px 10px; border-radius: 99px; cursor: pointer; font-size: 0.9286rem; display: inline-flex; gap: 6px; align-items: center; }
.chip .cost { font-size: 0.7857rem; padding: 0 5px; border-radius: 4px; background: var(--bg2); color: var(--muted); }
.chip .cost.neg { color: var(--ok); }
.chip .cost.pos { color: var(--accent2); }
.chip.on { border-color: var(--accent); background: #3a3120; }
.chip.dis { opacity: .35; cursor: not-allowed; }
.tag-desc { min-height: 2.8em; color: var(--muted); font-size: 0.9286rem; margin: 6px 0 0; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.policy-grid button { text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--card2); border-radius: 10px; cursor: pointer; }
.policy-grid button.on { border-color: var(--accent); background: #3a3120; }
.policy-grid b { display: block; }
.policy-grid span { font-size: 0.8571rem; color: var(--muted); }
.place-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sheet h2 { margin: 0; }
.sheet .box { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sheet .box h4 { margin: 0 0 8px; color: var(--accent); font-size: 0.9286rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 0.9286rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* 메인 */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.tb-left, .tb-right, .tb-mid { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.day { color: var(--accent2); font-size: 1.1429rem; }
.clock { font-variant-numeric: tabular-nums; font-size: 1.1429rem; font-weight: 700; }
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 460px; gap: 14px; padding: 14px; max-width: 1500px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card-title { font-weight: 700; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec { margin-top: 14px; }
.sec-title { font-size: 0.8571rem; color: var(--muted); margin-bottom: 6px; letter-spacing: .5px; }

.char-name { font-size: 1.4286rem; font-weight: 800; }
.char-sub { color: var(--muted); font-size: 0.9286rem; }
.tagline { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tagline span { font-size: 0.7857rem; padding: 1px 7px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); }
.bar { display: grid; grid-template-columns: 58px 1fr 34px; align-items: center; gap: 8px; font-size: 0.8571rem; margin: 4px 0; }
.bar .track { height: 8px; background: var(--bg2); border-radius: 8px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 8px; transition: width .4s; }
.bar .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 0.8571rem; }
.stats-mini div { background: var(--bg2); border-radius: 6px; padding: 3px 6px; display: flex; justify-content: space-between; }
.inv { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.8571rem; }
.inv span { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.inv span b { color: var(--accent2); margin-left: 3px; }
.warn { background: #3b1c18; border: 1px solid var(--danger); color: #f1b3aa; padding: 8px 10px; border-radius: 8px; font-size: 0.9286rem; margin-top: 10px; }

.now-card { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 170px; height: 170px; }
.ring svg { transform: rotate(-90deg); }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .time { font-size: 2.1429rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring .lbl { font-size: 0.8571rem; color: var(--muted); }
.now-title { font-size: 1.4286rem; font-weight: 800; margin: 0 0 4px; }
.now-sub { color: var(--muted); margin-bottom: 12px; }
.now-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.presence { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; font-size: 0.9286rem; }
.presence select { width: auto; padding: 5px 8px; }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.switch input { width: auto; }

.act-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.act { border: 1px solid var(--line); background: var(--card2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.act.dis { opacity: .5; }
.act .t { font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.act .d { font-size: 0.8571rem; color: var(--muted); }
.act .mins { display: flex; gap: 4px; flex-wrap: wrap; }
.act .mins button { padding: 3px 9px; font-size: 0.8571rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.act .mins button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent2); }
.act .mins button:disabled { cursor: not-allowed; opacity: .5; }
.act .req { font-size: 0.8571rem; }
.act .req .miss { color: var(--danger); }
.act select { padding: 4px 6px; font-size: 0.8571rem; }

.map-wrap { position: relative; width: 100%; aspect-ratio: 1; }
.map-wrap canvas { display: block; width: 100%; height: 100%; border-radius: 8px; cursor: crosshair; }
.map-info { min-height: 3em; font-size: 0.9286rem; margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.7857rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.picking #map { outline: 2px solid var(--accent); }

.log-body { max-height: 420px; overflow-y: auto; font-size: 0.9286rem; display: flex; flex-direction: column; gap: 2px; }
.log-line { padding: 5px 8px; border-radius: 6px; display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.log-line .ts { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.8571rem; }
.log-line.auto { color: #c9c7bc; }
.log-line.player { color: var(--text); }
.log-line.result { background: #20251d; }
.log-line.combat { background: #2d1e1b; color: #f1c0b7; }
.log-line.death { background: #3b1c18; color: #ff9d8f; font-weight: 700; }
.log-line.big { background: #2e2818; color: var(--accent2); }
.log-line.social { background: #1d2230; color: #b8cdf0; }
.log-line.weather { color: var(--blue); }
.log-line.danger { color: #f1b3aa; }
.day-sep { text-align: center; color: var(--muted); font-size: 0.7857rem; margin: 8px 0 2px; }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px; background: var(--bg2); border-radius: 8px; font-size: 0.9286rem; }
.person .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--accent); padding: 10px 18px; border-radius: 10px; z-index: 100; max-width: 90vw; box-shadow: 0 6px 24px #0008; } /* 창(모달) 위에 보이게 */
.toast.err { border-color: var(--danger); }

.dead-card { text-align: center; padding: 30px; }
.dead-card h2 { color: var(--danger); }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; padding: 10px; }
  .col-right { display: flex; }
  .col-center { order: -1; }
  .now-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .now-controls, .presence { justify-content: center; }
  .place-grid, .sheet { grid-template-columns: 1fr; }
  .create-body { padding: 16px; }
  .stat-row { grid-template-columns: 70px 36px 1fr 36px 50px; }
}

/* 날씨 효과 · 설정 */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
.btn.icon { padding: 4px 8px; }
.modal { position: fixed; inset: 0; background: #000a; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-box { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h2 { margin: 0; }
.set-sec { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.set-sec h3 { margin: 0 0 10px; font-size: 1rem; color: var(--accent); }
.slider { display: grid; grid-template-columns: 90px 1fr 42px; align-items: center; gap: 10px; margin: 10px 0; font-size: 0.9286rem; }
.slider input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.slider select { grid-column: 2 / 4; }
.slider b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.files { list-style: none; padding: 0; margin: 0; font-size: 0.8571rem; display: grid; gap: 3px; }
.files li { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; padding: 4px 6px; background: var(--bg2); border-radius: 6px; }
.files code { color: var(--accent2); }
.files .ok { color: var(--ok); } .files .no { color: var(--muted); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.8571rem; }
.sound-hint { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 45; background: var(--card2); border: 1px solid var(--accent); padding: 8px 14px; border-radius: 99px; font-size: 0.9286rem; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .progress > div, .bar .fill { transition: none; } }

/* ── 2단계: HUD 지도 · 지역 상세 · 카드 전투 ── */
.hud { font-family: 'Rajdhani', 'Pretendard', 'Noto Sans KR', sans-serif; }
.map-card { background: #08141a; border-color: #1f4453; }
.map-card .card-title span:first-child { color: #39d0ff; letter-spacing: 1.5px; font-size: 0.9286rem; }
.map-wrap { position: relative; width: 100%; aspect-ratio: 1; }
.map-wrap canvas { display: block; width: 100%; height: 100%; cursor: crosshair; border-radius: 6px; }
.map-tip { position: fixed; pointer-events: none; background: #000d; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 0.8571rem; white-space: nowrap; z-index: 40; border: 1px solid #ffffff22; }
.legend span { margin-right: 10px; }
.tile-card { padding: 0; overflow: hidden; }
.tile-card .empty { padding: 16px; color: var(--muted); }
.mood { position: relative; height: 150px; background: #0a0f12 center / cover no-repeat; }
.mood .over { position: absolute; inset: auto 0 0 0; padding: 10px 14px; background: linear-gradient(transparent, #000c); }
.mood h3 { margin: 0; font-size: 1.4286rem; }
.mood .sub { font-size: 0.8571rem; color: #cfd6d0; }
.tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pips i { width: 14px; height: 6px; background: #2b2f2a; }
.pips i.on { background: var(--danger); }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.site { border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 8px; cursor: pointer; text-align: left; }
.site.on { border-color: var(--accent); background: #3a3120; }
.site b { display: block; font-size: 0.9286rem; }
.site .meter { height: 5px; background: #2b2f2a; margin-top: 6px; border-radius: 3px; overflow: hidden; }
.site .meter i { display: block; height: 100%; background: var(--ok); }
.site small { color: var(--muted); }
.tile-actions { display: flex; flex-direction: column; gap: 8px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.note { background: #2a2518; border: 1px solid #5a4a28; border-radius: 8px; padding: 8px 10px; font-size: 0.9286rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.note b { color: var(--accent2); }
.subtle { font-size: 0.8571rem; color: var(--muted); }
.away-banner { background: #1d2a33; border: 1px solid var(--blue); color: #cfe6f5; padding: 8px 12px; border-radius: 8px; font-size: 0.9286rem; margin-top: 10px; }
.idle-big { font-size: 1.7143rem; }
.speed { font-size: 0.7857rem; padding: 1px 6px; border-radius: 4px; background: #3a3120; color: var(--accent2); margin-left: 6px; }

.modal-box.wide { max-width: 860px; }
.result-box { max-width: 460px; padding: 0; overflow: hidden; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .result-box { animation: none; } }
.res-head { padding: 16px 18px 12px; background: linear-gradient(135deg, #2a2418, #1f221e); border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.res-head.bad { background: linear-gradient(135deg, #3a1d19, #1f221e); }
.res-head.dead { background: linear-gradient(135deg, #4a1512, #1a0f0e); }
.res-icon { font-size: 2.1429rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #0006; flex: none; }
.res-head h2 { margin: 0; font-size: 1.2857rem; }
.res-head .sub { font-size: 0.8571rem; color: var(--muted); }
.res-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.res-lines div { font-size: 1rem; padding: 3px 0; }
.res-lines .combat { color: #f1c0b7; } .res-lines .death { color: #ff9d8f; font-weight: 700; } .res-lines .big { color: var(--accent2); }
.res-sec { font-size: 0.8571rem; color: var(--muted); margin-bottom: 4px; }
.res-items { display: flex; flex-wrap: wrap; gap: 5px; }
.res-items span { padding: 3px 9px; border-radius: 99px; font-size: 0.9286rem; background: var(--bg2); border: 1px solid var(--line); }
.res-items .plus { border-color: #4f7a45; color: #b5e3a8; }
.rar { font-style: normal; font-size: 0.78rem; padding: 1px 6px; border-radius: 6px; margin-left: 4px; border: 1px solid; white-space: nowrap; }
.rar.r1 { color: #b9c2b4; border-color: #5a6356; }
.rar.r2 { color: #9fd2ff; border-color: #3d6a92; }
.rar.r3 { color: #d8b4ff; border-color: #6d4a92; }
.rar.r4 { color: #ffc46b; border-color: #93692a; }
.rar.r5 { color: #ff8f6b; border-color: #a2452a; background: #3a1d14; box-shadow: 0 0 8px #ff6b3d55; }
.res-items .minus { border-color: #7a453f; color: #f1b3aa; }
.res-needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; font-size: 0.9286rem; }
.res-needs span { background: var(--bg2); border-radius: 6px; padding: 3px 8px; display: flex; justify-content: space-between; }
.res-needs .good { color: var(--ok); } .res-needs .bad { color: #f1b3aa; }
.res-foot { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.cards-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.battle { background: #050a0cee; }
.battle-box { width: 100%; max-width: 1000px; max-height: 94vh; overflow-y: auto; background: #0b1418; border: 1px solid #1f4453; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bt-head h2 { margin: 0; font-size: 1.2857rem; }
.nodes { display: flex; gap: 6px; align-items: center; }
.nodes span { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #2a5a6e; display: grid; place-items: center; font-size: 0.8571rem; color: #6f9aab; }
.nodes span.done { background: #16303a; color: #cfeaf3; }
.nodes span.now { border-color: var(--accent2); color: var(--accent2); }
.arena { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: end; min-height: 200px; background: radial-gradient(ellipse at 70% 60%, #1a2a30 0%, #0b1418 70%); border-radius: 12px; padding: 16px; }
.player-box, .enemy { background: #0f1f26; border: 1px solid #1f4453; border-radius: 10px; padding: 10px; }
.enemies { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.enemy { width: 170px; cursor: pointer; position: relative; }
.enemy.target { border-color: var(--accent2); box-shadow: 0 0 0 2px #ffb13b44; }
.enemy.dead { opacity: .3; cursor: default; }
.enemy .nm { font-weight: 700; }
.intent { font-size: 0.9286rem; margin: 6px 0; color: #ffd08a; }
.intent.bite { color: #ff8a8a; }
.hpbar { height: 8px; background: #22313a; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.hpbar i { display: block; height: 100%; background: var(--danger); }
.hpbar.me i { background: var(--ok); }
.chips-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; font-size: 0.7857rem; }
.chips-row span { padding: 1px 6px; border-radius: 4px; background: #1c2c33; }
.energy { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #ffb13b; color: #1a1406; font-weight: 800; font-size: 1.2857rem; }
.hand { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 150px; }
.card-c { width: 120px; min-height: 150px; border-radius: 10px; border: 2px solid #3a5a66; background: linear-gradient(#16262d, #0f1a1f); padding: 8px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; position: relative; text-align: left; color: var(--text); transition: transform .12s; }
.card-c:hover:not(:disabled) { transform: translateY(-6px); border-color: var(--accent2); }
.card-c:disabled { opacity: .45; cursor: not-allowed; }
.card-c.atk { border-color: #7a3a33; } .card-c.def { border-color: #33607a; } .card-c.skill { border-color: #5a4a7a; }
.card-c .cost { position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; border-radius: 50%; background: #ffb13b; color: #1a1406; font-weight: 800; display: grid; place-items: center; font-size: 0.9286rem; }
.card-c .cn { font-weight: 700; font-size: 1rem; margin-top: 4px; }
.card-c .ct { font-size: 0.7857rem; color: var(--muted); }
.card-c .cd { font-size: 0.8571rem; line-height: 1.4; }
.card-c.rare { box-shadow: 0 0 0 1px #ffb13b88 inset; }
/* 카드 움직임: 들어오기 · 내기 · 기력 부족 · 턴 끝 */
.card-c.lack { opacity: .45; cursor: not-allowed; }
.card-c.lack:hover { transform: none !important; border-color: inherit; }
.card-c.deal { animation: cardDeal .28s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: var(--d, 0s); }
@keyframes cardDeal { from { opacity: 0; transform: translate(-320px, 60px) rotate(-12deg) scale(.85); } to { opacity: 1; transform: none; } }
.card-c.played { animation: cardPlay .22s ease-in forwards; pointer-events: none; }
@keyframes cardPlay { to { opacity: 0; transform: translate(40px, -170px) scale(.6) rotate(6deg); } }
.card-c.nope { animation: cardNope .26s linear; }
@keyframes cardNope { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.hand.discard .card-c { animation: cardDiscard .28s ease-in forwards; animation-delay: var(--dd, 0s); pointer-events: none; }
@keyframes cardDiscard { to { opacity: 0; transform: translate(360px, 90px) rotate(14deg) scale(.7); } }
@media (max-width: 800px) {
  .card-c.deal { animation-name: cardDealM; }
  @keyframes cardDealM { from { opacity: 0; transform: translate(-140px, 50px) rotate(-10deg) scale(.85); } to { opacity: 1; transform: none; } }
  .hand.discard .card-c { animation-name: cardDiscardM; }
  @keyframes cardDiscardM { to { opacity: 0; transform: translate(150px, 80px) rotate(12deg) scale(.7); } }
}
@media (prefers-reduced-motion: reduce) { .card-c.deal, .card-c.played, .card-c.nope, .hand.discard .card-c { animation: none !important; } }
.bt-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bt-log { font-size: 0.8571rem; color: #9fb4bd; max-height: 120px; overflow-y: auto; background: #0a1216; border-radius: 8px; padding: 8px 10px; }
.bt-log div { padding: 1px 0; }
.bt-center { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 10px; }
.bt-center p { max-width: 560px; }
.loot { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; font-size: 0.8571rem; }
.loot span { background: #1c2c33; padding: 2px 8px; border-radius: 6px; }

.note-grid { display: grid; gap: 10px; }
.note-grid select { width: 100%; }
.note-preview { background: #2a2518; border: 1px solid #5a4a28; border-radius: 8px; padding: 12px; font-size: 1.1429rem; text-align: center; min-height: 48px; }

.cheat-box h4 { margin: 14px 0 6px; color: var(--accent); font-size: 0.9286rem; }
.cheat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cheat-grid label { margin: 0; }
.cheat-grid input, .cheat-grid select { padding: 5px 7px; font-size: 0.9286rem; }
.cheat-msg { font-size: 0.9286rem; color: var(--ok); min-height: 1.4em; }
@media (max-width: 1200px) { .col-right { display: flex; } }
@media (max-width: 800px) { .arena { grid-template-columns: 1fr; } .card-c { width: 100px; } }

/* 모바일 보정: 전투 창 */
.battle-box > * { flex-shrink: 0; }
.battle-box { max-height: 94dvh; }
.modal-box { max-height: 90dvh; }
@media (max-width: 600px) {
  .modal { padding: 8px; }
  .battle-box { padding: 12px; gap: 10px; max-height: calc(100dvh - 16px); border-radius: 12px; }
  .bt-head h2 { font-size: 1.1429rem; line-height: 1.35; }
  .arena { grid-template-columns: 1fr; gap: 10px; padding: 10px; min-height: 0; align-items: stretch; }
  .player-box { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; }
  .player-box > b, .player-box > .hpbar, .player-box > .subtle, .player-box > .chips-row { grid-column: 1; }
  .player-box > div:last-child { grid-column: 2; grid-row: 1 / span 4; margin-top: 0 !important; flex-direction: column; gap: 4px !important; text-align: center; }
  .player-box > div:last-child .subtle { font-size: 0.7857rem; }
  .energy { width: 38px; height: 38px; font-size: 1.2143rem; }
  .enemies { justify-content: stretch; gap: 8px; }
  .enemy { flex: 1 1 130px; width: auto; padding: 8px 10px; }
  .hand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; min-height: 0; padding: 8px 4px 0; }
  .card-c { width: auto; min-height: 112px; padding: 8px 7px; }
  .card-c:hover:not(:disabled) { transform: none; }
  .card-c .cn { font-size: 0.9286rem; }
  .card-c .cd { font-size: 0.8214rem; }
  .card-c .cost { top: -7px; left: -5px; width: 22px; height: 22px; font-size: 0.8571rem; }
  .bt-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .bt-foot > div { grid-column: 1 / -1; grid-row: 1; }
  .bt-foot .btn { width: 100%; padding: 12px 8px; }
  .bt-log { max-height: 90px; }
  .bt-center .hand { width: 100%; }
}

/* 내 생존자 탭 */
.roster { display: flex; gap: 8px; padding: 10px 14px 0; max-width: 1500px; margin: 0 auto; overflow-x: auto; scrollbar-width: thin; }
.ro-tab { flex: 0 0 auto; min-width: 150px; max-width: 220px; display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.ro-tab:hover { border-color: var(--accent); }
.ro-tab.on { border-color: var(--accent2); background: var(--card2); box-shadow: 0 0 0 1px var(--accent2) inset; }
.ro-tab.dead { opacity: .55; }
.ro-top { display: flex; gap: 6px; align-items: baseline; }
.ro-mbti { font-size: 0.7857rem; color: var(--muted); }
.ro-warn { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 0.7857rem; font-weight: 800; display: grid; place-items: center; }
.ro-sub { font-size: 0.8571rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-hp { height: 4px; background: #2a2e28; border-radius: 2px; overflow: hidden; }
.ro-hp i { display: block; height: 100%; background: var(--ok); }
.ro-new { border-style: dashed; justify-content: center; }
.ro-new b { color: var(--accent2); }
.ro-lock { align-self: center; font-size: 0.8571rem; color: var(--muted); padding: 0 6px; white-space: nowrap; }
/* 내 다른 생존자 카드 */
.comp { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 6px; display: grid; gap: 4px; }
.comp-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill.ok { border-color: var(--ok); color: var(--ok); }
.pill.subtle { color: var(--muted); }
.comp-edit summary { cursor: pointer; font-size: 0.8571rem; color: var(--accent2); }
.comp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin-top: 6px; }
.comp-row select, .comp-row input { padding: 5px 7px; font-size: 0.9286rem; min-width: 0; }
.comp-memo { display: grid; gap: 2px; font-size: 0.7857rem; color: var(--muted); margin: 0; flex: 1 1 110px; }
/* 캐릭터 생성: 관계 단계 */
.bond-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
.bond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 10px 0; }
.bond-grid button { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; text-align: center; }
.bond-grid button.on { border-color: var(--accent2); color: var(--accent2); background: var(--card2); }
.near-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
@media (max-width: 600px) {
  .roster { padding: 8px 10px 0; }
  .ro-tab { min-width: 128px; padding: 7px 10px; }
}

/* 프로필 사진 */
.avatar { display: inline-block; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: var(--card2); border: 1px solid var(--line); vertical-align: middle; }
.avatar.ph { display: inline-grid; place-items: center; color: var(--accent2); font-weight: 800; background: linear-gradient(135deg, #2c3129, #1b1e1a); }
.avatar.dead { filter: grayscale(1) brightness(.7); }
.char-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.av-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; line-height: 0; }
.av-btn .avatar { border: 2px solid var(--line); }
.av-btn:hover .avatar, .av-btn:focus-visible .avatar { border-color: var(--accent2); }
.av-edit { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; line-height: 1.4; font-size: 0.7857rem; padding: 1px 7px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); color: var(--accent2); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: 0.8571rem; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--text); }
.av-pick { display: flex; gap: 16px; align-items: center; margin: 10px 0 16px; }
.ro-top .avatar { margin-right: 2px; }
.comp-head .avatar { margin-right: 2px; }
.person { display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; }
.dead-card .avatar { margin-bottom: 8px; }
.av-modal { z-index: 90; }
.av-box { max-width: 380px; }
.av-stage { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 8px auto; border-radius: 10px; overflow: hidden; touch-action: none; }
.av-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.av-stage canvas:active { cursor: grabbing; }
.av-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.5); outline: 2px solid var(--accent2); outline-offset: -2px; }
.av-zoom { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: 0.9286rem; }
.av-zoom input { accent-color: var(--accent); padding: 0; border: 0; background: none; }

/* 설정: 지우기 */
.danger-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.danger-row + .danger-row { border-top: 1px dashed var(--line); }
.danger-box { background: #2a1917; border: 1px solid #6b3530; border-radius: 8px; padding: 10px 12px; margin: 4px 0 8px; }
.danger-box label { display: grid; gap: 4px; margin: 6px 0 0; }
.danger-box input { max-width: 220px; }
#tb-day { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.profile-edit { display: grid; gap: 6px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.profile-edit label { display: grid; gap: 3px; font-size: 0.8571rem; color: var(--muted); margin: 0; }
.profile-edit input { font-size: 1rem; }

/* 특수 이벤트 */
.log-line.event { background: #2a2414; color: #ffd98a; font-weight: 600; }
.log-line.danger { background: #3a1a18; }
.event-list { display: grid; gap: 6px; margin-top: 10px; }
.event-list:empty { display: none; }
.ev-item { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; text-align: left; background: #0f1f26; border: 1px solid #1f4453; border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--text); }
.ev-item:hover { border-color: #39d0ff; }
.ev-item.heli { border-color: #6b4a1e; } .ev-item.horde { border-color: #6b2a2e; }
.ev-item b { display: block; font-size: 0.9286rem; } .ev-item small { color: #9fb4bd; font-size: 0.8571rem; }
.ev-ic { font-size: 1.2857rem; text-align: center; }
.ev-banner { border-radius: 8px; padding: 8px 10px; font-size: 0.9286rem; line-height: 1.5; }
.ev-banner.heli { background: #2e2213; border: 1px solid #7a5520; color: #ffd08a; }
.ev-banner.drop { background: #13262e; border: 1px solid #2a5a6e; color: #bfeaff; }
.ev-banner.horde { background: #2e1516; border: 1px solid #7a2a2e; color: #ffb3b0; }
.site.ev { border-color: var(--accent2); }
.site.ev.heli b::before { content: '🚁 '; } .site.ev.drop b::before { content: '🪂 '; }
.pips i.on.ev { background: #ff8a3b; box-shadow: 0 0 4px #ff8a3b; }
.offer-bar { max-width: 1500px; margin: 10px auto 0; padding: 0 14px; }
.offer { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: #2e2616; border: 1px solid #7a5a20; border-radius: 10px; padding: 10px 14px; }
.offer .small { margin-top: 2px; }

/* 라디오 */
.log-line.radio { background: #13261d; color: #9dffc4; }
#tab-radio.new::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7dffb0; margin-left: 5px; vertical-align: middle; box-shadow: 0 0 6px #7dffb0; }
.radio-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.radio-msg { background: #10201a; border: 1px solid #2a5a44; border-radius: 8px; padding: 9px 11px; margin-bottom: 6px; display: grid; gap: 5px; }
.radio-msg.mine { border-color: #7dffb0; }
.rm-text { font-size: 1.0714rem; color: #c8ffe0; font-weight: 600; }
.rm-meta { font-size: 0.8571rem; color: var(--muted); }
.radio-preview { background: #10201a; border-color: #2a5a44; color: #c8ffe0; }
.radio-where { display: grid; gap: 4px; }
.radio-where .switch { margin: 0; }
.ev-banner.radio { background: #10201a; border: 1px solid #2a5a44; color: #c8ffe0; }
/* 업데이트 노트 */
.upd { border-top: 1px solid var(--line); padding: 10px 0; }
.upd-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.patch-item summary { cursor: pointer; list-style: none; padding: 2px 0; }
.patch-item summary::-webkit-details-marker { display: none; }
.patch-item summary b::before { content: '▸ '; color: var(--muted); }
.patch-item[open] summary b::before { content: '▾ '; }
.patch-new { display: inline-block; font-size: 0.75rem; padding: 1px 6px; border-radius: 6px; background: #3a3120; color: var(--accent2); border: 1px solid var(--accent); margin-right: 4px; }
.upd ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.9286rem; line-height: 1.55; }

/* 유저 간 교환 */
.offer-bar { display: grid; gap: 8px; }
.offer.trade { background: #16222e; border-color: #2a5a7a; }
.offer.trade.out { background: #1a1f24; border-color: var(--line); }
.trade-cols { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 4px; }
.trade-cols .inv { margin-top: 2px; }
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trade-grid h4 { margin: 0 0 8px; font-size: 1rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trade-row { display: grid; grid-template-columns: 1fr 72px; gap: 8px; align-items: center; margin: 0 0 5px; font-size: 0.9286rem; color: var(--text); }
.trade-row input { padding: 4px 6px; }
@media (max-width: 600px) { .trade-grid { grid-template-columns: 1fr; } }
.radio-trade { border: 1px dashed #2a5a44; border-radius: 8px; padding: 8px 10px; }
.radio-trade .switch { margin: 0; }
.stash { background: #1c1a12; border: 1px solid #5a4a28; border-radius: 8px; padding: 7px 9px; margin-top: 6px; display: grid; gap: 4px; }
.stash-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 0.9286rem; }
.my-stash { margin-bottom: 10px; }
.ev-banner .stash { margin-top: 6px; }
.horde-box { margin-top: 10px; border: 1px solid #6b2a2e; background: #221416; border-radius: 8px; padding: 10px; display: grid; gap: 6px; }
.horde-title { font-weight: 700; color: #ffb3b0; font-size: 0.9286rem; }
.horde-power { display: grid; grid-template-columns: auto 1fr 24px; gap: 8px; align-items: center; margin: 0; font-size: 0.9286rem; }
.horde-power input { accent-color: var(--danger); padding: 0; border: 0; background: none; }
.horde-power b { text-align: right; color: #ffb3b0; }
/* 결과·업데이트 알림은 다른 창보다 뒤에 */
#result-modal, #update-modal, #unlock-modal, #story-modal { z-index: 55; }
.bt-items { display: flex; justify-content: center; } .btn.molotov { border-color: #b8552a; color: #ffc19a; background: #2e1a12; }
.lg-hits { margin: 6px 0 0; padding-left: 18px; font-size: 0.8571rem; color: var(--muted); max-height: 140px; overflow-y: auto; display: grid; gap: 2px; }
/* 여러 베이스캠프 */
.camp-list { display: grid; gap: 5px; margin-top: 8px; }
.camp-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 0.8571rem; }
.act.warnact { border-color: #7a453f; }
.ck-camp { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 6px; display: grid; gap: 4px; }
/* 이벤트 2탄: 행상인 · 구조 요청 · 동물 떼 · 혹한/폭염 · 돌림병 · 약탈자 · 정신적 한계 */
.offer.raid { background: #2e1516; border-color: var(--danger); animation: raidPulse 1.6s ease-in-out infinite; }
@keyframes raidPulse { 50% { box-shadow: 0 0 0 3px #d0574a44; } }
@media (prefers-reduced-motion: reduce) { .offer.raid { animation: none; } }
.raid-left { font-variant-numeric: tabular-nums; font-weight: 800; color: #ffb3b0; margin-left: 6px; }
.coin-row { display: inline-flex; gap: 6px; align-items: baseline; margin-bottom: 6px; }
.coin-row b { color: var(--accent2, #f0c060); font-size: 1.0714rem; }
.warn.brk { background: #331528; border-color: #a0407a; color: #ffc2e4; }
.warn.strain { background: #2e2616; border-color: #7a5a20; color: #ffd08a; }
.warn.sick { background: #1c2a16; border-color: #5a7a30; color: #d8f0b0; }
.warn.cold { background: #132230; border-color: #3a6a90; color: #c4e4ff; }
.warn.heat { background: #33200f; border-color: #a0602a; color: #ffd0a0; }
.sick-bars { margin-top: 6px; }
.sick-bars .bar span:first-child { color: inherit; }
.pill.cold { background: #1c3448; color: #c4e4ff; }
.pill.heat { background: #4a2a12; color: #ffd0a0; }
.ev-banner.merchant { background: #2a2214; border: 1px solid #8a6a30; color: #f5dca8; }
.ev-banner.rescue { background: #2e1516; border: 1px solid #a0403a; color: #ffc4be; }
.ev-banner.deer { background: #13261a; border: 1px solid #2f6a40; color: #c8f5d4; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.shop { display: grid; gap: 6px; margin-top: 8px; }
.shop-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 0.9286rem; }
.shop-row .price { font-weight: 700; color: #f0c060; white-space: nowrap; }
#merchant-body .hand { flex-wrap: wrap; justify-content: center; max-height: 50vh; overflow-y: auto; }
@media (max-width: 560px) {
  .shop-row { grid-template-columns: 1fr auto; }
  .shop-row > :last-child { grid-column: 1 / -1; justify-self: end; }
}
/* 장비 바꾸기 */
.gear { margin-top: 8px; }
.gear summary { cursor: pointer; font-size: 0.9286rem; color: var(--accent2); }
.gear-list { display: grid; gap: 5px; margin-top: 8px; }
.gear-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 0.9286rem; }
.gear-row > span { min-width: 0; }
.gear-sep { height: 4px; }
.gear-row .btn { white-space: nowrap; flex-shrink: 0; }
/* 쓰던 무기 거래 */
.gear-chip { border-color: #7a5a20 !important; }
.gear-pick { display: grid; gap: 4px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.trade-row input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; }
#set-font { grid-template-columns: repeat(3, 1fr); }
#set-font button { padding: 7px 4px; }
#set-font { grid-column: 2 / 4; }
/* 위쪽 고정 바는 글자 크기와 상관없이 그대로 (화면을 덜 가리게) */
html.fs-l .topbar { zoom: 0.875; }
html.fs-xl .topbar { zoom: 0.7778; }
/* 이야기꾼 */
.teller-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.teller { text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--text); cursor: pointer; display: grid; gap: 3px; }
.teller small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.teller.on { border-color: var(--accent); background: #3a3120; }
/* UI 개편: 베이스캠프 버튼·창, 저장고, 기록 */
.log-body { max-height: 620px; }
.legend-wrap summary { cursor: pointer; font-size: 0.8571rem; color: var(--muted); margin-top: 6px; }
.camp-btn { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; color: var(--text); cursor: pointer; }
.camp-btn:hover { border-color: var(--accent); }
.camp-go-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.camp-go-list .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-rename { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.camp-rename input { flex: 1 1 160px; min-width: 0; margin: 0; }
.camp-btn .camp-ic { font-size: 1.6rem; line-height: 1; text-align: center; }
.camp-btn small { display: block; color: var(--muted); font-size: 0.8571rem; margin-top: 2px; }
.camp-btn .camp-go { color: var(--accent2); font-size: 0.8571rem; white-space: nowrap; }
.camp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.camp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rain-box { background: #10202a; border: 1px solid #2a5a6e; border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; }
.rain-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.store-grid h4 { margin: 0 0 6px; font-size: 0.9286rem; }
.st-list { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 0.9286rem; }
.st-row .btn { white-space: nowrap; }
@media (max-width: 700px) { .camp-grid, .store-grid { grid-template-columns: 1fr; } }
.camp-btn { grid-template-columns: 30px 1fr; }
.camp-btn .camp-go { color: var(--accent2); margin-top: 3px; }
.event-card:has(.event-list:empty) { display: none; }
.event-card .event-list { margin-top: 0; }
.bar .num.wnum { font-size: 0.75rem; white-space: nowrap; letter-spacing: -0.3px; }
.bar:has(.wnum) { grid-template-columns: 58px 1fr auto; }
/* ── 모바일 개편: 위쪽 바 · 상태창 · 소식 패널 ── */
.m-only, .m-panel-head { display: none; }
.set-top { border-top: 0; padding-top: 4px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; }
.set-row + .set-row { border-top: 1px dashed var(--line); }
.set-row .btn { white-space: nowrap; flex-shrink: 0; }
#tab-radio.new::after, #btn-news.new::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4a3d; margin-left: 5px; vertical-align: middle; box-shadow: 0 0 6px #ff4a3d; }
#btn-news { position: relative; }
@media (max-width: 800px) {
  .topbar { justify-content: center; gap: 4px 12px; padding: 7px 10px 8px; }
  .tb-left, .tb-mid { gap: 8px; justify-content: center; }
  #tb-date, #tb-phase, .tb-next, #btn-notify, #btn-mute, #tb-user, #btn-logout { display: none !important; }
  #tb-weather > span:first-child { font-size: 1.15rem !important; }
  .tb-right { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; flex-wrap: nowrap; }
  .tb-right .btn { width: 100%; padding: 7px 4px; font-size: 0.9286rem; }
  .m-only { display: inline-flex; justify-content: center; align-items: center; }
  .tb-right .btn.on { border-color: var(--accent); color: var(--accent2); background: #3a3120; }
  #btn-news.new::after { position: absolute; top: 4px; right: 6px; margin: 0; }
  /* 평소에는 숨기고, 버튼을 누르면 화면 전체를 덮는 창으로 */
  .col-left.m-panel, #news-card.m-panel { display: none; }
  body.m-status .col-left.m-panel, body.m-news #news-card.m-panel {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 55; margin: 0; border-radius: 0; border: 0;
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 24px; gap: 10px;
  }
  body.m-news #news-card.m-panel { background: var(--card); }
  body.m-status, body.m-news { overflow: hidden; }
  .m-panel-head { display: flex; position: sticky; top: 0; z-index: 2; justify-content: space-between; align-items: center; gap: 8px;
    margin: 0 -10px; padding: 10px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .m-panel-head b { font-size: 1.05rem; }
  .m-panel-head .btn { border-color: var(--accent); color: var(--accent2); }
  body.m-news #log-tabs { position: sticky; top: 52px; z-index: 1; background: var(--card); margin-top: 4px; }
  body.m-news .log-body { max-height: none; overflow: visible; }
}
/* 흥정 */
.tabs .rdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4a3d; vertical-align: middle; margin-left: 2px; }
.haggle-on { background: #1d2a1b; border: 1px solid #3f7a3a; color: #b9f0b0; border-radius: 8px; padding: 7px 10px; margin: 8px 0 0; font-size: 0.9286rem; }
.haggle-box { display: grid; gap: 10px; padding: 10px 2px 4px; text-align: center; }
.haggle-box p { margin: 0; }
.haggle-big { font-size: 1.35rem; font-weight: 800; color: var(--accent2); }
.ok-t { color: #7ee07a; }
.hg-rounds { display: flex; justify-content: center; gap: 8px; }
.hg-rounds i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-weight: 700; }
.hg-rounds i.hit { background: #24401f; border-color: #58b050; color: #b9f0b0; }
.hg-rounds i.pf { background: #4a3d12; border-color: #f0c060; color: #ffe08a; box-shadow: 0 0 8px #f0c06088; }
.hg-rounds i.miss { background: #3b1c18; border-color: var(--danger); color: #ff9d8f; }
.hg-say { min-height: 1.5em; font-style: italic; color: #e8dcc0; }
.hg-bar { position: relative; height: 46px; border-radius: 10px; background: linear-gradient(90deg, #3b1c18, #2a2420 50%, #3b1c18); border: 1px solid var(--line); overflow: hidden; touch-action: manipulation; cursor: pointer; user-select: none; -webkit-user-select: none; }
.hg-zone { position: absolute; top: 0; bottom: 0; background: #2f6a2a; border-left: 2px solid #7ee07a; border-right: 2px solid #7ee07a; display: flex; justify-content: center; }
.hg-pf { width: 30%; height: 100%; background: #6fd06a88; }
.hg-needle { position: absolute; top: -2px; bottom: -2px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px #fff; border-radius: 2px; }
.hg-bar.flash-ok { animation: hgok .5s; } .hg-bar.flash-no { animation: hgno .45s; }
@keyframes hgok { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 3px #7ee07a; } }
@keyframes hgno { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hg-go { font-size: 1.15rem; padding: 12px; }
@media (prefers-reduced-motion: reduce) { .hg-bar.flash-ok, .hg-bar.flash-no { animation: none; } }
/* 다른 계정과의 사이 · 동맹 */
.person.ally { border: 1px solid #3f7a3a; }
.person-acts { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.person-acts select { width: auto; padding: 4px 6px; }
.person-acts input { padding: 4px 6px; }
.ally-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #1d2a1b; border: 1px solid #3f7a3a; border-radius: 8px; padding: 8px 10px; }
.offer.pact { background: #2a1d2a; border-color: #7a4a7a; }
.people .person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: start; margin-right: 0; }
.people .person > span:first-child { min-width: 0; }
.people .person > span:nth-child(2) { text-align: right; white-space: nowrap; }

/* ── 항구: 요리 탭 묶음 · 해금 팝업 ── */
.act-sec { font-size: 0.8571rem; font-weight: 700; color: var(--accent2, #e0b070); letter-spacing: .5px; padding: 6px 2px 0; border-top: 1px dashed var(--line); margin-top: 4px; }
.act-sec:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.req .taint { color: #ff8a7a; }
.unlock-box { max-width: 460px; animation: pop .22s ease-out; }
.unlock-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.unlock-head h2 { margin: 2px 0; font-size: 1.3571rem; }
.unlock-ic { font-size: 1.8571rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: #10303b; border: 1px solid #2a5a6e; flex: none; }
.unlock-card { border: 1px solid #2a5a6e; background: #0d1f26; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.unlock-name { font-weight: 700; font-size: 1.0714rem; display: flex; gap: 8px; align-items: center; }
.unlock-name .pill { font-size: 0.7143rem; background: #39d0ff22; color: #39d0ff; border: 1px solid #39d0ff66; padding: 1px 7px; border-radius: 99px; }
.unlock-card ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 0.9286rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .unlock-box { animation: none; } }
/* 행동 카드 제목 줄: 제목은 필요하면 줄바꿈, 오른쪽 표시(시간·사유)는 한 덩어리로 — 자리가 없으면 다음 줄로 */
.act .t { flex-wrap: wrap; row-gap: 2px; }
.act .t > span:first-child { min-width: 3em; }
.act .t > span:last-child:not(:first-child) { white-space: nowrap; margin-left: auto; }

/* ── 농촌: 농사 탭 ── */
.plot-bar { height: 6px; background: #2b2f2a; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.plot-bar i { display: block; height: 100%; background: #5fbf6a; }
.seed-sel { max-width: 100%; margin-right: 6px; }
.plot-list { display: grid; gap: 6px; margin-top: 6px; font-size: 0.9286rem; }
.plot-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; padding: 6px 8px; background: var(--bg2); border-radius: 6px; border-left: 3px solid #5fbf6a; }
.plot-row.ready { border-left-color: #ffd24a; } .plot-row.wilting { border-left-color: #ff9a3c; } .plot-row.dead { border-left-color: #6b5a50; } .plot-row.empty { border-left-color: #6b7c84; }
@media (max-width: 480px) { .plot-row { grid-template-columns: 1fr; } }

.plot-wet { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; font-size: 0.8571rem; margin-top: 4px; }
.plot-wet .plot-bar { margin-top: 0; }
.plot-bar.wet i { background: #4aa8ff; }

.recv { font-size: 0.8571rem; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: #1d2a33; border: 1px solid #2a5a6e; color: #cfe6f5; }
.recv.wide { background: #15302a; border-color: #2f6b55; color: #bff0d8; }

/* ── 도심의 기록 ── */
.story-box { max-width: 480px; background: #0e1417; border-color: #3a4a52; animation: pop .22s ease-out; }
.story-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.story-head h2 { margin: 2px 0 0; font-size: 1.2857rem; }
.story-ic { font-size: 1.7143rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #1b2226; border: 1px solid #3a4a52; flex: none; }
.story-text { font-family: 'Noto Serif KR', 'Nanum Myeongjo', serif; line-height: 1.75; font-size: 1rem; color: #e6e2d6; border-left: 2px solid #3a4a52; padding: 2px 0 2px 12px; }
.story-text p { margin: 0 0 10px; }
.story-gift { margin-top: 10px; font-size: 0.9286rem; color: #b5e3a8; }
.story-quest { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #2a2518; border: 1px solid #5a4a28; font-size: 0.9286rem; line-height: 1.55; }
.story-quest.dim { background: transparent; border-style: dashed; color: var(--muted); }
.story-list { display: grid; gap: 6px; }
.story-item { text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: inherit; cursor: pointer; font: inherit; }
.story-item:hover { border-color: #5a4a28; }
.story-act .t { align-items: center; }
@media (prefers-reduced-motion: reduce) { .story-box { animation: none; } }

/* ── 월드맵 · 섹터 지도 ── */
.map-card .card-title { align-items: center; }
.map-ctl { display: inline-flex; gap: 8px; align-items: center; }
.map-zone { font-family: 'Pretendard', 'Noto Sans KR', sans-serif; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-left: 6px; font-size: 0.8571rem; }
.wbtn { font-family: 'Rajdhani', 'Pretendard', sans-serif; font-weight: 700; letter-spacing: 1.2px; font-size: 0.8571rem; color: #39d0ff; background: #0b1e26; border: 1px solid #2a5a6e; border-radius: 6px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.wbtn:hover { border-color: #39d0ff; background: #0f2a35; }
.map-wrap { overflow: hidden; }
.map-exit { opacity: 0; pointer-events: none; transition: opacity 280ms ease; }
.map-exit.near, .map-exit:hover, .map-exit:focus-visible { opacity: 1; pointer-events: auto; }
.map-wrap.worldview .map-exit { opacity: 0 !important; pointer-events: none !important; }
.map-exit { position: absolute; z-index: 3; font-size: 0.7857rem; font-weight: 700; color: #08141a; background: #39d0ff; border: 0; border-radius: 4px; padding: 2px 6px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 4px #0008; }
.map-exit:hover { background: #fff; }
.map-exit span { font-size: 0.7143rem; }
.map-exit.h { transform: translateY(calc(-100% - 7px)); }
.map-exit.v { transform: translateX(10px); }
.wv { position: absolute; inset: 0; z-index: 4; overflow: hidden; background: #07111a; border-radius: 6px; }
.wv-world { position: absolute; left: 0; top: 0; width: 300%; height: 300%; transform-origin: 0 0; will-change: transform; }
.wv-world.anim { transition: transform 900ms cubic-bezier(.65, 0, .25, 1); }
.wv-world.pan { transition: transform 750ms cubic-bezier(.45, 0, .2, 1); }
.wv-cell { position: absolute; width: 33.3334%; height: 33.3334%; }
.wv-cell canvas { display: block; width: 100%; height: 100%; }
.wv-locked { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #07111a 0 14px, #0a1820 14px 28px); }
.wv-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 400ms 600ms; }
.wv.open .wv-grid { opacity: 1; }
.wv-grid i { position: absolute; }
.wv-grid .v { top: 0; bottom: 0; border-left: 1px dashed #39d0ff55; }
.wv-grid .h { left: 0; right: 0; border-top: 1px dashed #39d0ff55; }
.wv-labels { position: absolute; inset: 0; pointer-events: none; }
.wv-lbl { position: absolute; transform: translate(-50%, 0); text-align: center; opacity: 0; transition: opacity 450ms ease; white-space: nowrap; font-family: 'Rajdhani', 'Pretendard', sans-serif; }
.wv-lbl.on { opacity: 1; }
.wv-lbl b { display: block; font-size: 0.7857rem; letter-spacing: 1.5px; color: #6f9aab; }
.wv-lbl span { display: inline-block; font-family: 'Pretendard', 'Noto Sans KR', sans-serif; font-size: 0.8571rem; font-weight: 700; color: #d8f6ff; background: #08141ae6; border: 1px solid #2a5a6e; padding: 1px 6px; border-radius: 4px; }
.wv-lbl span em { font-style: normal; margin-left: 3px; }
.wv-lbl small { display: block; margin-top: 3px; font-size: 0.7143rem; color: #ffb13b; }
.wv-lbl.me span { border-color: #ffb13b; }
.wv-lbl.lock span { color: #6b7c84; border-color: #1f3440; }
.wv-hits { position: absolute; inset: 0; display: none; }
.wv.open .wv-hits { display: block; }
.wv-hit { position: absolute; width: 33.3334%; height: 33.3334%; background: transparent; border: 0; cursor: pointer; }
.wv-hit:hover { background: #39d0ff14; outline: 1px solid #39d0ff88; outline-offset: -1px; }
.wv-scan { position: absolute; left: 0; right: 0; height: 2px; top: -4px; background: #39d0ff; box-shadow: 0 0 12px #39d0ff; opacity: 0; pointer-events: none; }
.wv-scan.go { animation: wvscan 900ms cubic-bezier(.4, 0, .2, 1); }
@keyframes wvscan { 0% { top: -4px; opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } 100% { top: 100%; opacity: 0; } }
.wv-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: #39d0ff; mix-blend-mode: screen; }
.wv-flash::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(8, 20, 26, .55) 2px 3px); }
.wv-flash.go { animation: wvflash 620ms linear; }
.wv-flash.go.soft { animation: wvflashSoft 420ms linear; }
@keyframes wvflash { 0% { opacity: 0; } 5% { opacity: .38; } 12% { opacity: .05; } 20% { opacity: .26; } 30% { opacity: .04; } 42% { opacity: .1; } 100% { opacity: 0; } }
@keyframes wvflashSoft { 0% { opacity: 0; } 8% { opacity: .22; } 20% { opacity: .03; } 32% { opacity: .12; } 100% { opacity: 0; } }
.zone-chip { font-size: 0.7857rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #0008; border: 1px solid #ffffff33; vertical-align: 3px; }
@media (prefers-reduced-motion: reduce) { .wv-world.anim, .wv-world.pan { transition-duration: 1ms; } .wv-scan.go, .wv-flash.go { animation: none; } }
.map-card .card-title { flex-wrap: nowrap; gap: 8px; }
.map-card .card-title #map-title { white-space: nowrap; }
.map-ctl #map-hint { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .map-ctl #map-hint { display: none; } }
.map-card .card-title .map-ctl #map-hint { color: var(--muted); letter-spacing: 0; font-size: 0.8571rem; font-family: inherit; }

/* 시안과 같은 HUD: 모서리 브래킷(월드 보기에서 커짐) · 좌표 글자 · 안개 · 내 위치 펄스 */
.hudbr { position: absolute; z-index: 6; width: 16px; height: 16px; border: 0 solid #39d0ff; pointer-events: none; transition: all 900ms cubic-bezier(.65, 0, .25, 1); }
.hudbr.tl { left: 5px; top: 5px; border-left-width: 2px; border-top-width: 2px; }
.hudbr.tr { right: 5px; top: 5px; border-right-width: 2px; border-top-width: 2px; }
.hudbr.bl { left: 5px; bottom: 5px; border-left-width: 2px; border-bottom-width: 2px; }
.hudbr.br { right: 5px; bottom: 5px; border-right-width: 2px; border-bottom-width: 2px; }
.map-wrap.worldview .hudbr { width: 26px; height: 26px; }
.hud-coord { position: absolute; z-index: 6; right: 26px; bottom: 7px; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 0.7857rem; letter-spacing: 1px; color: #39d0ffaa; pointer-events: none; }
.wv-fog { position: absolute; inset: 0; background: #07111a; pointer-events: none; opacity: 0; transition: opacity 500ms ease; }
.wv-fog.stripe { background: repeating-linear-gradient(45deg, #07111a 0 10px, #0a1820 10px 20px); }
.wv-lbl.unk span { border-style: dashed; }
.wv-lbl small.dim { color: #6f9aab; }
.wv-me { position: absolute; width: 0; height: 0; opacity: 0; transition: opacity 300ms 900ms; pointer-events: none; z-index: 2; }
.wv-me.on { opacity: 1; }
.wv-me::before, .wv-me::after { content: ''; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.wv-me::after { background: none; border: 1.5px solid #fff; animation: wvping 1.4s ease-out infinite; }
@keyframes wvping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wv-me::after { animation: none; } }
.map-under { font-size: 0.8571rem; color: var(--muted); margin: 6px 2px 0; min-height: 1.2em; }
.story-place { font-size: 0.7857rem; color: #e0b070; margin-top: 2px; }
/* 실시간 공지 (위쪽 바 안, 오른쪽 → 왼쪽으로 흐름) */
.notice-bar { flex-basis: 100%; order: 99; display: flex; align-items: center; gap: 8px; margin: 2px -16px -10px; padding: 6px 10px 6px 14px; background: linear-gradient(90deg, #4a3510, #3a2a10); border-top: 1px solid #a07a2a; color: #ffe2a0; font-weight: 700; min-width: 0; }
.notice-bar.hidden { display: none; }
.nb-ic { flex: 0 0 auto; font-size: 1.1rem; animation: nbpulse 1.6s ease-in-out infinite; }
.nb-track { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.nb-text { display: inline-block; padding-left: 100%; white-space: nowrap; animation: nbscroll 20s linear infinite; }
.nb-close { flex: 0 0 auto; background: none; border: 1px solid #a07a2a; color: #ffe2a0; border-radius: 6px; padding: 1px 7px; cursor: pointer; font-size: 0.8571rem; }
@keyframes nbscroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes nbpulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (max-width: 800px) { .notice-bar { margin: 2px -10px -8px; } }
@media (prefers-reduced-motion: reduce) { .nb-text { animation: none; padding-left: 0; white-space: normal; } .nb-track { white-space: normal; } .nb-ic { animation: none; } }
/* 지금 벌어지는 일: '지도 기호 보기'와 같은 ▶ 접기/펼치기 */
.ev-wrap summary { margin-top: 0; }
.ev-count { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: rgba(255,255,255,.1); color: inherit; font-size: 0.7857rem; text-align: center; }
.ev-body { display: grid; gap: 6px; margin-top: 6px; }

/* 모바일: [행동 상태 ↔ 지도]를 옆으로 밀어서 보는 카드, 그 아래 지역 정보(세부 구역) (PC에서는 원래 배치 — 지도는 JS가 자리를 옮김) */
.m-slider, .m-slides { display: contents; }
.m-arr { display: none; }
@media (max-width: 800px) {
  .col-center, .col-right { display: contents; }
  .m-slider { display: block; position: relative; order: 1; min-width: 0; scroll-margin-top: 96px; }
  .tile-card { order: 2; }
  .act-card { order: 3; }
  #news-card { order: 4; }
  .m-slides { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--radius); transition: height .25s ease; }
  .m-slides::-webkit-scrollbar { display: none; }
  .m-slides > .card { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; margin: 0; min-width: 0; }
  .m-slides > .now-card { padding-left: 30px; padding-right: 30px; }
  .m-slides > .map-card { padding-left: 28px; padding-right: 28px; }
  .tile-card { scroll-margin-top: 96px; }
  .m-arr { display: block; position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 26px; height: 56px; padding: 0; border: 0; background: none;
    font-family: inherit; font-size: 30px; line-height: 1; color: #fff; cursor: pointer; transition: color .25s, opacity .25s, top .25s; text-shadow: 0 1px 4px #000; }
  .m-arr.l { left: 1px; } .m-arr.r { right: 1px; }
  .m-arr.off { color: #4a4d46; text-shadow: none; cursor: default; }
}

/* 좀비 떼 배너 설명 버튼 */
.hd-row { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.hd-help { flex: none; }
.hd-help > summary { list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #b85a5e; color: #ffd0cd; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.hd-help > summary::-webkit-details-marker { display: none; }
.hd-help[open] > summary { background: #7a2a2e; }
.hd-banner .hd-help[open] { flex-basis: 100%; }
.hd-banner .hd-row { flex-wrap: wrap; }
.hd-help[open] > summary { margin-left: auto; }
.hd-help-body { margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: #1f0e0f; border: 1px solid #5a2226; color: #f4d6d4; font-size: .86rem; line-height: 1.6; }

/* 아이템 도감 */
.dex-box { padding-top: 0; }
.dex-top { position: sticky; top: 0; z-index: 2; background: var(--card); padding-top: 16px; }
.dex-search { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; }
.dex-search input { flex: 1; font-size: 1rem; padding: 9px 12px; }
.dex-row { display: grid; grid-template-columns: 1.1fr .6fr 2fr 1.3fr; gap: 10px; align-items: baseline; padding: 8px 6px; }
.dex-headrow { font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.dex-headrow b { font-weight: 600; }
.dex-item { border-bottom: 1px solid var(--line); }
.dex-item > summary { list-style: none; cursor: pointer; border-radius: 6px; }
.dex-item > summary::-webkit-details-marker { display: none; }
.dex-item > summary:hover { background: #ffffff08; }
.dex-n::before { content: '▸ '; color: var(--muted); font-weight: 400; }
.dex-item[open] .dex-n::before { content: '▾ '; }
.dex-t { font-size: .82rem; color: var(--muted); }
.dex-h { font-size: .85rem; }
.dex-p { font-size: .82rem; color: var(--accent2); }
.dex-dev { display: inline-block; font-size: .65rem; font-weight: 700; padding: 0 5px; border-radius: 5px; background: #3a3120; color: #ffd08a; border: 1px solid #7a5a33; vertical-align: middle; }
.dex-tbl { width: 100%; border-collapse: collapse; margin: 2px 0 12px; font-size: .84rem; }
.dex-tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.dex-tbl td { padding: 6px; vertical-align: top; border-bottom: 1px solid #ffffff0d; }
.dex-tbl td small { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; }
.dex-tbl td:nth-child(1) { white-space: nowrap; }
.dex-tbl td:nth-child(3), .dex-tbl td:nth-child(4) { white-space: nowrap; color: #cfe7e2; }
.dex-tbl tr.dev td { background: #2a241522; }
.dex-tbl tr.dev td:first-child::after { content: ' 데브'; font-size: .65rem; color: #ffd08a; }
@media (max-width: 700px) {
  .dex-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .dex-row .dex-h, .dex-row .dex-p { grid-column: 1 / -1; }
  .dex-headrow { display: none; }
  .dex-tbl, .dex-tbl tbody, .dex-tbl tr, .dex-tbl td { display: block; }
  .dex-tbl thead { display: none; }
  .dex-tbl tr { padding: 6px 0; border-bottom: 1px solid #ffffff14; }
  .dex-tbl td { border: 0; padding: 1px 4px; white-space: normal !important; }
  .dex-tbl td:nth-child(1) { font-weight: 700; }
  .dex-tbl td:nth-child(3)::before { content: '확률 '; color: var(--muted); font-size: .72rem; }
  .dex-tbl td:nth-child(4):not(:empty)::before { content: '개수 '; color: var(--muted); font-size: .72rem; }
}
.dex-tbl th { white-space: nowrap; }

.ck-deck-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ck-dcard { font-size: .75rem; padding: 3px 8px; }
.ck-dcard.atk { border-color: #7a3b33; } .ck-dcard.def { border-color: #33587a; } .ck-dcard.skill { border-color: #5b4a7a; }
.ck-dcard:hover { border-color: #d0574a; color: #ffb3a8; }
