/* 구름시티 화면. 도시가 주인공이고 화면 장치는 귀퉁이로 물러난다.
   밤하늘빛 반투명 판에 가로등 호박색 실선, 제목과 숫자도 또렷한 고딕. */
:root {
  --ink-0: #0c1018;
  --ink-1: #121826;
  --ink-2: #1a2233;
  --ink-3: #28324a;
  --glass: rgba(14, 19, 30, .74);
  --glass-2: rgba(14, 19, 30, .92);
  --text: #eef2fa;
  --text-2: #c9d2e3;
  --line: rgba(255, 184, 77, .42);
  --line-soft: rgba(238, 242, 250, .12);
  --gold: #ffb84d;
  --gold-2: #ffd27a;
  --gold-d: #a8701e;
  --ju: #d8432b;
  --ju-2: #ef6a4f;
  --dan: #1f8a74;
  --dan-2: #4cc2a5;
  --cheong: #2f69a8;
  --cheong-2: #79a9e0;
  /* 집문서 종이 색 */
  --baek: #f7f2e4;
  --paper: #f7f2e4;
  --meok: #1d1b19;
  /* 조선풍 명조는 큰 제목(도시 이름·카드 이름·시트 제목)에만. 나머지 글자는 폰 기본 고딕으로 또렷하게(11/11 「글꼴이 보기 힘들다」) */
  --title: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Noto Sans CJK KR', 'Malgun Gothic', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Noto Sans CJK KR', 'Malgun Gothic', system-ui, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tab: 70px;   /* 아래 탭 높이와 바닥 틈을 합친 값 */
  --net: 0px;
  --kb: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 10px 28px rgba(0, 0, 0, .42);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--ink-1);
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink-1);
  color: var(--text);
  font: 400 15px/1.6 var(--body);
  font-synthesis: none;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; padding: 0; font-weight: 400; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
input, textarea { border-radius: 0; }
summary { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
svg { flex: none; }

#world { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; }
#labels { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
/* 위아래 가장자리만 살짝 어둡게 해 글자가 도시 위에서도 읽히게 한다 */
#veil {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(21, 17, 13, .42), rgba(21, 17, 13, 0) 22%, rgba(21, 17, 13, 0) 74%, rgba(21, 17, 13, .38));
}
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui[hidden] { display: none; }
.noscript { position: fixed; inset: auto 16px 16px; z-index: 200; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-1); color: var(--text); }

/* 단추 ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--ink-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--text);
  font: 700 15px/1.25 var(--body);
  text-align: center;
  text-decoration: none;
}
.btn:active:not([disabled]) { transform: translateY(1px); filter: brightness(.94); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.pri {
  border-color: rgba(255, 236, 190, .55);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 2px 0 var(--gold-d), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: var(--ink-0);
}
.btn.go { border-color: rgba(76, 194, 165, .5); background: var(--dan); color: #fff; }
.btn.blue { border-color: rgba(121, 169, 224, .5); background: var(--cheong); color: #fff; }
.btn.yellow { border-color: var(--line); background: rgba(226, 182, 79, .16); color: var(--gold-2); }
.btn.quiet { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 44px; padding: 6px 14px; font-size: 14px; }
.btn.big { min-height: 56px; padding: 12px 20px; font-size: 17px; }   /* 지난 링크 화면처럼 들어오는 길이 단추 하나뿐일 때 */
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 140px; }

.icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--glass-2);
  color: var(--text);
}
.icon-btn:active { transform: translateY(1px); }
.icon-btn.flat { border-color: transparent; background: transparent; color: var(--text-2); }
.icon-btn svg { width: 22px; height: 22px; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(226, 182, 79, .45);
  border-radius: 999px;
  background: rgba(226, 182, 79, .16);
  color: var(--gold-2);
  font: 700 13px/1.5 var(--body);
  white-space: nowrap;
}
.tag.plain { border-color: var(--line-soft); background: rgba(246, 236, 214, .08); color: var(--text-2); }
.tag.red { border-color: rgba(239, 106, 79, .5); background: rgba(216, 67, 43, .22); color: #ffb9a8; }
.tag.blue { border-color: rgba(121, 169, 224, .5); background: rgba(47, 105, 168, .26); color: #bcd6f6; }
.tag.green { border-color: rgba(76, 194, 165, .5); background: rgba(31, 138, 116, .26); color: #a9e6d5; }
/* 창립 시민: 오픈하고 7일 안에 들어온 첫 집 */
.tag.gold { border-color: var(--gold-2); background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink-0); }
/* 작게 보이는 단추도 손가락이 닿는 자리는 44px로 넓힌다 */
.tag-btn { position: relative; cursor: pointer; }
.tag-btn::after { content: ''; position: absolute; top: -8px; right: -4px; bottom: -8px; left: -4px; }

/* 왼쪽 위와 오른쪽 위 ------------------------------------------------------ */
#hud {
  position: fixed;
  top: calc(var(--sat) + 10px);
  left: calc(var(--sal) + 10px);
  right: calc(var(--sar) + 10px);
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
#ui > #hud { pointer-events: none; }
.hud-l {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 340px;
}
.hud-r {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  transition: transform .26s var(--ease);
}
.hud-top { display: flex; align-items: center; max-width: 100%; }
.medal, .hud-id, .news-pill, .era-chip, .cta, .stat-pill { pointer-events: auto; }

/* 시대 고리: 다음 시대까지 얼마나 찼는지 둥글게 보여 준다 */
.medal {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}
.medal:active { transform: scale(.96); }
.medal-ring, .medal-ring svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.medal-ring svg { transform: rotate(-90deg); }
.medal-ring .track { fill: var(--ink-0); stroke: rgba(226, 182, 79, .22); stroke-width: 7; }
.medal-ring .fill { fill: none; stroke: var(--gold); stroke-width: 7; transition: stroke-dashoffset .6s var(--ease); }
.medal-ring .inner { fill: var(--ink-1); stroke: rgba(226, 182, 79, .55); stroke-width: 1.5; }
.medal[aria-current='true'] .medal-ring .inner { stroke: var(--gold-2); stroke-width: 2.5; }
.medal-name {
  position: relative;
  max-width: 40px;
  color: var(--gold-2);
  font: 700 13px/1.05 var(--body);
  letter-spacing: -.02em;
  text-align: center;
}
.medal.long .medal-name { font-size: 11px; }

.hud-id {
  min-width: 0;
  min-height: 50px;
  margin-left: -24px;
  padding: 6px 14px 7px 32px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  background: var(--glass);
  box-shadow: var(--shadow);
}
.hud-brand { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.hud-name { color: var(--text); font: 700 17px/1.3 var(--title); letter-spacing: -.01em; }
.day-chip { color: var(--text-2); font-size: 13px; line-height: 1.3; }
.hud-next { overflow: hidden; color: var(--gold-2); font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }

/* 오늘 소식: 가장 새 방송 한 줄 */
.news-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
}
.news-pill:active { transform: translateY(1px); }
.news-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--dan); color: #fff; }
.news-mark svg { width: 18px; height: 18px; }
.news-label { flex: none; color: var(--gold-2); font: 700 13px/1.2 var(--body); white-space: nowrap; }
.news-text { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.news-dot { position: absolute; top: 3px; left: 30px; width: 10px; height: 10px; border-radius: 50%; background: var(--ju-2); box-shadow: 0 0 0 2px var(--ink-1); }
.news-pill[aria-current='true'] { border-color: var(--gold-2); }

/* 지난 시대를 미리 볼 때만 뜨는 되돌리기 단추 */
.era-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--glass-2);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
}
.chip-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink-0); }
.chip-mark svg { width: 18px; height: 18px; }
.chip-text { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

/* 입주하기: 화면에서 가장 밝은 단추 */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 236, 190, .6);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 2px 0 var(--gold-d), 0 8px 18px rgba(0, 0, 0, .38);
  color: var(--ink-0);
  font: 700 15px/1.2 var(--body);
  white-space: nowrap;
}
.cta:active { transform: translateY(2px); box-shadow: 0 0 0 var(--gold-d), 0 6px 14px rgba(0, 0, 0, .38); }
.cta[aria-current='true'] { background: linear-gradient(180deg, #fff1c8, var(--gold-2)); }
.cta-icon { display: inline-flex; }
.cta-icon svg { width: 20px; height: 20px; }

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 11px 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font: 700 13px/1.2 var(--body);
  white-space: nowrap;
}
.pill-icon { display: inline-flex; color: var(--gold); }
.pill-icon svg { width: 15px; height: 15px; }
.tag-pill { padding: 0 11px; border-color: var(--line); color: var(--gold-2); }
/* 옛 화면의 「구름폰」 단추(client/main.js mountOldMore): 오른쪽 위 줄 맨 아래, 손가락으로 누르기 좋게 조금 크게 */
.oph { min-height: 38px; padding: 0 14px; font-size: 14px; }
.oph[aria-expanded='true'] { border-color: var(--gold-2); }

/* 아래 탭: 떠 있는 판 하나에 다섯 칸 ------------------------------------------- */
#tabs {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sab) + 10px);
  z-index: 24;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: calc(100% - var(--sal) - var(--sar) - 20px);
  max-width: 520px;
  height: calc(var(--tab) - 10px);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  border-radius: 14px;
  color: var(--text-2);
  font: 700 12px/1.2 var(--body);
}
.tab-icon, .tab-name { display: inline-flex; }
.tab-icon svg { width: 22px; height: 22px; }
.tab:active { background: rgba(246, 236, 214, .06); }
.tab[aria-current='true'] { background: rgba(226, 182, 79, .16); color: var(--gold-2); }
/* 산책은 판을 여는 대신 도시로 걸어 나간다: 아이콘을 초록으로, 같이 걷는 사람이 있으면 수를 단다 */
.tab[data-tab='walk'] { position: relative; }
.tab[data-tab='walk'] .tab-icon { color: var(--walk, #3ddc97); }
.tab-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--walk, #3ddc97);
  color: #06271a;
  font: 800 10.5px/18px var(--body);
  text-align: center;
  box-shadow: 0 0 0 2px var(--ink-1);
}
.tab-badge[hidden] { display: none; }
.tab[aria-pressed='true'] { background: rgba(226, 182, 79, .16); color: var(--gold-2); }
/* 폰에서 시트가 열리면 탭 판을 바닥에 붙인다. 중간까지 내린 시트가 탭 판 둘레와 판 너머로
   비쳐 보이지 않게 하려는 것이다. 단추 자리는 떠 있을 때와 같다(옆 패널 배치의 여집합). */
@media (max-width: 559.98px), (max-width: 959.98px) and (min-height: 480.02px) {
  body.panel-open #tabs {
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: calc(var(--tab) + var(--sab));
    padding: 4px max(calc(var(--sar) + 15px), calc((100% - 510px) / 2)) calc(var(--sab) + 15px) max(calc(var(--sal) + 15px), calc((100% - 510px) / 2));
    border-width: 1px 0 0;
    border-color: var(--line-soft);
    border-radius: 0;
    background: var(--ink-1);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, .38);
    transform: none;
  }
  /* 구름 백화점(11/14): 입어 본 캐릭터가 보이게 아래 탭 판·왼쪽 위 띠(이름·오늘 소식·시대)를 숨기고 시트를 바닥까지 내린다.
     체험 「미리보기」 단추(.tag-pill)도 숨긴다(시계 아래라 작은 폰에서 시트 윗변에 반쯤 잘린다). 메달·입주하기·집 수·시계는 남는다.
     가운데 멈춤 높이는 #sheet.c-dept의 --sheet-need(sheet.js midY) */
  body.sheet-dept #tabs, body.sheet-dept .hud-id, body.sheet-dept .news-pill, body.sheet-dept .era-chip, body.sheet-dept .tag-pill { display: none; }
  body.sheet-dept #sheet { bottom: calc(var(--sab) + 6px); height: calc(100dvh - var(--sat) - var(--sab) - 14px); }
  /* 바닥 줄 아래 틈(시트 아래 6px·홈 막대 자리)도 같은 바탕으로 덮는다. 가운데 멈춤에서 다음 옷 줄이 비치지 않게 */
  body.sheet-dept .dept-detail::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: calc(var(--sab) + 8px); background: inherit; }
}

/* 비행선 따라가기와 소리 단추: 오른쪽 아래 */
#imoogi {
  position: fixed;
  right: calc(var(--sar) + 12px);
  bottom: calc(var(--tab) + var(--sab) + 14px + var(--net));
  z-index: 14;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass-2);
  box-shadow: var(--shadow);
  color: var(--gold-2);
  transition: right .26s var(--ease);
}
#imoogi svg { width: 34px; height: 34px; }
#imoogi:active { transform: scale(.96); }
#imoogi[aria-pressed='true'] { border-color: var(--gold-2); background: var(--gold); color: var(--ink-0); }
#sound {
  position: fixed;
  right: calc(var(--sar) + 16px);
  bottom: calc(var(--tab) + var(--sab) + 78px + var(--net));
  z-index: 14;
  border-radius: 50%;
  transition: right .26s var(--ease);
}
#sound[aria-pressed='true'] { border-color: var(--line); color: var(--gold-2); }
/* ♪ 곡 고르기: 소리 단추 바로 위, 목록은 단추 왼쪽에 */
#bgm {
  position: fixed;
  right: calc(var(--sar) + 16px);
  bottom: calc(var(--tab) + var(--sab) + 132px + var(--net));
  z-index: 14;
  border-radius: 50%;
  color: var(--text-2);
  transition: right .26s var(--ease);
}
#bgm[aria-expanded='true'] { border-color: var(--line); color: var(--gold-2); }
#bgm-menu {
  position: fixed;
  right: calc(var(--sar) + 72px);
  bottom: calc(var(--tab) + var(--sab) + 78px + var(--net));
  z-index: 15;
  display: grid;
  gap: 2px;
  width: min(240px, calc(100vw - var(--sar) - var(--sal) - 88px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass-2);
  box-shadow: var(--shadow);
}
#bgm-menu[hidden] { display: none; }
.bgm-title { margin: 2px 6px 4px; color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.bgm-row { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 15px; text-align: left; }
.bgm-row:active { background: rgba(255, 255, 255, .06); }
.bgm-row[aria-checked='true'] { background: rgba(255, 184, 77, .14); color: var(--gold-2); font-weight: 700; }
.bgm-name { flex: 1; min-width: 0; }
.bgm-tag { flex: none; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold-2); font-size: 11px; font-weight: 700; }
.bgm-mark { flex: none; display: inline-flex; width: 18px; height: 18px; visibility: hidden; }
.bgm-mark svg { width: 18px; height: 18px; }
.bgm-row[aria-checked='true'] .bgm-mark { visibility: visible; }

/* 산책: 탭과 비행선 단추를 치우고 왼쪽 아래 막대, 오른쪽 아래 말풍선·끝 단추, PC는 아래 가운데 말풍선 입력칸 ---------
   현대식: 어두운 유리 + 흰 손잡이 + 초록 「같이 걷는 중」 */
:root { --walk: #3ddc97; --walk-d: #1fa874; --walk-glass: rgba(12, 14, 20, .62); --walk-edge: rgba(255, 255, 255, .16); }
#stick, #walk-keys, #walk-end, #say-open, #say-bar { display: none; }
body.walk-on #stick { display: block; }
body.walk-on #walk-end, body.walk-on #say-open { display: inline-flex; }
body.walk-on:not(.panel-open) #tabs, body.walk-on #imoogi { display: none; }
body.walk-on.panel-open #stick, body.walk-on.panel-open #walk-end, body.walk-on.panel-open #say-open,
body.walk-on.card-on #stick, body.walk-on.kb #stick, body.walk-on.kb #walk-end, body.walk-on.kb #say-open,
body.walk-on.say-on #stick, body.walk-on.say-on #walk-end, body.walk-on.say-on #say-open { display: none; }
#stick {
  position: fixed;
  left: calc(var(--sal) + 18px);
  bottom: calc(var(--sab) + 18px);
  z-index: 16;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.stick-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--walk-edge);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .06) 0 38%, transparent 39%), var(--walk-glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
/* 앞쪽 표시: 고리 위쪽의 작은 흰 화살표 */
.stick-ring::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  border: 5px solid transparent;
  border-top: 0;
  border-bottom: 7px solid rgba(255, 255, 255, .7);
  transform: translateX(-50%);
}
.stick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #e7ebf2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 -2px 0 rgba(0, 0, 0, .08);
  transition: transform .18s var(--ease);
}
#stick.held .stick-knob { transition: none; box-shadow: 0 0 0 6px rgba(61, 220, 151, .28), 0 6px 16px rgba(0, 0, 0, .35); }
#walk-end {
  position: fixed;
  right: calc(var(--sar) + 14px);
  bottom: calc(var(--sab) + 18px);
  z-index: 16;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px 0 13px;
  border: 1px solid var(--walk-edge);
  border-radius: 999px;
  background: var(--walk-glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.walk-end-icon { display: inline-flex; }
.walk-end-icon svg { width: 18px; height: 18px; }
/* 폰: 「산책 끝」 위 둥근 말풍선 단추. 같이 걷는 사람 수를 초록 점에 단다 */
#say-open {
  position: fixed;
  right: calc(var(--sar) + 14px);
  bottom: calc(var(--sab) + 74px);
  z-index: 16;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
  color: #14161b;
}
#say-open svg { width: 26px; height: 26px; }
#say-open:active { transform: scale(.96); }
#say-open[data-n]:not([data-n=''])::after {
  content: attr(data-n);
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--walk);
  color: #06271a;
  font: 800 11px/18px var(--body);
  text-align: center;
}
/* 말풍선 입력판 */
#say-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sab) + 18px);
  z-index: 17;
  flex-direction: column;
  gap: 8px;
  width: min(560px, calc(100% - var(--sal) - var(--sar) - 28px));
  padding: 10px;
  border: 1px solid var(--walk-edge);
  border-radius: 22px;
  background: var(--walk-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
  transform: translateX(-50%);
}
.say-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.say-chips::-webkit-scrollbar { display: none; }
.say-count {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 6px;
  color: rgba(255, 255, 255, .78);
  font: 700 12px/1 var(--body);
  white-space: nowrap;
}
.say-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--walk);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .22);
  animation: say-pulse 1.8s ease-in-out infinite;
}
@keyframes say-pulse { 50% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } }
.say-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 600 13px/1 var(--body);
  white-space: nowrap;
}
.say-chip:active { background: rgba(255, 255, 255, .16); }
.say-meet { border-color: rgba(61, 220, 151, .5); background: rgba(61, 220, 151, .16); color: #b8f5da; }
.say-chip-icon { display: inline-flex; }
.say-chip-icon svg { width: 16px; height: 16px; }
.say-row { display: flex; align-items: center; gap: 8px; }
#say-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: 500 16px/1.2 var(--body);
  outline: none;
}
#say-input::placeholder { color: rgba(255, 255, 255, .5); }
#say-input:focus { border-color: rgba(61, 220, 151, .7); background: rgba(255, 255, 255, .14); }
.say-send, .say-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
}
.say-send { background: var(--walk); color: #06271a; box-shadow: 0 4px 12px rgba(61, 220, 151, .35); }
.say-send svg { width: 20px; height: 20px; }
.say-close { display: none; background: rgba(255, 255, 255, .1); color: #fff; }
.say-close svg { width: 18px; height: 18px; }
/* 폰: 말풍선 단추를 누르면 키보드 바로 위로 올라온다 */
body.walk-on.say-on:not(.panel-open) #say-bar { display: flex; bottom: calc(var(--sab) + var(--kb) + 10px); }
body.walk-on.say-on .say-close { display: inline-flex; }
#walk-keys {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sab) + 148px);
  z-index: 16;
  gap: 16px;
  padding: 7px 14px;
  border: 1px solid var(--walk-edge);
  border-radius: 999px;
  background: var(--walk-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}
#walk-keys span { display: inline-flex; align-items: center; gap: 3px; }
#walk-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: 700 11px/1 var(--body);
}
/* 마우스로 쓰는 PC는 막대 대신 키 안내, 말풍선 입력칸은 늘 아래 가운데 */
@media (hover: hover) and (pointer: fine) {
  body.walk-on #stick, body.walk-on #say-open { display: none; }
  body.walk-on:not(.panel-open) #walk-keys { display: flex; }
  body.walk-on:not(.panel-open) #say-bar { display: flex; }
  body.walk-on.say-on #walk-end { display: inline-flex; }
  body.walk-on.say-on:not(.panel-open) #say-bar { bottom: calc(var(--sab) + 18px); }
  body.walk-on .say-close { display: none; }
}
/* 좁은 창에서는 「산책 끝」과 겹치지 않게 입력판을 왼쪽에 붙이고, 더 좁으면 안내를 줄인다(돌아보기는 화면 끌기로도 된다) */
@media (hover: hover) and (pointer: fine) and (max-width: 860px) {
  #say-bar { left: calc(var(--sal) + 14px); width: calc(100% - var(--sal) - var(--sar) - 170px); transform: none; }
  #walk-keys { left: calc(var(--sal) + 14px); transform: none; }
}
@media (hover: hover) and (pointer: fine) and (max-width: 520px) {
  #walk-keys span:nth-child(3) { display: none; }
}
@media (hover: hover) and (pointer: fine) and (max-width: 400px) {
  #walk-keys span:nth-child(2) { display: none; }
}
/* 집 카드가 뜨면 말풍선 입력판은 잠깐 비킨다 */
body.walk-on.card-on #say-bar, body.walk-on.card-on.say-on:not(.panel-open) #say-bar { display: none; }
/* 차 단추: 오른쪽 단추 줄(산책 끝·말풍선·소리·♪ 곡 고르기) 맨 위에 세로로(타기·내리기, 차 매장, 매장 문 앞이면 들어가기) */
#walk-car {
  position: fixed;
  right: calc(var(--sar) + 14px);
  bottom: calc(var(--tab) + var(--sab) + 190px + var(--net));   /* ♪ 단추(#bgm) 바로 위 */
  z-index: 16;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
body.walk-on #walk-car { display: flex; }
body.walk-on.panel-open #walk-car, body.walk-on.kb #walk-car, body.walk-on.say-on #walk-car, body.walk-on.card-on #walk-car { display: none; }
.walk-car-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--walk-edge);
  border-radius: 999px;
  background: var(--walk-glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.walk-car-btn[aria-pressed='true'] { border-color: transparent; background: var(--walk); color: #06271a; }
@media (hover: hover) and (pointer: fine) {
  body.walk-on.say-on:not(.panel-open):not(.kb):not(.card-on) #walk-car { display: flex; }
}
/* ♪ 곡 목록이 열린 동안은 목록을 가리지 않게 비킨다(♪ 단추가 먼저 붙은 형제라 ~로 닿는다) */
#bgm[aria-expanded='true'] ~ #walk-car { display: none; }
/* 넓은 화면은 소리·♪ 단추가 아래로 내려와 있다(아래 넓은 화면 묶음) */
@media (min-width: 960px), (min-width: 560px) and (max-height: 480px) {
  #walk-car { bottom: calc(var(--sab) + 188px + var(--net)); }
}
/* 눕힌 폰은 ♪ 단추 위 자리가 모자라 오른쪽 위 표시(시각·미리보기)에 닿는다 → 말풍선 단추 왼쪽에 한 줄로(타기·내리기가 엄지 쪽 끝) */
@media (min-width: 560px) and (max-height: 480px) {
  #walk-car { right: calc(var(--sar) + 80px); bottom: calc(var(--sab) + 80px); flex-direction: row; align-items: center; }
  .walk-horn .horn-word { display: none; }   /* 경적은 아이콘만(한 줄이 왼쪽 막대에 닿지 않게) */
  #walk-keys .keys-horn { display: none !important; }   /* 마우스 PC 낮은 창: 키 안내가 차 단추 줄에 닿지 않게 H 안내는 뺀다(📣 단추가 옆에 있다) */
}
/* 마우스 PC의 낮은 창은 아래 말풍선 입력판이 넓어서 그 위로 올린다 */
@media (hover: hover) and (pointer: fine) and (min-width: 560px) and (max-height: 480px) {
  #walk-car { bottom: calc(var(--sab) + 134px); }
}
/* 산책 중 차 매장 창(크팡 차 탭)이 뜨면 산책 단추는 모두 비킨다. 창을 닫으면 그 자리에서 다시 걷는다 */
body.walk-on.work-on #stick, body.walk-on.work-on #walk-end, body.walk-on.work-on #say-open, body.walk-on.work-on #say-bar,
body.walk-on.work-on #walk-keys, body.walk-on.work-on #walk-car { display: none !important; }

/* 시트: 폰은 아래에서 올라오고, PC와 눕힌 폰은 오른쪽에 붙는다 ----------------- */
#sheet {
  position: fixed;
  left: calc(var(--sal) + 8px);
  right: calc(var(--sar) + 8px);
  bottom: calc(var(--tab) + var(--sab) + 6px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--sat) - var(--tab) - var(--sab) - 14px);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--ink-1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  color: var(--text);
  transition: transform .26s var(--ease);
  will-change: transform;
}
#sheet.dragging { transition: none; }
.sheet-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 14px 6px 8px 18px;
  border-bottom: 1px solid var(--line-soft);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-head::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: rgba(246, 236, 214, .28);
}
.sheet-head h2 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font: 700 19px/1.25 var(--title); }
.sheet-head h2::before { content: ''; flex: none; width: 9px; height: 9px; background: var(--hd, var(--gold)); transform: rotate(45deg); }
.sheet-head h2:focus { outline: none; }
.sheet-head .icon-btn.flat { width: 44px; height: 44px; }
.c-news { --hd: var(--dan-2); }
.c-find { --hd: var(--cheong-2); }
.c-places { --hd: var(--gold); }
.c-home { --hd: var(--ju-2); }
.c-market { --hd: var(--gold-2); }
.c-raid { --hd: var(--ju); }
.c-era { --hd: var(--gold); }
.c-dept { --hd: #f08fae; }
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-color: rgba(246, 236, 214, .22) transparent;
}
.sheet-body:focus-visible { outline: none; }

/* 패널 안쪽 ---------------------------------------------------------------- */
.sec { padding: 16px 18px 18px; }
.sec + .sec { border-top: 1px solid var(--line-soft); }
.sec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--gold-2); font: 700 15px/1.35 var(--body); }
.sec-title .tag { font-size: 13px; }
.sec-title .right { margin-left: auto; color: var(--text-2); font: 400 14px/1.3 var(--body); }
.lead { font: 700 17px/1.5 var(--title); }
.muted { color: var(--text-2); }
.small { font-size: 14px; line-height: 1.55; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.tight { gap: 6px; }
.note-box { padding: 10px 12px; border: 1px solid rgba(226, 182, 79, .3); border-radius: 12px; background: rgba(226, 182, 79, .1); font-size: 14px; line-height: 1.55; }
.note-box.bad { border-color: rgba(239, 106, 79, .42); background: rgba(216, 67, 43, .14); }
.note-box.good { border-color: rgba(76, 194, 165, .42); background: rgba(31, 138, 116, .16); }
.empty { padding: 18px 12px; border: 1px dashed rgba(246, 236, 214, .22); border-radius: 12px; color: var(--text-2); text-align: center; }
.empty .btn { margin-top: 10px; }
.wait-line { margin: 8px 0; }

.rows > li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.rows > li:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title, .row-sub { display: block; }
.row-title { color: var(--text); font: 700 15px/1.4 var(--body); }
.row-sub { color: var(--text-2); font-size: 14px; line-height: 1.45; }
.row-go { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 4px; border-radius: 12px; text-align: left; }
.row-go:active:not([disabled]) { background: rgba(246, 236, 214, .05); }
.row-go[disabled] { opacity: .5; cursor: default; }
.place-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(226, 182, 79, .14); color: var(--gold-2); }
.place-mark svg { width: 19px; height: 19px; }
.rank-no { flex: none; width: 34px; color: var(--text-2); font: 700 16px/1 var(--body); text-align: center; }
.rank-no.top { color: var(--gold-2); }
.money { flex: none; color: var(--gold-2); font: 700 15px/1.2 var(--body); white-space: nowrap; }

.seg {
  display: flex;
  gap: 4px;
  padding: 6px 12px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-1);
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font: 700 14px/1.2 var(--body);
  white-space: nowrap;
}
.seg button[aria-selected='true'], .seg button[aria-pressed='true'] { border-bottom-color: var(--gold); color: var(--gold-2); }
.seg.pill { gap: 6px; padding: 0; border: 0; background: none; }
.seg.pill button { border: 1px solid var(--line-soft); border-radius: 999px; }
.seg.pill button[aria-pressed='true'] { border-color: var(--gold); background: var(--gold); color: var(--ink-0); }
.c-home .seg { position: sticky; top: 0; z-index: 2; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(246, 236, 214, .2);
  border-radius: 12px;
  background: var(--ink-0);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: rgba(246, 236, 214, .4); }
.input:focus { border-color: var(--gold); }
textarea.input { min-height: 88px; resize: none; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; }

/* 방송 */
.news-row { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.news-row:last-child { border-bottom: 0; }
.news-row time { color: var(--text-2); font-size: 13px; }
.news-row h4 { font: 700 15px/1.45 var(--body); }
.news-row p { margin-top: 2px; color: rgba(246, 236, 214, .86); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.poll-title { margin-bottom: 10px; font: 700 17px/1.45 var(--title); }
.poll-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.poll-choices .btn { min-height: 64px; flex-direction: column; gap: 2px; }
.poll-choices .btn small { color: inherit; font: 400 13px/1.2 var(--body); opacity: .9; }
.poll-choices .btn[aria-pressed='true'] { border-color: var(--cheong-2); background: var(--cheong); color: #fff; }
.cmd-write { display: inline-block; padding: 1px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(226, 182, 79, .16); color: var(--gold-2); font: 700 14px/1.55 var(--body); }
details.fold { border-bottom: 1px solid var(--line-soft); }
details.fold:last-child { border-bottom: 0; }
details.fold summary { position: relative; display: flex; align-items: center; min-height: 48px; padding: 8px 26px 8px 0; font: 700 15px/1.4 var(--body); list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: '+'; position: absolute; right: 4px; color: var(--gold); font: 400 20px/1 var(--body); }
details.fold[open] summary::after { content: '\2212'; }
details.fold > :not(summary) { padding-bottom: 12px; color: rgba(246, 236, 214, .86); font-size: 14px; line-height: 1.6; }

/* 내 집 */
.home-top { padding: 14px 18px 12px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(226, 182, 79, .1), rgba(226, 182, 79, 0)); }
.home-addr { font: 700 21px/1.3 var(--title); }
.home-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; color: var(--text-2); font-size: 15px; }
.home-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 10px; color: var(--text-2); font-size: 14px; }
.home-stats b { color: var(--gold-2); font: 700 17px/1.2 var(--title); }
.home-top .btn-row { margin-top: 2px; }
.home-top .note-box { margin-bottom: 10px; }
.step-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.step { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 2px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--ink-2); color: var(--text-2); font: 700 12px/1.15 var(--body); text-align: center; }
.step.on { border-color: rgba(76, 194, 165, .6); background: var(--dan); color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 92px;
  padding: 8px 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--ink-2);
  color: var(--text);
}
.swatch span { display: block; }
.swatch:active:not([disabled]) { transform: translateY(1px); }
.swatch[aria-pressed='true'] { border-color: var(--gold); background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--gold); }
.swatch[disabled] { opacity: .55; }
.swatch-house { display: block; width: 44px; height: 34px; }
.swatch-name { font: 700 13px/1.25 var(--body); }
.swatch-cost { color: var(--text-2); font-size: 13px; line-height: 1.2; }
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--ink-2); color: var(--text); text-align: left; }
.pick:active:not([disabled]) { transform: translateY(1px); }
.pick[disabled] { opacity: .55; cursor: default; }
.pick-name { font: 700 15px/1.3 var(--body); }
.pick-sub { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.pick[aria-pressed='true'] { border-color: var(--gold); background: var(--gold); color: var(--ink-0); }
.pick[aria-pressed='true'] .pick-sub { color: rgba(21, 17, 13, .72); }
.pick.side-uijeok[aria-pressed='true'] { border-color: var(--ju-2); background: var(--ju); color: #fff; }
.pick.side-pojol[aria-pressed='true'] { border-color: var(--cheong-2); background: var(--cheong); color: #fff; }
.pick.side-uijeok[aria-pressed='true'] .pick-sub, .pick.side-pojol[aria-pressed='true'] .pick-sub { color: rgba(255, 255, 255, .82); }
/* 구름 백화점: 옷 카드·시트 바닥에 붙는 「사기」 줄(bottom 0: 본문 아래 여백이 이미 화면 밖 높이라 그 안쪽 바닥 = 보이는 바닥)·후드티 색·내 옷장 */
/* 폰 가운데 멈춤에서 보여야 할 높이(sheet.js midY, 위로 세계 KEEP px는 남긴다): 머리 67·탭 51·옷 칸 줄 60·옷 두 줄·「사기」 줄.
   키 큰 폰은 이름 두 줄 카드 두 줄 끝 349 + 이름 두 줄·설명 줄 바닥 줄 139 + 두 줄 단추 몫(폭 360 실측). 740px 이하는 아래 @media(줄인 카드) */
#sheet.c-dept { --sheet-need: 496px; }
/* 「옷 칸」 단추 줄은 본문 위에 붙는다(어느 높이에서도 눌린다). 「사기」 줄(z-index 1)보다 위 */
.dept-bar { position: sticky; top: 0; z-index: 2; margin: -16px -18px 0; padding: 8px 18px; border-bottom: 1px solid var(--line-soft); background: var(--ink-1); }
.dept-cash { color: var(--gold-2); font-weight: 700; }
.dept-grid { margin-top: 8px; }
.dept-item { position: relative; min-width: 0; padding-left: 46px; }   /* min-width 0: 한 줄로 줄인 이름이 격자 칸을 넓히지 않게 */
.dept-ico { flex: none; font-size: 24px; line-height: 1; }
.dept-item .dept-ico { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); }
.dept-item.dept-t3 { border-color: rgba(255, 184, 77, .45); }
.dept-item.dept-t4 { border-color: rgba(240, 143, 174, .65); }
.dept-detail { position: sticky; bottom: 0; z-index: 1; margin: 12px -18px 0; padding: 10px 18px 12px; border-top: 1px solid var(--line-soft); background: var(--ink-1); box-shadow: 0 -8px 16px rgba(0, 0, 0, .35); }
.dept-detail.idle { display: flex; align-items: center; gap: 10px; }
.dept-hint { flex: 1; min-width: 0; }
.dept-name { font: 700 15px/1.35 var(--body); }
.dept-name small { color: var(--text-2); font-size: 13px; font-weight: 400; }
.dept-name .dept-lim { color: var(--gold-2); }
.dept-line { margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dept-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.dept-act > .btn:first-child { flex: 1 1 0; min-width: 0; line-height: 1.2; }   /* 글이 길어도 되돌리기를 다음 줄로 밀지 않고 단추 안에서 두 줄 */
.dept-act > .note-box, .dept-act > .empty, .dept-act > .waiting { flex: 1 1 100%; margin: 0; }
.dept-act > .dept-guest { flex: 1 1 0; min-width: 0; }
.dept-tints { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dept-tint { min-height: 44px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--sw, var(--ink-2)); color: var(--text); font: 700 12px/1 var(--body); }
.dept-tint[aria-pressed='true'] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.dept-tint[disabled] { opacity: .55; }
.dept-slot + .dept-slot { margin-top: 12px; }
.dept-slot-name { margin-bottom: 4px; }
.dept-row { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.dept-row-name { flex: 1; min-width: 0; font: 700 15px/1.35 var(--body); }
.dept-row-name small { color: var(--text-2); font-size: 13px; font-weight: 400; }
/* 키가 작은 화면: 고른 옷 설명 줄을 접고, 옷 이름·값은 한 줄로 줄여(…) 카드 높이를 맞춘다(옷 두 줄이 보이게, 전체 이름은 바닥 줄에).
   줄인 카드 두 줄 끝 311 + 바닥 줄 89(이름 줄 한 줄, 두 줄 단추면 +4) + 1 → 375×553에서 남는 409px 안 */
@media (max-height: 740px) {
  #sheet.c-dept { --sheet-need: 408px; }
  .dept-detail { padding: 8px 18px 10px; }
  .dept-act { margin-top: 6px; }
  .dept-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .dept-line { display: none; }
  .dept-item .pick-name, .dept-item .pick-sub { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.stat-grid div { padding: 6px 2px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--ink-2); }
.stat-grid b { display: block; color: var(--gold-2); font: 700 17px/1.2 var(--title); }
.stat-grid span { color: var(--text-2); font-size: 13px; }
.rar-common { color: var(--text-2); }
.rar-rare { color: var(--cheong-2); }
.rar-legend { color: var(--ju-2); }
.story-row { padding: 10px 12px; border-left: 3px solid var(--dan-2); border-radius: 0 12px 12px 0; background: var(--ink-2); font-size: 14px; line-height: 1.65; white-space: pre-line; }
.story-row time { display: block; color: var(--text-2); font-size: 13px; }

/* 로그인 */
.code-box { display: flex; align-items: center; justify-content: center; min-height: 76px; padding: 8px; border: 1px dashed var(--line); border-radius: 14px; background: var(--ink-0); color: var(--gold-2); font: 700 32px/1.1 var(--body); letter-spacing: .06em; user-select: all; -webkit-user-select: all; }
.steps { counter-reset: st; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; counter-increment: st; font-size: 14px; line-height: 1.55; }
.steps li::before { content: counter(st); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink-0); font: 700 13px/1 var(--body); }
.waiting { display: flex; align-items: center; gap: 8px; }
.waiting i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dan-2); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* 상점가 */
.left-bar { height: 6px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: var(--ink-0); }
.left-bar i { display: block; height: 100%; background: var(--ju-2); }

/* 토벌 */
.tier { display: inline-flex; gap: 3px; vertical-align: middle; }
.tier i { width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 50%; }
.tier i.on { border-color: var(--ju-2); background: var(--ju-2); }
.team-bar { display: flex; height: 12px; overflow: hidden; border-radius: 6px; background: var(--ink-0); }
.team-bar i { display: block; height: 100%; }
.team-bar .t-tteok, .team-key .t-tteok { background: var(--dan-2); }
.team-bar .t-gukbap, .team-key .t-gukbap { background: var(--gold-2); }
.team-bar .t-song, .team-key .t-song { background: var(--cheong-2); }
.team-bar .t-massage, .team-key .t-massage { background: var(--ju-2); }
.team-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--text-2); font-size: 14px; }
.team-key span { display: inline-flex; align-items: center; gap: 5px; }
.team-key i { width: 10px; height: 10px; border-radius: 3px; }
.raid-log { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--ink-2); font-size: 14px; line-height: 1.55; }
.result { display: inline-flex; padding: 0 9px; border-radius: 999px; color: #fff; font: 700 13px/1.7 var(--body); }
.result.calm { background: var(--dan); }
.result.sulk { background: var(--ju); }
.result.tie, .result.none { background: var(--ink-3); }

/* 시대 */
.era-row { display: flex; gap: 12px; align-items: stretch; width: 100%; min-height: 72px; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); color: var(--text); text-align: left; }
.era-row:last-child { border-bottom: 0; }
.era-row[aria-pressed='true'] { border-radius: 12px; background: rgba(226, 182, 79, .1); }
.era-mark { flex: none; display: flex; align-items: center; justify-content: center; width: 46px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--ink-2); color: var(--text-2); font: 700 13px/1.1 var(--body); writing-mode: vertical-rl; }
.era-mark.long { font-size: 11px; }
.era-row.now .era-mark { border-color: var(--gold-2); background: var(--gold); color: var(--ink-0); }
.era-row.past .era-mark { border-color: rgba(76, 194, 165, .6); background: var(--dan); color: #fff; }

/* 집 카드 ------------------------------------------------------------------ */
#card {
  position: fixed;
  left: calc(var(--sal) + 10px);
  right: calc(var(--sar) + 10px);
  bottom: calc(var(--tab) + var(--sab) + 10px + var(--net));
  z-index: 22;
  max-width: 460px;
  margin: 0 auto;
  padding: 14px 8px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  color: var(--text);
}
.card-top { display: flex; align-items: flex-start; gap: 6px; }
.card-main { flex: 1; min-width: 0; }
.card-addr { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.card-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 700 20px/1.3 var(--title); }
.card-line { margin-top: 4px; color: rgba(246, 236, 214, .88); font-size: 14px; line-height: 1.55; }
.card-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 8px 0 0; }
.card-act .btn { flex: 1 1 130px; }
body.card-on #imoogi, body.card-on #sound, body.card-on #bgm, body.card-on #bgm-menu { display: none; }

/* 입장 카드 ---------------------------------------------------------------- */
#entry {
  position: fixed;
  left: calc(var(--sal) + 12px);
  right: calc(var(--sar) + 12px);
  bottom: calc(var(--sab) + 12px);
  z-index: 30;
  max-width: 440px;
  max-height: calc(100dvh - var(--sat) - var(--sab) - 24px);
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  color: var(--text);
}
.sk-strip { display: block; width: 100%; height: 100%; }
.entry-strip { height: 26px; overflow: hidden; }
.entry-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.entry-brand { display: flex; align-items: center; gap: 8px; }
.entry-brand strong { color: var(--gold-2); font: 700 15px/1.2 var(--title); }
.entry-hook { font: 700 clamp(27px, 7.8vw, 34px)/1.22 var(--title); letter-spacing: -.02em; }
.entry-hook span { display: block; }
.entry-sub { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.entry-invite { margin-top: -4px; color: var(--text); word-break: keep-all; }
.entry-nums { display: flex; flex-wrap: wrap; gap: 2px 20px; padding: 10px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.entry-nums div { display: flex; align-items: baseline; gap: 4px; color: var(--text-2); font-size: 14px; }
.entry-nums b { color: var(--gold-2); font: 700 21px/1.2 var(--title); }
body.entry-on #hud, body.entry-on #tabs, body.entry-on #imoogi, body.entry-on #sound, body.entry-on #bgm, body.entry-on #bgm-menu { visibility: hidden; }
.entry-act { display: flex; gap: 8px; }
.entry-act .btn { flex: 1 1 0; width: auto; min-width: 0; padding-right: 10px; padding-left: 10px; }
/* 카드가 화면보다 길어도 입구 단추 두 개는 늘 카드 아래쪽에 붙어 보인다(11/13 실주소 점검 3번:
   844px 폰에선 화면 맨 아래에 걸려 카드를 밀어 올려야 눌렸고, 데스크톱에선 카드 안을 내려야 보였다).
   카드 좌우·아래 여백까지 덮어, 뒤로 지나가는 글이 단추 사이로 비치지 않게 한다. */
.entry-act { position: sticky; bottom: 0; z-index: 1; margin: 0 -18px -18px; padding: 14px 18px 18px; background: linear-gradient(rgba(14, 19, 30, 0), rgb(14, 19, 30) 14px); }
.entry-find .input { min-height: 44px; }

/* 입주하면 생기는 것: 입장 카드와 입주 화면이 같이 쓴다. 첫 집 모집만 금빛으로 눈에 띄게 둔다. */
.perks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.perk { display: flex; align-items: flex-start; gap: 10px; }
.perk-icon { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-soft); border-radius: 50%; color: var(--gold-2); }
.perk-icon svg { width: 17px; height: 17px; }
.perk-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perk-text b { color: var(--text); font: 700 14.5px/1.35 var(--body); }
.perk-text span { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.perk.gold { padding: 10px 12px; border: 1px solid rgba(243, 210, 124, .55); border-radius: 14px; background: rgba(226, 182, 79, .13); }
.perk.gold .perk-icon { border-color: transparent; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink-0); }
.perk.gold b { color: var(--gold-2); }

/* 집문서 */
#deed { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(var(--sat) + 10px) 12px calc(var(--sab) + 12px); overflow-y: auto; background: rgba(21, 17, 13, .95); }
#deed .deed-img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - var(--sat) - var(--sab) - 170px); border: 1px solid var(--line); border-radius: 6px; }
#deed .deed-bar { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 440px; }
#deed .deed-bar .btn { flex: 1 1 120px; }
#deed .deed-hint { max-width: 440px; color: var(--text-2); font-size: 14px; text-align: center; }

/* 안내 노선과 끊김 알림 */
#toasts { position: fixed; left: 12px; right: 12px; top: calc(var(--sat) + 12px); z-index: 70; display: flex; justify-content: center; pointer-events: none; }
.toast { max-width: 460px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-1); box-shadow: 0 10px 26px rgba(0, 0, 0, .5); color: var(--text); font-size: 15px; line-height: 1.5; }
.toast.bad { border-color: rgba(239, 106, 79, .6); background: #3a1912; }
.toast.good { border-color: rgba(76, 194, 165, .6); background: #12302a; }
body.offline { --net: 36px; }
#net { position: fixed; left: 50%; bottom: calc(var(--tab) + var(--sab) + 6px); z-index: 26; max-width: calc(100% - 24px); padding: 5px 14px; border-radius: 999px; background: #3a1912; color: var(--text); font-size: 13px; text-align: center; white-space: nowrap; transform: translateX(-50%); }
/* 늦게 받는 조각 안내(배포 B, lazy.js): 집 카드·직업 무대 조각이 느리거나 못 왔을 때 화면 위에 하나만 뜬다.
   누르기 단추를 덮지 않게 위쪽에 둔다. 패널·크팡 탭 안에서는 목록 자리에 같은 상자(.chunk-box)가 뜬다 */
#chunk-note { position: fixed; left: 50%; top: calc(var(--sat) + 12px); z-index: 65; width: max-content; max-width: calc(100% - 24px); padding: 12px 14px; border: 1px solid rgba(239, 106, 79, .6); border-radius: 14px; background: #3a1912; box-shadow: 0 10px 26px rgba(0, 0, 0, .5); color: var(--text); font-size: 15px; line-height: 1.5; text-align: center; transform: translateX(-50%); }
#chunk-note[role="status"] { border-color: var(--line); background: var(--ink-1); }
#chunk-note p { margin: 0 0 8px; }
.chunk-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chunk-box p { margin: 0 0 4px; }
.chunk-box .chunk-acts { margin-top: 10px; }
.chunk-box .chunk-acts .btn { margin-top: 0; }

/* 로딩 화면: 밤 빌딩 창문에 불이 하나씩 켜진다 ------------------------------------ */
#loader { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; background: var(--ink-0); color: var(--text); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .42s ease-in, transform .42s ease-in; }
.sky .w { opacity: 0; animation: sk-in .36s ease-out forwards; }
.d0 { --d: 0; } .d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; } .d5 { --d: 5; }
.d6 { --d: 6; } .d7 { --d: 7; } .d8 { --d: 8; } .d9 { --d: 9; } .d10 { --d: 10; } .d11 { --d: 11; }
.sky .w { animation-delay: calc(var(--d) * 96ms); }
@keyframes sk-in { from { opacity: 0; } to { opacity: 1; } }
#loader.lift { background: transparent; pointer-events: none; }
#loader.lift .sky { opacity: 0; transform: translateY(4%); }
#loader.lift .loader-plate { opacity: 0; transition: opacity .18s; }
.loader-plate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: min(320px, 100%);
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-2);
  box-shadow: var(--shadow);
  text-align: center;
}
.loader-title { font: 700 28px/1.25 var(--title); }
.loader-msg { font-size: 15px; line-height: 1.5; }
.loader-plate .btn { margin-top: 10px; }

/* 옆 패널 배치: PC와 가로로 눕힌 폰 ---------------------------------------------- */
@media (min-width: 960px), (min-width: 560px) and (max-height: 480px) {
  :root { --panel: min(400px, 46vw); --imoogi-room: 76px; }
  #sheet {
    top: calc(var(--sat) + 12px);
    right: calc(var(--sar) + 12px);
    bottom: calc(var(--sab) + 12px);
    left: auto;
    width: var(--panel);
    max-width: none;
    height: auto;
    margin: 0;
  }
  .sheet-head { touch-action: auto; padding-top: 10px; }
  .sheet-head::before { display: none; }
  #tabs {
    width: min(520px, calc(100vw - 2 * var(--imoogi-room) - 40px));
    transition: left .26s var(--ease), width .26s var(--ease);
  }
  body.panel-open #tabs {
    --room: calc(100vw - var(--panel) - 36px - var(--imoogi-room));
    left: calc(12px + var(--room) / 2);
    width: min(520px, var(--room));
  }
  #imoogi { right: calc(var(--sar) + 16px); bottom: calc(var(--sab) + 12px + var(--net)); }
  #sound { right: calc(var(--sar) + 20px); bottom: calc(var(--sab) + 76px + var(--net)); }
  #bgm { right: calc(var(--sar) + 20px); bottom: calc(var(--sab) + 130px + var(--net)); }
  #bgm-menu { right: calc(var(--sar) + 76px); bottom: calc(var(--sab) + 76px + var(--net)); }
  body.panel-open #imoogi { right: calc(var(--panel) + 36px); }
  body.panel-open #sound, body.panel-open #bgm { right: calc(var(--panel) + 40px); }
  body.panel-open #bgm-menu { right: calc(var(--panel) + 96px); }
  /* 오른쪽 위 단추는 패널이 열리면 패널 왼쪽으로 비켜선다 */
  body.panel-open .hud-r { transform: translateX(calc(-1 * (var(--panel) + 14px))); }
  #card { left: calc(var(--sal) + 16px); right: auto; bottom: calc(var(--sab) + 86px + var(--net)); width: 360px; margin: 0; }
  #entry { left: calc(var(--sal) + 40px); right: auto; bottom: 50%; width: 420px; margin: 0; transform: translateY(50%); }
  #net { left: calc(var(--sal) + 16px); bottom: calc(var(--sab) + 84px); transform: none; }
}

/* 가로로 눕힌 폰은 높이가 모자란다 */
@media (max-height: 480px) {
  :root { --tab: 60px; }
  #tabs { bottom: calc(var(--sab) + 8px); border-radius: 16px; }
  .tab { font-size: 11px; }
  .tab-icon svg { width: 20px; height: 20px; }
  .medal { width: 50px; height: 50px; }
  .medal-name { max-width: 34px; font-size: 11px; }
  .medal.long .medal-name { font-size: 10px; }
  .hud-id { min-height: 42px; margin-left: -20px; padding: 5px 12px 5px 26px; }
  .hud-next { display: none; }
  .hud-l { gap: 6px; }
  #entry { top: calc(var(--sat) + 8px); bottom: calc(var(--sab) + 8px); transform: none; }
  .entry-strip { display: none; }
  .entry-hook { font-size: 24px; }
  /* 패널을 연 눕힌 폰은 자리가 좁아 꼭 필요한 것만 남긴다 */
  body.panel-open { --imoogi-room: 0px; }
  body.panel-open #imoogi, body.panel-open #sound, body.panel-open #bgm, body.panel-open #bgm-menu { display: none; }
  body.panel-open .hud-id, body.panel-open .news-pill, body.panel-open .stat-pill { display: none; }
  #card { bottom: calc(var(--sab) + 70px + var(--net)); max-height: calc(100dvh - var(--sat) - var(--sab) - 186px); overflow-y: auto; overscroll-behavior: contain; }
}

/* 작은 폰 */
@media (max-width: 350px) {
  .medal { width: 52px; height: 52px; }
  .medal-name { max-width: 36px; font-size: 12px; }
  .hud-id { margin-left: -20px; padding: 6px 10px 6px 26px; }
  .hud-name { font-size: 15px; }
  .news-text { display: none; }
  .cta { padding: 0 12px 0 10px; font-size: 14px; }
  .pick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 374px), (min-width: 560px) and (max-height: 480px) { .seg-more { display: none; } }
/* 눕힌 폰의 좁은 옆 패널에서도 내 집 다섯 칸이 한 줄에 들어가게 한다 */
@media (min-width: 560px) and (max-height: 480px) {
  .seg:not(.pill) { padding: 6px 6px 0; }
  .seg button { min-width: 44px; padding: 6px 4px; font-size: 13px; }
}

/* 키보드가 올라오면 탭을 치우고 시트를 키보드 위에 붙인다 */
body.kb #tabs, body.kb #imoogi, body.kb #sound, body.kb #bgm, body.kb #bgm-menu, body.kb #net { display: none; }
body.kb #sheet { bottom: var(--kb); height: calc(100dvh - var(--kb) - var(--sat) - 8px); }
body.kb #card { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .sky .w { opacity: 1; animation: none; }
  #loader.lift { opacity: 0; transition: opacity .2s !important; }
  #loader.lift .sky { transition: none; }
  .waiting i { animation: none; }
}

/* 「내일 다시 올 이유」 카드: 오늘 밤 00:05 정산 방송(client/ui/tonight.js) */
#tonight {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px);
  background: rgba(6, 9, 16, .58);
  animation: tonight-in .28s var(--ease);
}
.tonight-card {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 20px 18px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--glass-2); box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  color: var(--text);
}
.tonight-kicker { color: var(--gold-2); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.tonight-title { font: 800 clamp(24px, 7vw, 30px)/1.25 var(--title); letter-spacing: -.02em; }
.tonight-count { color: var(--text-2); font-size: 15px; }
.tonight-left { color: var(--gold-2); font: 800 clamp(26px, 8vw, 34px)/1.1 var(--title); margin-left: 4px; }
.tonight-lines { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); list-style: none; }
.tonight-lines li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.45; }
.tonight-lines li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.tonight-foot { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.tonight-act { display: flex; gap: 8px; }
.tonight-act .btn { flex: 1 1 0; min-width: 0; }
@keyframes tonight-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #tonight { animation: none; } }

/* 「닉네임 정하기」 창(client/ui/nick.js). 「내일 다시 올 이유」 카드와 같은 모양의 떠 있는 창 */
#nick {
  position: fixed; inset: 0; z-index: 62;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px);
  background: rgba(6, 9, 16, .58);
  animation: tonight-in .28s var(--ease);
}
.nick-card {
  width: 100%; max-width: 380px; max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px 18px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--glass-2); box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  color: var(--text);
}
.nick-kicker { color: var(--gold-2); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.nick-title { font: 800 clamp(24px, 7vw, 30px)/1.25 var(--title); letter-spacing: -.02em; }
.nick-lead { font-size: 15.5px; line-height: 1.5; }
.nick-lead b { color: var(--gold-2); white-space: nowrap; }
.nick-note { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.nick-card .input { width: 100%; font-size: 18px; }
.nick-card .input:disabled { opacity: .5; }
.nick-rule { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.nick-why { min-height: 1.45em; color: #ffb9a8; font-size: 14px; line-height: 1.45; }
.nick-why:empty { display: none; }
.nick-act { display: flex; gap: 8px; margin-top: 2px; }
.nick-act .btn { flex: 1 1 0; min-width: 0; }
.nick-reset { align-self: center; min-height: 44px; padding: 4px 8px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nick-edit { border: 1px solid var(--line); font: inherit; font-size: 12.5px; font-weight: 700; }
.home-ig { margin-top: 2px; font-size: 13px; }
.say-nick { border-color: rgba(255, 210, 122, .5); background: rgba(255, 210, 122, .14); color: #ffe2a6; }
@media (prefers-reduced-motion: reduce) { #nick { animation: none; } }

/* 친구 초대 카드(client/ui/invite.js) */
.invite-card { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 184, 77, .07); }
.invite-title { color: var(--gold-2); font: 700 16px/1.35 var(--title); }
.invite-steps { display: flex; flex-direction: column; gap: 4px; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.invite-code { color: var(--text-2); font-size: 14px; }
.invite-code b { color: var(--text); font: 700 17px/1.2 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .08em; }
.invite-card.landing { margin-top: 10px; }

/* 깊숙이 둔 계정 관리(지우기) */
details.deep { border-top: 1px solid var(--line-soft); padding-top: 8px; }
details.deep > summary { cursor: pointer; color: var(--text-2); font-size: 13px; list-style: none; padding: 6px 0; }
details.deep > summary::-webkit-details-marker { display: none; }
details.deep > summary::after { content: ' ›'; }
details.deep[open] > summary::after { content: ' ⌄'; }
details.deep > * + * { margin-top: 8px; }

/* 상하차 뛰기(client/ui/work.js): 왼쪽 아래 단추와 아래에서 올라오는 작업판 ------------------- */
#workfab {
  position: fixed;
  left: calc(var(--sal) + 12px);
  bottom: calc(var(--tab) + var(--sab) + 14px + var(--net));
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(226, 182, 79, .55);
  border-radius: 27px;
  background: var(--glass-2);
  box-shadow: var(--shadow);
  color: var(--text);
}
#workfab:active { transform: scale(.97); }
.workfab-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(226, 182, 79, .18); font-size: 22px; line-height: 1; }
.workfab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.workfab-text b { color: var(--gold-2); font: 800 15px/1.2 var(--title); }
.workfab-cash { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.walk-on #workfab, body.card-on #workfab, body.entry-on #workfab, body.kb #workfab, body.work-on #workfab { display: none; }

#work {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  height: min(82dvh, 760px);
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 14px calc(var(--sab) + 10px);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--ink-1);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .55);
  color: var(--text);
  animation: work-up .24s var(--ease);
}
#work[hidden] { display: none; }
@keyframes work-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
body.work-on #tabs, body.work-on #imoogi, body.work-on #sound, body.work-on #bgm, body.work-on #bgm-menu { visibility: hidden; }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.work-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.work-place { color: var(--text-2); font-size: 13px; font-weight: 700; }
.work-home { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold-2); font-size: 13.5px; font-weight: 700; }
.work-money { padding: 2px 2px 8px; }
.work-cash { color: var(--gold-2); font: 800 clamp(28px, 8.4vw, 38px)/1.15 var(--title); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.work-rate { color: var(--text-2); font-size: 13.5px; }
.work-stage { position: relative; }
.work-tap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: clamp(120px, 22dvh, 190px);
  overflow: hidden;
  border: 1px solid rgba(226, 182, 79, .4);
  border-radius: 20px;
  background: radial-gradient(120% 90% at 50% 100%, rgba(226, 182, 79, .22), rgba(226, 182, 79, .04) 70%), var(--ink-2);
  color: var(--text);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.work-tap:active { background-color: var(--ink-3); }
.work-hands { display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 2vw, 14px); }
.work-boxes { display: block; font-size: clamp(56px, 13dvh, 84px); line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.work-boxes.hit { animation: work-hit .14s ease-out; }
@keyframes work-hit { 0% { transform: scale(1); } 40% { transform: scale(.86, .8) translateY(6px); } 100% { transform: scale(1); } }
/* 지금 쓰는 도구: 상자 옆에 거의 같은 크기로. 누를 때마다 흔들리고, 새 도구는 튀어 오른다 */
.work-gear { display: block; font-size: clamp(48px, 11.5dvh, 74px); line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); transform-origin: 50% 90%; }
.work-gear.hit { animation: work-swing .16s ease-out; }
.work-gear.new { animation: work-newgear .9s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes work-swing { 40% { transform: rotate(-14deg) translateY(-3px); } }
@keyframes work-newgear { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.35) rotate(6deg); opacity: 1; } 100% { transform: none; } }
.work-tap-label { color: var(--text-2); font-size: 13.5px; font-weight: 700; }
.work-tap-label b { color: var(--gold-2); }
.work-tap-lv { color: var(--text-2); font-weight: 600; }
/* 차 탭: 지금 집 앞에 선 차 */
.car-now-ic { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, .05); font-size: 40px; line-height: 1; }
.work-floats { position: absolute; inset: 0; pointer-events: none; }
.work-float { position: absolute; color: var(--gold-2); font: 800 18px/1 var(--title); text-shadow: 0 2px 6px rgba(0, 0, 0, .6); transform: translate(-50%, -50%); animation: work-float .7s ease-out forwards; white-space: nowrap; }
@keyframes work-float { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -190%); } }
.work-gold {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--gold-2);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(226, 182, 79, .6);
  color: var(--ink-0);
  font: 800 14px/1.2 var(--title);
  animation: work-pulse 1.2s ease-in-out infinite;
}
@keyframes work-pulse { 50% { transform: scale(1.05); } }
.work-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin: 10px 0 6px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 14px; }
.work-tabs button { min-width: 0; min-height: 36px; padding: 0 1px; border-radius: 11px; color: var(--text-2); font: 700 13px/1.2 var(--body); white-space: nowrap; letter-spacing: -.02em; }
.work-tabs button[aria-selected='true'] { background: rgba(226, 182, 79, .16); color: var(--gold-2); }
.work-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 8px; }
.work-seg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: var(--text-2); font-size: 13px; }
.work-n { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-soft); border-radius: 10px; }
.work-n button { min-width: 44px; min-height: 32px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 700; }
.work-n button[aria-pressed='true'] { background: rgba(226, 182, 79, .16); color: var(--gold-2); }
.work-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.work-ic { flex: none; width: 34px; font-size: 26px; line-height: 1; text-align: center; }
.work-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.work-name { font: 700 15.5px/1.35 var(--title); }
.work-lv { color: var(--gold-2); font-size: 13px; }
.work-sub { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.work-sub.muted { opacity: .75; }
.work-buy { flex: none; min-width: 84px; font-variant-numeric: tabular-nums; }
.work-more { color: var(--text-2); font-size: 13px; text-align: center; padding: 6px 0; }
.work-next { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(226, 182, 79, .06); }
/* 지금 집 → 다음 집 띠: 누를수록 막대가 차고 다음 집 사진이 밝아진다 */
.work-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.work-strip-house { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 76px; padding: 0; color: var(--text); }
.work-strip-house b { max-width: 76px; overflow: hidden; color: var(--text-2); font: 700 12px/1.2 var(--body); text-overflow: ellipsis; white-space: nowrap; }
.work-strip-house.next b { color: var(--gold-2); }
.work-pic { display: block; width: 68px; height: 68px; border-radius: 14px; object-fit: cover; background: var(--ink-2); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transition: filter .25s linear; }
.work-strip-mid { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; text-align: center; }
.work-strip-arrow { color: var(--gold-2); font: 800 18px/1 var(--title); }
.work-strip-msg { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.work-strip-go { align-self: center; min-height: 34px; animation: work-pulse 1s ease-in-out infinite; }
.work-strip.ready { border-color: var(--gold-2); background: rgba(226, 182, 79, .1); }
.work-strip.ready .next .work-pic { box-shadow: 0 0 0 2px var(--gold-2), 0 0 22px rgba(226, 182, 79, .7); }
.work-strip.top { grid-template-columns: auto 1fr; }
.work-strip.top .work-strip-arrow, .work-strip.top .work-bar { display: none; }
.work-now { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--gold-2); border-radius: 16px; background: rgba(226, 182, 79, .08); }
.work-now-pic { flex: none; width: 116px; height: 116px; border-radius: 16px; object-fit: cover; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.work-now-name { color: var(--gold-2); font: 800 22px/1.25 var(--title); }
.work-now .btn { align-self: flex-start; margin-top: 6px; }
.work-vs { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold-2); font: 800 22px/1 var(--title); }
.work-vs-pic { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; opacity: .75; filter: grayscale(.4); }
.work-vs-pic.big { width: 128px; height: 128px; opacity: 1; filter: none; box-shadow: 0 0 0 2px rgba(226, 182, 79, .6), 0 8px 20px rgba(0, 0, 0, .4); }
.work-bar { height: 10px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, .08); }
.work-bar i { display: block; width: 0; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold-d), var(--gold-2)); transition: width .2s linear; }
.work-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.work-kind { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 14px; text-align: left; color: var(--text); font-size: 12.5px; line-height: 1.4; }
.work-kind b { font-size: 15px; }
.work-kind span { color: var(--text-2); }
.work-kind[aria-pressed='true'] { border-color: var(--gold-2); background: rgba(226, 182, 79, .1); }
.work-ladder { display: flex; flex-direction: column; gap: 2px; padding: 0; list-style: none; }
.work-ladder li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; color: var(--text-2); font-size: 14px; }
.work-ladder-pic { display: block; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--ink-2); }
.work-ladder li.far .work-ladder-pic { filter: grayscale(.7) brightness(.6); }
.work-ladder li b { font-weight: 600; }
.work-ladder li em { font-style: normal; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.work-ladder li.past { opacity: .55; }
.work-ladder li.now { background: rgba(226, 182, 79, .14); color: var(--gold-2); }
.work-ladder li.now b { font-weight: 800; }
.work-richlist { display: flex; flex-direction: column; gap: 6px; padding: 0; list-style: none; }
.work-rich { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 14px; text-align: left; color: var(--text); }
.work-rich.me { border-color: var(--gold-2); }
.work-rank { flex: none; width: 22px; color: var(--gold-2); font: 800 16px/1 var(--title); text-align: center; }
/* 간판 탭: 내 집 이름 간판(글자는 언제나 내 닉네임)과 도시 전광판 광고 */
.work-list > * { flex-shrink: 0; }   /* 스크롤 목록: overflow가 있는 칸(간판 미리보기)이 0으로 줄어들지 않게 */
.work-lock { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 12px; color: var(--gold-2); font-size: 13px; line-height: 1.45; }
.work-row.on { border-color: var(--gold-2); background: rgba(226, 182, 79, .08); }
.work-row.locked .work-peek { opacity: .6; }
.work-peek { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 0; text-align: left; color: var(--text); }
.sign-peek { position: relative; display: grid; place-items: center; height: 150px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; background: radial-gradient(90% 80% at 50% 100%, #26304a, #0b0f18); }
.sign-peek-pic { position: absolute; bottom: -18px; width: 150px; height: 150px; border-radius: 18px; object-fit: cover; opacity: .9; }
.sign-peek.none .sign-board { opacity: .55; }
.sign-peek-cap { position: absolute; left: 50%; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 10px; border-radius: 999px; background: rgba(8, 11, 18, .8); color: var(--text-2); font-size: 12px; text-align: center; transform: translateX(-50%); width: max-content; }
.sign-board { position: relative; z-index: 1; max-width: 86%; margin-bottom: 52px; padding: 6px 14px; overflow: hidden; border-radius: 8px; font: 800 clamp(16px, 4.6vw, 21px)/1.2 var(--title); letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.sign-board.led { border: 2px solid #3a4256; background: #10141e; color: #f4f8ff; text-shadow: 0 0 6px rgba(220, 235, 255, .9); }
.sign-board.neon { border: 2px solid #ff4fb1; background: rgba(40, 6, 30, .85); color: #ffd6f0; text-shadow: 0 0 6px #ff4fb1, 0 0 16px #ff4fb1; box-shadow: 0 0 14px rgba(255, 79, 177, .7), inset 0 0 10px rgba(255, 79, 177, .4); }
.sign-board.gold { border: 2px solid #b8862b; background: linear-gradient(180deg, #ffe7a0, #d39a2c 60%, #a8701e); color: #3a2400; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); box-shadow: 0 0 22px rgba(255, 196, 80, .7); }
.sign-chip { flex: none; display: grid; place-items: center; width: 40px; height: 30px; border-radius: 7px; font: 800 16px/1 var(--title); }
.sign-chip.led { border: 1.5px solid #3a4256; background: #10141e; color: #f4f8ff; text-shadow: 0 0 5px rgba(220, 235, 255, .9); }
.sign-chip.neon { border: 1.5px solid #ff4fb1; background: #28061e; color: #ffd6f0; text-shadow: 0 0 5px #ff4fb1; box-shadow: 0 0 8px rgba(255, 79, 177, .6); }
.sign-chip.gold { border: 1.5px solid #b8862b; background: linear-gradient(180deg, #ffe7a0, #d39a2c); color: #3a2400; }
/* 창립 시민 간판: 남색 판 + 금 테두리(3D 간판 그림과 같은 색) */
.sign-board.founder { border: 2px solid #e2b64f; background: linear-gradient(180deg, #1b2c52, #101a33); color: #fff; box-shadow: 0 0 16px rgba(226, 182, 79, .55); }
.sign-board.founder::before { content: '창립 시민'; display: block; color: var(--gold-2); font-size: .58em; letter-spacing: .12em; }
.sign-chip.founder { border: 1.5px solid #e2b64f; background: #14213f; color: var(--gold-2); font-size: 15px; }
.work-row.founder { border-color: rgba(226, 182, 79, .45); }
.ad-box { margin-top: 6px; }
.ad-screen { display: flex; align-items: center; gap: 10px; padding: 8px; border: 3px solid #2a3044; border-radius: 10px; background: #05070c; box-shadow: inset 0 0 18px rgba(80, 160, 255, .25), 0 0 0 1px #000; }
.ad-screen-pic { flex: none; width: 72px; height: 72px; border-radius: 6px; object-fit: cover; }
.ad-screen-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-screen-text b { overflow: hidden; color: #9fe2ff; font: 800 18px/1.2 var(--title); text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 8px rgba(80, 200, 255, .8); }
.ad-screen-text span { color: #ffe7a0; font-size: 13.5px; font-weight: 700; }
.ad-left { color: var(--gold-2); font-variant-numeric: tabular-nums; }
/* 꾸미기 탭: 자리(옥상·벽·마당)마다 카드 */
.deco-slot { margin-top: 4px; }
.deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.deco-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255, 255, 255, .02); text-align: center; }
.deco-card b { font: 700 13.5px/1.3 var(--title); word-break: keep-all; }
.deco-card .work-sub { font-size: 11.5px; line-height: 1.35; word-break: keep-all; }
.deco-card .btn { width: 100%; margin-top: auto; }
.deco-card.have { border-color: rgba(226, 182, 79, .35); }
.deco-card.on { border-color: var(--gold-2); background: rgba(226, 182, 79, .1); }
.deco-ic { font-size: 30px; line-height: 1.1; }
.deco-ic.paint-sw { width: 36px; height: 36px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 10px; }
/* 문패 · 한마디 */
.motto-box { display: flex; flex-direction: column; gap: 8px; }
.motto-peek { position: relative; display: grid; place-items: center; height: 150px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; background: radial-gradient(90% 80% at 50% 100%, #2c3550, #0b0f18); }
.motto-board { position: relative; z-index: 1; max-width: 88%; margin-bottom: 48px; padding: 7px 14px; border-radius: 8px; font: 800 clamp(15px, 4.4vw, 20px)/1.25 var(--title); text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.motto-board.plate { border: 3px solid #b07c48; background: #6b4528; color: #fff3d2; }
.motto-board.banner { width: 88%; border-radius: 2px; background: #d42a30; color: #fff36a; box-shadow: 0 2px 0 #a81b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.motto-board.bubble { padding: 10px 18px; border: 3px solid #1b1b1f; border-radius: 26px; background: #fff; color: #16161a; }
.motto-board.bubble::after { content: ''; position: absolute; left: 34%; bottom: -14px; border: 8px solid transparent; border-top: 10px solid #1b1b1f; }
.motto-in { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .04); color: var(--text); font: 600 16px/1.2 var(--body); }
.motto-in:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.motto-presets { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.motto-presets::-webkit-scrollbar { display: none; }
.motto-chip { flex: none; min-height: 32px; padding: 0 11px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.deco-state { color: var(--gold-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.work-foot:empty { display: none; }
.work-foot { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.work-foot .btn { flex: none; }
@media (min-width: 960px), (min-width: 560px) and (max-height: 480px) {
  #workfab { bottom: calc(var(--sab) + 12px + var(--net)); }
  #work { left: calc(var(--sal) + 12px); right: auto; top: calc(var(--sat) + 12px); bottom: calc(var(--sab) + 12px); width: min(420px, 46vw); height: auto; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 20px; }
  body.work-on #tabs, body.work-on #imoogi, body.work-on #sound, body.work-on #bgm, body.work-on #bgm-menu { visibility: visible; }
  body.work-on .hud-l { visibility: hidden; }
}
/* 이사 축하 화면 */
.movefx { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: calc(var(--sat) + 16px) 16px calc(var(--sab) + 16px); background: rgba(6, 8, 14, .78); animation: movefx-in .25s ease-out; }
@keyframes movefx-in { from { opacity: 0; } }
.movefx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(420px, 100%); padding: 22px 18px 18px; border: 1px solid var(--gold-2); border-radius: 24px; background: var(--ink-1); box-shadow: 0 0 60px rgba(226, 182, 79, .35); text-align: center; color: var(--text); animation: movefx-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes movefx-pop { from { transform: scale(.82); opacity: 0; } }
.movefx-kicker { padding: 4px 14px; border-radius: 999px; background: var(--gold); color: var(--ink-0); font: 800 14px/1.2 var(--title); letter-spacing: .04em; }
.movefx-pair { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 2px; }
.movefx-pair figure { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.movefx-pair img { position: relative; display: block; border-radius: 16px; object-fit: cover; }
.movefx-pair figcaption { font: 700 13px/1.2 var(--body); color: var(--text-2); }
.movefx-old img { width: 92px; height: 92px; filter: grayscale(.6) brightness(.7); animation: movefx-old 1s ease-in both; }
@keyframes movefx-old { from { transform: scale(1.25); filter: none; } }
.movefx-new img { z-index: 1; width: min(180px, 44vw); height: min(180px, 44vw); box-shadow: 0 0 0 3px var(--gold-2), 0 10px 30px rgba(0, 0, 0, .5); animation: movefx-new .9s .35s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes movefx-new { from { transform: translateY(40px) scale(.3); opacity: 0; } }
.movefx-new figcaption { color: var(--gold-2); font: 800 16px/1.2 var(--title); }
.movefx-rays { position: absolute; top: 50%; left: 50%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -58%); background: repeating-conic-gradient(rgba(255, 211, 106, .28) 0 10deg, transparent 10deg 24deg); border-radius: 50%; -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent); animation: movefx-spin 9s linear infinite; pointer-events: none; }
@keyframes movefx-spin { to { transform: translate(-50%, -58%) rotate(360deg); } }
.movefx-arrow { color: var(--gold-2); font: 800 26px/1 var(--title); }
.movefx-name { font: 800 clamp(20px, 5.6vw, 26px)/1.3 var(--title); color: var(--gold-2); }
.movefx-line { color: var(--text-2); font-size: 14px; }
.movefx-boost { padding: 4px 12px; border: 1px solid rgba(226, 182, 79, .5); border-radius: 999px; color: var(--gold-2); font: 800 14px/1.3 var(--body); }
.movefx-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.movefx-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.movefx-confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: movefx-fall 2.6s linear infinite; }
.movefx-confetti i:nth-child(odd) { width: 7px; height: 7px; border-radius: 50%; animation-duration: 3.2s; }
@keyframes movefx-fall { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .movefx, .movefx-card, .movefx-old img, .movefx-new img, .movefx-rays, .work-strip-go { animation: none; } }
@media (max-height: 480px) { .work-pic { width: 44px; height: 44px; } .work-strip-house { width: 56px; } .work-tap { height: 96px; } .work-boxes { font-size: 44px; } .work-gear { font-size: 38px; } .work-money { padding-bottom: 4px; } .work-cash { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { #work, .work-boxes.hit, .work-gear.hit, .work-gear.new, .work-gold { animation: none; } }
/* 폰(세로·가로)과 낮은 데스크톱 창: 크팡 창 전체가 쓸려 올라가고 상품 목록은 적어도 240px.
   예전엔 위 칸들이 자리를 먼저 차지해 664px 폰에서 목록이 10px로 줄어 살 수가 없었다(11/13 실주소 점검 1번).
   목록을 내려도 탭은 위에, 체험판 안내줄은 아래에 붙어 있다. */
@media (max-width: 959px), (max-height: 700px) {
  #work { overflow-y: auto; overscroll-behavior: contain; }
  #work > * { flex-shrink: 0; }
  /* 붙는 칸은 판 안쪽 여백 안에 멈춘다. 판 맨 위 여백(10px) 띠에 판 색 띠를 늘 붙여, 쓸려 올라가는 상품 글이 탭 위로 비치지 않게 한다.
     제자리도 그 여백 자리(margin-top -10px)라 다른 칸을 밀지 않는다 */
  #work::before { content: ''; position: sticky; top: -10px; z-index: 3; flex: none; height: 10px; margin: -10px -14px 0; background: var(--ink-1); }
  .work-list { flex: 1 0 auto; min-height: 240px; overflow-y: visible; }
  /* 판 색 테두리 그림자(6px = 탭 아래 틈)가 탭의 둥근 모서리와 탭 아래 틈을 덮는다. 붙지 않았을 땐 판 바탕 위라 보이지 않는다 */
  .work-tabs { position: sticky; top: 0; z-index: 3; background: var(--ink-1); box-shadow: 0 0 0 6px var(--ink-1), 0 13px 8px -8px rgba(0, 0, 0, .7); }
  /* 안내줄 바탕은 판 아래 여백까지 덮고(뒤로 지나가는 상품이 비치지 않게) 글·단추는 그 여백 위에 둔다.
     margin-bottom은 맨 끝까지 내렸을 때, bottom은 쓸리는 동안 그 여백만큼 내려 붙게 한다. 옆에 붙는 판의 아래 여백은 12px */
  .work-foot { position: sticky; bottom: -12px; z-index: 3; margin-bottom: -12px; padding-bottom: 12px; background: var(--ink-1); }
}
/* 아래에서 올라오는 판(폰 세로): 판 아래 여백이 10px + 홈 막대 자리라, 안내줄 글·단추가 홈 막대에 겹치지 않게 그만큼 띄운다 */
@media (max-width: 559px), (max-width: 959px) and (min-height: 481px) {
  .work-foot { bottom: calc(-10px - var(--sab)); margin-bottom: calc(-10px - var(--sab)); padding-bottom: calc(10px + var(--sab)); }
}
.card-motto { color: #fff3d2; font-weight: 700; word-break: keep-all; }

/* ── 구름은행·구름증권·순위·자랑 카드(client/fin/, 입구는 client/ui/finlink.js). 크팡 작업판(#work)과 같은 자리에 덮이는 창 ── */
.fin-open { flex: none; min-height: 36px; margin-left: auto; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(226, 182, 79, .12); color: var(--gold-2); font: 700 13px/1 var(--body); white-space: nowrap; }
.fin-open:active { transform: translateY(1px); }
#fin {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
  display: flex; flex-direction: column;
  height: min(82dvh, 760px); max-width: 640px; margin: 0 auto;
  padding: 10px 14px calc(var(--sab) + 10px);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  background: var(--ink-1); box-shadow: 0 -16px 40px rgba(0, 0, 0, .55); color: var(--text);
}
#fin[hidden] { display: none; }
body.fin-on #work { visibility: hidden; }   /* 아래 깔린 작업판은 초점도 받지 않게 */
#fin p { margin: 0; }
/* 금융 창은 창 전체가 아니라 목록만 쓸린다. 크팡 창의 낮은 화면 규칙(목록 240px 이상·붙는 탭·붙는 안내줄)이 클래스로 걸려 있어 여기서는 되돌린다 */
#fin .work-tabs { flex: 1; grid-template-columns: 1fr 1fr; margin: 0; position: static; box-shadow: none; }
#fin .work-list { flex: 1 1 0; min-height: 0; overflow-y: auto; }
#fin .work-foot { position: static; margin-bottom: 0; padding-bottom: 0; }
#fin .work-tabs button { min-height: 38px; font-size: 14px; }
#fin .work-money { padding: 8px 2px 6px; }
#fin .work-cash { font-size: clamp(23px, 6.6vw, 30px); }
#fin .up { color: var(--ju-2); }
#fin .down { color: var(--cheong-2); }
#fin .flat { color: var(--text-2); }
.fin-card { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.fin-card p { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fin-card p > span { color: var(--text-2); font-size: 13px; }
.fin-card p > b { font: 800 16.5px/1.3 var(--title); font-variant-numeric: tabular-nums; }
.fin-card p.work-sub { display: block; }
.fin-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 2px 0; font: 700 14.5px/1.3 var(--title); }
.fin-h span { color: var(--text-2); font: 500 12px/1.3 var(--body); }
.fin-lines { display: flex; flex-direction: column; }
.fin-line { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.fin-line span:first-child { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.fin-line span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-line b { font-variant-numeric: tabular-nums; }
.fin-line b.in { color: var(--dan-2); }
.fin-tk { display: grid; grid-template-columns: 34px minmax(0, 1fr) 56px auto; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 6px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255, 255, 255, .02); text-align: left; }
.fin-tk[disabled] { opacity: .5; cursor: default; }
.fin-tk.on { border-color: var(--gold-2); border-radius: 14px 14px 0 0; background: rgba(226, 182, 79, .08); }
.fin-tk-main { display: flex; flex-direction: column; min-width: 0; }
.fin-tk-main b { overflow: hidden; font: 700 15px/1.35 var(--title); text-overflow: ellipsis; white-space: nowrap; }
.fin-tk-sub { overflow: hidden; color: var(--text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fin-kind { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); font-size: 11px; font-style: normal; font-weight: 700; }
.fin-kind.blue { color: var(--cheong-2); }
.fin-kind.growth { color: var(--dan-2); }
.fin-kind.penny { color: var(--gold-2); }
.fin-spark { display: block; width: 56px; height: 24px; color: var(--text-2); opacity: .85; }
.fin-spark svg, .fin-chart svg { display: block; width: 100%; height: 100%; }
.fin-tk-price { display: flex; flex-direction: column; align-items: flex-end; min-width: 74px; font-variant-numeric: tabular-nums; }
.fin-tk-price b { font: 700 15px/1.35 var(--body); }
.fin-tk-price span { font-size: 12.5px; font-weight: 700; }
.fin-trade { display: flex; flex-direction: column; gap: 6px; margin-top: -8px; padding: 8px 10px 10px; border: 1px solid var(--gold-2); border-top: 0; border-radius: 0 0 14px 14px; background: rgba(226, 182, 79, .05); }
.fin-chart { display: block; height: 52px; }
.fin-go { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fin-go .btn { flex-direction: column; gap: 0; min-height: 50px; padding: 4px 8px; }
.fin-go .btn span { font-size: 12px; font-weight: 600; opacity: .92; font-variant-numeric: tabular-nums; }
.fin-buy { border-color: rgba(239, 106, 79, .5); background: var(--ju); color: #fff; }
.fin-sell { border-color: rgba(121, 169, 224, .5); background: var(--cheong); color: #fff; }
@media (min-width: 960px), (min-width: 560px) and (max-height: 480px) {
  #fin { left: calc(var(--sal) + 12px); right: auto; top: calc(var(--sat) + 12px); bottom: calc(var(--sab) + 12px); width: min(420px, 46vw); height: auto; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 20px; }
}
@media (max-height: 600px) { #fin .work-money { padding: 4px 2px 4px; } #fin .work-place { display: none; } .fin-card p.work-sub { display: none; } .fin-chart { height: 40px; } }

/* ── 순위 탭 넓힌 부분(client/fin/rank.js) · 왕관과 주간 간판(client/fin/crown.js) ── */
.fin-boards { display: flex; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.fin-boards::-webkit-scrollbar { display: none; }
.fin-boards button { flex: 1 0 auto; padding: 0 8px; white-space: nowrap; }
.fin-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 14px; }
.fin-title { padding: 1px 7px; border-radius: 999px; background: rgba(226, 182, 79, .14); color: var(--gold-2); font: 700 12px/1.5 var(--body); white-space: nowrap; }
.btn.fin-brag { min-height: 32px; margin-left: auto; padding: 2px 10px; border-color: var(--line); color: var(--gold-2); font-size: 13px; }
.work-sub.fin-val { flex: none; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.work-sub.fin-val.up { color: var(--ju-2); }
.work-sub.fin-val.down { color: var(--cheong-2); }
.fin-prev { text-align: center; }
.btn.fin-again { align-self: center; }
.fin-marks { position: absolute; inset: 0; }
.fin-mark { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; opacity: 0; transition: opacity .25s; will-change: transform; white-space: nowrap; }
.fin-mark b { font-size: 26px; line-height: 1.05; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.fin-mark span { padding: 1px 7px; border-radius: 999px; background: rgba(21, 17, 13, .74); color: #ffe9b0; font: 700 11px/1.5 var(--body); }
/* 자랑 카드 창(client/fin/card.js). 집문서 창(#deed)과 같은 모양 */
#brag { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(var(--sat) + 10px) 12px calc(var(--sab) + 12px); overflow-y: auto; background: rgba(21, 17, 13, .95); pointer-events: auto; }
.brag-img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - var(--sat) - var(--sab) - 150px); border: 1px solid var(--line); border-radius: 10px; }
.brag-bar { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 440px; }
.brag-bar .btn { flex: 1 1 100px; }
.brag-hint { max-width: 440px; margin: 0; color: var(--text-2); font-size: 13px; text-align: center; }

/* ── 구름 오락실(client/arcade/, 입구는 client/ui/finlink.js). 크팡 작업판(#work)과 같은 자리에 덮이는 창. 그림은 2D 캔버스 하나 ── */
.arc-open { flex: none; min-height: 36px; margin-left: auto; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(226, 182, 79, .12); color: var(--gold-2); font: 700 13px/1 var(--body); white-space: nowrap; }
.arc-open:active { transform: translateY(1px); }
.arc-open + .fin-open { margin-left: 0; }
#arcade {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
  display: flex; flex-direction: column;
  height: min(90dvh, 780px); max-width: 640px; margin: 0 auto;
  padding: 10px 14px calc(var(--sab) + 10px);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  background: var(--ink-1); box-shadow: 0 -16px 40px rgba(0, 0, 0, .55); color: var(--text);
}
#arcade[hidden] { display: none; }
body.arcade-on #work { visibility: hidden; }   /* 아래 깔린 작업판은 초점도 받지 않게 */
#arcade p { margin: 0; }
.arc-title { font: 800 18px/1.2 var(--title); }
.arc-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; overflow-y: auto; overscroll-behavior: contain; }
.arc-hello { font-size: 15px; font-weight: 700; }
.arc-note, .arc-foot { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.arc-list { display: grid; gap: 8px; }
.arc-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--ink-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.arc-card:active:not([disabled]) { transform: translateY(1px); filter: brightness(.94); }
.arc-card[disabled] { opacity: .6; cursor: default; }
.arc-card.arc-draw { border-color: var(--line); background: rgba(226, 182, 79, .1); }
.arc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(238, 242, 250, .08); font-size: 26px; line-height: 1; }
.arc-what { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; }
.arc-what b { font-size: 16px; font-weight: 800; }
.arc-feel { justify-self: start; padding: 2px 8px; border-radius: 999px; background: rgba(121, 169, 224, .16); color: var(--cheong-2); font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.arc-what small { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.arc-left { flex: none; padding: 4px 9px; border: 1px solid rgba(76, 194, 165, .5); border-radius: 999px; color: var(--dan-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.arc-left.none { border-color: var(--line-soft); color: var(--text-2); }
/* 한 판: 머리(이름·점수) · 남은 시간 막대 · 캔버스 · 하는 법 */
.arc-hud { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.arc-game { font-size: 15px; font-weight: 800; }
.arc-score { color: var(--gold-2); font: 800 22px/1 var(--title); font-variant-numeric: tabular-nums; }
.arc-bar { flex: none; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.arc-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left center; will-change: transform; }
.arc-stage { position: relative; flex: 1 1 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.arc-canvas { display: block; border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.arc-count { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 84px/1 var(--title); text-shadow: 0 4px 18px rgba(0, 0, 0, .6); pointer-events: none; }
.arc-how { color: var(--text-2); font-size: 13.5px; line-height: 1.45; text-align: center; }
.arc-quit { align-self: center; }
/* 결과 */
.arc-result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 4px; text-align: center; }
.arc-pts { color: var(--gold-2); font: 800 clamp(34px, 11vw, 46px)/1.1 var(--title); font-variant-numeric: tabular-nums; }
.arc-new { display: block; margin-top: 6px; color: var(--dan-2); font: 700 14px/1 var(--body); }
.arc-won { font-size: 16px; font-weight: 700; }
.arc-won.good { color: var(--dan-2); }
.arc-left-line, .arc-wait { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.arc-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.arc-btns .btn { min-width: 132px; }
@media (min-width: 960px), (min-width: 560px) and (max-height: 480px) {
  #arcade { left: calc(var(--sal) + 12px); right: auto; top: calc(var(--sat) + 12px); bottom: calc(var(--sab) + 12px); width: min(420px, 46vw); height: auto; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); border-radius: 20px; }
}
/* 누운 전화기: 캔버스를 왼쪽에 크게, 점수·하는 법은 오른쪽 좁은 칸에 */
@media (min-width: 560px) and (max-height: 480px) {
  #arcade[data-view="play"] .arc-body { display: grid; grid-template-columns: minmax(0, 1fr) 96px; grid-template-rows: auto auto 1fr auto; gap: 6px 10px; overflow: hidden; }
  #arcade[data-view="play"] .arc-stage { grid-column: 1; grid-row: 1 / -1; }
  #arcade[data-view="play"] .arc-hud { grid-column: 2; grid-row: 1; flex-direction: column; align-items: flex-start; gap: 4px; }
  #arcade[data-view="play"] .arc-bar { grid-column: 2; grid-row: 2; }
  #arcade[data-view="play"] .arc-how { grid-column: 2; grid-row: 3; align-self: start; font-size: 12px; text-align: left; }
  #arcade[data-view="play"] .arc-quit { grid-column: 2; grid-row: 4; padding: 6px 4px; font-size: 12.5px; }
}
/* 순위 탭의 「오락실」 갈래(client/fin/arcadeboard.js): 게임 이름 아래에 그 게임의 오늘 최고 기록 줄 */
.arc-rank { display: flex; flex-direction: column; gap: 6px; }
.arc-rank-name { margin: 4px 0 0; font: 800 14px/1.3 var(--title); }
