/* =====================================================================
   City UI — Low-poly skin (timeHUD 정사각 타일과 같은 디자인 언어)
   ---------------------------------------------------------------------
   - 레이아웃/크기는 건드리지 않는 "스킨 전용" 레이어: 색/면 분할/깎인 모서리/블록 두께만 바꿈.
     (모바일 가로/세로 반응형 규칙은 city.html 쪽 그대로 유지)
   - 화이트/다크 모드: 색은 전부 --lp-* 변수. :root = 화이트(기본), body.dark-mode = 다크 팔레트.
     규칙 본문은 모드와 무관하게 한 벌만 둔다 → 새 요소 스킨 추가 시 변수만 쓰면 두 모드 자동 대응.
   - city.html의 모든 <style> 뒤(body 끝)에서 로드 → 같은 우선순위면 이 파일이 이김.
     body.dark-mode 규칙(1,1,1)보다 세게 하기 위해 ID를 두 번 쓴다(#bottomBar#bottomBar = 2,0,0).
   - 비용: 이미지/JS 0, 그라디언트 + clip-path만. 상·하단 바 backdrop-filter(blur) 제거로 GPU 합성 패스 감소.
     /cache/js/** immutable + CDN 캐시 → 수정 시 city.html의 ?v= 버전 bump 필수.
   - clip-path는 자식이 밖으로 튀어나오지 않는 판(plaque)에만 사용. 배지(알림 점)가 붙는
     상단 버튼/툴 버튼은 clip 대신 작은 radius + 하단 inset 두께로 블록 느낌을 낸다.
   ===================================================================== */

/* ---------- 화이트 모드 팔레트 (기본) ---------- */
:root {
    /* 상·하단 바 */
    --lp-bar-hi: #ffffff;
    --lp-bar-lo: #e3ecf6;
    --lp-bar-facet: rgba(29, 66, 105, 0.045);
    --lp-bar-facet-2: rgba(255, 255, 255, 0.7);
    --lp-bar-edge: #b3c6db;
    --lp-bar-shadow: rgba(23, 53, 86, 0.12);
    --lp-bar-shine: rgba(255, 255, 255, 0.9);
    --lp-divider: rgba(29, 66, 105, 0.16);
    /* 블록 타일 (버튼) */
    --lp-tile-hi: #ffffff;
    --lp-tile-lo: #e4eef8;
    --lp-tile-hover-hi: #ffffff;
    --lp-tile-hover-lo: #edf5fd;
    --lp-tile-facet: rgba(20, 47, 77, 0.07);
    --lp-tile-line: #7d96b2;
    --lp-tile-lip: #a9bdd3;
    --lp-text: #1b2a3d;
    /* 정보 판 */
    --lp-money-hi: #effcf3; --lp-money-lo: #c8efd5; --lp-money-lip: #79c294; --lp-money-text: #13663a;
    --lp-pop-hi: #f1f4ff; --lp-pop-lo: #d6defc; --lp-pop-lip: #93a3e0; --lp-pop-text: #1e3a9e; --lp-pop-sub: #334155;
    --lp-warm-hi: #fffaf0; --lp-warm-lo: #f5e6c4; --lp-warm-lip: #cfb276; --lp-warm-label: #6b5a3a;
    --lp-plaque-shine: rgba(255, 255, 255, 0.55);
    --lp-plaque-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    --lp-rate-pos: #15803d; --lp-rate-pos-bg: rgba(34, 197, 94, 0.16);
    --lp-rate-neg: #c81e1e; --lp-rate-neg-bg: rgba(239, 68, 68, 0.14);
    --lp-rci-track: #c9d6e4;
    /* 뉴스 카드 */
    --lp-card: #ffffff;
    --lp-card-facet: rgba(220, 232, 245, 0.55);
    --lp-card-frame-hi: #8ea7c3;
    --lp-card-frame-lo: #5f7a99;
    /* 판(나침반/서브메뉴) — 아이콘·흰 글씨 가독성 때문에 화이트 모드에서도 남색 계열 */
    --lp-panel-hi: #3a6894;
    --lp-panel-lo: #24496f;
    --lp-panel-ink: #142f4d;
    --lp-sheet-hi: #2f5a86;
    --lp-sheet-lo: #20446a;
    /* 강조 */
    --lp-yellow-hi: #ffdd55;
    --lp-yellow-lo: #f6b519;
    --lp-yellow-lip: rgba(150, 82, 0, 0.5);
    --lp-cut: calc(7px * var(--ui-scale));
    --lp-chamfer: polygon(var(--lp-cut) 0, calc(100% - var(--lp-cut)) 0, 100% var(--lp-cut), 100% calc(100% - var(--lp-cut)), calc(100% - var(--lp-cut)) 100%, var(--lp-cut) 100%, 0 calc(100% - var(--lp-cut)), 0 var(--lp-cut));
}

/* ---------- 다크 모드 팔레트 ---------- */
body.dark-mode {
    --lp-bar-hi: #23476f;
    --lp-bar-lo: #142f4d;
    --lp-bar-facet: rgba(255, 255, 255, 0.06);
    --lp-bar-facet-2: rgba(255, 255, 255, 0.04);
    --lp-bar-edge: #0b1a2e;
    --lp-bar-shadow: rgba(0, 0, 0, 0.2);
    --lp-bar-shine: rgba(255, 255, 255, 0.14);
    --lp-divider: rgba(255, 255, 255, 0.16);
    --lp-tile-hi: #35587f;
    --lp-tile-lo: #25425f;
    --lp-tile-hover-hi: #3f6791;
    --lp-tile-hover-lo: #2c4d70;
    --lp-tile-facet: rgba(0, 0, 0, 0.16);
    --lp-tile-line: #0b1a2e;
    --lp-tile-lip: #10243b;
    --lp-text: #e6eef8;
    --lp-money-hi: #1f6343; --lp-money-lo: #134430; --lp-money-lip: #0a2a1b; --lp-money-text: #86efac;
    --lp-pop-hi: #33438a; --lp-pop-lo: #222d63; --lp-pop-lip: #131a40; --lp-pop-text: #c7d2fe; --lp-pop-sub: #cbd5e1;
    --lp-warm-hi: #5e4a24; --lp-warm-lo: #403118; --lp-warm-lip: #2a1e0b; --lp-warm-label: #f3dcae;
    --lp-plaque-shine: rgba(255, 255, 255, 0.1);
    --lp-plaque-text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
    --lp-rate-pos: #86efac; --lp-rate-pos-bg: rgba(34, 197, 94, 0.2);
    --lp-rate-neg: #fca5a5; --lp-rate-neg-bg: rgba(239, 68, 68, 0.22);
    --lp-rci-track: #10243b;
    --lp-card: #f6f9fc;
    --lp-card-facet: rgba(200, 216, 234, 0.55);
    --lp-card-frame-hi: #2b5683;
    --lp-card-frame-lo: #0b1a2e;
    --lp-panel-hi: #2b5683;
    --lp-panel-lo: #142f4d;
    --lp-panel-ink: #0b1a2e;
    --lp-sheet-hi: #1d4269;
    --lp-sheet-lo: #142f4d;
}

/* ---------- 상단 바: 면 분할 띠 + 아래 두께 ---------- */
#topBar#topBar {
    background:
        linear-gradient(100deg, var(--lp-bar-facet-2) 0 18%, transparent 18.2%),
        linear-gradient(262deg, var(--lp-bar-facet) 0 26%, transparent 26.2%),
        linear-gradient(180deg, var(--lp-bar-hi) 0%, var(--lp-bar-lo) 100%);
    border-bottom: 0;
    box-shadow:
        0 calc(3px * var(--ui-scale)) 0 var(--lp-bar-edge),
        0 calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale)) var(--lp-bar-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 상단 블록 버튼 (배지가 밖으로 나오므로 clip-path 금지) */
.city-chat-tab[hidden] { display: none; }
#cityChatPanel .city-chat-tab { min-width: 0; overflow-wrap: anywhere; }
.city-chat-sister-pane,
.city-chat-sister-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}
.city-chat-sister-content { background: #f8fafc; color: #334155; }
.city-chat-sister-content > :not(#scBody) { flex-shrink: 0; }
body.dark-mode #cityChatPanel#cityChatPanel #cityChatSisterPane * { color: inherit; }
body.dark-mode #cityChatPanel#cityChatPanel #cityChatSisterPane .city-chat-sister-content { color: #334155; }
body.dark-mode #cityChatPanel#cityChatPanel #scSearchInput {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}
body.dark-mode #cityChatPanel#cityChatPanel #scSearchInput::placeholder { color: #64748b; }

#topBar#topBar .top-btn,
#topBar#topBar .menu-btn,
#topBar#topBar .bgm-btn,
#topBar#topBar .like-btn,
#topBar#topBar .city-name-display {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#topBar#topBar .top-btn:hover,
#topBar#topBar .menu-btn:hover,
#topBar#topBar .bgm-btn:hover,
#topBar#topBar .like-btn:hover {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
    transform: translateY(calc(-1px * var(--ui-scale)));
}

#topBar#topBar .top-btn:active,
#topBar#topBar .menu-btn:active,
#topBar#topBar .bgm-btn:active,
#topBar#topBar .like-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 calc(-1px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

#topBar#topBar .like-btn.liked,
#topBar#topBar .like-btn.active {
    background:
        linear-gradient(300deg, rgba(120, 10, 40, 0.1) 0 30%, transparent 30.5%),
        linear-gradient(180deg, #ffe4ea, #ffc7d3);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 #e38aa0;
    color: #9f1239;
}

/* "My Page" 링크는 a 기본색(#555)을 받아 다크 타일에서 안 보임 → 타일 글씨색 고정 */
#topBar#topBar a.top-btn,
#topBar#topBar a.top-btn:visited {
    color: var(--lp-text);
}

/* 잼: 보라 보석 블록 (양 모드 공통) */
#topBar#topBar .gem-display-btn {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.28) 0 30%, transparent 30.5%),
        linear-gradient(300deg, rgba(40, 0, 90, 0.18) 0 28%, transparent 28.5%),
        linear-gradient(180deg, #9b6bff, #6d3fe0);
    border-color: #3b1d86;
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 #4a22a8;
    color: #fff;
    text-shadow: 0 1px 0 rgba(30, 0, 70, 0.45);
}

/* 버그 제보 배너: 노란 블록 (양 모드 공통) */
#topBar#topBar .dev-banner {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border: calc(1px * var(--ui-scale)) solid #9a6a00;
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-yellow-lip);
}

#topBar#topBar .dev-banner-btn {
    background: transparent;
    border-color: transparent;
    color: #4a2b00;
    font-weight: 800;
}

/* ---------- 하단 바: 받침 + 위쪽 하이라이트 ---------- */
#bottomBar#bottomBar {
    background:
        linear-gradient(96deg, var(--lp-bar-facet-2) 0 14%, transparent 14.2%),
        linear-gradient(276deg, var(--lp-bar-facet) 0 22%, transparent 22.2%),
        linear-gradient(180deg, var(--lp-bar-hi) 0%, var(--lp-bar-lo) 100%);
    border-top: 0;
    box-shadow:
        inset 0 calc(2px * var(--ui-scale)) 0 var(--lp-bar-shine),
        0 calc(-3px * var(--ui-scale)) 0 var(--lp-bar-edge),
        0 calc(-6px * var(--ui-scale)) calc(12px * var(--ui-scale)) var(--lp-bar-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 툴 버튼: 블록 타일 (화재/전력 미공급 등 !important 경고 상태는 city.html 규칙 그대로 유지) */
#bottomBar#bottomBar .tool-btn {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border: calc(1.5px * var(--ui-scale)) solid var(--lp-tile-line);
    border-radius: calc(5px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

#bottomBar#bottomBar .tool-btn:hover:not(.active) {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
    transform: translateY(calc(-2px * var(--ui-scale)));
}

#bottomBar#bottomBar .tool-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 calc(-1px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

/* 선택된 도구: 노란 블록 (timeHUD 버튼과 같은 색, 양 모드 공통) */
#bottomBar#bottomBar .tool-btn.active {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border-color: #9a6a00;
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip),
        0 0 0 calc(2px * var(--ui-scale)) rgba(255, 221, 85, 0.35);
}

/* 시설 부족 경고(전력/수도 0개): 빨간 블록 유지 — 펄스 애니메이션(box-shadow)은 city.html 그대로 */
#bottomBar#bottomBar .tool-btn.utility-danger {
    background:
        linear-gradient(300deg, rgba(120, 0, 0, 0.1) 0 30%, transparent 30.5%),
        linear-gradient(180deg, #fee2e2, #fca5a5);
    border-color: #b91c1c;
}

#bottomBar#bottomBar .tool-btn.utility-danger:not(.active):hover {
    background:
        linear-gradient(300deg, rgba(120, 0, 0, 0.1) 0 30%, transparent 30.5%),
        linear-gradient(180deg, #fecaca, #f87171);
}

#bottomBar#bottomBar .tool-btn.utility-danger.active {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.22) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #ef4444, #dc2626);
    border-color: #7f1414;
}

#bottomBar#bottomBar .tool-divider {
    background: var(--lp-divider);
    box-shadow: none;
}

/* 철거: 빨간 블록 (양 모드 공통) */
#bottomBar#bottomBar .demolish-btn {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.24) 0 34%, transparent 34.5%),
        linear-gradient(300deg, rgba(60, 0, 0, 0.2) 0 28%, transparent 28.5%),
        linear-gradient(180deg, #ef4444, #c81e1e);
    border: calc(1.5px * var(--ui-scale)) solid #7f1414;
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #7f1414;
}

#bottomBar#bottomBar .demolish-btn:hover {
    filter: brightness(1.08);
    transform: translateY(calc(-2px * var(--ui-scale)));
}

#bottomBar#bottomBar .demolish-btn.active {
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 #7f1414,
        0 0 0 calc(2px * var(--ui-scale)) rgba(255, 221, 85, 0.75);
}

/* ---------- 하단 정보 판(plaque): 깎인 모서리 + 하단 두께 ---------- */
#bottomBar#bottomBar .money-display-center,
#bottomBar#bottomBar .population-display-center,
#bottomBar#bottomBar .city-happiness,
#bottomBar#bottomBar .city-tourism,
#bottomBar#bottomBar .rci-demand-bar {
    border-color: transparent;
    border-radius: 0;
    clip-path: var(--lp-chamfer);
    color: var(--lp-text);
}

#bottomBar#bottomBar .money-display-center {
    background:
        linear-gradient(112deg, var(--lp-plaque-shine) 0 30%, transparent 30.5%),
        linear-gradient(290deg, rgba(10, 80, 40, 0.08) 0 26%, transparent 26.5%),
        linear-gradient(180deg, var(--lp-money-hi), var(--lp-money-lo));
    box-shadow: inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-money-lip);
}

#bottomBar#bottomBar .money-display-center .money-amount {
    color: var(--lp-money-text);
    text-shadow: var(--lp-plaque-text-shadow);
}

/* 시간당 수지 칩 */
#bottomBar#bottomBar .money-display-center .money-rate {
    color: var(--lp-rate-pos);
    background: var(--lp-rate-pos-bg);
    border-radius: calc(3px * var(--ui-scale));
}

#bottomBar#bottomBar .money-display-center .money-rate.negative {
    color: var(--lp-rate-neg);
    background: var(--lp-rate-neg-bg);
}

#bottomBar#bottomBar .population-display-center {
    background:
        linear-gradient(112deg, var(--lp-plaque-shine) 0 30%, transparent 30.5%),
        linear-gradient(290deg, rgba(30, 40, 120, 0.08) 0 26%, transparent 26.5%),
        linear-gradient(180deg, var(--lp-pop-hi), var(--lp-pop-lo));
    box-shadow: inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-pop-lip);
}

#bottomBar#bottomBar .population-display-center .pop-amount {
    color: var(--lp-pop-text);
    text-shadow: var(--lp-plaque-text-shadow);
}

#bottomBar#bottomBar .population-display-center .pop-next-label {
    color: var(--lp-pop-sub);
}

#bottomBar#bottomBar .city-happiness,
#bottomBar#bottomBar .city-tourism {
    background:
        linear-gradient(112deg, var(--lp-plaque-shine) 0 30%, transparent 30.5%),
        linear-gradient(290deg, rgba(110, 70, 0, 0.08) 0 26%, transparent 26.5%),
        linear-gradient(180deg, var(--lp-warm-hi), var(--lp-warm-lo));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-warm-lip);
}

#bottomBar#bottomBar .city-happiness .happiness-label,
#bottomBar#bottomBar .city-tourism .tourism-label,
#bottomBar#bottomBar .city-tourism .tourism-capacity {
    color: var(--lp-warm-label);
}

/* 행복도 숫자 색은 JS가 인라인으로 지정 — 지정 전 기본값(#333)만 판 글씨색으로 */
#bottomBar#bottomBar .happiness-number:not([style*="color"]) {
    color: var(--lp-text);
}

/* 밝은 판(화이트 모드)에서 원래의 형광 계열 색은 대비가 낮아 같은 색상의 진한 톤으로 */
body:not(.dark-mode) #bottomBar#bottomBar .rci-item.residential .rci-label { color: #15803d; }
body:not(.dark-mode) #bottomBar#bottomBar .rci-item.commercial .rci-label { color: #1d4ed8; }
body:not(.dark-mode) #bottomBar#bottomBar .rci-item.industrial .rci-label { color: #b45309; }
body:not(.dark-mode) #bottomBar#bottomBar .tourism-number.low { color: #c81e1e; }
body:not(.dark-mode) #bottomBar#bottomBar .tourism-number.medium { color: #b45309; }
body:not(.dark-mode) #bottomBar#bottomBar .tourism-number.high { color: #15803d; }
body:not(.dark-mode) #bottomBar#bottomBar .pop-rank-label { color: #475569; }
/* 등급 라벨 색은 JS가 등급별 인라인 지정(어두운 판 기준 파스텔) → 화이트 모드는 색상 유지한 채 어둡게 */
body:not(.dark-mode) #bottomBar#bottomBar .pop-rank-label { filter: brightness(0.55) saturate(1.4); }

#bottomBar#bottomBar .rci-demand-bar {
    background:
        linear-gradient(112deg, var(--lp-plaque-shine) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

/* city.html dark-mode 규칙이 !important라 여기도 !important */
#bottomBar#bottomBar .rci-bar-container {
    background: var(--lp-rci-track) !important;
    border-color: transparent !important;
    border-radius: calc(2px * var(--ui-scale));
    box-shadow: inset 0 calc(1px * var(--ui-scale)) 0 rgba(11, 26, 46, 0.25);
}

/* ---------- 뉴스 헤드라인: 깎인 카드 + 테두리 ---------- */
#newsHeadline#newsHeadline {
    border: calc(2px * var(--ui-scale)) solid transparent;
    border-radius: 0;
    background:
        linear-gradient(112deg, transparent 0 60%, var(--lp-card-facet) 60.5%) padding-box,
        linear-gradient(var(--lp-card), var(--lp-card)) padding-box,
        linear-gradient(180deg, var(--lp-card-frame-hi), var(--lp-card-frame-lo)) border-box;
    clip-path: polygon(calc(10px * var(--ui-scale)) 0, 100% 0, 100% calc(100% - calc(10px * var(--ui-scale))), calc(100% - calc(10px * var(--ui-scale))) 100%, 0 100%, 0 calc(10px * var(--ui-scale)));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(147, 171, 198, 0.55);
}

#newsHeadline#newsHeadline .nh-tk-live {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.18) 0 38%, transparent 38.5%),
        linear-gradient(300deg, rgba(60, 0, 0, 0.22) 0 30%, transparent 30.5%),
        #c81e1e;
}

/* MSG #50164: 지도를 덜 가리게 작은 한 줄 띠로, 다크 모드·밤에는 어두운 판 */
#newsHeadline#newsHeadline {
    --lp-ticker-card: var(--lp-card);
    --lp-ticker-facet: var(--lp-card-facet);
    --lp-ticker-ink: #111;
    top: calc(var(--bar-height, 56px) + 4px);
    width: min(max(320px, calc(400px * var(--ui-scale))), 80vw);
    height: max(32px, calc(36px * var(--ui-scale)));
    opacity: 0.9;
}
#newsHeadline#newsHeadline:hover { opacity: 1; }
body.dark-mode #newsHeadline#newsHeadline,
#newsHeadline#newsHeadline.nh-night {
    --lp-ticker-card: #17263a;
    --lp-ticker-facet: rgba(43, 86, 131, 0.35);
    --lp-ticker-ink: #e6eef8;
    background:
        linear-gradient(112deg, transparent 0 60%, var(--lp-ticker-facet) 60.5%) padding-box,
        linear-gradient(var(--lp-ticker-card), var(--lp-ticker-card)) padding-box,
        linear-gradient(180deg, #2b5683, #0b1a2e) border-box;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(4, 10, 20, 0.6);
}
#newsHeadline#newsHeadline .nh-tk-live { padding: 0 calc(7px * var(--ui-scale)); }
#newsHeadline#newsHeadline .nh-tk-thumb { width: max(34px, calc(40px * var(--ui-scale))); }
#newsHeadline#newsHeadline .nh-tk-content { padding: calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale)) calc(3px * var(--ui-scale)) calc(8px * var(--ui-scale)); }
#newsHeadline#newsHeadline .nh-tk-text {
    color: var(--lp-ticker-ink);
    font-size: max(11px, calc(12px * var(--ui-scale)));
    -webkit-line-clamp: 1;
}
body.dark-mode #newsHeadline#newsHeadline .nh-tk-live,
#newsHeadline#newsHeadline.nh-night .nh-tk-live { filter: brightness(0.8); }
body.dark-mode #newsHeadline#newsHeadline .nh-tk-cat,
#newsHeadline#newsHeadline.nh-night .nh-tk-cat { filter: brightness(1.9) saturate(0.8); }

/* ---------- 나침반: 원형 판 (방위 글씨가 밝은색이라 양 모드 모두 남색 계열) ---------- */
#compass#compass {
    border-color: transparent;
    border-radius: 50%;
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0 36%, transparent 36.5%),
        linear-gradient(300deg, rgba(0, 0, 0, 0.18) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-panel-hi), var(--lp-panel-lo));
    clip-path: circle(50%);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-panel-ink);
}

/* ---------- 건설 서브메뉴(하단 시트): 받침 + 블록 카드 (흰 글씨라 양 모드 모두 남색 계열) ---------- */
#subMenu#subMenu {
    background:
        linear-gradient(96deg, rgba(255, 255, 255, 0.06) 0 14%, transparent 14.2%),
        linear-gradient(180deg, var(--lp-sheet-hi) 0%, var(--lp-sheet-lo) 100%);
    border-top: 0;
    box-shadow:
        inset 0 calc(2px * var(--ui-scale)) 0 rgba(255, 255, 255, 0.14),
        0 calc(-3px * var(--ui-scale)) 0 var(--lp-panel-ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#subMenu#subMenu .submenu-item {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.12) 0 34%, transparent 34.5%),
        linear-gradient(300deg, rgba(0, 0, 0, 0.14) 0 28%, transparent 28.5%),
        linear-gradient(180deg, var(--lp-panel-hi), var(--lp-panel-lo));
    border: calc(1.5px * var(--ui-scale)) solid var(--lp-panel-ink);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-panel-ink);
}

#subMenu#subMenu .submenu-item:hover {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0 34%, transparent 34.5%),
        linear-gradient(300deg, rgba(0, 0, 0, 0.12) 0 28%, transparent 28.5%),
        linear-gradient(180deg, #4679ab, #2f5d8a);
    transform: translateY(calc(-2px * var(--ui-scale)));
}

#subMenu#subMenu .submenu-item.active,
#subMenu#subMenu .submenu-item.selected {
    border-color: var(--lp-panel-ink);
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-panel-ink),
        inset 0 0 0 calc(2px * var(--ui-scale)) var(--lp-yellow-hi);
}

/* ---------- 시간 HUD: 화이트 모드에선 테두리/받침/버튼 영역을 밝게 (하늘 장면은 시간대 색 그대로) ---------- */
body:not(.dark-mode) #timeHUD::before {
    background: linear-gradient(180deg, #6f8aa8, #546e8c);
    opacity: 0.6;
}

body:not(.dark-mode) #timeHUD::after {
    background: linear-gradient(180deg, #a7bcd3 0%, #7d96b2 100%);
}

body:not(.dark-mode) #timeHUD .time-hud-face {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.6) 0 45%, transparent 45.5%),
        linear-gradient(180deg, #f6f9fd, #dfe9f4);
}

/* =====================================================================
   팝업 / 패널 / 모달 / 툴팁
   ---------------------------------------------------------------------
   기존 팝업들은 모드와 무관하게 "어두운 판"(건물 정보, 시청, 무역…) 또는 "밝은 판"(예산, 인구,
   행복도, 관광…)으로 고정이고, 안쪽 글씨 색이 그 판에 맞춰 하드코딩돼 있다(수십 곳).
   → 판의 명암 계열은 유지하고 로우폴리 면/두께로 재질만 바꾸며, 모드별로는 테두리·받침 색만 바꾼다.
   ui-modal(알림/확인)만 구조가 닫혀 있어 화이트/다크 판 자체를 전환한다.
   - 패널마다 고유 강조색(--lp-accent)은 헤더 밑줄로 남긴다.
   - clip-path는 쓰지 않는다(닫기 버튼/드롭다운이 잘릴 수 있음) → 작은 radius + 하단 두께.
   ===================================================================== */
:root {
    --lp-dpanel-hi: #2c527b;
    --lp-dpanel-lo: #1d3b5c;
    --lp-dpanel-frame: #8aa3bf;
    --lp-dpanel-edge: #50698a;
    --lp-dhead-hi: #3a6894;
    --lp-dhead-lo: #2c527b;
    --lp-lpanel-frame: #b9c9da;
    --lp-lpanel-edge: #9fb2c7;
    --lp-panel-shadow: rgba(15, 35, 60, 0.28);
    /* ui-modal */
    --lp-dialog-hi: #ffffff;
    --lp-dialog-lo: #e8f0f8;
    --lp-dialog-frame: #8ea7c3;
    --lp-dialog-edge: #6f88a4;
    --lp-dialog-title: #1b2a3d;
    --lp-dialog-msg: #475569;
    --lp-dialog-facet: rgba(29, 66, 105, 0.05);
    /* 행복도 패널: 이사 속도 타일(#49916)과 행복도 숫자 색 */
    --lp-intake-bg: #f8fafc;
    --lp-intake-line: #e2e8f0;
    --lp-intake-text: #0f172a;
    --lp-intake-up: #15803d;
    --lp-intake-down: #b45309;
    --lp-intake-rule: #475569;
    --lp-happy-low: #b91c1c;
    --lp-happy-mid: #a16207;
    --lp-happy-high: #15803d;
}

body.dark-mode {
    --lp-intake-bg: rgba(255, 255, 255, 0.06);
    --lp-intake-line: rgba(255, 255, 255, 0.16);
    --lp-intake-text: #e6eef8;
    --lp-intake-up: #4ade80;
    --lp-intake-down: #fbbf24;
    --lp-intake-rule: #aebdd0;
    --lp-happy-low: #fca5a5;
    --lp-happy-mid: #fbbf24;
    --lp-happy-high: #4ade80;
    --lp-dpanel-hi: #1f3f63;
    --lp-dpanel-lo: #11263f;
    --lp-dpanel-frame: #0b1a2e;
    --lp-dpanel-edge: #050d18;
    --lp-dhead-hi: #2b5683;
    --lp-dhead-lo: #1d4269;
    --lp-lpanel-frame: #0b1a2e;
    --lp-lpanel-edge: #050d18;
    --lp-panel-shadow: rgba(0, 0, 0, 0.45);
    --lp-dialog-hi: #24486f;
    --lp-dialog-lo: #142f4d;
    --lp-dialog-frame: #0b1a2e;
    --lp-dialog-edge: #050d18;
    --lp-dialog-title: #f1f5f9;
    --lp-dialog-msg: #cbd5e1;
    --lp-dialog-facet: rgba(255, 255, 255, 0.05);
}

/* 패널별 강조색 (헤더 밑줄) */
#publicBuildingPopup { --lp-accent: #ef4444; }
#upgradePopup, #constructionPopup, #cityNameModal > div { --lp-accent: #fbbf24; }
#cityHallPanel { --lp-accent: #a855f7; }
#tradeCenterPanel, #casinoAssociationPanel, #tradeSendModal .tsm-container { --lp-accent: #f59e0b; }
#tourismBureauPanel, #nicknameModal > div { --lp-accent: #22d3ee; }

/* ---------- 어두운 판: 건물 정보/공공건물/업그레이드/건설, 시청·무역·관광청·카지노·카메라·도움말 패널, 어두운 모달 박스 ---------- */
:is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #dailyQuestModal > div, #systemHelpModal .system-help-content, #warehouseResourceModal .warehouse-modal-content, #tradeSendModal .tsm-container, #cityNameModal > div, #nicknameModal > div):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #dailyQuestModal > div, #systemHelpModal .system-help-content, #warehouseResourceModal .warehouse-modal-content, #tradeSendModal .tsm-container, #cityNameModal > div, #nicknameModal > div) {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0 24%, transparent 24.2%),
        linear-gradient(248deg, rgba(255, 255, 255, 0.035) 0 32%, transparent 32.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
    border: calc(2px * var(--ui-scale)) solid var(--lp-dpanel-frame);
    border-radius: calc(6px * var(--ui-scale));
    /* 판 기본 글씨색이 검정(상속 기본값)이라 색 지정 없는 값(시청 통계, 행복도 값 등)이 안 보였음 */
    color: #e6eef8;
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(5, 13, 24, 0.45),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-dpanel-edge),
        0 calc(14px * var(--ui-scale)) calc(30px * var(--ui-scale)) var(--lp-panel-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 헤더 띠: 밝은 남색 + 면 분할 + 강조색 밑줄 */
:is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal) :is(.popup-header, .panel-header, .system-help-header, .warehouse-modal-header, .tsm-header) {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 36%, transparent 36.3%),
        linear-gradient(290deg, rgba(0, 0, 0, 0.12) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-dhead-hi), var(--lp-dhead-lo));
    border-bottom: calc(3px * var(--ui-scale)) solid var(--lp-accent, #60a5fa);
}

/* 닫기 버튼: 작은 블록 타일, hover 시 빨간 블록 */
:is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal) :is(.popup-close, .panel-close, .tsm-close, #warehouseModalClose) {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0 40%, transparent 40.5%),
        linear-gradient(180deg, #3f6f9c, #2b5683);
    border: calc(1.5px * var(--ui-scale)) solid #0b1a2e;
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 #0b1a2e;
    color: #e6eef8;
}

:is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #systemHelpModal, #warehouseResourceModal, #tradeSendModal) :is(.popup-close, .panel-close, .tsm-close, #warehouseModalClose):hover {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.2) 0 40%, transparent 40.5%),
        linear-gradient(180deg, #ef4444, #c81e1e);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 #7f1414;
    color: #fff;
}

/* 남색 판 위에서 대비가 낮던 글씨 보정 */
#gameHelpPanel#gameHelpPanel .help-panel-title { color: #93c5fd; }
#tradeCenterPanel#tradeCenterPanel .tc-gift-claim-btn { color: #3b2200; }

/* ---------- 밝은 판: 예산/인구/행복도/관광/RCI 설명/채팅 — 화이트 모드는 기존 디자인 + 테두리·두께 ---------- */
/* 화이트 모드에서 너무 옅던 보조 글씨(대비 2.3~2.8) 보정 */
body:not(.dark-mode) #budgetPanel#budgetPanel #budgetSpeechText { color: #7a6a40; }
body:not(.dark-mode) #populationPanel#populationPanel .age-legend-percent { color: #8a7a4c; }
body:not(.dark-mode) #cityChatPanel#cityChatPanel .city-chat-empty { color: #64748b; }
body:not(.dark-mode) #rciTooltip#rciTooltip .rci-tooltip-tip { color: #64748b; }

:is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel) {
    border: calc(2px * var(--ui-scale)) solid var(--lp-lpanel-frame);
    border-radius: calc(8px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.1),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-lpanel-edge),
        0 calc(14px * var(--ui-scale)) calc(30px * var(--ui-scale)) var(--lp-panel-shadow);
}

/* =====================================================================
   다크 모드: 밝은 판을 남색 판으로 전환 (검정/갈색 글씨 금지)
   - 모든 자손 글씨를 밝게 덮은 뒤(:is 두 번 = ID 2개 우선순위), 의미 색(수입 초록/지출 빨강/
     관광 파랑/강조 금색)만 밝은 톤으로 다시 지정한다. 동적 생성 행도 자동으로 밝은 글씨.
   ===================================================================== */
body.dark-mode :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel) {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 24%, transparent 24.2%),
        linear-gradient(248deg, rgba(255, 255, 255, 0.03) 0 32%, transparent 32.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
    color: #e6eef8;
}

body.dark-mode :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel) * {
    color: #e6eef8;
    border-color: rgba(255, 255, 255, 0.12);
}

/* 행복도/관광 패널은 city.html이 화이트 기준 `.happiness-panel *, .tourism-panel * { color:#0f172a !important }`로
   검정을 강제하므로 다크 모드에서만 !important로 되돌린다. #budgetPanel .income/.expense도 !important 원본 */
body.dark-mode :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel),
body.dark-mode :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) * {
    color: #e6eef8 !important;
}

body.dark-mode :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) :is(.tourism-summary-label, .happiness-system-desc) {
    color: #aebdd0 !important;
}

body.dark-mode :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) .positive { color: #4ade80 !important; }
body.dark-mode :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) .negative { color: #f87171 !important; }

/* 행복도 패널 이사 속도 타일(#49916): 원본이 밝은 바탕 고정이라 다크에서 위 밝은 글씨와 겹쳐 안 보였다.
   바탕·글씨를 같은 --lp-intake-* 변수로 두 모드에 맞춘다(규칙 한 벌, 값만 모드별). ID 두 번은 위 #e6eef8 !important를 이기려고 */
#happinessPanel#happinessPanel .happiness-intake {
    background: var(--lp-intake-bg);
    border-color: var(--lp-intake-line);
}
#happinessPanel#happinessPanel :is(.happiness-intake-icon, .happiness-intake-line) { color: var(--lp-intake-text) !important; }
#happinessPanel#happinessPanel .happiness-intake-line.up { color: var(--lp-intake-up) !important; }
#happinessPanel#happinessPanel .happiness-intake-line.down { color: var(--lp-intake-down) !important; }
#happinessPanel#happinessPanel .happiness-intake-rule { color: var(--lp-intake-rule) !important; }
/* 행복도 숫자: 패널 전체 글씨 강제색에 묻히던 색을 단계(data-tone)로 되살린다 */
#happinessPanel#happinessPanel .happiness-advisor-number[data-tone="low"] { color: var(--lp-happy-low) !important; }
#happinessPanel#happinessPanel .happiness-advisor-number[data-tone="mid"] { color: var(--lp-happy-mid) !important; }
#happinessPanel#happinessPanel .happiness-advisor-number[data-tone="high"] { color: var(--lp-happy-high) !important; }

/* 무역 흐름 (2026-10-28): 단계 카드·병목·안내 줄·경로 막대 */
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) :is(.trade-flow-step, .trade-flow-tip, .trade-flow-chip, .trade-mode-chip) {
    background: rgba(8, 20, 36, 0.35);
    border-color: rgba(255, 255, 255, 0.14);
}
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-chip.is-active { background: #2b5683; border-color: #60a5fa; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-step.is-bottleneck { background: rgba(127, 29, 29, 0.55); border-color: #f87171; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-step.is-bottleneck * { color: #fecaca !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-step .trade-flow-badge { background: #ef4444; color: #ffffff !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-step.is-warn .trade-flow-step-sub { color: #fcd34d !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) :is(.trade-flow-step-label, .trade-flow-step-sub, .trade-flow-muted, .trade-route-legend, .trade-route-legend *, .trade-flow-tip-cost, .trade-flow-tip-caption) { color: #aebdd0 !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-img { background-color: #1e293b; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-img:not(.is-mini) { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-img.is-emoji { background: #1e3a5f; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-meter { background: #0d1f33; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-advisor-bubble { background: rgba(30, 58, 138, 0.45); border-color: #60a5fa; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-advisor[data-tone="is-warn"] .trade-flow-advisor-bubble { background: rgba(120, 53, 15, 0.5); border-color: #d97706; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-advisor[data-tone="is-ok"] .trade-flow-advisor-bubble { background: rgba(20, 83, 45, 0.5); border-color: #22c55e; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-alert.is-warn { color: #fde68a !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-advisor-name { color: #93c5fd !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-tip-gain { color: #4ade80 !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) :is(.trade-flow-tip-locked, .trade-flow-tip.is-locked .trade-flow-tip-gain) { color: #94a3b8 !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-tip.is-process { background: rgba(30, 58, 138, 0.4); border-color: #60a5fa; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-tip.is-process :is(.trade-flow-tip-text, .trade-flow-tip-price) { color: #bfdbfe !important; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-tip.is-upgrade { background: rgba(120, 53, 15, 0.45); border-color: #d97706; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) .trade-flow-tip.is-upgrade.is-ready { background: rgba(20, 83, 45, 0.5); border-color: #22c55e; }
body.dark-mode :is(#tradeStatusPanel, #productionStatusPanel):is(#tradeStatusPanel, #productionStatusPanel) :is(.trade-route-bar, .trade-route-seg) { background: #0d1f33; }
body.dark-mode #budgetPanel#budgetPanel :is(.income, .summary-value.income) { color: #4ade80 !important; }
body.dark-mode #budgetPanel#budgetPanel :is(.expense, .summary-value.expense) { color: #f87171 !important; }

body.dark-mode #budgetPanel#budgetPanel :is(.bond-approve-btn, .bond-cancel-btn) {
    background: linear-gradient(180deg, #a07a1f, #6f5412);
    border-color: #3d2e0a;
    color: #fff8e6;
}

/* 보조 글씨 */
body.dark-mode :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #rciTooltip, #cityChatPanel) :is(#budgetSpeechText, .bp-col-title, .bp-visitors, .bp-muted, .summary-label, .trans-label, .transaction-empty, .bond-option .total, .pie-center-label, .age-legend-percent, .stat-label, .rci-tooltip-desc, .rci-tooltip-tip, .city-chat-empty, .friend-dm-empty, .tourism-summary-label, .happiness-system-desc, .bond-tab:not(.active)) {
    color: #aebdd0;
}

/* 섹션 제목·라벨(따뜻한 금색 계열) */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.section-title, .pop-section-title, .bond-selection-title, .tier-label, .age-legend-label, .service-label) {
    color: #f3dcae;
}

/* 금색 강조 값 */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.tax-pct-display, .hourly, .total-label, .total-value, .bond-tab.active, #populationSummaryTotal, #populationSummaryChange, .pop-live-pill, .pop-live-pill *) {
    color: #fcd34d;
}

/* 의미 색: 수입/수출/부채없음/긍정 = 초록, 지출/수입(import)/부정 = 빨강, 관광/노동력 = 파랑, 출산율 = 분홍 */
body.dark-mode :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) :is(.income, .export, .no-debt, .no-debt *, .positive) {
    color: #4ade80;
}

body.dark-mode :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) :is(.expense, .import, .negative, .has-debt, .has-debt *) {
    color: #f87171;
}

body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.bp-val.tourism, #ageWorkforce) {
    color: #93c5fd;
}

body.dark-mode #populationPanel#populationPanel #ageBirthRate {
    color: #f9a8d4;
}

/* 안쪽 카드/섹션 */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.budget-section, .bp-table, .budget-service-expense, .bond-selection, .bond-option, .age-stat, .pop-chart-section, .pop-tier-section, .pop-age-section, .pop-service-section, .pop-milestone-section) {
    background: rgba(8, 20, 36, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 강조 카드(합계/총자산/아바타/선택 탭) = 어두운 금색 판 */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.budget-summary, .budget-total, .bp-avatar, .panel-icon, .bond-tab.active, .pop-live-pill) {
    background: linear-gradient(180deg, #4b3a14, #352910);
    border-color: #a07a1f;
}

/* 막대 트랙 / 슬라이더 홈 */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.bp-bar-wrap, .tax-slider, .tier-bar-bg, .service-bar-bg) {
    background: #0d1f33;
}

/* 판 안 버튼(닫기/탭/기록 지우기) */
body.dark-mode :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) :is(.panel-close, .bond-tab:not(.active), .clear-history-btn) {
    background: linear-gradient(180deg, #34587f, #26476b);
    border-color: #0b1a2e;
}

/* 인구 추이 그래프 격자선 */
body.dark-mode #populationPanel#populationPanel #popTrendChart {
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px) 0 0 / 100% 33.33%,
        linear-gradient(to bottom, transparent calc(100% - 1px), rgba(255, 255, 255, 0.12) calc(100% - 1px));
}

body.dark-mode :is(#populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel):is(#populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel) svg text {
    fill: #cbd5e1;
}

/* 채팅 */
body.dark-mode #cityChatPanel#cityChatPanel :is(.city-chat-tabs, .friend-add-row, .friend-dm-header, .city-chat-friend-pane, .city-chat-friend-main) {
    background: rgba(8, 20, 36, 0.4);
}

body.dark-mode #cityChatPanel#cityChatPanel .city-chat-tab.active {
    background: #2b5683;
}

body.dark-mode #cityChatPanel#cityChatPanel :is(input, textarea, .city-chat-emoji-btn) {
    background: #0d1f33;
    border-color: #2c4d70;
    color: #e6eef8;
}

body.dark-mode #cityChatPanel#cityChatPanel :is(input, textarea)::placeholder {
    color: #7f93ab;
}

body.dark-mode #cityChatPanel#cityChatPanel .friend-dm-back {
    background: transparent;
    color: #93c5fd;
}

/* =====================================================================
   툴팁 + 토스트: 화이트 모드 = 밝은 판 + 어두운 글씨, 다크 모드 = 남색 판 + 밝은 글씨
   ===================================================================== */
:root {
    --lp-tip-hi: #ffffff;
    --lp-tip-lo: #eaf1f8;
    --lp-tip-facet: rgba(29, 66, 105, 0.05);
    --lp-tip-frame: #8ea7c3;
    --lp-tip-edge: #6f88a4;
    --lp-tip-lip: rgba(31, 58, 92, 0.14);
}

body.dark-mode {
    --lp-tip-hi: #1f3f63;
    --lp-tip-lo: #11263f;
    --lp-tip-facet: rgba(255, 255, 255, 0.07);
    --lp-tip-frame: #0b1a2e;
    --lp-tip-edge: #050d18;
    --lp-tip-lip: rgba(5, 13, 24, 0.45);
}

/* #shipTooltip은 배경/테두리가 인라인 → !important */
:is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip):is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip),
#toastRoot#toastRoot .toast {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo)) !important;
    border: calc(1.5px * var(--ui-scale)) solid var(--lp-tip-frame) !important;
    border-radius: calc(4px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(3px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(8px * var(--ui-scale)) calc(16px * var(--ui-scale)) var(--lp-panel-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#toastRoot#toastRoot .toast {
    border-width: calc(2px * var(--ui-scale)) !important;
    border-radius: calc(5px * var(--ui-scale));
}

#toastRoot#toastRoot .toast .icon {
    border-radius: calc(4px * var(--ui-scale));
}

/* --- 화이트 모드 툴팁/토스트 글씨: 전부 어둡게 → 보조/의미 색만 다시 --- */
body:not(.dark-mode) :is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip, #toastRoot):is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip, #toastRoot) * {
    color: #1b2a3d;
}

body:not(.dark-mode) #costTooltip#costTooltip {
    color: #15803d;
}

body:not(.dark-mode) #costTooltip#costTooltip.insufficient {
    color: #b91c1c;
}

body:not(.dark-mode) :is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #toastRoot):is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #toastRoot) :is(.tt-desc, .tooltip-desc, .label, .stat-label, .tooltip-preview-size, #ttAutoSaveTime, .desc, .addon-tooltip-desc) {
    color: #4a5b70;
}

body:not(.dark-mode) #toolbarTooltip#toolbarTooltip #ttCost,
body:not(.dark-mode) #submenuTooltip#submenuTooltip #tooltipCost {
    color: #a1560a;
}

body:not(.dark-mode) #toolbarTooltip#toolbarTooltip #ttMaintenance,
body:not(.dark-mode) #submenuTooltip#submenuTooltip #tooltipMaintenance {
    color: #c81e1e;
}

body:not(.dark-mode) #toolbarTooltip#toolbarTooltip #ttEffect,
body:not(.dark-mode) #addonTooltip#addonTooltip .addon-tooltip-unlock-title {
    color: #15803d;
}

body:not(.dark-mode) #buildingHoverTooltip#buildingHoverTooltip .hover-tooltip-status {
    color: #1d4ed8;
}

body:not(.dark-mode) #toastRoot#toastRoot .toast .icon.success { color: #15803d; }
body:not(.dark-mode) #toastRoot#toastRoot .toast .icon.error { color: #c81e1e; }

/* 인라인 색(서브메뉴 땅값 버프/설치 조건, 선박) → !important로 같은 색상의 어두운 톤 */
body:not(.dark-mode) #submenuTooltip .zone-bonus-title { color: #1b2a3d !important; }
body:not(.dark-mode) #submenuTooltip .zone-bonus-notice { color: #8a4b05 !important; }
body:not(.dark-mode) #submenuTooltip .zone-bonus-item:nth-child(1) > div { color: #15803d !important; }
body:not(.dark-mode) #submenuTooltip .zone-bonus-item:nth-child(2) > div { color: #1d4ed8 !important; }
body:not(.dark-mode) #submenuTooltip .zone-bonus-item:nth-child(3) > div { color: #b45309 !important; }
body:not(.dark-mode) #submenuTooltip #tooltipRequirement div { color: #8a4b05 !important; }
body:not(.dark-mode) #shipTooltip div[style*="color"] { color: #1d4ed8 !important; }

/* 화이트 모드 툴팁 안쪽의 어두운 띠/영역 → 밝게 */
body:not(.dark-mode) #submenuTooltip#submenuTooltip .tooltip-title-bar {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.7) 0 36%, transparent 36.3%),
        linear-gradient(180deg, #e9f1f9, #d8e5f2);
    border-bottom-color: rgba(29, 66, 105, 0.18);
}

body:not(.dark-mode) #submenuTooltip#submenuTooltip .tooltip-preview-area {
    background: linear-gradient(180deg, #eef4fa, #dde8f3);
    border-bottom-color: rgba(29, 66, 105, 0.14);
}

body:not(.dark-mode) #submenuTooltip#submenuTooltip .tooltip-preview-size {
    background: rgba(255, 255, 255, 0.85);
}

body:not(.dark-mode) #submenuTooltip#submenuTooltip .tooltip-desc {
    border-bottom-color: rgba(29, 66, 105, 0.12);
}

body:not(.dark-mode) #submenuTooltip#submenuTooltip .tooltip-cost-bar {
    background: linear-gradient(180deg, #eef4fa, #e2ebf5);
    border-top-color: rgba(29, 66, 105, 0.16);
}

body:not(.dark-mode) :is(#toolbarTooltip, #addonTooltip):is(#toolbarTooltip, #addonTooltip) :is(.tt-header, .addon-tooltip-header) {
    border-bottom-color: rgba(29, 66, 105, 0.14);
}

body:not(.dark-mode) #toolbarTooltip :has(> #ttAutoSaveBar) {
    background: rgba(29, 66, 105, 0.12) !important;
}

/* Entry tutorial uses the same low-poly dialog palette in both themes. */
#tutorialOnboardingDialog#tutorialOnboardingDialog {
    background: linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo)) !important;
    color: var(--lp-dialog-title) !important;
    border-color: var(--lp-dialog-frame) !important;
    border-radius: calc(8px * var(--ui-scale)) !important;
    box-shadow: inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(16px * var(--ui-scale)) calc(32px * var(--ui-scale)) var(--lp-panel-shadow) !important;
}
#tutorialOnboardingDialog#tutorialOnboardingDialog > div { color: var(--lp-dialog-title) !important; }
#tutorialOnboardingDialog#tutorialOnboardingDialog > div:nth-child(3) { color: var(--lp-dialog-msg) !important; }
#tutorialOnboardingDialog#tutorialOnboardingDialog button {
    background: linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo)) !important;
    color: var(--lp-dialog-title) !important;
    border: calc(1px * var(--ui-scale)) solid var(--lp-dialog-frame) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-dialog-edge);
    border-radius: calc(6px * var(--ui-scale)) !important;
}
#tutorialOnboardingDialog#tutorialOnboardingDialog :is(#tutSkipNo, #fsTipFullscreen) {
    background: linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo)) !important;
    color: var(--lp-panel-ink) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
}

/* ---------- ui-modal (customAlert / customConfirm): 화이트/다크 판 전환 ---------- */
#ui-modal-overlay#ui-modal-overlay .ui-modal-box {
    background:
        linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(250deg, var(--lp-dialog-facet) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo));
    border: calc(2px * var(--ui-scale)) solid var(--lp-dialog-frame);
    border-radius: calc(8px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(20px * var(--ui-scale)) calc(50px * var(--ui-scale)) rgba(0, 0, 0, 0.4);
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-title {
    color: var(--lp-dialog-title);
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-msg {
    color: var(--lp-dialog-msg);
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn {
    border-radius: calc(6px * var(--ui-scale));
    border: calc(1.5px * var(--ui-scale)) solid rgba(11, 26, 46, 0.55);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
    font-weight: 800;
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn:hover {
    opacity: 1;
    filter: brightness(1.07);
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn:active {
    box-shadow: inset 0 calc(-1px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

/* 확인 = 노란 블록 (게임 전체 주요 버튼 색) */
#ui-modal-overlay#ui-modal-overlay .ui-modal-btn--primary {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border-color: #9a6a00;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
    color: #4a2b00;
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn--danger {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.22) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #ef4444, #c81e1e);
    border-color: #7f1414;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #7f1414;
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn--action {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.24) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #9b6bff, #6d3fe0);
    border-color: #3b1d86;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #4a22a8;
}

#ui-modal-overlay#ui-modal-overlay .ui-modal-btn--ghost {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

/* =====================================================================
   자주 보이는 UI: 좌·우 사이드바 / 어드바이저 / 범례 / 단축키 힌트 / 작은 표시 / 시간 다이얼
   화이트 = 밝은 타일 + 어두운 글씨, 다크 = 남색 타일 + 밝은 글씨. 테두리 두께는 원본 유지(크기 불변).
   ===================================================================== */
:root {
    --lp-mine-hi: #fff7ea;
    --lp-mine-lo: #f1dfbd;
    --lp-mine-line: #a07a46;
    --lp-mine-lip: #c9a46a;
    --lp-mine-text: #4a3416;
    --lp-sub-text: #4a5b70;
    --lp-key-bg: #dbeafe;
    --lp-key-line: #93c5fd;
    --lp-key-text: #1e3a8a;
    --lp-key-red-bg: #fee2e2;
    --lp-key-red-line: #fca5a5;
    --lp-key-red-text: #991b1b;
    --lp-hint-title: #a1560a;
    --lp-hint-title-red: #c81e1e;
    --lp-dial-frame: #a7bcd3;
    --lp-dial-edge: #6f88a4;
}

body.dark-mode {
    --lp-mine-hi: #5c4424;
    --lp-mine-lo: #3f2e17;
    --lp-mine-line: #1c1308;
    --lp-mine-lip: #2a1e0b;
    --lp-mine-text: #f3dcae;
    --lp-sub-text: #b8c6d8;
    --lp-key-bg: rgba(96, 165, 250, 0.28);
    --lp-key-line: rgba(147, 197, 253, 0.55);
    --lp-key-text: #ffffff;
    --lp-key-red-bg: rgba(248, 113, 113, 0.28);
    --lp-key-red-line: rgba(252, 165, 165, 0.55);
    --lp-key-red-text: #ffffff;
    --lp-hint-title: #fbbf24;
    --lp-hint-title-red: #f87171;
    --lp-dial-frame: #0b1a2e;
    --lp-dial-edge: #050d18;
}

/* ---------- 좌·우 데이터 보기 사이드바 버튼 ---------- */
:is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad) .sidebar-btn {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip), 0 calc(2px * var(--ui-scale)) 0 rgba(11, 26, 46, 0.35);
}

:is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad) .sidebar-btn:hover:not(.active) {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
    border-color: var(--lp-tile-line);
}

:is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining) .sidebar-btn .label {
    color: var(--lp-text);
    font-weight: 700;
}

/* 광업 사이드바: 흙빛 블록 */
#leftSidebarMining#leftSidebarMining .sidebar-btn {
    background:
        linear-gradient(300deg, rgba(60, 35, 0, 0.1) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-mine-hi), var(--lp-mine-lo));
    border-color: var(--lp-mine-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-mine-lip), 0 calc(2px * var(--ui-scale)) 0 rgba(28, 19, 8, 0.4);
}

#leftSidebarMining#leftSidebarMining .sidebar-btn .label {
    color: var(--lp-mine-text);
}

/* 켜진 보기: 노란 블록(양 모드 공통) */
:is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining) .sidebar-btn.active {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border-color: #9a6a00;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip), 0 0 0 calc(2px * var(--ui-scale)) rgba(255, 221, 85, 0.35);
}

:is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining) .sidebar-btn.active .label {
    color: #4a2b00;
}

/* ---------- 어드바이저 말풍선 / 배지 ---------- */
#advisorPanel#advisorPanel .advisor-speech-bubble {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 28%, transparent 28.3%),
        linear-gradient(250deg, var(--lp-tip-facet) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    border-color: var(--lp-tip-frame);
    border-radius: calc(10px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(12px * var(--ui-scale)) calc(28px * var(--ui-scale)) var(--lp-panel-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 꼬리 = 말풍선 아래쪽 색 */
#advisorPanel#advisorPanel .advisor-speech-bubble::after {
    border-color: transparent var(--lp-tip-lo) transparent transparent;
}

#advisorPanel#advisorPanel .bubble-title {
    color: var(--lp-text);
}

#advisorPanel#advisorPanel .bubble-content {
    color: var(--lp-sub-text);
}

body.dark-mode #advisorPanel#advisorPanel .bubble-content {
    color: #cbd5e1;
}

#advisorPanel#advisorPanel .advisor-badge {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.25) 0 38%, transparent 38.5%),
        linear-gradient(180deg, #3b82f6, #1d4ed8);
    border-color: #0b1a2e;
    border-radius: calc(12px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #1e3a8a, 0 calc(3px * var(--ui-scale)) 0 rgba(11, 26, 46, 0.5);
}

/* 튜토리얼 안내 말풍선: 인라인 흰 배경/글씨 → 프레임 추가, 다크 모드는 남색 */
#advisorStepOverlay .adv-tutor-bubble {
    border: calc(2px * var(--ui-scale)) solid var(--lp-tip-frame);
    border-radius: calc(10px * var(--ui-scale)) !important;
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(12px * var(--ui-scale)) calc(28px * var(--ui-scale)) rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode #advisorStepOverlay .adv-tutor-bubble {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 28%, transparent 28.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo)) !important;
    color: #e6eef8 !important;
}

body.dark-mode #advisorStepOverlay #advisorStepName { color: #93c5fd !important; }
body.dark-mode #advisorStepOverlay #advisorStepText { color: #e6eef8 !important; }
body.dark-mode #advisorStepOverlay #advisorStepSkip { color: #cbd5e1 !important; background: rgba(255, 255, 255, 0.1) !important; }

#advisorStepOverlay #advisorStepNext {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo)) !important;
    color: #4a2b00 !important;
    font-weight: 800 !important;
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #9a6a00, inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
}

/* ---------- 데이터 보기 / 전력·수도 범례 ---------- */
:is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 26%, transparent 26.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    border-radius: calc(8px * var(--ui-scale));
    box-shadow:
        inset 0 0 0 calc(1.5px * var(--ui-scale)) var(--lp-tip-frame),
        inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(12px * var(--ui-scale)) calc(26px * var(--ui-scale)) var(--lp-panel-shadow);
}

:is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-header, .utility-legend-header) {
    border-radius: calc(8px * var(--ui-scale)) calc(8px * var(--ui-scale)) 0 0;
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.15);
}

/* 다크 모드: 본문 글씨 밝게(헤더 제외), 인라인 의미 색은 그대로 */
body.dark-mode :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) {
    color: #e6eef8;
}

body.dark-mode :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) *:not(.legend-header *):not(.utility-legend-header *) {
    color: #e6eef8;
}

body.dark-mode :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-stat-label, .legend-section-title, .legend-item-label, .utility-stat-label, .sewage-cylinder-info-label, .gauge-label-min, .gauge-label-max) {
    color: #b8c6d8;
}

body.dark-mode #dataViewLegend#dataViewLegend .legend-stat-value:not([style*="color"]) {
    color: #bbf7d0;
}

body.dark-mode #utilityLegend#utilityLegend :is(#utilityRemaining, .utility-status-text) { color: #4ade80; }
body.dark-mode #utilityLegend#utilityLegend #utilityPendingCapacity { color: #93c5fd; }
body.dark-mode #utilityLegend#utilityLegend :is(.sewage-cylinder-label, .sewage-cylinder-info-value) { color: #e7c08f; }
body.dark-mode #utilityLegend#utilityLegend svg text { fill: #e6eef8; }

body.dark-mode :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-stat, .utility-stat-row) {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #utilityLegend#utilityLegend .utility-stats {
    background: rgba(8, 20, 36, 0.35);
}

/* ---------- 단축키 힌트 (배치/구역/철거) + 모드 안내 ---------- */
:is(#placementModeHint, #zoneModeHint, #demolishModeHint):is(#placementModeHint, #zoneModeHint, #demolishModeHint),
#hintContainer #hint {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    border-color: var(--lp-tip-frame);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(3px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(8px * var(--ui-scale)) calc(16px * var(--ui-scale)) var(--lp-panel-shadow);
}

#hintContainer #hint {
    color: var(--lp-text);
}

:is(#placementModeHint, #zoneModeHint):is(#placementModeHint, #zoneModeHint) .hint-title {
    color: var(--lp-hint-title);
    border-bottom-color: var(--lp-tile-line);
}

#demolishModeHint#demolishModeHint .hint-title {
    color: var(--lp-hint-title-red);
    border-bottom-color: var(--lp-tile-line);
}

:is(#placementModeHint, #zoneModeHint, #demolishModeHint):is(#placementModeHint, #zoneModeHint, #demolishModeHint) .hint-desc {
    color: var(--lp-sub-text);
}

:is(#placementModeHint, #zoneModeHint):is(#placementModeHint, #zoneModeHint) .hint-key {
    background: var(--lp-key-bg);
    border-color: var(--lp-key-line);
    color: var(--lp-key-text);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(29, 78, 216, 0.25);
}

#demolishModeHint#demolishModeHint .hint-key {
    background: var(--lp-key-red-bg);
    border-color: var(--lp-key-red-line);
    color: var(--lp-key-red-text);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(185, 28, 28, 0.25);
}

/* ---------- 작은 표시: 폐건물 카운터 / 자동저장 / 무역 선물 ---------- */
#abandonedCounter#abandonedCounter {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(3px * var(--ui-scale)) 0 #7f1414,
        0 calc(8px * var(--ui-scale)) calc(16px * var(--ui-scale)) var(--lp-panel-shadow);
    border-radius: calc(6px * var(--ui-scale));
}

#abandonedCounter#abandonedCounter :is(.counter-label, .nav-index) {
    color: var(--lp-sub-text);
}

#abandonedCounter#abandonedCounter :is(.nav-btn, .counter-close) {
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#autoSaveStatus#autoSaveStatus {
    padding: calc(2px * var(--ui-scale)) calc(7px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    border: 1px solid var(--lp-tip-frame);
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 -1px 0 var(--lp-tip-lip);
    color: var(--lp-sub-text);
    opacity: 0.92;
}

#tradeGiftBubble#tradeGiftBubble .gift-bubble-box {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tip-lip), 0 calc(3px * var(--ui-scale)) 0 #b45309;
}

#tradeGiftBubble#tradeGiftBubble .gift-bubble-text {
    color: var(--lp-hint-title);
}

/* ---------- 시간 변경 다이얼: 하늘 색 시간대 고리(2시간 단위 면) ---------- */
#timeDialPanel#timeDialPanel .time-dial-rim {
    background: radial-gradient(circle at 50% 50%, #10233c 0 70%, #1d4269 71% 100%);
    border-color: var(--lp-dial-frame);
    box-shadow:
        0 calc(6px * var(--ui-scale)) 0 var(--lp-dial-edge),
        0 calc(18px * var(--ui-scale)) calc(44px * var(--ui-scale)) rgba(0, 0, 0, 0.5),
        inset 0 0 0 calc(2px * var(--ui-scale)) rgba(255, 255, 255, 0.1);
}

#timeDialPanel#timeDialPanel .time-dial-face {
    background: radial-gradient(circle at 50% 50%, #0c1c31 0 54%, #142f4d 55% 77%, #1d4269 78% 100%);
}

/* 위=정오, 오른쪽=18시, 아래=자정, 왼쪽=6시 (바늘 각도와 동일 기준) */
#timeDialPanel#timeDialPanel .time-dial-band {
    background: conic-gradient(from 0deg,
        #7cc6f5 0deg 30deg,     /* 12-14 */
        #5aaee8 30deg 60deg,    /* 14-16 */
        #f2a65a 60deg 90deg,    /* 16-18 */
        #e0705e 90deg 120deg,   /* 18-20 */
        #5a4a9a 120deg 150deg,  /* 20-22 */
        #23305e 150deg 180deg,  /* 22-24 */
        #141f45 180deg 210deg,  /* 0-2 */
        #1b2a5a 210deg 240deg,  /* 2-4 */
        #7a5aa8 240deg 270deg,  /* 4-6 */
        #f5b26b 270deg 300deg,  /* 6-8 */
        #8fcbf2 300deg 330deg,  /* 8-10 */
        #6fbdf4 330deg 360deg); /* 10-12 */
    box-shadow:
        inset 0 0 0 calc(3px * var(--ui-scale)) rgba(11, 26, 46, 0.85),
        inset 0 0 calc(16px * var(--ui-scale)) rgba(0, 0, 0, 0.35);
}

#timeDialPanel#timeDialPanel .time-dial-core {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0 40%, transparent 40.5%),
        #10233c;
    box-shadow: 0 0 0 calc(3px * var(--ui-scale)) rgba(11, 26, 46, 0.9), 0 0 calc(18px * var(--ui-scale)) rgba(0, 0, 0, 0.5);
}

#timeDialPanel#timeDialPanel .time-dial-icon {
    background: linear-gradient(180deg, #2b5683, #1d4269);
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #0b1a2e, inset 0 calc(-2px * var(--ui-scale)) 0 rgba(5, 13, 24, 0.5);
}

#timeDialPanel#timeDialPanel .time-dial-value {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.1) 0 36%, transparent 36.5%),
        #142f4d;
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 0 0 calc(2px * var(--ui-scale)) #0b1a2e, inset 0 calc(-3px * var(--ui-scale)) 0 rgba(5, 13, 24, 0.6);
}

#timeDialPanel#timeDialPanel .time-dial-knob {
    border-color: var(--lp-yellow-lo);
}

.weather-picker {
    box-sizing: border-box;
    width: 100%;
    padding: calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale)) calc(10px * var(--ui-scale));
    border: calc(2px * var(--ui-scale)) solid var(--lp-dial-frame, #203c59);
    border-radius: calc(12px * var(--ui-scale));
    background: #142c44;
    box-shadow: inset 0 1px 0 #728da05c, inset 0 -2px 0 #0a192a;
    color: #f2f6fa;
    font-size: var(--font-md);
    font-weight: 700;
    line-height: 1.2;
    user-select: none;
}

.weather-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(8px * var(--ui-scale));
    padding-inline-start: calc(3px * var(--ui-scale));
    margin-bottom: calc(5px * var(--ui-scale));
}

.weather-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: max(4px, calc(5px * var(--ui-scale)));
}

.weather-card, .weather-auto {
    position: relative;
    display: grid;
    box-sizing: border-box;
    align-items: center;
    justify-items: center;
    min-width: 0;
    color: #edf5ff;
    font-size: max(11px, var(--font-sm));
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    border: 2px solid #35516c;
    border-radius: calc(6px * var(--ui-scale));
    background-color: #203c56;
}

.weather-card {
    min-height: 44px;
    grid-template-rows: auto 1fr;
    align-content: start;
    overflow: hidden;
    padding-bottom: calc(3px * var(--ui-scale));
    overflow-wrap: anywhere;
}

.weather-card .weather-picture {
    width: 100%;
    height: max(26px, calc(34px * var(--ui-scale)));
    margin-bottom: calc(3px * var(--ui-scale));
    background: #42617c url("./city-weather-cards.webp?v=20261118-city-weather-1") var(--weather-column) center / 600% 100% no-repeat;
}

.weather-auto {
    grid-auto-flow: column;
    gap: calc(5px * var(--ui-scale));
    padding-inline: calc(9px * var(--ui-scale));
    min-height: max(32px, calc(32px * var(--ui-scale)));
    border-radius: calc(12px * var(--ui-scale));
}

.weather-picker input {
    position: absolute;
    inset-inline-start: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.weather-picker label:not(:has(input:disabled)):hover { border-color: #93b5cc; }
.weather-card:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.65;
    filter: saturate(0.35);
}
.weather-picker label:has(input:checked) {
    border-color: #ffdc80;
    background-color: #374b5b;
    color: #ffe9ac;
}
.weather-card:has(input:checked)::after {
    content: "✓";
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    padding: 0 calc(4px * var(--ui-scale));
    background: #ffdc80;
    color: #24354a;
    border-end-start-radius: calc(5px * var(--ui-scale));
}
.weather-picker label:has(input:focus-visible) {
    outline: 2px solid white;
    outline-offset: 1px;
}

@media (pointer: coarse) {
    .weather-auto { min-height: 44px; }
}

/* =====================================================================
   가끔 뜨는 UI: 퀘스트 / 업적·로그인 보상 / 스킨 모달 / 차량·열차 팝업 / 튜토리얼 / 게이지 /
   작은 툴팁 / 확장 설치 바 / 뉴스 웹페이지 / 모바일 전용 UI / 개발자 패널
   - 어두운 정보 판(팝업·튜토리얼·게이지): 기존 팝업과 같이 양 모드 남색, 테두리만 모드별.
   - 작은 툴팁: 기존 툴팁과 같이 화이트=밝은 판+어두운 글씨, 다크=남색.
   - 밝은 판(스킨 카드·모바일 메뉴·뉴스): 화이트=기존+테두리, 다크=남색 판+밝은 글씨.
   - 인라인 배경을 쓰는 요소는 !important (JS/HTML 인라인 style 덮기). 테두리 두께는 원본 유지.
   ===================================================================== */

/* ---------- 어두운 정보 판 ---------- */
:is(#questContainer, #achievementToast, #loginRewardBox, #vehiclePopup, #trainPopup, #rciTutorialPanel, #cvTutorialPanel, #cameraTutorial, #miningEfficiencyGauge, #windCursorGauge, #devPanel):is(#questContainer, #achievementToast, #loginRewardBox, #vehiclePopup, #trainPopup, #rciTutorialPanel, #cvTutorialPanel, #cameraTutorial, #miningEfficiencyGauge, #windCursorGauge, #devPanel) {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0 26%, transparent 26.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo)) !important;
    border-color: var(--lp-dpanel-frame) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow:
        inset 0 calc(-3px * var(--ui-scale)) 0 rgba(5, 13, 24, 0.45),
        0 calc(3px * var(--ui-scale)) 0 var(--lp-dpanel-edge),
        0 calc(12px * var(--ui-scale)) calc(26px * var(--ui-scale)) var(--lp-panel-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 판별 강조색 테두리 유지(업적=금, 로그인 보상=초록, 차량=파랑, 열차=보라, 튜토리얼) */
#achievementToast#achievementToast { border-color: #b8860b !important; }
#loginRewardBox#loginRewardBox { border-color: #15803d !important; }
#vehiclePopup#vehiclePopup { border-color: #2563eb !important; }
#trainPopup#trainPopup { border-color: #7e22ce !important; }
#cvTutorialPanel#cvTutorialPanel { border-color: #b8860b !important; }

/* 차량/열차 헤더 띠 */
:is(#vehiclePopup, #trainPopup):is(#vehiclePopup, #trainPopup) .vehicle-popup-header {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 36%, transparent 36.3%),
        linear-gradient(180deg, var(--lp-dhead-hi), var(--lp-dhead-lo)) !important;
}

:is(#vehiclePopup, #trainPopup):is(#vehiclePopup, #trainPopup) .vehicle-popup-label { color: #aebdd0; }
:is(#vehiclePopup, #trainPopup):is(#vehiclePopup, #trainPopup) .vehicle-popup-close { color: #cbd5e1; }

#vehiclePopup#vehiclePopup .vehicle-follow-btn {
    border-radius: calc(4px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px #1e3a8a, inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

/* 튜토리얼 확인 버튼 = 노란 블록 */
:is(#rciTutorialPanel, #cvTutorialPanel):is(#rciTutorialPanel, #cvTutorialPanel) :is(#rciTutorialConfirm, #cvTutorialConfirm),
#loginRewardBox#loginRewardBox #btnClaimReward {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo)) !important;
    color: #4a2b00 !important;
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #9a6a00, inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip) !important;
}

/* 퀘스트 말풍선: 화이트=흰 판 + 테두리, 다크=남색 판 */
#questContainer#questContainer .quest-speech-bubble {
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) var(--lp-tip-frame), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tip-lip);
}

body.dark-mode #questContainer#questContainer .quest-speech-bubble {
    background: linear-gradient(180deg, #2c527b, #1f3f63);
}

body.dark-mode #questContainer#questContainer :is(.quest-speech-text, .quest-panel-close) {
    color: #e6eef8;
}

/* 게이지 트랙 */
#miningEfficiencyGauge#miningEfficiencyGauge .efficiency-bar-container,
#windCursorGauge#windCursorGauge .gauge-container {
    background: #0d1f33 !important;
    border-color: #0b1a2e !important;
}

#miningEfficiencyGauge#miningEfficiencyGauge .efficiency-label { color: #aebdd0; }

/* 개발자 패널 헤더 */
#devPanel#devPanel #devPanelHeader {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 36%, transparent 36.3%),
        linear-gradient(180deg, var(--lp-dhead-hi), var(--lp-dhead-lo)) !important;
}

/* 커서 나침반(바람/해류): 팔각 판 */
:is(#industrialWindCompass, #industrialCurrentCompass):is(#industrialWindCompass, #industrialCurrentCompass) {
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.35), 0 calc(3px * var(--ui-scale)) 0 rgba(28, 19, 8, 0.6);
}

/* ---------- 확장 설치 바: 하단 바와 같은 받침 ---------- */
#expansionModeBar#expansionModeBar {
    background:
        linear-gradient(96deg, var(--lp-bar-facet-2) 0 14%, transparent 14.2%),
        linear-gradient(180deg, var(--lp-bar-hi), var(--lp-bar-lo));
    border-top-color: var(--lp-bar-edge);
    box-shadow: inset 0 calc(2px * var(--ui-scale)) 0 var(--lp-bar-shine), 0 calc(-3px * var(--ui-scale)) 0 var(--lp-bar-edge);
}

body:not(.dark-mode) #expansionModeBar#expansionModeBar .expansion-bar-title { color: #0369a1; }
body:not(.dark-mode) #expansionModeBar#expansionModeBar .expansion-bar-info { color: #4a5b70; }

#expansionModeBar#expansionModeBar .expansion-bar-btn {
    border-radius: calc(5px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

/* 애드온 철거 중(다시 누르면 짓던 항목으로 돌아간다, MSG #50292): 눌린 블록 + 노란 테 */
#expansionModeBar#expansionModeBar .expansion-bar-btn.demolish.active {
    transform: translateY(calc(2px * var(--ui-scale)));
    box-shadow: inset 0 calc(2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.35), 0 0 0 calc(3px * var(--ui-scale)) #ffc93c;
}

#expansionModeBar#expansionModeBar .expansion-bar-btn.close {
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

/* ---------- 작은 툴팁: 그래프 / 확률바 / 게임 도움말 / 모드 도움말 ---------- */
:is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip):is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo)) !important;
    border-color: var(--lp-tip-frame) !important; /* 두께는 원본(#probBarTooltip은 0) */
    border-radius: calc(4px * var(--ui-scale)) !important;
    box-shadow:
        inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tip-lip),
        0 calc(3px * var(--ui-scale)) 0 var(--lp-tip-edge),
        0 calc(8px * var(--ui-scale)) calc(16px * var(--ui-scale)) var(--lp-panel-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:not(.dark-mode) :is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip):is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) {
    color: #1b2a3d !important;
}

body:not(.dark-mode) :is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip):is(#graphTooltip, #probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) * {
    color: #1b2a3d;
    border-color: rgba(29, 66, 105, 0.14);
}

body:not(.dark-mode) :is(#gameHelpTooltip, #modeHelpTooltip):is(#gameHelpTooltip, #modeHelpTooltip) :is(.label, .stat-label, .help-section-title, .help-text) {
    color: #4a5b70;
}

body:not(.dark-mode) :is(#graphTooltip, #gameHelpTooltip, #modeHelpTooltip):is(#graphTooltip, #gameHelpTooltip, #modeHelpTooltip) :is(.green, .value.green, .stat-value.green) { color: #15803d; }
body:not(.dark-mode) :is(#gameHelpTooltip, #modeHelpTooltip):is(#gameHelpTooltip, #modeHelpTooltip) :is(.red, .value.red, .stat-value.red) { color: #c81e1e; }
body:not(.dark-mode) :is(#gameHelpTooltip, #modeHelpTooltip):is(#gameHelpTooltip, #modeHelpTooltip) :is(.yellow, .value.yellow, .stat-value.yellow) { color: #a1560a; }
body:not(.dark-mode) #graphTooltip#graphTooltip .value { color: #15803d; }

body:not(.dark-mode) #modeHelpTooltip#modeHelpTooltip .help-header {
    background: linear-gradient(180deg, #e9f1f9, #d8e5f2);
}

/* 인라인 밝은 의미 색 → 같은 색상의 진한 톤 (화이트 모드 툴팁 안) */
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#4ade80"], [style*="#22c55e"]) { color: #15803d !important; }
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#f87171"], [style*="#ef4444"]) { color: #c81e1e !important; }
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#fbbf24"], [style*="#f59e0b"]) { color: #a1560a !important; }
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#60a5fa"], [style*="#3b82f6"]) { color: #1d4ed8 !important; }
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#8b5cf6"], [style*="#a78bfa"]) { color: #6d28d9 !important; }
body:not(.dark-mode) :is(#probBarTooltip, #gameHelpTooltip, #modeHelpTooltip) :is([style*="#94a3b8"], [style*="#cbd5e1"], [style*="#e2e8f0"]) { color: #4a5b70 !important; }

/* ---------- 스킨 모달 (목록 / 건물 스킨 선택 / 출시 안내) ---------- */
:is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-card {
    border-color: var(--lp-lpanel-frame); /* 원본 1px 유지 + 바깥 링 */
    box-shadow:
        0 0 0 1px var(--lp-lpanel-frame),
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.1),
        0 calc(4px * var(--ui-scale)) 0 var(--lp-lpanel-edge),
        0 calc(14px * var(--ui-scale)) calc(30px * var(--ui-scale)) var(--lp-panel-shadow);
}

:is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-card-header {
    border-bottom-color: var(--lp-yellow-lo);
    box-shadow: 0 1px 0 var(--lp-yellow-lo);
}

:is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-action-btn:not(.active), .skin-launch-primary) {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border-color: #9a6a00;
    color: #4a2b00;
    font-weight: 800;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
}

/* 다크 모드: 카드 남색 + 밝은 글씨 (스킨 썸네일 이미지 영역은 그대로) */
body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-card, .skin-card-header) {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 24%, transparent 24.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
    color: #e6eef8;
}

body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-card-title, .skin-item-title, .skin-item.has-hero-image .skin-item-title) { color: #f1f5f9; }
body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-card-subtitle, .skin-item-desc, .skin-item.has-hero-image .skin-item-desc, .skin-launch-copy, .skin-launch-dontshow, .skin-list-empty) { color: #b8c6d8; }
body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-item-meta, .skin-item.has-hero-image .skin-item-meta, .skin-picker-target) { color: #fcd34d; }

body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-item, .skin-picker-item) {
    background: linear-gradient(180deg, #2d5079, #213f60);
    border-color: #0b1a2e;
}

body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-item-body {
    background: linear-gradient(180deg, rgba(33, 63, 96, 0.96), rgba(26, 52, 82, 0.96));
}

body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) :is(.skin-close-btn, .skin-launch-secondary) {
    background: linear-gradient(180deg, #34587f, #26476b);
    border-color: #0b1a2e;
    color: #e6eef8;
}

body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-status-badge.owned { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
body.dark-mode :is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-status-badge.locked { background: rgba(255, 255, 255, 0.1); color: #cbd5e1; }

/* ---------- 모바일 전용 UI ---------- */
#mobileHUD#mobileHUD,
#mobileMenuBtn#mobileMenuBtn:not(.open) {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip), 0 calc(2px * var(--ui-scale)) 0 rgba(11, 26, 46, 0.35);
}

#mobileHUD#mobileHUD .hud-item,
#mobileHUD#mobileHUD :is(#mobileMoneyDisplay, #mobilePopDisplay, #mobileHappinessDisplay),
#mobileMenuBtn#mobileMenuBtn:not(.open) {
    color: var(--lp-text);
}

#mobileMenuBtn#mobileMenuBtn.open {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    color: #4a2b00;
}

:is(#mobileSideMenu, #mobileSubmenuSheet):is(#mobileSideMenu, #mobileSubmenuSheet) {
    background:
        linear-gradient(118deg, var(--lp-tip-facet) 0 26%, transparent 26.2%),
        linear-gradient(180deg, var(--lp-tip-hi), var(--lp-tip-lo));
    color: var(--lp-text);
}

#mobileSideMenu#mobileSideMenu .mobile-menu-header {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 36%, transparent 36.3%),
        linear-gradient(180deg, var(--lp-dhead-hi), var(--lp-dhead-lo));
    border-bottom-color: var(--lp-yellow-lo);
    box-shadow: 0 calc(2px * var(--ui-scale)) 0 var(--lp-yellow-lo);
}

#mobileSideMenu#mobileSideMenu :is(.mobile-menu-title, .mobile-menu-close) {
    color: #ffffff;
}

#mobileSideMenu#mobileSideMenu .mobile-menu-close {
    border-color: rgba(255, 255, 255, 0.35);
}

#mobileSideMenu#mobileSideMenu .mobile-menu-section-title { color: var(--lp-sub-text); }

#mobileSideMenu#mobileSideMenu .mobile-menu-btn {
    color: var(--lp-text);
    border-radius: calc(5px * var(--ui-scale));
}

#mobileSideMenu#mobileSideMenu .mobile-menu-btn :is(span, .menu-icon) { color: inherit; }

#mobileSideMenu#mobileSideMenu .mobile-menu-btn:hover {
    background: rgba(127, 150, 178, 0.14);
}

#mobileSideMenu#mobileSideMenu .mobile-menu-btn.active {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    color: #4a2b00;
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-yellow-lip);
}

#mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-title { color: var(--lp-text); }
#mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-handle { background: var(--lp-tile-line); }

#mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-item {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-item .item-name { color: var(--lp-text); }
body:not(.dark-mode) #mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-item .item-cost { color: #a1560a; }

/* ---------- 뉴스 웹페이지(City Herald): 브라우저 틀 + 다크 모드 페이지 ---------- */
#newsOverlay #newsPanel {
    box-shadow:
        0 0 0 calc(2px * var(--ui-scale)) var(--lp-lpanel-frame),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-lpanel-edge),
        0 calc(18px * var(--ui-scale)) calc(40px * var(--ui-scale)) rgba(0, 0, 0, 0.45);
}

#newsOverlay #newsPanel .nh-chrome {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-dhead-hi), var(--lp-dhead-lo));
    border-bottom-color: #0b1a2e;
}

#newsOverlay #newsPanel .nh-chrome :is(.nh-nav-btn, .nh-close-btn) { color: #e6eef8; }

#newsOverlay #newsPanel .nh-chrome .nh-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

#newsOverlay #newsPanel .nh-address-bar {
    background: #10233c;
    border-color: #0b1a2e;
}

#newsOverlay #newsPanel .nh-address-bar :is(.nh-url, span) { color: #cbd5e1; }
#newsOverlay #newsPanel .nh-address-bar .nh-lock { color: #4ade80; }

/* 다크 모드: 신문 지면을 어두운 지면으로 (붉은 브랜드 색 유지, 사진/썸네일 그대로) */
body.dark-mode #newsOverlay #newsPanel,
body.dark-mode #newsOverlay #newsPanel :is(.nh-site-header, .nh-page-area, .nh-card) {
    background: #13202f;
}

body.dark-mode #newsOverlay #newsPanel :is(.nh-page-area, .nh-site-header, .nh-card) :where(*) {
    color: #dde6f0;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode #newsOverlay #newsPanel :is(.nh-sep, .nh-art-byline, .nh-art-byline *, .nh-card-meta, .nh-card-meta *, time) { color: #9fb0c4; }

body.dark-mode #newsOverlay #newsPanel :is(.nh-toptag, .nh-back-link, .nh-back-link *) { color: #ff6b6b; }
body.dark-mode #newsOverlay #newsPanel :is(.nh-brand-mark, .nh-art-cat, .nh-brand-mark *, .nh-art-cat *) { color: #ffffff; }

body.dark-mode #newsOverlay #newsPanel .nh-art-interviews {
    background: #1b2b3f;
}

body.dark-mode #newsOverlay #newsPanel .nh-comment-badge {
    background: rgba(255, 255, 255, 0.1);
}

/* =====================================================================
   도시 진입 모달: 일일 출석보상 / 월정액 달력 / 오프라인 결산 / 파산 / 확인창 / GPU 안내
   - 크림 카드(출석·월정액·오프라인): 예산·인구 패널과 같은 규칙 —
     화이트 = 기존 크림 + 저폴리 테두리·두께·블록 버튼, 다크 = 남색 판 + 밝은 글씨(검정 글씨 금지).
   - 출석보상은 마크업/JS 셀이 인라인 style → !important. 테두리 두께는 원본 유지.
   ===================================================================== */
:root {
    --lp-cream-frame: #d9c48a;
    --lp-cream-edge: #b39a55;
    --lp-cream-lip: rgba(150, 110, 30, 0.14);
}

body.dark-mode {
    --lp-cream-frame: #0b1a2e;
    --lp-cream-edge: #050d18;
    --lp-cream-lip: rgba(5, 13, 24, 0.45);
}

:is(#dailyRewardModal, #monthlyPassModal, #offlineProgressModal) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ---------- 카드 공통: 프레임 링 + 하단 두께 + 받침 ---------- */
#dailyRewardModal .dr-card,
#monthlyPassModal .mp-card,
#offlineProgressModal .offline-progress-content {
    border-radius: calc(14px * var(--ui-scale)) !important;
    box-shadow:
        inset 0 -6px 0 var(--lp-cream-lip),
        0 0 0 2px var(--lp-cream-frame),
        0 6px 0 var(--lp-cream-edge),
        0 22px 50px rgba(4, 24, 53, 0.45) !important;
}

#monthlyPassModal .mp-scroll { border-radius: calc(14px * var(--ui-scale)) !important; }

/* 화이트 모드: 크림 위 면 분할 하이라이트 */
body:not(.dark-mode) #dailyRewardModal .dr-card {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.45) 0 20%, transparent 20.2%),
        linear-gradient(250deg, rgba(160, 120, 30, 0.05) 0 28%, transparent 28.2%),
        linear-gradient(170deg, #FEFAEC 0%, #FBF0D2 100%) !important;
}

body:not(.dark-mode) #monthlyPassModal .mp-card,
body:not(.dark-mode) #offlineProgressModal .offline-progress-content {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.45) 0 20%, transparent 20.2%),
        linear-gradient(250deg, rgba(160, 120, 30, 0.05) 0 28%, transparent 28.2%),
        linear-gradient(170deg, #FEFAEC 0%, #FBF0D2 100%);
}

/* 닫기 버튼: 둥근 원 → 작은 블록 타일 */
#dailyRewardModal .dr-close,
#monthlyPassModal .mp-close,
#offlineProgressModal .offline-report-close {
    border-radius: calc(8px * var(--ui-scale)) !important;
    box-shadow: inset 0 -3px 0 rgba(150, 110, 30, 0.2) !important;
}

/* 출석 칸(JS 생성 셀) / 달력 칸 / 섹션 판: 하단 두께 */
#dailyRewardModal #dailyRewardGrid > div {
    border-radius: calc(10px * var(--ui-scale)) !important;
    box-shadow: inset 0 -3px 0 rgba(150, 110, 30, 0.12);
}

#monthlyPassModal :is(.mp-day, .mp-reward-strip),
#offlineProgressModal :is(.offline-section, .offline-time-merged, .offline-advisor-bubble) {
    border-radius: calc(9px * var(--ui-scale));
    box-shadow: inset 0 -3px 0 rgba(150, 110, 30, 0.12);
}

#offlineProgressModal .offline-summary {
    border-radius: calc(10px * var(--ui-scale));
    box-shadow: inset 0 -4px 0 rgba(160, 110, 0, 0.18);
}

/* 주요 버튼: 노란 블록 (출석 받기 / 월정액 받기 / 오프라인 확인) */
#dailyRewardModal .dr-btn-claim,
#monthlyPassModal .mp-btn-primary:not(:disabled),
#offlineProgressModal .offline-close-btn {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo)) !important;
    border-radius: calc(10px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 2px #9a6a00, inset 0 -5px 0 var(--lp-yellow-lip), 0 4px 0 #8a5a00 !important;
    color: #4a2b00 !important;
}

#dailyRewardModal .dr-btn-claim :is(span, div, #dailyRewardClaimLabel),
#monthlyPassModal .mp-btn-primary:not(:disabled) :is(span, div),
#offlineProgressModal .offline-close-btn * {
    color: #4a2b00 !important;
}

#dailyRewardModal .dr-btn-claim:active,
#monthlyPassModal .mp-btn-primary:not(:disabled):active,
#offlineProgressModal .offline-close-btn:active {
    box-shadow: inset 0 0 0 2px #9a6a00, inset 0 -2px 0 var(--lp-yellow-lip), 0 1px 0 #8a5a00 !important;
}

/* 수령 완료(비활성) 버튼: 초록 블록 */
#dailyRewardModal .dr-btn-claim:disabled,
#monthlyPassModal .mp-btn-primary:disabled {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.24) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #34C159, #1FA748) !important;
    box-shadow: inset 0 0 0 2px #14692f, inset 0 -5px 0 rgba(0, 0, 0, 0.18) !important;
    color: #ffffff !important;
}

#dailyRewardModal .dr-btn-claim:disabled * { color: #ffffff !important; }

#monthlyPassModal .mp-btn-secondary {
    border-radius: calc(10px * var(--ui-scale));
    box-shadow: inset 0 -4px 0 rgba(150, 110, 30, 0.18);
}

#offlineProgressModal .offline-report-status {
    border-radius: calc(6px * var(--ui-scale));
}

/* ---------- 다크 모드: 크림 카드 → 남색 ---------- */
body.dark-mode #dailyRewardModal .dr-card,
body.dark-mode #monthlyPassModal :is(.mp-card, .mp-scroll),
body.dark-mode #offlineProgressModal .offline-progress-content {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 20%, transparent 20.2%),
        linear-gradient(250deg, rgba(255, 255, 255, 0.03) 0 28%, transparent 28.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo)) !important;
    color: #e6eef8 !important;
}

body.dark-mode #dailyRewardModal .dr-card *:where(:not(.dr-btn-claim):not(.dr-btn-claim *):not(svg):not(svg *):not(img)),
body.dark-mode #monthlyPassModal .mp-card *:where(:not(.mp-btn-primary):not(.mp-btn-primary *):not(svg):not(svg *):not(img)),
body.dark-mode #offlineProgressModal .offline-progress-content *:where(:not(.offline-close-btn):not(.offline-close-btn *):not(svg):not(svg *):not(img)) {
    color: #e6eef8 !important;
}

/* 보조 글씨 */
body.dark-mode #dailyRewardModal :is(#dailyRewardHint, #dailyRewardCountdown, .dr-reset, .dr-reset *),
body.dark-mode #monthlyPassModal :is(.mp-label, .mp-legend-text, .mp-weekday, .mp-note, .mp-hint-text, .mp-progress),
body.dark-mode #offlineProgressModal :is(.modal-subtitle, .time-label, .offline-advisor-name, .expand-icon, .offline-item .item-info) {
    color: #b8c6d8 !important;
}

/* 금색 강조 / 의미 색 */
body.dark-mode #monthlyPassModal :is(.mp-kicker, .mp-amount-accent, .mp-gem-mini, .mp-float-reward, .mp-month-label),
body.dark-mode #offlineProgressModal :is(.offline-report-kicker, .item-value.neutral, .offline-summary .label) {
    color: #fcd34d !important;
}

body.dark-mode #offlineProgressModal :is(.item-value.positive, .inline-income, .summary-row .val.positive) { color: #4ade80 !important; }
body.dark-mode #offlineProgressModal :is(.item-value.negative, .inline-expense, .value.negative) { color: #f87171 !important; }
body.dark-mode #monthlyPassModal .mp-weekday.sun { color: #fca5a5 !important; }
body.dark-mode #monthlyPassModal .mp-weekday.sat { color: #93c5fd !important; }

/* 연속 출석 알약(초록)과 오늘 칸 배지(파랑): 흰 글씨 유지 */
body.dark-mode #dailyRewardModal#dailyRewardModal :is(#dailyRewardStreak, #dailyRewardStreak *, #dailyRewardGrid > div > div[style*="#2563EB"]) {
    color: #ffffff !important;
}

#dailyRewardModal #dailyRewardStreak {
    border-radius: calc(8px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 2px #14692f, inset 0 -3px 0 rgba(0, 0, 0, 0.18) !important;
}

/* 초록/파랑 알약 위 글씨는 흰색 — 위의 일괄 밝은 글씨 규칙(:not() 포함)보다 세게 ID 2회 */
body.dark-mode #offlineProgressModal#offlineProgressModal :is(.offline-report-status, .offline-report-status *),
body.dark-mode #monthlyPassModal#monthlyPassModal :is(.mp-active-badge, .mp-active-badge *, .mp-today-tag, .mp-today-tag *) {
    color: #ffffff !important;
}

/* 화이트 모드: 크림 위에서 옅던 보조 글씨(대비 2.1~2.9)를 같은 색상의 진한 톤으로 */
body:not(.dark-mode) #offlineProgressModal .offline-advisor-name { color: #7a6334; }
body:not(.dark-mode) #offlineProgressModal .offline-report-kicker { color: #9a5f00; }
body:not(.dark-mode) #offlineProgressModal .offline-progress-header .modal-subtitle { color: #7a6a40; }
body:not(.dark-mode) #dailyRewardModal .dr-reset [data-i18n="dailyReward.resetIn"] { color: #7a6a40 !important; }
body:not(.dark-mode) #monthlyPassModal .mp-kicker { color: #9a5f00; }
body:not(.dark-mode) #offlineProgressModal .offline-summary :is(.value.positive, .val.positive) { color: #15803d; }
body:not(.dark-mode) #monthlyPassModal :is(.mp-legend-text, .mp-label) { color: #7a6a40; }
body:not(.dark-mode) #monthlyPassModal .mp-note { color: #857547; }

/* 안쪽 판/칸 */
body.dark-mode #dailyRewardModal #dailyRewardGrid > div {
    background: linear-gradient(180deg, #2d5079, #213f60) !important;
    border-color: #0b1a2e !important;
}

body.dark-mode #dailyRewardModal #dailyRewardGrid > div[style*="#3D7BFF"] {
    background: linear-gradient(180deg, #2f5f9e, #23497a) !important;
    border-color: #60a5fa !important;
}

body.dark-mode #monthlyPassModal :is(.mp-reward-strip, .mp-future, .mp-claimed),
body.dark-mode #offlineProgressModal :is(.offline-section, .offline-time-merged, .offline-advisor-bubble) {
    background: linear-gradient(180deg, #2d5079, #213f60) !important;
    border-color: #0b1a2e !important;
}

/* 말풍선 꼬리(::after는 :is() 안에 쓸 수 없어 따로) */
body.dark-mode #offlineProgressModal .offline-advisor-bubble::after {
    background: #2a4b72 !important;
    border-color: #0b1a2e !important;
}

body.dark-mode #monthlyPassModal :is(.mp-today, .mp-bonus),
body.dark-mode #offlineProgressModal .offline-summary {
    background: linear-gradient(180deg, #4b3a14, #352910) !important;
    border-color: #a07a1f !important;
}

body.dark-mode #offlineProgressModal .offline-section.abandoned {
    background: linear-gradient(180deg, #4a2424, #361818) !important;
    border-color: #7f1d1d !important;
}

/* Construction cards need dark surfaces alongside the modal's light text. */
body.dark-mode #offlineProgressModal #offlineConstructionSection .building-summary-box {
    background: #1c3a5b;
    border-color: #47678b;
}

body.dark-mode #offlineProgressModal #offlineConstructionSection .building-summary-box.upgrade {
    background: #493b20;
    border-color: #8b733d;
}

body.dark-mode #offlineProgressModal #offlineConstructionSection .building-summary-box.public {
    background: #1b4435;
    border-color: #41745a;
}

body.dark-mode #offlineProgressModal #offlineConstructionSection .building-summary-box:hover {
    border-color: #93c5fd;
}

body.dark-mode #offlineProgressModal #offlineConstructionSection .bsb-count { color: #93c5fd !important; }
body.dark-mode #offlineProgressModal #offlineConstructionSection .upgrade .bsb-count { color: #fcd34d !important; }
body.dark-mode #offlineProgressModal #offlineConstructionSection .public .bsb-count { color: #86efac !important; }

body.dark-mode #offlineProgressModal .offline-advisor-side {
    background: linear-gradient(180deg, #1d4269, #142f4d) !important;
}

body.dark-mode #offlineProgressModal .offline-section .section-header.collapsible:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

body.dark-mode :is(#dailyRewardModal .dr-close, #monthlyPassModal .mp-close, #monthlyPassModal .mp-btn-secondary, #offlineProgressModal .offline-report-close) {
    background: linear-gradient(180deg, #34587f, #26476b) !important;
    border-color: #0b1a2e !important;
}

body.dark-mode :is(#dailyRewardModal .dr-close, #monthlyPassModal .mp-close, #offlineProgressModal .offline-report-close) svg path {
    stroke: #e6eef8;
}

body.dark-mode #dailyRewardModal .dr-mascot,
body.dark-mode #monthlyPassModal .mp-mascot {
    border-color: #1f3f63 !important;
}

body.dark-mode #dailyRewardModal .dr-watermark,
body.dark-mode #monthlyPassModal .mp-watermark {
    color: rgba(255, 255, 255, 0.05) !important;
}

/* ---------- 파산 경고 / 파산 선택 모달: 남색 판(양 모드) + 경고 테두리 ---------- */
.bk-modal-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.bk-modal-overlay .bk-modal {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0 24%, transparent 24.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
    border-radius: calc(10px * var(--ui-scale));
    color: #e6eef8;
}

.bk-modal-overlay .bk-modal.bk-modal-warning { box-shadow: inset 0 -5px 0 rgba(5, 13, 24, 0.45), 0 5px 0 #8a5a00, 0 0 40px rgba(245, 158, 11, 0.3); }
.bk-modal-overlay .bk-modal.bk-modal-failed { box-shadow: inset 0 -5px 0 rgba(5, 13, 24, 0.45), 0 5px 0 #7f1414, 0 0 50px rgba(220, 38, 38, 0.35); }
.bk-modal-overlay .bk-modal .bk-modal-desc { color: #cbd5e1; }

.bk-modal-overlay .bk-modal-btn-primary {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    color: #4a2b00;
    box-shadow: inset 0 0 0 2px #9a6a00, inset 0 -4px 0 var(--lp-yellow-lip);
}

.bk-modal-overlay .bk-modal-option {
    background: linear-gradient(180deg, #2d5079, #213f60);
    border-color: #0b1a2e;
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 -3px 0 rgba(5, 13, 24, 0.5);
}

.bk-modal-overlay .bk-opt-sub { color: #b8c6d8; }

/* ---------- 확인창(confirm-dialog): 화이트/다크 판 전환 ---------- */
.confirm-overlay .confirm-dialog {
    background:
        linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo));
    border-color: var(--lp-dialog-frame);
    border-radius: calc(8px * var(--ui-scale));
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(20px * var(--ui-scale)) calc(50px * var(--ui-scale)) rgba(0, 0, 0, 0.4);
}

.confirm-overlay .confirm-dialog .confirm-title { color: var(--lp-dialog-title); }
.confirm-overlay .confirm-dialog .confirm-message { color: var(--lp-dialog-msg); }

.confirm-overlay .confirm-dialog .confirm-btn.cancel {
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    color: var(--lp-text);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

.confirm-overlay .confirm-dialog .confirm-btn.confirm {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.22) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #ef4444, #c81e1e);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px #7f1414, inset 0 calc(-3px * var(--ui-scale)) 0 #7f1414;
}

/* 비싼 건물 철거 확인의 숫자 타일 (MSG #50042): 타일 판 + 손실은 빨강, 환급은 초록 */
.confirm-overlay .confirm-dialog .confirm-tile {
    background:
        linear-gradient(112deg, var(--lp-tile-facet) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

.confirm-overlay .confirm-dialog .confirm-tile.loss .confirm-tile-value { color: var(--lp-rate-neg); }
.confirm-overlay .confirm-dialog .confirm-tile.gain .confirm-tile-value { color: var(--lp-rate-pos); }

/* ---------- GPU 설정 안내: 남색 판 ---------- */
#gpuSetupPrompt#gpuSetupPrompt {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.06) 0 26%, transparent 26.2%),
        linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
    border-color: var(--lp-dpanel-frame);
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 -4px 0 rgba(5, 13, 24, 0.45), 0 4px 0 var(--lp-dpanel-edge), 0 14px 30px var(--lp-panel-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-download {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    color: #4a2b00;
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 2px #9a6a00, inset 0 -3px 0 var(--lp-yellow-lip);
}

#gpuSetupPrompt#gpuSetupPrompt :is(.gpu-setup-prompt-later, .gpu-setup-prompt-manual) {
    background: linear-gradient(180deg, #34587f, #26476b);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px #0b1a2e, inset 0 -3px 0 rgba(5, 13, 24, 0.5);
    color: #e6eef8;
}

/* =====================================================================
   시청 패널: 통계 카드 그리드 (pop-stat-grid/pop-stat-card 원본 CSS가 없어 아이콘·라벨·값이
   한 줄씩 세로로 쌓이던 것 → 한눈에 보이게. 총 인구 = 큰 가로 카드, 주거 건물·평균 = 2열 카드)
   ===================================================================== */
#cityHallPanel .pop-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(8px * var(--ui-scale));
    margin-bottom: calc(10px * var(--ui-scale));
}

#cityHallPanel .pop-stat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: calc(8px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.08) 0 30%, transparent 30.3%),
        linear-gradient(180deg, #2d5079, #213f60);
    border: 1px solid #0b1a2e;
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(5, 13, 24, 0.5);
    min-width: 0;
}

#cityHallPanel .pop-stat-card.full-width {
    grid-column: 1 / -1;
    padding: calc(10px * var(--ui-scale)) calc(12px * var(--ui-scale));
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0 30%, transparent 30.3%),
        linear-gradient(180deg, #a07a1f, #6f5412);
    border-color: #3d2e0a;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(40, 25, 0, 0.45);
}

#cityHallPanel .pop-stat-card .stat-icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: calc(34px * var(--ui-scale));
    height: calc(34px * var(--ui-scale));
    font-size: var(--font-lg);
    border-radius: calc(6px * var(--ui-scale));
    background: rgba(5, 13, 24, 0.3);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

#cityHallPanel .pop-stat-card.full-width .stat-icon {
    width: calc(42px * var(--ui-scale));
    height: calc(42px * var(--ui-scale));
    font-size: var(--font-xl, var(--font-lg));
}

#cityHallPanel .pop-stat-card .stat-label {
    font-size: var(--font-xs);
    font-weight: 700;
    color: #b8c6d8;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cityHallPanel .pop-stat-card .stat-value {
    font-size: var(--font-lg);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#cityHallPanel .pop-stat-card.full-width .stat-label { color: #fde9b0; }

#cityHallPanel .pop-stat-card.full-width .stat-value {
    font-size: calc(var(--font-lg) * 1.35);
    color: #ffffff;
    text-shadow: 0 calc(2px * var(--ui-scale)) 0 rgba(40, 25, 0, 0.5);
}

/* 유지비 줄: 빨간 띠 블록 */
#cityHallPanel .panel-content > div:has(> #cityHallMaintenance) {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.1)) !important;
    border: 1px solid rgba(248, 113, 113, 0.35) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
}

#cityHallPanel .panel-content > div:has(> #cityHallMaintenance) > span:first-child { color: #e6eef8 !important; font-weight: 700; }
#cityHallPanel #cityHallMaintenance { color: #fca5a5 !important; }

/* 레벨 섹션: 보라 테두리 → 남색 블록 + 보라 강조 */
#cityHallPanel #upgradePointsSection {
    background: linear-gradient(180deg, rgba(88, 52, 160, 0.35), rgba(60, 35, 120, 0.3)) !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
    border-radius: calc(8px * var(--ui-scale)) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(30, 10, 60, 0.4);
}

#cityHallPanel #btnCityHallAddon {
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 1px #0b1a2e, inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #3f6f9c, #2b5683) !important;
}

@media (prefers-reduced-motion: reduce) {
    #topBar#topBar .top-btn:hover,
    #bottomBar#bottomBar .tool-btn:hover:not(.active),
    #bottomBar#bottomBar .demolish-btn:hover,
    #subMenu#subMenu .submenu-item:hover,
    .sidebar-btn:hover {
        transform: none;
    }
}

/* =====================================================================
   상단 바 버튼 팝업: 일일 퀘스트 / 업적 / 설정 / 소셜 메뉴 / 채팅·친구
   ---------------------------------------------------------------------
   - 화이트 모드 = 흰 판, 다크 모드 = 남색 판 (ui-modal과 같은 --lp-dialog-* 판).
   - 일일 퀘스트·업적은 인라인 style(JS 생성 행 포함)로 색이 들어가 있어 !important로 덮는다.
   - 크기 유지: 원본 border 두께는 그대로 두고, 두꺼워 보이는 테두리는 box-shadow 링으로만 낸다.
     (앞 절 어두운 판 공통 규칙이 업적/설정 판에 넣던 2px 테두리·3px 헤더 밑줄도 원래 두께로 되돌림)
   - 앞 절 공통 규칙이 :is(#id > div …) 두 번이라 (2,0,2) → 여기 판 규칙은 ID 3번으로 이긴다.
   ===================================================================== */
:root {
    --lp-pt-row-hi: #ffffff;
    --lp-pt-row-lo: #eef4fa;
    --lp-pt-row-line: #b9c9da;
    --lp-pt-row-lip: #c9d7e6;
    --lp-pt-head-hi: #f6f9fd;
    --lp-pt-head-lo: #dfe9f4;
    --lp-pt-sub: #475569;
    --lp-pt-mute: #64748b;
    --lp-pt-track: #d3deea;
    --lp-pt-value: #1d4ed8;
    --lp-pt-ok: #15803d;
    --lp-pt-ok-bg: #dcfce7;
    --lp-pt-ok-line: #86efac;
    --lp-pt-gold: #b45309;
    --lp-pt-gem: #7e22ce;
    --lp-pt-input: #ffffff;
    --lp-pt-input-line: #9fb2c7;
    --lp-pt-off-bg: #e2e8f0;
    --lp-pt-off-text: #5b6b80;
    --lp-pt-done-hi: #f8f3ff; --lp-pt-done-lo: #ece2fd; --lp-pt-done-line: #c4a7f5;
    --lp-pt-ready-hi: #fffaeb; --lp-pt-ready-lo: #fdebb6; --lp-pt-ready-line: #e0b04a;
}

body.dark-mode {
    --lp-pt-row-hi: #2a5078;
    --lp-pt-row-lo: #1c3a5b;
    --lp-pt-row-line: #0b1a2e;
    --lp-pt-row-lip: #0f2238;
    --lp-pt-head-hi: #2b5683;
    --lp-pt-head-lo: #1d4269;
    --lp-pt-sub: #b8c6d8;
    --lp-pt-mute: #9fb0c6;
    --lp-pt-track: #0d1f33;
    --lp-pt-value: #93c5fd;
    --lp-pt-ok: #86efac;
    --lp-pt-ok-bg: rgba(34, 197, 94, 0.18);
    --lp-pt-ok-line: rgba(134, 239, 172, 0.4);
    --lp-pt-gold: #fcd34d;
    --lp-pt-gem: #d8b4fe;
    --lp-pt-input: #0d1f33;
    --lp-pt-input-line: #2c4d70;
    --lp-pt-off-bg: #15304d;
    --lp-pt-off-text: #9fb0c6;
    --lp-pt-done-hi: #3a3470; --lp-pt-done-lo: #2a2656; --lp-pt-done-line: #7c5bd6;
    --lp-pt-ready-hi: #5e4a24; --lp-pt-ready-lo: #403118; --lp-pt-ready-line: #c9962e;
}

/* ---------- 판 공통 ---------- */
#dailyQuestModal#dailyQuestModal#dailyQuestModal > div,
#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel {
    background:
        linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(250deg, var(--lp-dialog-facet) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo)) !important;
    border-color: var(--lp-dialog-frame) !important;
    border-radius: calc(8px * var(--ui-scale)) !important;
    color: var(--lp-dialog-title) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 일일 퀘스트 판: 원래 2px 테두리 유지 */
#dailyQuestModal#dailyQuestModal#dailyQuestModal > div {
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(20px * var(--ui-scale)) calc(50px * var(--ui-scale)) rgba(0, 0, 0, 0.4) !important;
}

/* 설정 판은 원래 1px → 1px 유지 + 바깥 링 1px */
#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel {
    border-width: 1px;
    box-shadow:
        0 0 0 1px var(--lp-dialog-frame),
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(5px * var(--ui-scale)) 0 1px var(--lp-dialog-edge),
        0 calc(20px * var(--ui-scale)) calc(50px * var(--ui-scale)) var(--lp-panel-shadow);
}

#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel { --lp-accent: #60a5fa; }

/* 헤더 띠 (업적/설정): 밝은 띠 + 강조색 밑줄은 inset으로 (두께 1px 유지) */
#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .panel-header {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.16) 0 36%, transparent 36.3%),
        linear-gradient(290deg, rgba(0, 0, 0, 0.05) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-pt-head-hi), var(--lp-pt-head-lo)) !important;
    border-bottom: 1px solid var(--lp-dialog-frame) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-accent);
}

#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .panel-title { color: var(--lp-dialog-title); }

/* 닫기: 블록 타일 → hover 빨간 블록 */
#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .panel-close {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo)) !important;
    border-radius: calc(4px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text) !important;
}

#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .panel-close:hover {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.2) 0 40%, transparent 40.5%),
        linear-gradient(180deg, #ef4444, #c81e1e) !important;
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 #7f1414;
    color: #fff !important;
}

#dailyQuestModal#dailyQuestModal #btnDailyQuestClose {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo)) !important;
    border-color: var(--lp-tile-line) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text) !important;
}

#dailyQuestModal#dailyQuestModal #btnDailyQuestClose:hover {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo)) !important;
}

/* 노란 블록 (일일 퀘스트 보상 받기) */
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > button {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo)) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 1px #9a6a00, inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip) !important;
    color: #4a2b00 !important;
}

#dailyQuestModal#dailyQuestModal #dailyQuestList > div > button:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#dailyQuestModal#dailyQuestModal #dailyQuestList > div > button:disabled {
    filter: grayscale(0.6);
    opacity: 0.7;
}

/* ---------- 일일 퀘스트 ---------- */
#dailyQuestModal#dailyQuestModal > div > div:first-child > div:nth-child(2) { color: var(--lp-dialog-title) !important; }
#dailyQuestModal#dailyQuestModal > div > div:first-child > div:nth-child(3) { color: var(--lp-pt-sub) !important; }

#dailyQuestModal#dailyQuestModal #dailyQuestList > div {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-pt-row-hi), var(--lp-pt-row-lo)) !important;
    border-color: var(--lp-pt-row-line) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-pt-row-lip);
    color: var(--lp-dialog-title);
}

#dailyQuestModal#dailyQuestModal #dailyQuestList > div > div:first-child > span:last-child { color: var(--lp-pt-gem) !important; }
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > div:nth-child(2) > div:first-child {
    background: var(--lp-pt-track) !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.18);
}
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > div:nth-child(2) > span { color: var(--lp-pt-sub) !important; }
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > div:nth-child(3) { color: var(--lp-pt-ok) !important; }
/* v2 퀘스트는 진행 설명 문단(p)이 셋째 자식이라 인라인 #cbd5e1이 흰 판에서 안 보이고, 수령 완료 표시는 넷째로 밀린다 */
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > p { color: var(--lp-pt-sub) !important; }
#dailyQuestModal#dailyQuestModal #dailyQuestList > div > p + div { color: var(--lp-pt-ok) !important; }

/* ---------- 업적 ----------
   도시 성장 보상 창(city-rank-rewards.js)과 같은 양식: 파란 머리띠, 블록 타일 카드, 마름모 단계 점,
   블록 진행 막대, 노란 받기 블록. 뼈대(크기·배치)는 city.html, 여기는 색과 면 분할만. */
#achievementModal#achievementModal .ach-frame {
    background:
        linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(250deg, var(--lp-dialog-facet) 0 22%, transparent 22.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo));
    border: 2px solid var(--lp-dialog-frame);
    border-radius: calc(8px * var(--ach-u));
    box-shadow:
        inset 0 calc(-4px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(5px * var(--ui-scale)) 0 var(--lp-dialog-edge),
        0 calc(20px * var(--ui-scale)) calc(50px * var(--ui-scale)) rgba(0, 0, 0, 0.4);
    color: var(--lp-dialog-title);
}

#achievementModal#achievementModal .ach-header {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.16) 0 34%, transparent 34.3%),
        linear-gradient(290deg, rgba(0, 0, 0, 0.1) 0 22%, transparent 22.3%),
        linear-gradient(180deg, #3b82f6, #2563eb);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #1e40af;
    color: #ffffff;
}

#achievementModal#achievementModal .ach-title { color: #ffffff; text-shadow: 0 2px 0 rgba(30, 64, 175, 0.6); }

#achievementModal#achievementModal .ach-hero {
    background:
        linear-gradient(300deg, rgba(20, 47, 77, 0.07) 0 30%, transparent 30.5%),
        linear-gradient(180deg, #ffffff, #e4eef8);
    box-shadow: inset 0 0 0 1px #7d96b2, inset 0 -3px 0 #a9bdd3, 0 0 0 3px rgba(255, 221, 85, 0.6);
}

#achievementModal#achievementModal .ach-chip {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

#achievementModal#achievementModal .ach-chip.is-ready {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 0 0 1px #9a6a00, inset 0 -2px 0 var(--lp-yellow-lip);
    color: #4a2b00;
}

/* 닫기: 블록 타일 → hover 빨간 블록 */
#achievementModal#achievementModal .ach-close {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#achievementModal#achievementModal .ach-close:hover {
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.2) 0 40%, transparent 40.5%),
        linear-gradient(180deg, #ef4444, #c81e1e);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #7f1414;
    color: #ffffff;
}

/* 카드: 진행 중 = 흰 블록, 받기 가능 = 금빛 블록 + 빛 훑기, 전체 완료 = 보라 블록 */
#achievementModal#achievementModal .ach-item {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-pt-row-hi), var(--lp-pt-row-lo));
    border-color: var(--lp-pt-row-line);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-pt-row-lip), 0 calc(2px * var(--ui-scale)) 0 rgba(11, 26, 46, 0.18);
    overflow: hidden;
}

#achievementModal#achievementModal .ach-item.completed {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-pt-done-hi), var(--lp-pt-done-lo));
    border-color: var(--lp-pt-done-line);
}

#achievementModal#achievementModal .ach-item.unlocked-unclaimed {
    background:
        linear-gradient(300deg, rgba(255, 255, 255, 0.18) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-pt-ready-hi), var(--lp-pt-ready-lo));
    border-color: var(--lp-pt-ready-line);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-pt-ready-line), 0 0 calc(14px * var(--ui-scale)) rgba(246, 181, 25, 0.35);
}

#achievementModal#achievementModal .ach-item.unlocked-unclaimed::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 0 40%, rgba(255, 255, 255, 0.45) 48%, transparent 56% 100%);
    transform: translateX(-120%);
    animation: achShine 3.2s ease-in-out infinite;
}

@keyframes achShine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes achBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-3px * var(--ui-scale))); } }
@keyframes achPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 181, 25, 0.7); } 50% { box-shadow: 0 0 0 calc(4px * var(--ui-scale)) rgba(246, 181, 25, 0); } }

#achievementModal#achievementModal .ach-icon {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
}

#achievementModal#achievementModal .ach-item.unlocked-unclaimed .ach-icon {
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip), 0 0 0 calc(2px * var(--ui-scale)) var(--lp-yellow-hi);
    animation: achBob 1.6s ease-in-out infinite;
}

#achievementModal#achievementModal .ach-item.locked .ach-icon > .ach-emoji { filter: grayscale(0.85); opacity: 0.6; }

#achievementModal#achievementModal .ach-icon-badge { background: #ef4444; box-shadow: 0 0 0 2px #ffffff; color: #ffffff; }
#achievementModal#achievementModal .ach-item.completed .ach-icon-badge { background: #16a34a; }

#achievementModal#achievementModal .ach-item .ach-name { color: var(--lp-dialog-title); }
#achievementModal#achievementModal .ach-item.locked .ach-name { color: var(--lp-dialog-title); }
#achievementModal#achievementModal .ach-item .ach-desc { color: var(--lp-pt-sub); }

/* 단계 점(마름모): 빈 칸 / 받은 단계 금색 / 지금 받을 단계 깜빡임 */
#achievementModal#achievementModal .ach-pip {
    background: var(--lp-pt-track);
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line);
}

#achievementModal#achievementModal .ach-pip.is-claimed {
    background: linear-gradient(135deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 0 0 1px #9a6a00;
}

#achievementModal#achievementModal .ach-item.completed .ach-pip.is-claimed {
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    box-shadow: inset 0 0 0 1px #4c1d95;
}

#achievementModal#achievementModal .ach-pip.is-ready {
    background: linear-gradient(135deg, #ffffff, var(--lp-yellow-hi));
    box-shadow: inset 0 0 0 1px #9a6a00;
    animation: achPulse 1.4s ease-in-out infinite;
}

#achievementModal#achievementModal .ach-reward {
    background: rgba(168, 85, 247, 0.12);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4);
    color: var(--lp-pt-gem);
}

/* 진행 막대: 홈 파인 길 + 면 분할 채움. 받기 가능 = 노랑, 전체 완료 = 초록 */
#achievementModal#achievementModal .ach-progress {
    background: var(--lp-pt-track);
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line), inset 0 2px 2px rgba(0, 0, 0, 0.18);
}

#achievementModal#achievementModal .ach-progress-fill {
    background:
        repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.18) 0 8px, transparent 8px 16px),
        linear-gradient(180deg, #60a5fa, #2563eb);
    box-shadow: inset 0 -3px 0 rgba(30, 64, 175, 0.55);
}

#achievementModal#achievementModal .ach-item.unlocked-unclaimed .ach-progress-fill {
    background:
        repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.3) 0 8px, transparent 8px 16px),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 -3px 0 var(--lp-yellow-lip);
}

#achievementModal#achievementModal .ach-item.completed .ach-progress-fill {
    background:
        repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.2) 0 8px, transparent 8px 16px),
        linear-gradient(180deg, #4ade80, #16a34a);
    box-shadow: inset 0 -3px 0 rgba(20, 83, 45, 0.5);
}

#achievementModal#achievementModal .ach-progress-label { color: var(--lp-pt-sub); }
#achievementModal#achievementModal .ach-progress-label strong { color: var(--lp-dialog-title); }

/* Staged achievement details also need the active panel theme. The title color
   stays readable on the brighter facet of claimable cards in both modes. */
#achievementModal#achievementModal .ach-item .ach-stage,
#achievementModal#achievementModal .ach-item .ach-history summary,
#achievementModal#achievementModal .ach-item .ach-next,
#achievementModal#achievementModal .ach-item .ach-history li span {
    color: var(--lp-dialog-title);
}

/* 노란 받기 블록 / 잠긴 회색 블록 / 완료 초록 띠 */
#achievementModal#achievementModal .ach-item .ach-claim-btn:not(:disabled) {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 0 0 1px #9a6a00, inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip), 0 calc(2px * var(--ui-scale)) 0 rgba(120, 70, 0, 0.35);
    color: #4a2b00;
}

#achievementModal#achievementModal .ach-item .ach-claim-btn:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
#achievementModal#achievementModal .ach-item .ach-claim-btn:not(:disabled):active { transform: translateY(1px); box-shadow: inset 0 0 0 1px #9a6a00, inset 0 calc(-1px * var(--ui-scale)) 0 var(--lp-yellow-lip); }

#achievementModal#achievementModal .ach-item .ach-claim-btn:disabled {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        var(--lp-pt-off-bg);
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-pt-row-lip);
    color: var(--lp-pt-off-text);
}

#achievementModal#achievementModal .ach-list > .ach-claim-btn {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#achievementModal#achievementModal .ach-item .ach-claimed-tag {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.22) 0 34%, transparent 34.5%),
        var(--lp-pt-ok-bg);
    box-shadow: inset 0 0 0 1px var(--lp-pt-ok-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-pt-ok-line);
    color: var(--lp-pt-ok);
}

#achievementModal#achievementModal .ach-history > summary {
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line), inset 0 -2px 0 var(--lp-pt-row-lip);
}

#achievementModal#achievementModal .ach-history li {
    background: var(--lp-tile-facet);
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line);
}

#achievementModal#achievementModal .ach-history li.is-claimed { box-shadow: inset 0 0 0 1px var(--lp-pt-ok-line); }
#achievementModal#achievementModal .ach-history li.is-ready { box-shadow: inset 0 0 0 1px var(--lp-pt-ready-line); }
#achievementModal#achievementModal .ach-item .ach-history li span.ach-h-gems { color: var(--lp-pt-gem); }

/* ---------- 설정 ---------- */
#cameraSettingsPanel#cameraSettingsPanel .settings-tab {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#cameraSettingsPanel#cameraSettingsPanel .settings-tab:hover:not(.active) {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
}

/* 선택 탭 = 노란 블록 (하단 바 선택 도구와 같은 색) */
#cameraSettingsPanel#cameraSettingsPanel .settings-tab.active {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    border-color: #9a6a00;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
    color: #4a2b00;
}

#cameraSettingsPanel#cameraSettingsPanel .settings-section-title { color: var(--lp-dialog-title); }
#cameraSettingsPanel#cameraSettingsPanel .settings-control-hint { color: var(--lp-pt-sub); }
#cameraSettingsPanel#cameraSettingsPanel .camera-setting-label .name { color: var(--lp-dialog-msg); }
#cameraSettingsPanel#cameraSettingsPanel .camera-setting-label .value { color: var(--lp-pt-value); }
#cameraSettingsPanel#cameraSettingsPanel .settings-checkbox { color: var(--lp-dialog-title); }
#cameraSettingsPanel#cameraSettingsPanel .settings-checkbox input { accent-color: #2563eb; }
#cameraSettingsPanel#cameraSettingsPanel .camera-settings-divider { background: var(--lp-divider); }

#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider {
    background: var(--lp-pt-track);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
}

#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider::-webkit-slider-thumb {
    background: linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: 0 0 0 1px #9a6a00, inset 0 -2px 0 var(--lp-yellow-lip), 0 2px 4px rgba(0, 0, 0, 0.25);
}

#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider::-moz-range-thumb {
    background: linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: 0 0 0 1px #9a6a00, 0 2px 4px rgba(0, 0, 0, 0.25);
}

#cameraSettingsPanel#cameraSettingsPanel .settings-select {
    background-color: var(--lp-pt-input);
    border-color: var(--lp-pt-input-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.08);
    color: var(--lp-dialog-title);
}

#cameraSettingsPanel#cameraSettingsPanel .settings-select option {
    background: var(--lp-pt-input);
    color: var(--lp-dialog-title);
}

#cameraSettingsPanel#cameraSettingsPanel :is(.camera-reset-btn, .settings-action-btn) {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#cameraSettingsPanel#cameraSettingsPanel :is(.camera-reset-btn, .settings-action-btn):hover {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
    border-color: var(--lp-tile-line);
    color: var(--lp-text);
}

/* ---------- 소셜 메뉴 (친구 / 채팅) ---------- */
#socialMenu#socialMenu {
    background:
        linear-gradient(118deg, var(--lp-dialog-facet) 0 30%, transparent 30.3%),
        linear-gradient(180deg, var(--lp-dialog-hi), var(--lp-dialog-lo));
    border-color: var(--lp-dialog-frame);
    border-radius: calc(6px * var(--ui-scale));
    box-shadow:
        0 0 0 1px var(--lp-dialog-frame),
        inset 0 calc(-3px * var(--ui-scale)) 0 rgba(31, 58, 92, 0.14),
        0 calc(4px * var(--ui-scale)) 0 1px var(--lp-dialog-edge),
        0 calc(12px * var(--ui-scale)) calc(28px * var(--ui-scale)) var(--lp-panel-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#socialMenu#socialMenu .top-social-menu-btn {
    border-radius: calc(4px * var(--ui-scale));
    color: var(--lp-dialog-title);
}

#socialMenu#socialMenu .top-social-menu-btn:hover,
#socialMenu#socialMenu .top-social-menu-btn:focus-visible {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 30%, transparent 30.5%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#socialMenu#socialMenu .top-social-menu-icon {
    height: calc(20px * var(--ui-scale));
    border-radius: calc(4px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 -2px 0 var(--lp-tile-lip);
}

/* ---------- 채팅 / 친구 ---------- */
#cityChatPanel#cityChatPanel .city-chat-header {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.16) 0 34%, transparent 34.3%),
        linear-gradient(290deg, rgba(0, 0, 0, 0.1) 0 22%, transparent 22.3%),
        linear-gradient(180deg, #3b82f6, #2563eb);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #1e40af;
}

#cityChatPanel#cityChatPanel .friend-row {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-pt-row-hi), var(--lp-pt-row-lo));
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-pt-row-lip);
}

#cityChatPanel#cityChatPanel .friend-row:hover,
#cityChatPanel#cityChatPanel .friend-row.active {
    background:
        linear-gradient(300deg, var(--lp-tile-facet) 0 26%, transparent 26.4%),
        linear-gradient(180deg, var(--lp-tile-hover-hi), var(--lp-tile-hover-lo));
}

#cityChatPanel#cityChatPanel .friend-row.active {
    outline: 0;
    box-shadow: inset 0 0 0 1.5px #3b82f6, inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-pt-row-lip);
}

#cityChatPanel#cityChatPanel .friend-mini-btn {
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border-color: var(--lp-tile-line);
    box-shadow: inset 0 -2px 0 var(--lp-tile-lip);
    color: var(--lp-text);
}

#cityChatPanel#cityChatPanel .friend-mini-btn.accept { border-color: #16a34a; color: var(--lp-pt-ok); }
#cityChatPanel#cityChatPanel .friend-mini-btn.decline { color: var(--lp-pt-mute); }

#cityChatPanel#cityChatPanel :is(.friend-username, .friend-sub, .chat-msg .chat-time) { color: var(--lp-pt-mute); }
#cityChatPanel#cityChatPanel .friend-section-label { color: var(--lp-pt-sub); }

#cityChatPanel#cityChatPanel .chat-msg:not(.dev-admin):not(.dev-reward):not(.dev-user) {
    border-radius: calc(6px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px var(--lp-pt-row-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-pt-row-lip);
}

body.dark-mode #cityChatPanel#cityChatPanel .chat-msg:not(.dev-admin):not(.dev-reward):not(.dev-user) {
    background: linear-gradient(180deg, var(--lp-pt-row-hi), var(--lp-pt-row-lo));
}

body.dark-mode #cityChatPanel#cityChatPanel .chat-msg.mine:not(.dev-admin):not(.dev-reward):not(.dev-user),
body.dark-mode #cityChatPanel#cityChatPanel .chat-msg.dev-user {
    background: linear-gradient(180deg, #2f5f99, #234a7a);
}

body.dark-mode #cityChatPanel#cityChatPanel .friend-name { color: #f1f5f9; }
body.dark-mode #cityChatPanel#cityChatPanel .chat-msg .chat-sender { color: #93c5fd; }

/* On overflow, shift the original flat toolbar as one strip. */
#bottomBar#bottomBar.demolition-toolbar-overflow {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-padding-inline: calc(70px * var(--ui-scale));
}
#bottomBar#bottomBar.demolition-toolbar-overflow .bottom-center {
    flex: 0 0 auto !important;
    min-width: max-content;
    overflow: visible !important;
}
#bottomBar#bottomBar.demolition-toolbar-overflow .bottom-tools { display: contents; }
#bottomBar#bottomBar.demolition-toolbar-overflow #btnDemolish {
    position: sticky;
    left: calc(4px * var(--ui-scale));
    right: calc(4px * var(--ui-scale));
    z-index: 12;
    max-height: 100%;
    transition-property: background, border-color, box-shadow, filter, transform;
}

/* =====================================================================
   생산시설(제련소·원유 공장·전자제품 공장) / 무역시설(무역 기지·무역항·화물역) 팝업 + 무역센터 패널: 정보 계층
   ---------------------------------------------------------------------
   같은 굵기의 "라벨 값" 줄이 길게 이어져 핵심(작동 상태·생산량)이 묻히던 것을 4단으로 나눈다.
     1) 상태 배너   : 작동 여부 → 상태색 알약 (색은 JS가 넣는 인라인 color를 currentColor로 재사용)
     2) 핵심 수치   : 생산량/매출/처리량 = 큰 숫자 타일, 소비량 = 작은 투입 타일
     3) 저장량      : 막대 안에 수치를 겹쳐 한 줄로 (아래 숫자 줄 제거 → 팝업 높이 감소)
     4) 운영 정보   : 트럭·유지비·용량·운송량 = 작은 보조 칩, 안내문·우선순위는 맨 아래
   - CSS만: 마크업/JS/i18n 변경 없음. 순서는 grid order로만 바꾼다(DOM·이벤트 그대로).
   - 판은 기존처럼 양 모드 남색 → 색은 판 위 반투명 흰/검정만 써서 두 모드 공통.
   ===================================================================== */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) > :is(.smelter-status, .oil-refinery-status, .electronics-factory-status, .trade-depot-status, .trade-port-status) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(6px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale));
    background: rgba(5, 13, 24, 0.22);
    border-radius: calc(8px * var(--ui-scale));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) > :is(.smelter-status, .oil-refinery-status, .electronics-factory-status, .trade-depot-status, .trade-port-status) > * {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0 !important;
}

/* 기본 줄: 라벨 왼쪽 / 값 오른쪽 (라벨이 길어도 값과 붙지 않게) */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) .popup-row {
    justify-content: space-between;
    gap: calc(8px * var(--ui-scale));
    padding: calc(6px * var(--ui-scale)) calc(8px * var(--ui-scale));
    border-bottom: 0;
    border-radius: calc(6px * var(--ui-scale));
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) .popup-row .label {
    min-width: 0;
    color: #a9b8cc;
}

/* ---------- 1) 상태 배너 ---------- */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .popup-row:has(> .value[id$="Operational"]) {
    order: 1;
    padding: calc(7px * var(--ui-scale)) calc(8px * var(--ui-scale));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .popup-row:has(> .value[id$="Operational"]) .label {
    font-size: var(--font-xs);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .popup-row > .value[id$="Operational"] {
    display: inline-flex;
    align-items: center;
    gap: calc(6px * var(--ui-scale));
    max-width: 70%;
    padding: calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale));
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 16%, rgba(5, 13, 24, 0.5));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent);
    font-size: var(--font-sm);
    font-weight: 800 !important;
    text-align: right;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .popup-row > .value[id$="Operational"]::before {
    content: "";
    flex: 0 0 auto;
    width: calc(7px * var(--ui-scale));
    height: calc(7px * var(--ui-scale));
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 calc(6px * var(--ui-scale)) currentColor;
}

/* ---------- 2) 핵심 수치 타일 ---------- */
/* 생산량·매출·처리량 = 큰 숫자 */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) .popup-row:has(> .value:is([id$="Rate"], #tradeDailyMaxRevenue, #tradePortTripsPerDay, #tradePortExportLast24h, #transportTodayTons, #transportYesterdayTons)) {
    order: 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: calc(2px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
    background:
        linear-gradient(300deg, rgba(0, 0, 0, 0.12) 0 28%, transparent 28.4%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.28);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) .popup-row:has(> .value:is([id$="Rate"], #tradeDailyMaxRevenue, #tradePortTripsPerDay, #tradePortExportLast24h, #transportTodayTons, #transportYesterdayTons)) .label {
    font-size: var(--font-xs);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection, #transportStatusSection) .popup-row > .value:is([id$="Rate"], #tradeDailyMaxRevenue, #tradePortTripsPerDay, #tradePortExportLast24h, #transportTodayTons, #transportYesterdayTons) {
    font-size: var(--font-lg);
    font-weight: 800 !important;
    line-height: 1.15;
}

/* 소비량(투입) = 작은 타일, 2칸씩 */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .popup-row:has(> .value[id$="Consumption"]),
#tradeDepotSection .popup-row:has(#tradeWarehouseCount) {
    order: 3;
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(2px * var(--ui-scale));
    padding: calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale));
    background: rgba(5, 13, 24, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .popup-row:has(> .value[id$="Consumption"]) .label,
#tradeDepotSection .popup-row:has(#tradeWarehouseCount) .label {
    font-size: var(--font-xs);
}

#tradeDepotSection .popup-row:has(#tradeWarehouseCount) { order: 2; }

/* 칸 나누기: 한 개면 전체 폭, 두 개면 반씩 */
#oilRefineryStatusSection .popup-row:has(> .value[id$="Rate"]),
#tradeDepotSection .popup-row:has(> #tradeDailyMaxRevenue),
#tradePortSection .popup-row:has(> .value:is(#tradePortTripsPerDay, #tradePortExportLast24h)),
#transportStatusSection .popup-row:has(> .value:is(#transportTodayTons, #transportYesterdayTons)) {
    grid-column: auto;
}

#oilRefineryStatusSection .popup-row:has(> .value[id$="Consumption"]) { grid-column: 1 / -1; }

/* 어제 운송량은 비교값 → 한 단계 작게 */
#transportStatusSection .popup-row > #transportYesterdayTons { font-size: var(--font-md); }

/* ---------- 3) 저장량: 제목 작은 라벨 + 막대 안에 수치 ---------- */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) :is(.smelter-status, .oil-refinery-status, .electronics-factory-status) > :is(.popup-section-title, .mining-storage-bar-container, div:has(> .mining-storage-bar-container)),
#tradeDepotSection .trade-depot-status > :is(.warehouse-resource-tabs, .add-warehouse-btn, .trade-warehouses, .trade-info) {
    order: 4;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .popup-section-title:has(+ .mining-storage-bar-container) {
    margin: calc(2px * var(--ui-scale)) 0 0 !important;
    padding: 0 calc(2px * var(--ui-scale));
    border-top: 0;
    color: #cbd5e1;
    font-size: var(--font-xs);
    font-weight: 700;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-bar-container {
    position: relative;
    margin: calc(3px * var(--ui-scale)) 0 0 !important;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-bar-bg {
    background: rgba(5, 13, 24, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 2px rgba(0, 0, 0, 0.35);
    border-radius: calc(5px * var(--ui-scale));
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-bar-fill {
    border-radius: calc(5px * var(--ui-scale));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-labels {
    position: absolute;
    inset: 0 calc(8px * var(--ui-scale)) auto auto;
    height: 20px;
    margin: 0;
    line-height: 20px;
    color: #ffffff;
    font-size: var(--font-xs);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

/* 막대 위에 겹친 수치는 채움 색과 상관없이 읽히게 작은 판 위에 */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-labels {
    inset: 2px calc(3px * var(--ui-scale)) auto auto;
    height: 16px;
    padding: 0 calc(5px * var(--ui-scale));
    line-height: 16px;
    border-radius: calc(4px * var(--ui-scale));
    background: rgba(15, 23, 42, 0.82);
    text-shadow: none;
}
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup :is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-labels { background: rgba(255, 255, 255, 0.92) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup :is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-storage-labels > span { color: var(--sc-text) !important; }

/* ---------- 4) 운영 정보: 작은 보조 칩 ---------- */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection) .popup-row:is(:has(.truck-count-btn), :has(> .value:is([id$="TruckMaintenance"], [id$="TruckCapacity"], #tradeShipCapacity, #tradeTrainCapacity))) {
    order: 6;
    padding: calc(5px * var(--ui-scale)) calc(8px * var(--ui-scale));
    background: rgba(5, 13, 24, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection) .popup-row:has(> .value:is([id$="TruckMaintenance"], #tradeShipCapacity, #tradeTrainCapacity)) {
    grid-column: auto;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection) .popup-row:is(:has(.truck-count-btn), :has(> .value:is([id$="TruckMaintenance"], [id$="TruckCapacity"], #tradeShipCapacity, #tradeTrainCapacity))) :is(.label, .value) {
    font-size: var(--font-xs);
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection) .truck-count-btn {
    border-radius: calc(4px * var(--ui-scale)) !important;
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.3);
}

/* 안내문·우선순위·저장고 트럭 = 맨 아래 */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-transport-info { order: 5; }
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) :is(.resource-priority-section, #storageAddonTruckSection) { order: 7; }

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .mining-transport-info {
    padding: calc(6px * var(--ui-scale)) calc(8px * var(--ui-scale)) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    text-align: left !important;
}

:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection) .resource-priority-section .popup-section-title {
    margin: 0 0 calc(6px * var(--ui-scale)) !important;
    padding-top: 0;
    border-top: 0;
    font-size: var(--font-xs);
    color: #cbd5e1;
}

/* 무역 기지 창고 카드 */
#tradeDepotSection .warehouse-item {
    padding: calc(8px * var(--ui-scale));
    border-radius: calc(6px * var(--ui-scale));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.25);
}

#tradeDepotSection .warehouse-item .warehouse-name { font-weight: 800; color: #f1f5f9; }

/* ---------- 무역센터 패널: 레벨 → 매출/유지비 2칸 타일 → 진행 → 해금 ---------- */
#tradeCenterPanel#tradeCenterPanel .panel-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: calc(6px * var(--ui-scale));
    align-content: start;
}

#tradeCenterPanel#tradeCenterPanel .panel-content > * { grid-column: 1 / -1; min-width: 0; }

#tradeCenterPanel#tradeCenterPanel .panel-content > div:is(:has(> #tcExport24h), :has(> #tcMaintenance)) {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: calc(2px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale)) !important;
    border-radius: calc(6px * var(--ui-scale)) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 calc(-3px * var(--ui-scale)) 0 rgba(0, 0, 0, 0.28);
}

#tradeCenterPanel#tradeCenterPanel .panel-content > div:is(:has(> #tcExport24h), :has(> #tcMaintenance)) > span:first-child {
    font-size: var(--font-xs) !important;
    color: #b8c6d8 !important;
}

#tradeCenterPanel#tradeCenterPanel :is(#tcExport24h, #tcMaintenance) {
    font-size: var(--font-lg) !important;
    font-weight: 800 !important;
    line-height: 1.15;
}

#tradeCenterPanel#tradeCenterPanel #tcMaintenance { font-size: var(--font-md) !important; }

#tradeCenterPanel#tradeCenterPanel .panel-content > div:has(> #tcLevel) {
    margin-bottom: calc(8px * var(--ui-scale)) !important;
}

#tradeCenterPanel#tradeCenterPanel #tcLevel {
    display: inline-block;
    padding: calc(3px * var(--ui-scale)) calc(14px * var(--ui-scale));
    border-radius: calc(6px * var(--ui-scale));
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.12));
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.45), inset 0 calc(-2px * var(--ui-scale)) 0 rgba(120, 70, 0, 0.35);
}

/* JS가 넣는 회색(#9ca3af/#6b7280)만 밝게 — 완료 초록·최대 보라는 그대로 */
#tradeCenterPanel#tradeCenterPanel #tcProgressLabel[style*="156, 163, 175"] { color: #cbd5e1 !important; }
/* 해금 목록은 innerHTML 문자열이라 속성에 hex 그대로 남음 */
#tradeCenterPanel#tradeCenterPanel #tcUnlocks span[style*="#9ca3af"] { color: #cbd5e1 !important; }
#tradeCenterPanel#tradeCenterPanel #tcUnlocks span[style*="#6b7280"] { color: #a9b8cc !important; }

/* 주황 블록 위 흰 글씨(대비 2.2) → 진한 갈색 */
#tradeCenterPanel#tradeCenterPanel #tcUpgradeBtn { color: #3b2200 !important; }

/* ---------- 대비 보정 (남색 판 위) ---------- */
/* 상태 알약: JS 인라인 빨강/주황(#ef4444/#f59e0b)은 남색 위 2.9 → 밝은 톤 */
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .value[id$="Operational"][style*="239, 68, 68"] { color: #fca5a5 !important; }
:is(#smelterStatusSection, #oilRefineryStatusSection, #electronicsFactoryStatusSection, #tradeDepotSection, #tradePortSection) .value[id$="Operational"][style*="245, 158, 11"] { color: #fcd34d !important; }

/* 무역 기지: 선택된 수출(주황)/수입(초록) 버튼 흰 글씨 → 진한 글씨, 탭 개수·창고 안내 회색 보정 */
#tradeDepotSection .trade-mode-btn.export.active { color: #3b2200; }
#tradeDepotSection .trade-mode-btn.import.active { color: #052e16; }
#tradeDepotSection .warehouse-resource-tab.active .warehouse-resource-tab-count { background: rgba(5, 13, 24, 0.35); }
#tradeDepotSection .warehouse-info { color: #a9b8cc; }

/* 해금 현황: 체크리스트 카드 */
#tradeCenterPanel#tradeCenterPanel #tcUnlocks {
    padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
    margin-bottom: calc(8px * var(--ui-scale)) !important;
    border-radius: calc(6px * var(--ui-scale));
    background: rgba(5, 13, 24, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

#tradeCenterPanel#tradeCenterPanel .panel-content > div:has(+ #tcUnlocks) {
    color: #cbd5e1 !important;
    font-weight: 700;
}

/* =====================================================================
   월정액(신도시 개발 지원권) 달력 모달: 정보 계층
   ---------------------------------------------------------------------
   기존 순서(상품 설명 → 달력 → 규칙 → 남은 일수·버튼)는 "지금 받을 수 있는지"가 작은 글씨에 묻히고,
   만료여도 초록 배지, 버튼 문구가 카드 밖으로 넘쳤다. CSS grid 영역으로만 재배치(DOM/JS/i18n 그대로).
     1) 상태      : 수령 가능(일분·젬) 큰 카드 + 남은 일수 카드, 다음 보상 카운트다운
     2) 달력      : 월 + 범례 → 요일 → 날짜
     3) 행동      : 확인 / 받기 버튼 한 줄 전체 폭 (받을 게 없으면 받기 버튼은 "완료" 표시로 낮춤)
     4) 상품·규칙 : 일일 젬/총 수령 가능, 적립 규칙, 작은 안내문
   만료 배지는 JS가 바꾸는 data-i18n 값으로 회색 처리.
   ===================================================================== */
#monthlyPassModal#monthlyPassModal .mp-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "header  header"
        "status  reset"
        "next    next"
        "month   legend"
        "week    week"
        "grid    grid"
        "actions actions"
        "strip   strip"
        "hint    hint"
        "note    note";
    column-gap: calc(10px * var(--ui-scale));
    align-items: center;
}

#monthlyPassModal#monthlyPassModal :is(.mp-month-row, .mp-bottom) { display: contents; }

#monthlyPassModal#monthlyPassModal .mp-header { grid-area: header; }
#monthlyPassModal#monthlyPassModal #monthlyPassClaimProgress { grid-area: status; }
#monthlyPassModal#monthlyPassModal .mp-reset { grid-area: reset; }
#monthlyPassModal#monthlyPassModal #monthlyPassNextReward { grid-area: next; }
#monthlyPassModal#monthlyPassModal #monthlyPassCalLabel { grid-area: month; }
#monthlyPassModal#monthlyPassModal .mp-legend { grid-area: legend; }
#monthlyPassModal#monthlyPassModal #monthlyPassWeekdays { grid-area: week; }
#monthlyPassModal#monthlyPassModal #monthlyPassCalGrid { grid-area: grid; }
#monthlyPassModal#monthlyPassModal .mp-actions { grid-area: actions; }
#monthlyPassModal#monthlyPassModal .mp-reward-strip { grid-area: strip; }
#monthlyPassModal#monthlyPassModal .mp-hint { grid-area: hint; }
#monthlyPassModal#monthlyPassModal .mp-note { grid-area: note; }

/* 장식 워터마크는 상태 카드 뒤로 오면 글씨를 흐리게 해서 숨김 */
#monthlyPassModal#monthlyPassModal .mp-watermark { display: none; }

/* 헤더: 상태 배지가 닫기 버튼과 겹치지 않게(닫기 자리만큼 비움) */
#monthlyPassModal#monthlyPassModal .mp-header { padding-right: calc(56px * var(--ui-scale)); }
#monthlyPassModal#monthlyPassModal .mp-active-badge { font-size: var(--font-sm); padding: calc(6px * var(--ui-scale)) calc(12px * var(--ui-scale)); }

/* 만료 배지 = 회색 (초록은 이용 중일 때만) */
#monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) {
    background: linear-gradient(180deg, #eee7d3, #ddd3b8) !important;
    box-shadow: inset 0 0 0 1px #c8bb95, inset 0 calc(-2px * var(--ui-scale)) 0 #c2b48a !important;
}
#monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) :is(span, svg) { color: #5f5232 !important; }
#monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) svg path { stroke: #5f5232; }
#monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) svg circle { fill: #5f5232; fill-opacity: .15; }
body.dark-mode #monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) {
    background: linear-gradient(180deg, #34506f, #253c57) !important;
    box-shadow: inset 0 0 0 1px #0b1a2e, inset 0 calc(-2px * var(--ui-scale)) 0 #0b1a2e !important;
}
body.dark-mode #monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) :is(span, svg) { color: #dbe4ef !important; }
body.dark-mode #monthlyPassModal#monthlyPassModal .mp-active-badge:has(> [data-i18n="shop.monthly.expiredAccrual"]) svg path { stroke: #dbe4ef; }

/* ---------- 1) 상태: 수령 가능 카드 + 남은 일수 카드 ---------- */
#monthlyPassModal#monthlyPassModal #monthlyPassClaimProgress,
#monthlyPassModal#monthlyPassModal .mp-reset {
    align-self: stretch;
    margin: var(--spacing-lg) 0 0;
    box-sizing: border-box;
    border-radius: calc(10px * var(--ui-scale));
}

#monthlyPassModal#monthlyPassModal #monthlyPassClaimProgress {
    display: flex;
    align-items: center;
    padding: calc(12px * var(--ui-scale)) calc(14px * var(--ui-scale));
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.5) 0 34%, transparent 34.4%),
        linear-gradient(180deg, #fff3cf, #ffe3a1);
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #e8b84a, inset 0 calc(-3px * var(--ui-scale)) 0 #e0a733;
    color: #6b3f00;
    font-size: var(--font-lg);
    font-weight: 900;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

#monthlyPassModal#monthlyPassModal .mp-reset {
    margin-left: 0;
    padding: calc(8px * var(--ui-scale)) calc(12px * var(--ui-scale));
    background: #fffdf3;
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #eadfba, inset 0 calc(-3px * var(--ui-scale)) 0 #e6d9ad;
    max-width: calc(220px * var(--ui-scale));
}

#monthlyPassModal#monthlyPassModal .mp-reset #monthlyPassRemaining { white-space: normal; overflow-wrap: anywhere; }

#monthlyPassModal#monthlyPassModal #monthlyPassNextReward {
    padding: calc(6px * var(--ui-scale)) calc(2px * var(--ui-scale)) 0 !important;
    text-align: left !important;
    font-size: var(--font-sm);
    font-weight: 700;
    color: #6b5a3a !important;
}

body.dark-mode #monthlyPassModal#monthlyPassModal #monthlyPassClaimProgress {
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.08) 0 34%, transparent 34.4%),
        linear-gradient(180deg, #5e4a24, #403118);
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #c9962e, inset 0 calc(-3px * var(--ui-scale)) 0 #2a1e0b;
    color: #fde68a !important;
}

body.dark-mode #monthlyPassModal#monthlyPassModal .mp-reset {
    background: linear-gradient(180deg, #24486f, #1a3657);
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #0b1a2e, inset 0 calc(-3px * var(--ui-scale)) 0 #0b1a2e;
}

body.dark-mode #monthlyPassModal#monthlyPassModal #monthlyPassNextReward { color: #cbd5e1 !important; }

/* ---------- 2) 달력 ---------- */
#monthlyPassModal#monthlyPassModal #monthlyPassCalLabel,
#monthlyPassModal#monthlyPassModal .mp-legend {
    margin-top: var(--spacing-lg);
}

#monthlyPassModal#monthlyPassModal .mp-legend { margin-left: 0; justify-self: end; }

/* 화이트 모드 요일·수령 완료 날짜 숫자가 2.1~2.5 대비로 흐렸음 */
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal .mp-weekday { color: #7a6a40; }
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal .mp-weekday.sun { color: #b4412f; }
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal .mp-weekday.sat { color: #2f5ea8; }
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal .mp-claimed { color: #8a7a4c; }

/* 오늘 태그: 주황 위 흰 글씨(2.5) → 진한 갈색 */
#monthlyPassModal#monthlyPassModal .mp-today-tag,
body.dark-mode #monthlyPassModal#monthlyPassModal#monthlyPassModal :is(.mp-today-tag, .mp-today-tag *) { color: #4a2b00 !important; }

/* ---------- 3) 행동: 한 줄 전체 폭, 받기 버튼이 남은 폭을 채움 ---------- */
#monthlyPassModal#monthlyPassModal .mp-actions {
    margin: var(--spacing-lg) 0 0;
    padding-top: var(--spacing-md);
    border-top: calc(1.5px * var(--ui-scale)) solid rgba(160, 130, 50, 0.16);
    width: auto;
    min-width: 0;
}

#monthlyPassModal#monthlyPassModal .mp-btn-primary {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

/* 긴 문구(예: "적립된 보상을 모두 받았습니다")는 잘리지 않고 두 줄로 */
#monthlyPassModal#monthlyPassModal .mp-btn-primary { white-space: normal; }
#monthlyPassModal#monthlyPassModal #monthlyPassClaimLabel {
    min-width: 0;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* 받을 보상이 없으면 "완료" 상태 표시: 눌러야 하는 버튼처럼 보이지 않게 낮춤 */
#monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled {
    background: linear-gradient(180deg, #e9f7ec, #d6efdc) !important;
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #9fd3ad !important;
    color: #1f6b38 !important;
    animation: none;
    transform: none;
}

#monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled :is(span, div) { color: #1f6b38 !important; }
#monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled img { opacity: 0.7; }

body.dark-mode #monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled {
    background: linear-gradient(180deg, #1f4d3a, #173b2d) !important;
    box-shadow: inset 0 0 0 calc(1.5px * var(--ui-scale)) #2f7a52 !important;
}

body.dark-mode #monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled,
body.dark-mode #monthlyPassModal#monthlyPassModal .mp-btn-primary:disabled :is(span, div) { color: #a7f3c4 !important; }

/* ---------- 4) 상품·규칙: 작게, 맨 아래 ---------- */
#monthlyPassModal#monthlyPassModal .mp-reward-strip {
    margin-top: var(--spacing-md);
    padding: calc(6px * var(--ui-scale)) calc(12px * var(--ui-scale));
}

#monthlyPassModal#monthlyPassModal .mp-reward-strip .mp-amount { font-size: var(--font-md); }
#monthlyPassModal#monthlyPassModal .mp-reward-strip .mp-reward-icon { width: calc(28px * var(--ui-scale)); height: calc(28px * var(--ui-scale)); }

/* 왼쪽 아래 마스코트(카드 밖으로 걸친 원형 이미지)와 겹치지 않게 원래처럼 왼쪽을 비움 */
#monthlyPassModal#monthlyPassModal .mp-hint { margin-top: var(--spacing-sm); padding-left: calc(52px * var(--ui-scale)); }
#monthlyPassModal#monthlyPassModal .mp-hint-text { font-size: var(--font-xs); }
#monthlyPassModal#monthlyPassModal .mp-note { margin: var(--spacing-sm) 0 0 calc(52px * var(--ui-scale)); }

/* 좁은 화면(원본 모바일 기준과 같은 620px): 상태 두 카드를 위아래로 */
@media (max-width: 620px) {
    #monthlyPassModal#monthlyPassModal .mp-scroll {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "header"
            "status"
            "reset"
            "next"
            "month"
            "legend"
            "week"
            "grid"
            "actions"
            "strip"
            "hint"
            "note";
    }
    #monthlyPassModal#monthlyPassModal .mp-reset { max-width: none; margin-top: var(--spacing-sm); }
    #monthlyPassModal#monthlyPassModal .mp-legend { justify-self: end; margin-top: calc(4px * var(--ui-scale)); }
    #monthlyPassModal#monthlyPassModal .mp-header { padding-right: calc(44px * var(--ui-scale)); }
    /* 좁은 화면은 마스코트가 숨겨지므로 왼쪽 여백 불필요 */
    #monthlyPassModal#monthlyPassModal .mp-hint { padding-left: 0; }
    #monthlyPassModal#monthlyPassModal .mp-note { margin-left: 0; }
}

/* ---------- 대학교·공과대학·친환경 광산 (건물 팝업 #universitySection) — docs/university-colleges-20261120.md ---------- */
.university-section {
    margin-bottom: calc(8px * var(--ui-scale));
    padding: calc(10px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    clip-path: var(--lp-chamfer);
    color: var(--lp-text);
    font-size: var(--font-sm);
}
.university-section .university-head { font-weight: 900; margin-bottom: calc(4px * var(--ui-scale)); }
.university-section .university-bar {
    height: calc(8px * var(--ui-scale));
    margin: calc(4px * var(--ui-scale)) 0 calc(2px * var(--ui-scale));
    background: var(--lp-tile-line);
    clip-path: var(--lp-chamfer);
    overflow: hidden;
}
.university-section .university-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
}
.university-section .university-bar-label { font-size: var(--font-xs); font-weight: 700; margin-bottom: calc(4px * var(--ui-scale)); }
.university-section .university-chip {
    display: inline-block;
    cursor: help;
    margin: calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale)) calc(2px * var(--ui-scale)) 0;
    padding: calc(2px * var(--ui-scale)) calc(8px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: var(--lp-tile-hi);
    color: currentColor;
    font-size: var(--font-xs);
    font-weight: 700;
}
/* 단과대학 5칸 타일: 운영(초록 테두리)·대기·빈 칸·잠김(흐림) */
.university-section .university-colleges {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: calc(4px * var(--ui-scale));
    margin: calc(6px * var(--ui-scale)) 0 calc(2px * var(--ui-scale));
}
.university-section .university-college {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(34px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    clip-path: var(--lp-chamfer);
    cursor: help;
}
.university-section .university-college-icon { font-size: var(--font-lg); line-height: 1; }
.university-section .university-college-image {
    display: block;
    width: calc(40px * var(--ui-scale));
    height: calc(40px * var(--ui-scale));
    object-fit: contain;
    filter: drop-shadow(0 calc(1px * var(--ui-scale)) calc(2px * var(--ui-scale)) rgba(0, 0, 0, 0.45));
}
.university-section .university-college-badge {
    position: absolute;
    right: calc(2px * var(--ui-scale));
    bottom: calc(1px * var(--ui-scale));
    font-size: var(--font-xs);
    line-height: 1;
}
.university-section .university-college.is-on { border-color: #22a35a; box-shadow: inset 0 0 0 calc(1px * var(--ui-scale)) #22a35a; }
.university-section .university-college.is-locked { opacity: 0.45; }
.university-section .university-card {
    margin-top: calc(8px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: var(--lp-tile-lo);
}
.university-section .university-card-title { font-weight: 900; }
.university-section .university-card-effect { font-size: var(--font-xs); margin: calc(2px * var(--ui-scale)) 0 calc(4px * var(--ui-scale)); }
.university-section .university-done { font-weight: 800; margin-top: calc(4px * var(--ui-scale)); }
.university-section .university-lock { font-size: var(--font-xs); font-weight: 700; margin-top: calc(4px * var(--ui-scale)); }
.university-section .university-button {
    display: block;
    width: 100%;
    margin-top: calc(6px * var(--ui-scale));
    padding: calc(7px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid #9a6a00;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
    clip-path: var(--lp-chamfer);
    color: #4a2b00;
    font-size: var(--font-sm);
    font-weight: 900;
    cursor: pointer;
}
.university-section .university-button:disabled {
    background: linear-gradient(180deg, #d6dde6, #b7c2cf);
    border-color: #7d8896;
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 rgba(60, 70, 85, 0.35);
    color: #445063;
    cursor: not-allowed;
}
/* 대학교(연구 캠퍼스) 팝업: 정보 ⓘ, 큰 숫자 타일, 단과대학 애드온 ➕ 설치, 연구 그룹(진행 중/시작 가능/잠김/완료), 💎 즉시 완료 */
.university-section .university-head { display: flex; align-items: center; gap: calc(6px * var(--ui-scale)); }
.university-section .university-info-button {
    margin-left: auto;
    width: calc(24px * var(--ui-scale));
    height: calc(24px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    clip-path: var(--lp-chamfer);
    color: var(--lp-text);
    font-size: var(--font-sm);
    font-weight: 900;
    cursor: pointer;
}
.university-section .university-info-button.is-open {
    border-color: #9a6a00;
    background: linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    color: #4a2b00;
}
.university-section .university-info {
    margin: calc(4px * var(--ui-scale)) 0 calc(6px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: var(--lp-tile-lo);
    font-size: var(--font-xs);
    font-weight: 700;
    line-height: 1.45;
}
.university-section .university-info-table {
    width: 100%;
    margin-top: calc(6px * var(--ui-scale));
    border-collapse: collapse;
    text-align: center;
}
.university-section .university-info-table th,
.university-section .university-info-table td {
    padding: calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale));
    border-bottom: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
}
.university-section .university-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(4px * var(--ui-scale));
    margin: calc(6px * var(--ui-scale)) 0;
}
.university-section .university-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(6px * var(--ui-scale)) calc(2px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    clip-path: var(--lp-chamfer);
}
.university-section .university-tile-value { font-size: var(--font-md); font-weight: 900; white-space: nowrap; }
.university-section .university-tile-value small { font-size: var(--font-xs); font-weight: 700; opacity: 0.75; }
.university-section .university-tile-label { font-size: var(--font-xs); font-weight: 700; opacity: 0.8; text-align: center; }
.university-section .university-subhead {
    margin-top: calc(8px * var(--ui-scale));
    font-weight: 900;
    font-size: var(--font-sm);
}
.university-section .university-college { flex-direction: column; gap: calc(1px * var(--ui-scale)); padding: calc(3px * var(--ui-scale)) 0; }
.university-section .university-college-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: calc(var(--font-xs) * 0.9);
    font-weight: 800;
}
.university-section button.university-college {
    color: inherit;
    font: inherit;
    cursor: pointer;
    border-color: #9a6a00;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.32) 0 34%, transparent 34.5%),
        linear-gradient(180deg, var(--lp-yellow-hi), var(--lp-yellow-lo));
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-yellow-lip);
    color: #4a2b00;
}
.university-section .university-group { margin-top: calc(6px * var(--ui-scale)); }
.university-section .university-group > summary {
    cursor: pointer;
    font-weight: 900;
    font-size: var(--font-xs);
    padding: calc(4px * var(--ui-scale)) calc(6px * var(--ui-scale));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    background: var(--lp-tile-hi);
    clip-path: var(--lp-chamfer);
}
.university-section .university-row {
    display: flex;
    justify-content: space-between;
    gap: calc(6px * var(--ui-scale));
    padding: calc(4px * var(--ui-scale)) calc(6px * var(--ui-scale));
    border-bottom: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    font-size: var(--font-xs);
    font-weight: 700;
    opacity: 0.8;
}
.university-section .university-row-reason { white-space: nowrap; }
.university-section .university-done-list { margin-top: calc(4px * var(--ui-scale)); }
.university-section .university-button.is-gem {
    border-color: #5b21b6;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.28) 0 34%, transparent 34.5%),
        linear-gradient(180deg, #a78bfa, #7c3aed);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 #4c1d95;
    color: #ffffff;
}

/* 연구 호버 툴팁: 효과 수치·조건·비용·상태 (대학교 팝업 연구 카드·잠김 줄·완료 칩) */
.university-tip {
    position: fixed;
    z-index: 100000;
    max-width: calc(300px * var(--ui-scale));
    padding: calc(10px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
    box-shadow: inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip), 0 calc(6px * var(--ui-scale)) calc(18px * var(--ui-scale)) rgba(15, 23, 42, 0.28);
    clip-path: var(--lp-chamfer);
    color: var(--lp-text);
    font-size: var(--font-xs);
    pointer-events: none;
}
.university-tip[hidden] { display: none; }
.university-tip-head { font-weight: 900; font-size: var(--font-sm); margin-bottom: calc(2px * var(--ui-scale)); }
.university-tip-effect { font-weight: 700; margin-bottom: calc(6px * var(--ui-scale)); }
.university-tip-stat {
    display: flex;
    justify-content: space-between;
    gap: calc(8px * var(--ui-scale));
    padding: calc(3px * var(--ui-scale)) calc(6px * var(--ui-scale));
    margin-bottom: calc(3px * var(--ui-scale));
    background: var(--lp-tile-hi);
    border: calc(1px * var(--ui-scale)) solid var(--lp-tile-line);
}
.university-tip-stat b { font-size: var(--font-sm); font-weight: 900; white-space: nowrap; }
.university-tip-meta { display: flex; flex-wrap: wrap; gap: calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale)); margin: calc(6px * var(--ui-scale)) 0 calc(4px * var(--ui-scale)); font-weight: 700; }
.university-tip-status { font-weight: 900; }
.university-tip-note { margin-top: calc(4px * var(--ui-scale)); opacity: 0.75; }
.university-section [data-research-tip] { cursor: help; }

/* ---------- 버스 노선 화면 (2026-11-28 노선 지도형) ---------- */
/* 오른쪽 아래 노선 통계 카드: 큰 숫자 승객 → 운임·운행 버스·정류장 타일. 하단 애드온 바 위에 뜬다. */
.bus-line-stat-card {
    position: fixed;
    right: calc(14px * var(--ui-scale));
    bottom: calc(96px * var(--ui-scale));
    z-index: 1200;
    width: calc(250px * var(--ui-scale));
    padding: calc(10px * var(--ui-scale));
    display: grid;
    gap: calc(8px * var(--ui-scale));
    color: var(--lp-text);
    background:
        linear-gradient(118deg, var(--lp-bar-facet) 0 38%, transparent 38.2%),
        linear-gradient(180deg, var(--lp-bar-hi), var(--lp-bar-lo));
    clip-path: var(--lp-chamfer);
    box-shadow: inset 0 0 0 calc(2px * var(--ui-scale)) var(--lp-bar-edge), inset 0 calc(-4px * var(--ui-scale)) 0 var(--lp-bar-edge);
    pointer-events: none;
}
.bus-line-stat-card[hidden] { display: none; }
.bus-line-stat-card .bls-status {
    font-size: var(--font-xs);
    font-weight: 800;
    line-height: 1.3;
}
.bus-line-stat-card .bls-status[hidden] { display: none; }
.bus-line-stat-card.is-off .bls-status { color: var(--lp-rate-neg); }
.bus-line-stat-card .bls-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon value" "icon label";
    align-items: center;
    column-gap: calc(8px * var(--ui-scale));
    padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-pop-hi), var(--lp-pop-lo));
    clip-path: var(--lp-chamfer);
    box-shadow: inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-pop-lip);
}
.bus-line-stat-card .bls-hero-icon { grid-area: icon; font-size: calc(26px * var(--ui-scale)); }
.bus-line-stat-card .bls-riders {
    grid-area: value;
    font-size: calc(24px * var(--ui-scale));
    font-weight: 900;
    line-height: 1.05;
    color: var(--lp-pop-text);
    font-variant-numeric: tabular-nums;
}
.bus-line-stat-card .bls-riders-label { grid-area: label; font-size: var(--font-xs); font-weight: 800; color: var(--lp-pop-sub); }
.bus-line-stat-card .bls-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(6px * var(--ui-scale)); }
.bus-line-stat-card .bls-tile {
    display: grid;
    justify-items: center;
    gap: calc(1px * var(--ui-scale));
    padding: calc(6px * var(--ui-scale)) calc(4px * var(--ui-scale));
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    clip-path: var(--lp-chamfer);
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-3px * var(--ui-scale)) 0 var(--lp-tile-lip);
    text-align: center;
}
.bus-line-stat-card .bls-tile > span { font-size: calc(16px * var(--ui-scale)); }
.bus-line-stat-card .bls-tile strong { font-size: var(--font-sm); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bus-line-stat-card .bls-tile small { font-size: calc(10px * var(--ui-scale)); font-weight: 700; opacity: 0.8; line-height: 1.15; }

/* 애드온 바 왼쪽: 교통 고문 사진 + 말풍선 한 줄(버스 노선 바에서만) */
#expansionModeBar .bus-line-bar-advisor { display: none; }
#expansionModeBar.bus-line-bar .bus-line-bar-advisor {
    display: flex;
    align-items: center;
    gap: calc(8px * var(--ui-scale));
    flex: 0 1 calc(270px * var(--ui-scale));
    min-width: 0;
    align-self: stretch;
    margin-right: calc(8px * var(--ui-scale));
}
#expansionModeBar.bus-line-bar .bus-line-bar-advisor img {
    width: calc(58px * var(--ui-scale));
    height: calc(58px * var(--ui-scale));
    flex: none;
    align-self: flex-end;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: 0 0 0 calc(3px * var(--ui-scale)) #1683e0, 0 calc(3px * var(--ui-scale)) 0 calc(3px * var(--ui-scale)) var(--lp-bar-edge);
}
#expansionModeBar.bus-line-bar .bus-line-bar-hint {
    position: relative;
    min-width: 0;
    padding: calc(5px * var(--ui-scale)) calc(8px * var(--ui-scale));
    font-size: var(--font-xs);
    font-weight: 700;
    line-height: 1.3;
    color: var(--lp-text);
    background: linear-gradient(180deg, var(--lp-tile-hi), var(--lp-tile-lo));
    box-shadow: inset 0 0 0 1px var(--lp-tile-line), inset 0 calc(-2px * var(--ui-scale)) 0 var(--lp-tile-lip);
    clip-path: var(--lp-chamfer);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 760px) {
    #expansionModeBar.bus-line-bar .bus-line-bar-hint { display: none; }
    #expansionModeBar.bus-line-bar .bus-line-bar-advisor { flex: none; }
    .bus-line-stat-card { width: calc(200px * var(--ui-scale)); bottom: calc(110px * var(--ui-scale)); }
}

/* =====================================================================================================
 * 메인 화면 컴팩트 HUD (2026-11-28 사용자 지시: 심시티 5처럼 단순·컴팩트하게, 일단 메인 화면만)
 * 양식: 떠 있는 흰 알약형 버튼(상단), 화면 맨 아래 얇은 상태 띠 + 그 위 가운데 둥근 도구 버튼 줄.
 * DOM·JS·이미지 추가 없이 CSS만. 바 전체 높이는 그대로라 하위 메뉴·애드온 바 위치는 바뀌지 않는다.
 * 넓은 화면(900px 이상)에만 적용한다. 좁은 화면·모바일은 기존 모양 그대로.
 * 색은 --sc-* 변수(화이트·다크 한 벌씩)만 쓴다.
 * SC-HUD-BEGIN
 * ===================================================================================================== */
body {
    --sc-panel: rgba(255, 255, 255, 0.95);
    --sc-panel-hover: #ffffff;
    --sc-strip: rgba(244, 246, 249, 0.96);
    --sc-line: #c6ced8;
    --sc-text: #37414d;
    --sc-sub: #6b7684;
    --sc-accent: #1b9be0;
    --sc-accent-deep: #0f7fc0;
    --sc-accent-ink: #ffffff;
    --sc-shadow: 0 1px 3px rgba(24, 38, 54, 0.28);
    --sc-icon-filter: grayscale(1) contrast(1.15) brightness(0.72);
    --sc-surface: #ffffff;
    --sc-surface-2: #f3f5f8;
    --sc-chip: #eef1f5;
    --sc-track: #e3e8ee;
    --sc-stock-a: #1e293b; --sc-stock-b: #475569;
    --sc-line-soft: #e1e6ec;
    --sc-pos: #15803d; --sc-pos-bg: rgba(34, 197, 94, 0.14);
    --sc-neg: #c81e1e; --sc-neg-bg: rgba(239, 68, 68, 0.12);
    --sc-warn: #b45309; --sc-warn-bg: #fff4d6;
    --sc-danger: #d93025; --sc-danger-deep: #a8231a;
    --sc-reward: #ffd24a; --sc-reward-ink: #3b2200;
    --sc-shadow-panel: 0 calc(6px * var(--ui-scale)) calc(20px * var(--ui-scale)) rgba(15, 28, 44, 0.28);
}
body.dark-mode {
    --sc-panel: rgba(36, 45, 57, 0.95);
    --sc-panel-hover: #33404f;
    --sc-strip: rgba(23, 30, 39, 0.96);
    --sc-line: #536072;
    --sc-text: #edf2f8;
    --sc-sub: #b1bdcb;
    --sc-accent: #1b8fd0;
    --sc-accent-deep: #1479b4;
    --sc-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --sc-icon-filter: grayscale(1) contrast(1.1) brightness(1.7);
    --sc-surface: #242d39;
    --sc-surface-2: #1c242e;
    --sc-chip: #303b49;
    --sc-track: #3a4656;
    --sc-stock-a: #64748b; --sc-stock-b: #a8b8cc;
    --sc-line-soft: #3a4656;
    --sc-pos: #86efac; --sc-pos-bg: rgba(34, 197, 94, 0.2);
    --sc-neg: #fca5a5; --sc-neg-bg: rgba(239, 68, 68, 0.22);
    --sc-warn: #fbbf24; --sc-warn-bg: rgba(251, 191, 36, 0.16);
    --sc-shadow-panel: 0 calc(6px * var(--ui-scale)) calc(20px * var(--ui-scale)) rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) and (min-height: 541px) {
    /* ---------- 하단: 도구 줄(위) + 상태 띠(아래) ---------- */
    #bottomBar#bottomBar {
        display: grid;
        grid-template-columns: auto auto 1fr auto auto auto;
        grid-template-rows: 1fr calc(36px * var(--ui-scale));
        align-items: center;
        gap: 0;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        pointer-events: none;
    }
    #bottomBar#bottomBar::before {
        content: "";
        position: static;
        grid-row: 2;
        grid-column: 1 / -1;
        align-self: stretch;
        width: auto;
        height: auto;
        background: var(--sc-strip);
        border-top: 1px solid var(--sc-line);
        box-shadow: 0 -1px 4px rgba(24, 38, 54, 0.16);
        pointer-events: auto;
    }
    #bottomBar#bottomBar::after { content: none; }
    #bottomBar#bottomBar > .bottom-left,
    #bottomBar#bottomBar > .bottom-center { display: contents; }

    /* 도구 줄: 가운데 정렬 둥근 버튼 */
    #bottomBar#bottomBar .bottom-tools {
        display: flex;
        grid-row: 1;
        grid-column: 1 / -1;
        justify-self: center;
        flex: none;
        max-width: 100%;
        height: auto;
        padding: calc(5px * var(--ui-scale)) calc(8px * var(--ui-scale));
        gap: calc(5px * var(--ui-scale));
        background: none;
        pointer-events: auto;
    }
    #bottomBar#bottomBar .bottom-tools :is(.tool-btn, .demolish-btn) {
        width: calc(42px * var(--ui-scale));
        height: calc(42px * var(--ui-scale));
        margin: 0;
        border-radius: 50%;
        clip-path: none;
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        box-shadow: var(--sc-shadow);
        color: var(--sc-text);
        transform: none;
        transition: background-color 0.14s, border-color 0.14s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.14s;
    }
    #bottomBar#bottomBar .bottom-tools .tool-btn .icon {
        font-size: calc(19px * var(--ui-scale));
        width: calc(26px * var(--ui-scale));
        height: calc(26px * var(--ui-scale));
        filter: var(--sc-icon-filter);
    }
    #bottomBar#bottomBar .bottom-tools .tool-btn:hover {
        background: var(--sc-panel-hover);
        border-color: var(--sc-accent);
    }
    #bottomBar#bottomBar .bottom-tools .tool-btn:hover .icon { filter: none; }
    #bottomBar#bottomBar .bottom-tools .tool-btn.active {
        background: var(--sc-accent);
        border-color: var(--sc-accent-deep);
        box-shadow: var(--sc-shadow), 0 0 0 calc(2px * var(--ui-scale)) rgba(27, 155, 224, 0.3);
    }
    #bottomBar#bottomBar .bottom-tools .tool-btn.active .icon { filter: brightness(0) invert(1); }
    #bottomBar#bottomBar .bottom-tools .demolish-btn { margin-left: calc(10px * var(--ui-scale)); }
    #bottomBar#bottomBar .bottom-tools .demolish-btn.active {
        background: var(--sc-danger);
        border-color: var(--sc-danger-deep);
    }
    #bottomBar#bottomBar .bottom-tools .tool-divider {
        width: 1px;
        height: calc(20px * var(--ui-scale));
        margin: 0 calc(5px * var(--ui-scale));
        background: var(--sc-line);
        box-shadow: none;
    }

    /* 상태 띠: RCI · 행복도 | 빈칸 | 자금 · 인구 — 받침 없이 글자만, 사이는 얇은 선 */
    #bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .rewarded-ad-btn, .population-display-center) {
        grid-row: 2;
        align-self: stretch;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0 calc(12px * var(--ui-scale));
        background: none;
        border: 0;
        border-radius: 0;
        clip-path: none;
        box-shadow: none;
        color: var(--sc-text);
        pointer-events: auto;
        z-index: 1;
    }
    #bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .population-display-center)::before,
    #bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .population-display-center)::after { content: none; }
    #bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .population-display-center):hover { background: rgba(27, 155, 224, 0.12); }
    #bottomBar#bottomBar .rci-demand-bar { grid-column: 1; align-items: center; width: auto; min-width: 0; border-right: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .city-happiness { grid-column: 2; border-right: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .money-display-center { grid-column: 4; border-left: 1px solid var(--sc-line); width: auto; }
    #bottomBar#bottomBar .rewarded-ad-btn { grid-column: 5; }
    #bottomBar#bottomBar .population-display-center { grid-column: 6; border-left: 1px solid var(--sc-line); width: auto; position: relative; }

    #bottomBar#bottomBar .rci-item { gap: calc(1px * var(--ui-scale)); }
    #bottomBar#bottomBar .rci-label { font-size: calc(8px * var(--ui-scale)); line-height: 1; color: var(--sc-sub); text-shadow: none; }
    #bottomBar#bottomBar .rci-bar-container { height: calc(19px * var(--ui-scale)); width: calc(11px * var(--ui-scale)); border-radius: 2px; box-shadow: none; }

    #bottomBar#bottomBar .city-happiness .happiness-icon { font-size: calc(18px * var(--ui-scale)); }
    #bottomBar#bottomBar .city-happiness .happiness-label { display: none; }
    #bottomBar#bottomBar .city-happiness .happiness-value { font-size: calc(15px * var(--ui-scale)); color: var(--sc-text); text-shadow: none; }
    #bottomBar#bottomBar .city-happiness { width: auto; min-width: 0; }

    #bottomBar#bottomBar :is(.money-icon, .pop-icon) { font-size: calc(16px * var(--ui-scale)); width: auto; height: auto; background: none; box-shadow: none; filter: none; }
    #bottomBar#bottomBar :is(.money-amount, .pop-amount) {
        font-size: calc(17px * var(--ui-scale));
        line-height: 1;
        color: var(--sc-text);
        text-shadow: none;
        letter-spacing: 0;
    }
    #bottomBar#bottomBar .money-rate {
        padding: calc(2px * var(--ui-scale)) calc(6px * var(--ui-scale));
        border-radius: 999px;
        font-size: calc(11px * var(--ui-scale));
        box-shadow: none;
    }
    #bottomBar#bottomBar .pop-main { justify-content: center; }
    #bottomBar#bottomBar .pop-top-row { align-items: center; }
    #bottomBar#bottomBar .pop-label { color: var(--sc-sub); background: none; box-shadow: none; padding: 0; }
    #bottomBar#bottomBar .pop-next-label { display: none; }
    /* 다음 도시 단계까지의 진행 막대: 인구 칸 아래 가장자리 얇은 선 */
    #bottomBar#bottomBar .pop-progress-wrap {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(3px * var(--ui-scale));
        margin: 0;
        border-radius: 0;
        background: transparent;
    }

    /* ---------- 상단: 받침 없이 떠 있는 알약형 버튼 ---------- */
    #topBar#topBar {
        background: none;
        border: 0;
        box-shadow: none;
        pointer-events: none;
    }
    #topBar#topBar::before, #topBar#topBar::after { content: none; }
    #topBar#topBar > * { pointer-events: auto; }
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display, .dev-banner) {
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        border-radius: 999px;
        clip-path: none;
        box-shadow: var(--sc-shadow);
        color: var(--sc-text);
        text-shadow: none;
    }
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display):hover {
        background: var(--sc-panel-hover);
        border-color: var(--sc-accent);
    }
    #topBar#topBar :is(.menu-btn, .bgm-btn, .top-social-btn) { border-radius: 50%; }
    #topBar#topBar .dev-banner .dev-banner-btn { color: var(--sc-text); background: none; box-shadow: none; text-shadow: none; }
    #topBar#topBar .city-name-display, #topBar#topBar .city-name-display * { color: var(--sc-text); }
    #topBar#topBar .like-btn .like-count { color: var(--sc-text); }

    /* ---------- 시계: 한 줄 알약 ---------- */
    #timeHUD#timeHUD { --th-size: 0px; height: auto; width: auto; min-width: 0; min-height: 0; filter: none; }
    #timeHUD#timeHUD::before, #timeHUD#timeHUD::after { content: none; }
    #timeHUD#timeHUD .time-hud-face {
        flex-direction: row;
        align-items: center;
        gap: calc(6px * var(--ui-scale));
        height: auto;
        width: auto;
        min-height: 0;
        min-width: 0;
        margin: 0;
        padding: calc(4px * var(--ui-scale)) calc(6px * var(--ui-scale)) calc(4px * var(--ui-scale)) calc(10px * var(--ui-scale));
        clip-path: none;
        border-radius: 999px;
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        box-shadow: var(--sc-shadow);
    }
    #timeHUD#timeHUD .time-hud-face::before, #timeHUD#timeHUD .time-hud-face::after { content: none; }
    #timeHUD#timeHUD :is(.time-hud-orb, .time-hud-hills, .time-hud-city, .time-phase, .time-weather-name) { display: none; }
    #timeHUD#timeHUD .time-hud-sky {
        flex: none;
        flex-direction: row;
        gap: calc(5px * var(--ui-scale));
        height: auto;
        width: auto;
        min-height: 0;
        background: none;
        overflow: visible;
    }
    #timeHUD#timeHUD .time-weather { position: static; background: none; box-shadow: none; padding: 0; order: -1; }
    #timeHUD#timeHUD .time-weather-icon { font-size: calc(14px * var(--ui-scale)); }
    #timeHUD#timeHUD .clock-display {
        margin: 0;
        padding: 0;
        width: auto;
        font-size: calc(15px * var(--ui-scale));
        color: var(--sc-text);
        text-shadow: none;
        white-space: nowrap;
    }
    #timeHUD#timeHUD .time-hud-ground { background: none; box-shadow: none; height: auto; width: auto; padding: 0; }
    #timeHUD#timeHUD .date-display { color: var(--sc-sub); text-shadow: none; white-space: nowrap; font-size: calc(10px * var(--ui-scale)); }
    #timeHUD#timeHUD .time-change-controls { background: none; padding: 0; height: auto; width: auto; }
    #timeHUD#timeHUD .time-change-btn {
        width: calc(24px * var(--ui-scale));
        height: calc(24px * var(--ui-scale));
        min-width: 0;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        clip-path: none;
        background: var(--sc-accent);
        border: 1px solid var(--sc-accent-deep);
        box-shadow: none;
        color: var(--sc-accent-ink);
    }
    #timeHUD#timeHUD .time-change-btn > span:not(.time-change-icon) { display: none; }
    #timeHUD#timeHUD .time-change-btn .time-change-icon { font-size: calc(14px * var(--ui-scale)); color: var(--sc-accent-ink); }

    /* ---------- 뉴스 띠: 흰 둥근 판 ---------- */
    #newsHeadline#newsHeadline {
        clip-path: none;
        border-radius: calc(8px * var(--ui-scale));
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        box-shadow: var(--sc-shadow);
    }
    #newsHeadline#newsHeadline .nh-tk-content { background: none; }
    #newsHeadline#newsHeadline .nh-tk-text { color: var(--sc-text); text-shadow: none; }
    /* ---------- 하위 메뉴: 옅은 띠 + 알약 탭 ---------- */
    #subMenu#subMenu {
        background: var(--sc-strip);
        border: 0;
        border-top: 1px solid var(--sc-line);
        border-bottom: 1px solid var(--sc-line);
        clip-path: none;
        box-shadow: 0 -2px 10px rgba(24, 38, 54, 0.18);
        color: var(--sc-text);
    }
    #subMenu#subMenu::before, #subMenu#subMenu::after { content: none; }
    #subMenu#subMenu .submenu-item { color: var(--sc-text); }
    #subMenu#subMenu .submenu-item :is(.item-name, .item-cost, .label, .cost) { color: var(--sc-text); text-shadow: none; }
    #subMenu#subMenu .submenu-subcat-tab {
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        border-radius: 999px;
        box-shadow: none;
        color: var(--sc-text);
        text-shadow: none;
        transition: background-color 0.14s, border-color 0.14s, color 0.14s, transform 0.14s;
    }
    #subMenu#subMenu .submenu-subcat-tab:hover { border-color: var(--sc-accent); transform: translateY(-1px); }
    #subMenu#subMenu .submenu-subcat-tab.active {
        background: var(--sc-accent);
        border-color: var(--sc-accent-deep);
        color: var(--sc-accent-ink);
    }
    #subMenu#subMenu #subMenuClose {
        border-radius: 50% !important;
        background: var(--sc-panel) !important;
        border: 1px solid var(--sc-line) !important;
        color: var(--sc-text) !important;
        box-shadow: var(--sc-shadow);
    }
    #subMenu#subMenu #subMenuClose:hover { border-color: var(--sc-accent) !important; color: var(--sc-accent) !important; }

    /* 고문 말풍선: 흰 둥근 판 */
    #advisorPanel#advisorPanel #advisorBubble {
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        border-radius: calc(10px * var(--ui-scale));
        clip-path: none;
        box-shadow: var(--sc-shadow);
        color: var(--sc-text);
    }
    #advisorPanel#advisorPanel #advisorBubble::before, #advisorPanel#advisorPanel #advisorBubble::after { content: none; }
    #advisorPanel#advisorPanel #advisorBadge {
        border-radius: 50%;
        clip-path: none;
        background: var(--sc-accent);
        border: 1px solid var(--sc-accent-deep);
        color: var(--sc-accent-ink);
        box-shadow: var(--sc-shadow);
    }

    /* ---------- 움직임 ---------- */
    /* 도구 버튼: 올리면 살짝 떠오르고, 누르면 눌리고, 선택되면 한 번 튄다 */
    #bottomBar#bottomBar .bottom-tools :is(.tool-btn, .demolish-btn):hover { transform: translateY(calc(-3px * var(--ui-scale))) scale(1.08); }
    #bottomBar#bottomBar .bottom-tools :is(.tool-btn, .demolish-btn):active { transform: scale(0.92); transition-duration: 0.05s; }
    #bottomBar#bottomBar .bottom-tools .tool-btn.active { animation: sc-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
    /* 화면에 들어올 때: 도구 줄은 아래에서, 상단 알약·시계·뉴스는 위에서 차례로 */
    #bottomBar#bottomBar .bottom-tools { animation: sc-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
    #bottomBar#bottomBar::before { animation: sc-fade 0.4s ease-out both; }
    #topBar#topBar > * { animation: sc-drop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
    #topBar#topBar > :nth-child(2) { animation-delay: 0.06s; }
    #topBar#topBar > :nth-child(3) { animation-delay: 0.12s; }
    #timeHUD#timeHUD .time-hud-face { animation: sc-drop 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
    /* 상단 알약: 올리면 살짝 커진다 */
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display) { transition: background-color 0.14s, border-color 0.14s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1); }
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display):hover { transform: scale(1.06); }
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display):active { transform: scale(0.95); }
    /* 상태 띠 칸: 색이 부드럽게 바뀐다 */
    #bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .population-display-center) { transition: background-color 0.16s; }
    /* 하위 메뉴가 열릴 때: 항목과 탭이 조금 늦게 따라 올라온다(목록을 다시 그려도 반복되지 않게 고정된 부모에만 건다) */
    #subMenu#subMenu.open .submenu-items { animation: sc-rise 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both; }
    #subMenu#subMenu.open #submenuTabRow { animation: sc-fade 0.3s ease-out 0.14s both; }
    #subMenu#subMenu.open ~ #advisorPanel #advisorBubble { animation: sc-fade 0.3s ease-out 0.1s both; }
}
@keyframes sc-rise { from { opacity: 0; transform: translateY(calc(14px * var(--ui-scale))); } to { opacity: 1; transform: none; } }
@keyframes sc-drop { from { opacity: 0; transform: translateY(calc(-10px * var(--ui-scale))); } to { opacity: 1; transform: none; } }
@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sc-pop { 0% { transform: scale(0.86); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (min-width: 900px) and (min-height: 541px) and (prefers-reduced-motion: reduce) {
    #bottomBar#bottomBar .bottom-tools, #bottomBar#bottomBar::before, #bottomBar#bottomBar .bottom-tools .tool-btn.active,
    #topBar#topBar > *, #timeHUD#timeHUD .time-hud-face,
    #subMenu#subMenu.open .submenu-items, #subMenu#subMenu.open #submenuTabRow, #subMenu#subMenu.open ~ #advisorPanel #advisorBubble { animation: none; }
    #bottomBar#bottomBar .bottom-tools :is(.tool-btn, .demolish-btn):hover,
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display):hover { transform: none; }
}
/* ---------- 패널 (2026-11-28 사용자 "패널도 적용") ----------
 * 모든 판: 둥근 모서리·얇은 테·부드러운 그림자·평평한 헤더·둥근 닫기, 열릴 때 살짝 커지며 나타난다.
 * 진한 판(건물 정보·시청 등)은 글씨가 진한 바탕 기준이라 색은 그대로 두고 모양만 바꾼다.
 * 범례 판(데이터 보기·전력/수도)과 왼쪽 데이터 버튼은 흰 카드(다크는 짙은 카드)로 바꾼다. */
@media (min-width: 900px) and (min-height: 541px) {
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel, #dataViewLegend, #utilityLegend):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel, #dataViewLegend, #utilityLegend) {
        border: 1px solid var(--sc-line);
        border-radius: calc(12px * var(--ui-scale));
        clip-path: none;
        box-shadow: var(--sc-shadow-panel);
        animation: sc-panel-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    /* 진한 판: 면 분할 무늬를 빼고 한 가지 색으로 */
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel) {
        background: linear-gradient(180deg, var(--lp-dpanel-hi), var(--lp-dpanel-lo));
        border-color: rgba(255, 255, 255, 0.14);
    }
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel) :is(.popup-header, .panel-header) {
        background: var(--lp-dhead-lo);
        border-bottom: calc(2px * var(--ui-scale)) solid var(--lp-accent, #60a5fa);
        border-radius: calc(12px * var(--ui-scale)) calc(12px * var(--ui-scale)) 0 0;
    }
    /* 닫기: 둥근 단추 */
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel) :is(.popup-close, .panel-close) {
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.25);
        background: rgba(255, 255, 255, 0.12);
        box-shadow: none;
        color: #e6eef8;
        transition: background-color 0.14s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel) :is(.popup-close, .panel-close):hover {
        background: var(--sc-danger);
        border-color: var(--sc-danger-deep);
        box-shadow: none;
        transform: scale(1.08);
    }
    /* 밝은 판: 두께 그림자만 걷어 낸다(바탕·글씨 그대로) */
    :is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel):is(#budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel) { border-color: var(--sc-line); }

    /* 범례 판: 흰 카드 + 색 헤더는 그대로 두되 평평하게 */
    :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) {
        background: var(--sc-panel);
        overflow: hidden;
    }
    :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-header, .utility-legend-header) {
        border-radius: 0;
        box-shadow: none;
        border-bottom: 0;
    }
    :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-close, .utility-legend-close, #legendClose) {
        border-radius: 50%;
        clip-path: none;
        box-shadow: none;
        transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    :is(#dataViewLegend, #utilityLegend):is(#dataViewLegend, #utilityLegend) :is(.legend-close, .utility-legend-close, #legendClose):hover { transform: scale(1.1); }

    /* 왼쪽 데이터 버튼: 흰 둥근 사각 타일, 단색 아이콘, 선택하면 파랑 */
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn {
        background: var(--sc-panel);
        border: 1px solid var(--sc-line);
        border-radius: calc(10px * var(--ui-scale));
        clip-path: none;
        box-shadow: var(--sc-shadow);
        color: var(--sc-text);
        transition: background-color 0.14s, border-color 0.14s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn::before, :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn::after { box-shadow: none; }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn .label { color: var(--sc-sub); text-shadow: none; }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn .icon { filter: var(--sc-icon-filter); }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn:hover:not(.active) {
        background: var(--sc-panel-hover);
        border-color: var(--sc-accent);
        transform: translateX(calc(2px * var(--ui-scale)));
    }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn:hover .icon { filter: none; }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn.active {
        background: var(--sc-accent);
        border-color: var(--sc-accent-deep);
        box-shadow: var(--sc-shadow);
        animation: sc-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn.active .label { color: var(--sc-accent-ink); }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn.active .icon { filter: brightness(0) invert(1); }
}
@keyframes sc-panel-in { from { opacity: 0; scale: 0.96; translate: 0 calc(6px * var(--ui-scale)); } to { opacity: 1; scale: 1; translate: 0 0; } }
@media (min-width: 900px) and (min-height: 541px) and (prefers-reduced-motion: reduce) {
    :is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel, #dataViewLegend, #utilityLegend):is(#buildingPopup, #publicBuildingPopup, #upgradePopup, #constructionPopup, #cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #gameHelpPanel, #constructionListPanel, #budgetPanel, #populationPanel, #happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel, #dataViewLegend, #utilityLegend), :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn.active { animation: none; }
    :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar) .sidebar-btn:hover:not(.active) { transform: none; }
}
/* SC:패널-밝은 — 크림 → 흰색. 라이트 전용, 모든 폭 (2026-11-28 사용자 "흰색으로 바꿔") */
body:not(.dark-mode) :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) { background: var(--sc-surface); border-color: var(--sc-line); }

body:not(.dark-mode) #budgetPanel#budgetPanel :is(.bp-avatar, .service-expense-count) { background: var(--sc-chip); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(.budget-summary, .budget-total) { background: var(--sc-surface-2); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel .budget-total { border-left: calc(3px * var(--ui-scale)) solid var(--sc-accent); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(.bp-bar-wrap, .tax-slider, .service-expense-track, .budget-balance-bar) { background: var(--sc-track); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(.budget-section, .bond-section) { border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(.bond-tab, .clear-history-btn) { border-color: var(--sc-line); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-tab:hover { background: var(--sc-panel-hover); border-color: var(--sc-accent); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-tab.active { background: var(--sc-accent-deep); border-color: var(--sc-accent-deep); color: var(--sc-accent-ink); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-tab.active * { color: var(--sc-accent-ink); }
body:not(.dark-mode) #budgetPanel#budgetPanel .clear-history-btn:hover { background: var(--sc-chip); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-issued-info { border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-option { background: var(--sc-surface); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel .bond-option.selected { background: rgba(27, 155, 224, 0.1); border-color: var(--sc-accent); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(.bp-muted, .trans-time) { color: var(--sc-sub); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(#totalIncome, #netProfit) { color: var(--sc-pos); }

body:not(.dark-mode) #populationPanel#populationPanel :is(.pop-panel-header .panel-icon, .pop-live-pill, .milestone-unlocks-toggle) { background: var(--sc-chip); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #populationPanel#populationPanel :is(.population-policy-section, .pop-milestone-section) { background: var(--sc-surface-2); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #populationPanel#populationPanel :is(.tier-bar-bg, .service-bar-bg, .milestone-connector, .milestone-current-bar-bg) { background: var(--sc-track); }
body:not(.dark-mode) #populationPanel#populationPanel :is(.age-stat, .milestone-step-icon, .milestone-current-box) { border-color: var(--sc-line-soft); }
body:not(.dark-mode) #populationPanel#populationPanel #popTrendChart {
    background:
        linear-gradient(to bottom, var(--sc-line-soft) 0 1px, transparent 1px) 0 0 / 100% 33.33%,
        linear-gradient(to bottom, transparent calc(100% - 1px), var(--sc-line-soft) calc(100% - 1px));
}
body:not(.dark-mode) #populationPanel#populationPanel #popTrendXLabels, body:not(.dark-mode) #populationPanel#populationPanel #popTrendXLabels * { color: var(--sc-sub); }
body:not(.dark-mode) #populationPanel#populationPanel #populationSummaryChange { color: var(--sc-pos); }
body:not(.dark-mode) #populationPanel#populationPanel .milestone-current-name { color: var(--sc-sub); }

/* 닫기: 예산·인구 공통 */
body:not(.dark-mode) :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) .panel-close { background: var(--sc-chip); border-color: var(--sc-line-soft); border-radius: 50%; }
body:not(.dark-mode) :is(#budgetPanel, #populationPanel):is(#budgetPanel, #populationPanel) .panel-close:hover { background: var(--sc-danger); border-color: var(--sc-danger-deep); color: var(--sc-accent-ink); }

/* 인구 패널 안 정책 구역: 갈색 테마 변수를 기본 테마 값으로 */
body:not(.dark-mode) #populationPolicySection {
    --policy-pop-title: var(--sc-text); --policy-pop-border: var(--sc-line-soft); --policy-panel: var(--sc-surface);
    --policy-ink: var(--sc-text); --policy-muted: #435a72;
    --policy-ready: #2471bd; --policy-ready-surface: #eef6ff; --policy-ready-ink: #184b77;
    --policy-locked: #687c90; --policy-locked-surface: #e9eef3; --policy-locked-ink: #45586c;
}
/* 다크: 트랙에 남은 크림 조각 */
body.dark-mode #budgetPanel#budgetPanel :is(.bp-bar-wrap, .tax-slider, .service-expense-track, .service-expense-count, .budget-balance-bar) { background: var(--sc-track); }
body.dark-mode #populationPanel#populationPanel :is(.tier-bar-bg, .service-bar-bg, .milestone-connector, .milestone-current-bar-bg) { background: var(--sc-track); }
body:not(.dark-mode) #budgetPanel#budgetPanel .budget-section { background: var(--sc-surface); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #populationPanel#populationPanel :is(.pop-chart-section, .pop-tier-section, .pop-age-section, .pop-service-section, #popCapacitySection) { background: var(--sc-surface); border-color: var(--sc-line-soft); }
body:not(.dark-mode) #budgetPanel#budgetPanel :is(#totalIncome, #netProfit) { color: var(--sc-pos) !important; }
body:not(.dark-mode) #populationPanel#populationPanel #populationSummaryChange { color: var(--sc-pos) !important; }
body:not(.dark-mode) #populationPanel#populationPanel :is(.milestone-step-name, .milestone-current-name, #popTrendYAxis, #popTrendYAxis *) { color: var(--sc-sub) !important; }
/* 밤 뉴스 띠: 옛 남색 규칙(.nh-night)이 흰 판을 덮어 진한 글씨가 안 보였다 */
@media (min-width: 900px) and (min-height: 541px) {
    #newsHeadline#newsHeadline.nh-night { --lp-ticker-ink: var(--sc-text); background: var(--sc-panel); box-shadow: var(--sc-shadow); }
    #newsHeadline#newsHeadline.nh-night .nh-tk-cat { filter: none; }
}
body.dark-mode #budgetPanel#budgetPanel #totalAssets { color: var(--sc-reward) !important; }
/* SC:패널-밝은 2 — 행복도·관광·무역·생산·소셜: 헤더를 흰 판으로, 닫기는 원형 */
body:not(.dark-mode) :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel) { background: var(--sc-surface); }
body:not(.dark-mode) :is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel) :is(.happiness-panel-header, .tourism-panel-header, .city-chat-header) {
    background: var(--sc-surface);
    border-bottom: 1px solid var(--sc-line-soft);
}
:is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel) :is(.happiness-panel-close, .tourism-panel-close, .city-chat-close) {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: calc(28px * var(--ui-scale)); height: calc(28px * var(--ui-scale));
    border-radius: 50%; border: 1px solid var(--sc-line-soft); background: var(--sc-chip); box-shadow: none;
}
:is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel):is(#happinessPanel, #tourismPanel, #tradeStatusPanel, #productionStatusPanel, #cityChatPanel) :is(.happiness-panel-close, .tourism-panel-close, .city-chat-close):hover {
    background: var(--sc-danger); border-color: var(--sc-danger-deep); color: var(--sc-accent-ink) !important;
}
body:not(.dark-mode) #tourismPanel#tourismPanel .tourism-ov-bubble { background: var(--sc-surface); border-color: var(--sc-line); }
/* 키보드 초점 고리: 컴팩트 양식을 입힌 버튼류 */
body :is(.tool-btn, .demolish-btn, .sidebar-btn, .menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display, .submenu-subcat-tab, #subMenuClose, .time-change-btn, .panel-close, .popup-close, .happiness-panel-close, .tourism-panel-close, .city-chat-close, .bond-tab):focus-visible {
    outline: 2px solid var(--sc-accent);
    outline-offset: 2px;
}
body:not(.dark-mode) #cityChatPanel#cityChatPanel :is(.city-chat-header, .city-chat-header span, .city-chat-close) { color: var(--sc-text) !important; text-shadow: none; }
body.dark-mode #tourismPanel#tourismPanel .tourism-ov-badge { color: var(--sc-reward-ink) !important; }
/* SC:툴팁 — 흰 판(다크는 짙은 판). 크기·위치 계산은 그대로 */
:is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip, #graphTooltip, #modeHelpTooltip, #gameHelpTooltip, #probBarTooltip, #rciTooltip, #educationSystemTooltip):is(#buildingHoverTooltip, #toolbarTooltip, #submenuTooltip, #addonTooltip, #shipTooltip, #costTooltip, #graphTooltip, #modeHelpTooltip, #gameHelpTooltip, #probBarTooltip, #rciTooltip, #educationSystemTooltip) {
    background: var(--sc-surface) !important;
    border-color: var(--sc-line) !important;
    border-radius: calc(8px * var(--ui-scale));
    clip-path: none;
    box-shadow: 0 calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale)) rgba(15, 28, 44, 0.22);
}
body:not(.dark-mode) #submenuTooltip#submenuTooltip :is(.tooltip-title-bar, .tooltip-preview-area, .tooltip-cost-bar) { background: var(--sc-surface-2); border-color: var(--sc-line-soft); }
/* SC:고문 말풍선 버튼 — 평평한 알약(색은 그대로) */
#advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button) {
    border-radius: calc(10px * var(--ui-scale));
    clip-path: none;
    box-shadow: var(--sc-shadow);
    transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.14s;
}
#advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button):hover { transform: translateY(-1px); filter: brightness(1.08); }
#advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button):focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button):hover { transform: none; } }
/* SC:하위 메뉴 상태 — 흰 띠 위에서 선택·hover가 보이게(cutout 이미지·돌출 클릭은 그대로) */
@media (min-width: 900px) and (min-height: 541px) {
    #subMenu#subMenu .submenu-item { box-shadow: none; }
    #subMenu#subMenu .submenu-item:not(.submenu-model-cutout) { background: var(--sc-panel); border: 1px solid var(--sc-line); color: var(--sc-text); }
    #subMenu#subMenu .submenu-item:not(.submenu-model-cutout):hover { background: var(--sc-panel-hover); border-color: var(--sc-accent); }
    #subMenu#subMenu .submenu-item:not(.submenu-model-cutout):is(.active, .selected) { border-color: var(--sc-accent-deep); box-shadow: 0 0 0 calc(2px * var(--ui-scale)) var(--sc-accent); }
}
/* SC:모달 — 알림·확인(라이트·다크 공통 토큰), 크림 계열은 흰 판(라이트), 가림막 흐림 제거(D8) */
:is(#nicknameModal, #cityNameModal, #dailyRewardModal):is(#nicknameModal, #cityNameModal, #dailyRewardModal) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
#ui-modal-overlay#ui-modal-overlay .ui-modal-box,
.confirm-dialog.confirm-dialog {
    background: var(--sc-surface);
    border: 1px solid var(--sc-line);
    border-radius: calc(12px * var(--ui-scale));
    clip-path: none;
    box-shadow: var(--sc-shadow-panel);
}
body:not(.dark-mode) .confirm-dialog.confirm-dialog :is(.confirm-title, .confirm-tile-value) { color: var(--sc-text); }
body:not(.dark-mode) .confirm-dialog.confirm-dialog :is(.confirm-message, .confirm-tile-label) { color: var(--sc-sub); }
body:not(.dark-mode) .confirm-dialog.confirm-dialog .confirm-tile { background: var(--sc-surface-2); border-color: var(--sc-line-soft); }
body:not(.dark-mode) .confirm-dialog.confirm-dialog .confirm-btn.cancel { background: var(--sc-chip); border: 1px solid var(--sc-line); color: var(--sc-text); }
/* 오프라인 결산 */
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal :is(.offline-progress-content, .offline-progress-header, .offline-advisor-side) { background: var(--sc-surface) !important; }
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal .offline-progress-content { border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)); }
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal .offline-advisor-side { border-right: 1px solid var(--sc-line-soft); }
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal :is(.offline-time-merged, .offline-section, .offline-summary, .offline-detail-toggle) { background: var(--sc-surface-2) !important; border-color: var(--sc-line-soft) !important; }
/* 닉네임·도시 이름 */
body:not(.dark-mode) :is(#nicknameModal, #cityNameModal):is(#nicknameModal, #cityNameModal) :is(.city-window-frame, .sw-avatar) { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; }
/* 월정액·신임 시장 패스·출석(D6: 판만 흰색, 금색 보상 강조와 문구·순서는 그대로) */
body:not(.dark-mode) :is(#monthlyPassModal, #newMayorPassModal, #dailyRewardModal):is(#monthlyPassModal, #newMayorPassModal, #dailyRewardModal) :is(.mp-card, .nmp-card, .dr-card, .mp-header, .city-window-titlebar) { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; }
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal :is(.mp-reward-strip, #monthlyPassClaimProgress, .mp-reset) { background: var(--sc-surface-2) !important; border-color: var(--sc-line-soft) !important; }
body:not(.dark-mode) #monthlyPassModal#monthlyPassModal .mp-note { color: var(--sc-sub) !important; }
body:not(.dark-mode) #eventPanel#eventPanel .ev-bg { background: linear-gradient(180deg, rgba(226,245,255,.42) 0%, rgba(226,245,255,0) 46%), var(--ev-bg-image) center / cover no-repeat, linear-gradient(180deg, #eaf8ff 0%, #c9eafd 55%, #a3d8f8 100%) !important; }
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal :is(.item-value.positive, #offlineBudgetIncome) { color: var(--sc-pos) !important; }
body:not(.dark-mode) #offlineProgressModal#offlineProgressModal :is(.time-label, #offlineBudgetExpandIcon) { color: var(--sc-sub) !important; }
/* SC:토스트·저장·힌트 — 흰 카드. 종류·경고 색(테두리 색 줄·부분 저장·오류)은 유지 */
#toastRoot#toastRoot .toast {
    background: var(--sc-surface) !important;
    border: 1px solid var(--sc-line) !important;
    border-radius: calc(10px * var(--ui-scale));
    clip-path: none;
    box-shadow: var(--sc-shadow-panel);
}
#saveIndicator#saveIndicator:not(.failed):not(.partial) { background: var(--sc-panel); border-color: var(--sc-line); color: var(--sc-text); border-radius: 999px; clip-path: none; box-shadow: var(--sc-shadow); }
#saveIndicator#saveIndicator:is(.failed, .partial) { border-radius: calc(10px * var(--ui-scale)); clip-path: none; }
#saveDonePopup#saveDonePopup { border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
:is(#zoneModeHint, #placementModeHint, #demolishModeHint):is(#zoneModeHint, #placementModeHint, #demolishModeHint) { border-radius: 999px; clip-path: none; box-shadow: var(--sc-shadow); }
/* SC:범례 잔여·나침반 */
:is(#miningLegend, #tradeRouteBar, #tradeRouteLegend):is(#miningLegend, #tradeRouteBar, #tradeRouteLegend) { border-radius: calc(12px * var(--ui-scale)); clip-path: none; box-shadow: var(--sc-shadow-panel); }
#compass#compass.wind-compass { box-shadow: var(--sc-shadow); }
/* SC:확장 설치 바(버스 노선 바 제외) — 하위 메뉴와 같은 옅은 띠 */
@media (min-width: 900px) and (min-height: 541px) {
    #expansionModeBar#expansionModeBar:not(.bus-line-bar) { background: var(--sc-strip); border-top: 1px solid var(--sc-line); box-shadow: 0 -2px 10px rgba(24, 38, 54, 0.18); }
    #expansionModeBar#expansionModeBar:not(.bus-line-bar) .expansion-bar-btn { border-radius: 999px; box-shadow: var(--sc-shadow); }
    #expansionModeBar#expansionModeBar:not(.bus-line-bar) .expansion-bar-btn.close { background: var(--sc-panel); border: 1px solid var(--sc-line); color: var(--sc-text); border-radius: 50%; }
}
/* SC:하단 띠 — [시각][도시 이름] · [행복도][자금 +시간당][인구][RCI] (2026-11-28 사용자 참고 화면 구성) */
@media (min-width: 900px) and (min-height: 541px) {
    body { --sc-strip-h: calc(42px * var(--ui-scale)); --sc-tool-h: calc(52px * var(--ui-scale)); }
    #bottomBar#bottomBar {
        grid-template-columns: minmax(0, 1fr) auto auto auto auto auto minmax(0, 1fr);
        grid-template-rows: 1fr var(--sc-strip-h);
    }
    #bottomBar#bottomBar .city-happiness { grid-column: 2; border-left: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .money-display-center { grid-column: 3; border-left: 0; border-right: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .population-display-center { grid-column: 4; border-left: 0; border-right: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .rci-demand-bar { grid-column: 5; margin: 0; border-right: 1px solid var(--sc-line); }
    #bottomBar#bottomBar .rewarded-ad-btn { grid-column: 6; }
    #bottomBar#bottomBar :is(.money-amount, .pop-amount) { font-size: calc(21px * var(--ui-scale)); }
    #bottomBar#bottomBar :is(.money-icon, .pop-icon) { font-size: calc(19px * var(--ui-scale)); }
    #bottomBar#bottomBar .money-rate { font-size: calc(13px * var(--ui-scale)); font-weight: 800; }
    #bottomBar#bottomBar .pop-label { font-size: calc(11px * var(--ui-scale)); }
    #bottomBar#bottomBar .city-happiness .happiness-icon { font-size: calc(22px * var(--ui-scale)); }
    #bottomBar#bottomBar .city-happiness .happiness-value { font-size: calc(18px * var(--ui-scale)); }
    #bottomBar#bottomBar .rci-bar-container { height: calc(22px * var(--ui-scale)); }

    /* 시각: 띠 왼쪽 끝 */
    #timeHUD#timeHUD { top: auto !important; right: auto !important; left: calc(8px * var(--ui-scale)) !important; bottom: 0 !important; height: var(--sc-strip-h); display: flex; align-items: center; margin: 0; }
    #timeHUD#timeHUD .time-hud-face { background: none; border: 0; box-shadow: none; padding: 0; animation: none; }
    /* 도시 이름: 시각 오른쪽. 상단 바 안의 요소를 그대로 아래로 옮긴다(DOM 불변) */
    #topBar#topBar { z-index: 1002; }
    #topBar#topBar .top-center {
        position: fixed; top: auto; bottom: 0; right: auto; transform: none; animation: none;
        left: calc(236px * var(--ui-scale)); height: var(--sc-strip-h); display: flex; align-items: center; margin: 0;
    }
    #topBar#topBar .top-center .city-name-display {
        max-width: calc(230px * var(--ui-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        background: none; border: 0; box-shadow: none; padding: 0 calc(10px * var(--ui-scale));
        border-left: 1px solid var(--sc-line); border-radius: 0; font-size: calc(14px * var(--ui-scale)); font-weight: 800;
    }
    #topBar#topBar .top-center .city-name-display:hover { background: rgba(27, 155, 224, 0.12); transform: none; }
    #topBar#topBar .top-center .like-btn { box-shadow: none; }
    /* 애드온 바가 열리면(하단 바가 숨는다) 시각·이름은 그 바 위로 */
    body:has(#expansionModeBar[style*="flex"]) #timeHUD#timeHUD,
    body:has(#expansionModeBar[style*="flex"]) #topBar#topBar .top-center { bottom: calc(100px * var(--ui-scale)); background: var(--sc-panel); border-radius: 999px; padding: 0 calc(8px * var(--ui-scale)); }

    /* 건물 설치 목록: 상태 띠에 바로 붙이고(도구 줄 뒤까지 배경), 낮게 */
    #subMenu#subMenu { bottom: var(--sc-strip-h); height: calc(112px * var(--ui-scale)); padding-bottom: var(--sc-tool-h); border-bottom: 0; }
    #subMenu#subMenu.has-tabs { height: calc(132px * var(--ui-scale)); padding-bottom: var(--sc-tool-h); }
    #subMenu#subMenu.has-tabs.open { z-index: 998; }
    #subMenu#subMenu.has-tabs #submenuTabRow { position: static; flex: none; }
    #subMenu#subMenu ~ #advisorPanel#advisorPanel { bottom: var(--sc-strip-h); }
}
/* SC:버튼 체계(D1) — 주요 버튼·선택 표시는 파랑, 금색은 보상·젬 전용. 분류: docs/simcity-ui-redesign/button-classification.md */
#tutorialOnboardingDialog#tutorialOnboardingDialog :is(#tutSkipNo, #fsTipFullscreen),
#ui-modal-overlay#ui-modal-overlay .ui-modal-btn--primary,
#advisorStepOverlay#advisorStepOverlay #advisorStepNext,
:is(#rciTutorialPanel, #cvTutorialPanel):is(#rciTutorialPanel, #cvTutorialPanel) :is(#rciTutorialConfirm, #cvTutorialConfirm),
#offlineProgressModal#offlineProgressModal .offline-close-btn,
.bk-modal-overlay.bk-modal-overlay .bk-modal-btn-primary,
#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-download,
#cameraSettingsPanel#cameraSettingsPanel .settings-tab.active {
    background: var(--sc-accent-deep) !important;
    color: var(--sc-accent-ink) !important;
    border-color: var(--sc-accent-deep) !important;
    text-shadow: none !important;
    clip-path: none;
    border-radius: 999px;
    box-shadow: var(--sc-shadow) !important;
}
:is(#timeDialPanel):is(#timeDialPanel) .time-dial-knob,
#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider::-webkit-slider-thumb { background: var(--sc-accent) !important; box-shadow: var(--sc-shadow); }
#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider::-moz-range-thumb { background: var(--sc-accent); }
#mobileSideMenu#mobileSideMenu .mobile-menu-header, #mobileSideMenu#mobileSideMenu .mobile-menu-btn.active { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
:is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal):is(#skinInventoryModal, #buildingSkinPickerModal, #skinLaunchModal) .skin-card-header { background: var(--sc-surface-2) !important; color: var(--sc-text) !important; }
.university-section.university-section .university-info-button.is-open { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel button.settings-tab.active, body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel button.settings-tab.active * { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
/* SC:모바일(D4 = 색·모서리만, 배치·크기는 그대로) + 다른 화면의 창 틀 */
@media (max-width: 899px), (max-height: 540px) {
    #mobileHUD#mobileHUD .hud-item, #mobileHUD#mobileHUD :is(#mobileMoneyDisplay, #mobilePopDisplay, #mobileHappinessDisplay), #mobileMenuBtn#mobileMenuBtn:not(.open) {
        background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 999px; clip-path: none; box-shadow: var(--sc-shadow); color: var(--sc-text); }
    :is(#mobileSideMenu, #mobileSubmenuSheet):is(#mobileSideMenu, #mobileSubmenuSheet) { background: var(--sc-surface); border-color: var(--sc-line); }
    #mobileSideMenu#mobileSideMenu .mobile-menu-btn:not(.active), #mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-item {
        background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: calc(12px * var(--ui-scale)); clip-path: none; box-shadow: none; color: var(--sc-text); }
    #bottomBar#bottomBar { background: var(--sc-strip); border-top: 1px solid var(--sc-line); box-shadow: none; }
    #bottomBar#bottomBar :is(.tool-btn, .demolish-btn):not(.active) { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: calc(12px * var(--ui-scale)); clip-path: none; box-shadow: var(--sc-shadow); }
    #bottomBar#bottomBar .tool-btn.active { background: var(--sc-accent); border-color: var(--sc-accent-deep); border-radius: calc(12px * var(--ui-scale)); }
    #bottomBar#bottomBar :is(.money-display-center, .population-display-center, .city-happiness, .rci-demand-bar) { background: var(--sc-panel); box-shadow: inset 0 0 0 1px var(--sc-line); border-radius: calc(10px * var(--ui-scale)); clip-path: none; }
    #topBar#topBar { background: var(--sc-strip); box-shadow: none; border-bottom: 1px solid var(--sc-line); }
    #topBar#topBar :is(.menu-btn, .top-btn, .bgm-btn, .like-btn, .city-name-display) { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 999px; clip-path: none; box-shadow: none; }
    #subMenu#subMenu { background: var(--sc-strip); border-top: 1px solid var(--sc-line); }
}
body:not(.dark-mode) .city-window-frame.city-window-frame .offline-progress-header { background: var(--sc-surface); box-shadow: 0 6px 8px -8px rgba(24, 38, 54, 0.3); }
body:not(.dark-mode) .city-window-frame.city-window-frame .city-window-titlebar { background-color: var(--sc-surface); }
body.dark-mode #bottomBar#bottomBar .rci-bar-container { background: var(--sc-track); }
body:not(.dark-mode) #subMenu#subMenu #subMenuClose#subMenuClose { color: var(--sc-text) !important; background: var(--sc-panel) !important; border-color: var(--sc-line) !important; }
/* SC:도구 줄이 넘칠 때(철거 버튼 고정 모드) — 컴팩트 배치에서는 도구 줄 자체가 가로로 밀리는 한 줄이 된다 */
@media (min-width: 900px) and (min-height: 541px) {
    #bottomBar#bottomBar.demolition-toolbar-overflow { overflow: visible !important; }
    #bottomBar#bottomBar.demolition-toolbar-overflow .bottom-center { display: contents; }
    #bottomBar#bottomBar.demolition-toolbar-overflow .bottom-tools {
        display: flex; grid-row: 1; grid-column: 1 / -1; justify-self: stretch; justify-content: flex-start;
        min-width: 0; max-width: 100vw; overflow-x: auto; overflow-y: hidden; scroll-padding-inline: calc(70px * var(--ui-scale));
    }
}
/* SC:진한 판 → 흰 판 (D2). 창을 열어 읽은 색으로 만든 규칙: 의미 색(초록·빨강·금색·파랑)과 단색 버튼의 흰 글씨는 유지. 라이트 전용. */
body:not(.dark-mode) :is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup):is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup) { background: var(--sc-surface) !important; color: var(--sc-text); border-color: var(--sc-line) !important; }
body:not(.dark-mode) :is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup):is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup) * { color: var(--sc-text) !important; text-shadow: none !important; border-color: var(--sc-line-soft); }
body:not(.dark-mode) :is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup):is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup) :is(.popup-header, .panel-header) { background: var(--sc-surface) !important; border-bottom: 1px solid var(--sc-line-soft); }
body:not(.dark-mode) :is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup):is(#cityHallPanel, #tradeCenterPanel, #tourismBureauPanel, #casinoAssociationPanel, #cameraSettingsPanel, #buildingPopup, #publicBuildingPopup) :is(.popup-close, .panel-close) { background: var(--sc-chip) !important; border-color: var(--sc-line-soft); }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #cityHallPanelClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .pop-stat-card.full-width { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .stat-icon { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .stat-label { color: var(--sc-warn) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .pop-stat-card { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #cityHallMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #upgradePointsSection { background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #upgradePointsSection > div { color: #6d28d9 !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-slots-summary { color: #ffffff !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .policy-category-button { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .policy-category-button > span { }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .policy-category-count { color: #ffffff !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-toggle { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-option-art { color: #ffffff !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-option-action { color: #ffffff !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection-effect-park_improvements { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-option-benefit { color: var(--sc-accent-deep) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .ordinance-option-cost { color: var(--sc-accent-deep) !important; background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection-effect-night_classes { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection-effect-settlement_grant { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection-effect-culture_festival { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #ordinanceSection-effect-waterwise_homes { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel .departments-section > div { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #departmentsList > div { color: var(--sc-sub) !important; background: var(--sc-pos-bg) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tradeCenterPanelClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcLevel { color: var(--sc-warn) !important; background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcExport24h { color: var(--sc-pos) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcProgressLabel { color: #6d28d9 !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcUpgradeBtn { color: #ffffff !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcUnlocks { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcContractsBtn { color: var(--sc-warn) !important; background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcSendResourcesBtn { color: var(--sc-warn) !important; background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel #tcGiftCount { color: var(--sc-warn) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tourismBureauPanelClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbLevel { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbCurrentTourists { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbProgressBar { color: #ffffff !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbProgressLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #tourismBureauPanel#tourismBureauPanel #tbUpgradeBtn { color: #ffffff !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #casinoAssociationPanelClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caLevel { color: var(--sc-warn) !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caRevenue24h { color: var(--sc-pos) !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caProgressBar { color: #ffffff !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caProgressLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #casinoAssociationPanel#casinoAssociationPanel #caUpgradeBtn { color: #ffffff !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .panel-title { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .icon { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsPanelTitle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #cameraSettingsClose { color: var(--sc-sub) !important; background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .panel-content { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-tabs { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-tab { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-page { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .city-rename-settings { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-section-title { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .city-rename-settings > form { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .city-rename-input-row { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsCityName { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .city-rename-input-row > button { color: #ffffff !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsCityNameStatus { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-control-hint { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .camera-setting-row { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-checkbox { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsConstructionHints { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .settings-checkbox > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .camera-setting-row.first-person-setting { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnFirstPersonMode { color: var(--sc-sub) !important; background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #firstPersonDescription { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsEdgeScrollToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .camera-setting-label { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .name { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #minZoomValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #minZoomSlider { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #maxZoomValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #maxZoomSlider { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsFovValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsFovSlider { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #cameraResetBtn { color: var(--sc-sub) !important; background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsBgmVolumeValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsBgmVolume { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsBgmToggle { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .camera-settings-divider { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsSfxVolumeValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsSfxVolume { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsGraphicsPreset { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #resolutionValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #resolutionSlider { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsShadowToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsShadowResolution { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsSaturationToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsSaturationValue { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsSaturationSlider { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #postprocessToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #postprocessLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsFxaaToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsBloomToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsTiltShiftToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsDataViewMonochrome { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnHudToggle { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnHudToggle > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #hudToggleLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #hudToggleState { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .camera-setting-item { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsConstructionConfirmation { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnVoucherCode { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnVoucherCode > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel .voucher-chevron { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnDarkMode { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #settingsFontScale { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #btnResetWindowLayout { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #cameraSettingsPanel#cameraSettingsPanel #resetWindowLayoutHint { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #buildingSkinPaletteBtn { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #civilDisasterRestore { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupType { color: var(--sc-pos) !important; background: var(--sc-pos-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupTypeIcon { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupTypeText { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .label { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupPopulation { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupTierRequirement { color: var(--sc-warn) !important; background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupTierRequirementText { color: var(--sc-warn) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #happinessBarContainer { background: var(--sc-track) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #happinessBarFill { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #happinessValue { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupResidentFlow { color: var(--sc-warn) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #unhappySection { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .happiness-header.unhappy { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .happiness-header.unhappy > span { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #happySection { background: var(--sc-pos-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .happiness-header.happy { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .happiness-header.happy > span { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .happiness-item.happy { color: var(--sc-pos) !important; background: var(--sc-pos-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .hi-icon { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .hi-text { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .hi-value { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #eventAlertText { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #abandonedWarningRow { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #abandonedCountdown { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .age-distribution-header { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .icon { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .age-distribution-header > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .age-label-name { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #ageChildren { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #ageTeens { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #ageYoung { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #ageAdult { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #ageElderly { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .level-progress-title { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .level-progress-title > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #landValueDirectionArrowRate { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelProgressBar { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelSection1 { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .section-label { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelSection2 { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelSection3 { background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .marker-icon { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .marker-line { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #landValueDirectionArrow { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelBadgeCurrent { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .badge-icon { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .badge-label { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .badge-level { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #levelBadgeNext { color: var(--sc-pos) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupEducationLevelSection { background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .education-level-title > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .education-level-value { color: #6d28d9 !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupEducationLevelText { color: #6d28d9 !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #educationProgressBar { background: var(--sc-track) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .section-desc { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #eduSection2 { background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #eduSection3 { background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #educationShortageWarning { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #educationShortageText { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupDensitySection { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .density-progress-value { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #popupDensityValue { color: var(--sc-warn) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #densityArrowRate { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #densityProgressBar { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #densitySection1 { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #densitySection2 { color: #ffffff !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #densitySection3 { background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup #demolishInfoContainer { background: var(--sc-track) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .demolish-title { color: var(--sc-neg) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup .demolish-desc { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #buildingEnabledToggle { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .toggle-slider { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicMoveBtn { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicPopupClose { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicDisasterRestore { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .label { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicPopupMaintenance { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicPopupPowerUsage { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .public-worker-gauge { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #publicWorkerGaugeFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .firetruck-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .label > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupVisitors { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupDemand { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupAttractiveness { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupAccess { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupRevenue { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tourismPopupMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .firetruck-bar-bg { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #firetruckBarDispatched { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #firetruckBarAvailable { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .dispatched-label { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .dispatched-label > span { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #firetruckDispatched { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .available-label { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .available-label > span { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #firetruckAvailable { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .firetruck-total { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #policeBarDispatched { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #policeBarAvailable { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #policeDispatched { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #policeAvailable { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #prisonBarOccupied { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #prisonOccupied { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #prisonEmpty { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #ambulanceBarDispatched { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #ambulanceBarAvailable { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #ambulanceDispatched { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #ambulanceAvailable { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #patientBarOccupied { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #patientOccupied { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #patientEmpty { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #wastewaterContaminationWarning { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #wastewaterContaminationWarning > div { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #wastewaterContaminationDesc { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #waterPumpContaminationWarning { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #waterPumpContaminationWarning > div { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #waterPumpContaminationDesc { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #expansionTotalPower { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #expansionTotalMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnExpansionGear { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #helicopterMaintenance { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #helicopterCoverage { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnInstallHelicopter { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnInstallHelicopter > span { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #helicopterCost { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnRemoveHelicopter { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnRemoveHelicopter > span { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .mining-storage-bar-bg { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolStudentBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .mining-storage-labels { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolStudents { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolCapacityLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolCapacity { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolCapacityLabel > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #uniStudentBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #uniStudentCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #uniCapacityLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearPowerOutput { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearMaintenanceCost { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWaterLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWaterUsage { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWorkerBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWorkerCount { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWorkerCapLabel { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWorkerWarning { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #nuclearWorkerWarningText { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalPowerOutput { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalConsumptionRate { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalStorageCurrent { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalStorageMax { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .mining-storage-labels > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .coal-runtime-info { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .coal-runtime-info > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalRuntimeEstimate { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .priority-help { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #coalPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilPowerOutput { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilConsumptionRate { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilStorageCurrent { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilStorageMax { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .oil-runtime-info { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .oil-runtime-info > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRuntimeEstimate { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .mining-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningRatePerHour { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningStoredAmount { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningTruckCapacity { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningStorageBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningStorageCurrent { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningStorageMax { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #miningTransportStatus { color: #6d28d9 !important; background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddOilRig { color: var(--sc-warn) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddOilRig > span { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddCoalMiner { color: var(--sc-sub) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddCoalMiner > span { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddOreMiner { color: var(--sc-warn) !important; background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddOreMiner > span { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .smelter-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .popup-row { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterAlloyRate { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterCoalConsumption { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterOreConsumption { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterOreBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterAlloyBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterTransportStatus { color: var(--sc-warn) !important; background: var(--sc-warn-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterCoalPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #smelterOrePrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .oil-refinery-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryPlasticRate { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryFuelRate { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryOilConsumption { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryPlasticBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryFuelBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryTransportStatus { color: var(--sc-accent-deep) !important; background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilRefineryPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .electronics-factory-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryProcessorRate { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryAlloyConsumption { color: var(--sc-warn) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryPlasticConsumption { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryAlloyBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryPlasticBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryProcessorBarFill { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryTransportStatus { color: var(--sc-accent-deep) !important; background: rgba(27, 155, 224, 0.1) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryAlloyPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #electronicsFactoryPlasticPrioritySelect { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .trade-depot-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeTruckCount { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeTruckCapacity { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeDailyMaxRevenue { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeShipCapacity { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeTrainCapacity { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #btnAddWarehouse { color: #ffffff !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradeInfo { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .trade-port-status { background: var(--sc-track) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradePortTripsPerDay { color: #6d28d9 !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #tradePortExportLast24h { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #transportTodayTons { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #transportYesterdayTons { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .airport-stat > strong { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .bus-line-addon-manage { background: var(--sc-surface-2) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptResidentCount { color: var(--sc-accent-deep) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptResidentMax { color: var(--sc-sub) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptTaxValue { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptLandValueWarning { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptLandValueWarning > span { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptUnhappySection { background: var(--sc-neg-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .happiness-header.unhappy { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .happiness-header.unhappy > span { color: var(--sc-neg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #aptHappySection { background: var(--sc-pos-bg) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .happiness-header.happy { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup .happiness-header.happy > span { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #oilPowerOperational { color: var(--sc-pos) !important; }
body:not(.dark-mode) #publicBuildingPopup#publicBuildingPopup #schoolBusStatus { color: var(--sc-sub) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #btnCityHallAddon { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel #btnCityHallAddon * { color: var(--sc-accent-ink) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel button.policy-category-button, body:not(.dark-mode) #cityHallPanel#cityHallPanel button.policy-category-button * { color: var(--sc-text) !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel#cityHallPanel .panel-content div span:not([id]):not([class]) { color: var(--sc-text) !important; }
body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel#tradeCenterPanel .panel-content div span:not([id]):not([class]), body:not(.dark-mode) #tradeCenterPanel#tradeCenterPanel#tradeCenterPanel .panel-content > div:not([id]):not([class]) { color: var(--sc-sub) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup#buildingPopup #ageElderly { color: #111827 !important; }
body:not(.dark-mode) #cityHallPanel#cityHallPanel#cityHallPanel .panel-content #btnCityHallAddon#btnCityHallAddon span { color: var(--sc-accent-ink) !important; }
body:not(.dark-mode) #buildingPopup#buildingPopup#buildingPopup :is(#levelSection3, #densitySection3), body:not(.dark-mode) #buildingPopup#buildingPopup#buildingPopup :is(#levelSection3, #densitySection3) * { color: var(--sc-warn) !important; }
/* SC:진한 판 끝 */
/* SC:곡선 하단 — 여러 겹의 곡선 판(뒤 언덕 · 앞 언덕 · 도구 띠 · 상태 띠). 벡터 마스크(SVG data URI)로 그려
   해상도와 무관하고, 처음 뜰 때와 건설 목록을 열 때 왼쪽부터 그려진다. 요청·이미지 파일·JS 추가 없음 (2026-11-28) */
@media (min-width: 900px) and (min-height: 541px) {
    body {
        --sc-band: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(236, 241, 246, 0.97));
        --sc-band-back: linear-gradient(180deg, rgba(214, 228, 240, 0.9), rgba(196, 214, 230, 0.9));
    }
    #bottomBar#bottomBar { height: calc(var(--sc-tool-h) + var(--sc-strip-h)); grid-template-rows: var(--sc-tool-h) var(--sc-strip-h); }
    body.dark-mode {
        --sc-band: linear-gradient(180deg, rgba(46, 57, 71, 0.97), rgba(36, 45, 57, 0.97));
        --sc-band-back: linear-gradient(180deg, rgba(27, 64, 96, 0.92), rgba(22, 48, 74, 0.92));
    }
    /* 상태 띠: 맨 앞 판, 위에 파란 선 한 줄 */
    #bottomBar#bottomBar::before {
        position: relative; z-index: 0;
        border-top: 0;
        box-shadow: inset 0 calc(2px * var(--ui-scale)) 0 var(--sc-accent), 0 calc(-2px * var(--ui-scale)) calc(8px * var(--ui-scale)) rgba(15, 28, 44, 0.18);
        animation: sc-fade 0.35s ease-out both;
    }
    /* 도구 띠: 오른쪽 끝이 상태 띠로 둥글게 내려간다 */
    #bottomBar#bottomBar::after {
        content: "";
        grid-row: 1; grid-column: 1 / -1; align-self: stretch;
        position: relative; z-index: -1;
        background: var(--sc-band);
        border-top-right-radius: calc(140px * var(--ui-scale)) 100%;
        box-shadow: 0 calc(-3px * var(--ui-scale)) calc(10px * var(--ui-scale)) rgba(15, 28, 44, 0.16);
        pointer-events: none;
        animation: sc-draw-x 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    }
    /* 왼쪽 언덕 두 겹: 앞(흰 판), 뒤(옅은 하늘 판). 도구 띠와 S자로 이어진다 */
    #bottomBar#bottomBar .bottom-left::before,
    #bottomBar#bottomBar .bottom-center::before {
        content: "";
        position: absolute; left: 0; bottom: var(--sc-strip-h);
        pointer-events: none;
        -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
        -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
        transform-origin: 0 100%;
    }
    #bottomBar#bottomBar .bottom-left::before {
        width: calc(360px * var(--ui-scale)); height: calc(124px * var(--ui-scale));
        background: var(--sc-band);
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 124' preserveAspectRatio='none'%3E%3Cpath d='M0 124V30C0 10 12 0 34 0H150C214 0 224 72 292 72H360V124Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 124' preserveAspectRatio='none'%3E%3Cpath d='M0 124V30C0 10 12 0 34 0H150C214 0 224 72 292 72H360V124Z'/%3E%3C/svg%3E");
        z-index: -1;
        filter: drop-shadow(0 calc(-2px * var(--ui-scale)) calc(6px * var(--ui-scale)) rgba(15, 28, 44, 0.18));
        animation: sc-rise-curve 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) 0.18s both;
    }
    #bottomBar#bottomBar .bottom-center::before {
        width: calc(470px * var(--ui-scale)); height: calc(150px * var(--ui-scale));
        background: var(--sc-band-back);
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 470 150' preserveAspectRatio='none'%3E%3Cpath d='M0 150V18C0 6 8 0 22 0H210C300 0 310 106 400 106H470V150Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 470 150' preserveAspectRatio='none'%3E%3Cpath d='M0 150V18C0 6 8 0 22 0H210C300 0 310 106 400 106H470V150Z'/%3E%3C/svg%3E");
        z-index: -2;
        animation: sc-rise-curve 0.75s cubic-bezier(0.34, 1.3, 0.64, 1) 0.05s both;
    }
    #bottomBar#bottomBar .bottom-tools { position: relative; z-index: 1; }

    /* 건설 목록: 도구 띠 위로 올라오는 판. 왼쪽 끝이 언덕 쪽에서 곡선으로 솟는다(두 겹) */
    #subMenu#subMenu { background: transparent; border-top: 0; box-shadow: none; }
    #subMenu#subMenu::before, #subMenu#subMenu::after {
        content: ""; position: absolute; z-index: -1; pointer-events: none;
        left: calc(150px * var(--ui-scale)); right: 0; bottom: 0; top: 0;
    }
    #subMenu#subMenu::before {
        top: 0;
        background: var(--sc-band);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C70 100 78 0 150 0H260V100Z'/%3E%3C/svg%3E") left / calc(260px * var(--ui-scale)) 100% no-repeat, linear-gradient(#000, #000) calc(259px * var(--ui-scale)) 0 / 100% 100% no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C70 100 78 0 150 0H260V100Z'/%3E%3C/svg%3E") left / calc(260px * var(--ui-scale)) 100% no-repeat, linear-gradient(#000, #000) calc(259px * var(--ui-scale)) 0 / 100% 100% no-repeat;
        filter: drop-shadow(0 calc(-3px * var(--ui-scale)) calc(8px * var(--ui-scale)) rgba(15, 28, 44, 0.2));
    }
    #subMenu#subMenu::after {
        z-index: -2; top: calc(-10px * var(--ui-scale)); left: calc(110px * var(--ui-scale));
        background: var(--sc-band-back);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C70 100 78 0 150 0H260V100Z'/%3E%3C/svg%3E") left / calc(260px * var(--ui-scale)) 100% no-repeat, linear-gradient(#000, #000) calc(259px * var(--ui-scale)) 0 / 100% 100% no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C70 100 78 0 150 0H260V100Z'/%3E%3C/svg%3E") left / calc(260px * var(--ui-scale)) 100% no-repeat, linear-gradient(#000, #000) calc(259px * var(--ui-scale)) 0 / 100% 100% no-repeat;
        opacity: 0.85;
    }
}
@keyframes sc-draw-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sc-rise-curve { from { transform: scale(0.35, 0.2); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) and (min-height: 541px) and (prefers-reduced-motion: reduce) {
    #bottomBar#bottomBar::before, #bottomBar#bottomBar::after, #bottomBar#bottomBar .bottom-left::before, #bottomBar#bottomBar .bottom-center::before { animation: none; }
}
/* SC:곡선 하단 끝 */
/* SC:뉴스·업그레이드 — 긴급 뉴스는 화면 맨 위 가운데에 붙인다(도시 이름이 아래 띠로 내려가 빈 자리) */
@media (min-width: 900px) and (min-height: 541px) {
    #newsHeadline#newsHeadline, #newsHeadline#newsHeadline.nh-night {
        top: 0; width: clamp(220px, calc(100vw - 700px), 380px);
        border-top: 0; border-radius: 0 0 calc(14px * var(--ui-scale)) calc(14px * var(--ui-scale));
        background: var(--sc-panel); box-shadow: 0 calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale)) rgba(15, 28, 44, 0.22);
    }
    #newsHeadline#newsHeadline .nh-tk-live { border-radius: 0 0 0 calc(12px * var(--ui-scale)); }

    /* 공사 차량 업그레이드 버튼: 왼쪽 볼록한 언덕 안. 건설 목록(고문)이 열리면 자리를 내주고, 닫히면 돌아온다 */
    .civil-upgrade-btn#constructionVehicleBtn {
        --civil-fab-size: calc(84px * var(--ui-scale));
        left: calc(env(safe-area-inset-left) + 34px * var(--ui-scale)); right: auto;
        bottom: calc(var(--sc-strip-h) + 18px * var(--ui-scale)); z-index: 1001;
        transition: transform 0.36s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.22s ease, visibility 0s linear 0s;
    }
    body:has(#subMenu.open) .civil-upgrade-btn#constructionVehicleBtn,
    body:has(#expansionModeBar[style*="flex"]) .civil-upgrade-btn#constructionVehicleBtn {
        transform: translateY(calc(46px * var(--ui-scale))) scale(0.45); opacity: 0; visibility: hidden; pointer-events: none;
        transition: transform 0.22s ease-in, opacity 0.18s ease-in, visibility 0s linear 0.22s;
    }
    /* 왼쪽에 있는 버튼의 "업그레이드 가능" 표시는 오른쪽으로 펼친다 */
    .civil-upgrade-btn#constructionVehicleBtn .civil-fab-badge { left: -4px; right: auto; }
    /* 고문: 버튼이 빠진 언덕에서 아래에서 올라온다 */
    #subMenu#subMenu.open ~ #advisorPanel#advisorPanel #advisorImage { animation: sc-advisor-in 0.42s cubic-bezier(0.34, 1.3, 0.64, 1) 0.12s both; }
    #subMenu#subMenu.open ~ #advisorPanel#advisorPanel #advisorBubble { animation: sc-advisor-bubble-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; }
    /* 오른쪽 아래에 버튼이 없으므로 저장 표시·모드 안내는 원래 자리로 */
    body:has(#constructionVehicleBtn) :is(#autoSaveStatus, #saveIndicator)#saveIndicator { right: calc(14px * var(--ui-scale)); }
    body:has(#constructionVehicleBtn) #civilWorksHub#civilWorksHub { bottom: calc(var(--sc-strip-h) + var(--sc-tool-h) + 12px); }
}
@keyframes sc-advisor-in { from { opacity: 0; transform: translateY(calc(48px * var(--ui-scale))) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes sc-advisor-bubble-in { from { opacity: 0; transform: translateX(calc(-18px * var(--ui-scale))) scale(0.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    #subMenu#subMenu.open ~ #advisorPanel#advisorPanel :is(#advisorImage, #advisorBubble) { animation: none; }
    .civil-upgrade-btn#constructionVehicleBtn { transition: none; }
}
/* 업그레이드 버튼 모양: 파란 원(모두 작업 중이면 주황), 초록 대기 배지는 그대로 */
.civil-upgrade-btn.civil-upgrade-btn {
    color: #ffffff; border: calc(3px * var(--ui-scale)) solid #ffffff;
    background: linear-gradient(180deg, #2aa7ea, #1479b4);
    box-shadow: 0 0 0 calc(2px * var(--ui-scale)) var(--sc-accent-deep), 0 calc(5px * var(--ui-scale)) calc(14px * var(--ui-scale)) rgba(15, 28, 44, 0.35);
}
.civil-upgrade-btn.civil-upgrade-btn:hover { filter: brightness(1.08); }
.civil-upgrade-btn.civil-upgrade-btn.all-busy { background: linear-gradient(180deg, #fb923c, #ea580c); box-shadow: 0 0 0 calc(2px * var(--ui-scale)) #9a3412, 0 calc(5px * var(--ui-scale)) calc(14px * var(--ui-scale)) rgba(15, 28, 44, 0.35); }
.civil-upgrade-btn.civil-upgrade-btn.civil-fab-ready { animation: sc-fab-call 1.6s ease-in-out infinite; }
@keyframes sc-fab-call { 50% { box-shadow: 0 0 0 calc(2px * var(--ui-scale)) var(--sc-accent-deep), 0 0 0 calc(8px * var(--ui-scale)) rgba(34, 197, 94, 0.55); } }
@media (prefers-reduced-motion: reduce) { .civil-upgrade-btn.civil-upgrade-btn.civil-fab-ready { animation: none; outline: 3px solid #22c55e; outline-offset: 3px; } }
/* 업그레이드 창(작업팀·예약·업그레이드·자동 승인): 로우폴리 변수를 컴팩트 토큰으로 */
#civilWorksHub#civilWorksHub, #civilAutoDialog#civilAutoDialog, #civilReasonTip, #civilUpgradePopupAction, #civilSitePopupAction {
    --lp-dialog-hi: var(--sc-surface); --lp-dialog-lo: var(--sc-surface); --lp-dialog-facet: var(--sc-surface-2); --lp-dialog-frame: var(--sc-line);
    --lp-dialog-edge: transparent; --lp-dialog-title: var(--sc-text); --lp-dialog-msg: var(--sc-sub); --lp-tile-line: var(--sc-line);
    --lp-tile-hi: var(--sc-panel-hover); --lp-tile-lo: var(--sc-surface-2); --lp-tile-lip: transparent; --lp-text: var(--sc-text);
    --lp-divider: var(--sc-line-soft); --lp-panel-shadow: rgba(15, 28, 44, 0.28); --lp-yellow-hi: var(--sc-accent); --lp-yellow-lo: var(--sc-accent-deep);
    --lp-yellow-lip: var(--sc-accent-deep); --lp-warm-hi: var(--sc-warn-bg); --lp-warm-lip: var(--sc-warn); --lp-warm-label: var(--sc-warn); --lp-rci-track: var(--sc-track);
}
#civilWorksHub#civilWorksHub :is(#civilWorksDock, #civilFleetBox, #civilReserveBox), #civilAutoDialog#civilAutoDialog .civil-auto-box {
    border: 1px solid var(--sc-line); border-radius: calc(12px * var(--ui-scale)); box-shadow: var(--sc-shadow-panel);
}
#civilWorksHub#civilWorksHub button:where(:not(.civil-model-card, .civil-locate)), #civilAutoDialog#civilAutoDialog button, #civilUpgradePopupAction#civilUpgradePopupAction, #civilSitePopupAction#civilSitePopupAction {
    border-radius: calc(10px * var(--ui-scale)); clip-path: none;
}
#civilAutoDialog#civilAutoDialog .civil-auto-actions .civil-auto-start { color: #ffffff; }
/* SC:뉴스·업그레이드 끝 */
/* SC:팝업·튜토리얼 전체 — 창을 하나씩 열어 읽은 남색·크림 판을 테마 토큰으로(라이트·다크 공통). 도구: sc-ui-tools/popups.mjs */
html body #newsPanel#newsPanel#newsPanel .nh-chrome.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel .nh-chrome-dots { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel .nh-chrome-nav { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #btnNewsBack { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #btnNewsForward { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #btnNewsRefresh { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel .nh-address-bar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel .nh-lock { color: var(--sc-pos) !important; }
html body #newsPanel#newsPanel#newsPanel #newsUrl { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #btnNewsCloseX { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #cityNewsTab { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel .cs-tab-icon { color: var(--sc-text) !important; }
html body #newsPanel#newsPanel#newsPanel #cityNewsTab > span { color: var(--sc-text) !important; }
html body #advisorStepBubble#advisorStepBubble#advisorStepBubble { color: var(--sc-sub) !important; }
html body #advisorStepBubble#advisorStepBubble#advisorStepBubble .adv-tutor-character { color: var(--sc-sub) !important; }
html body #achievementModal#achievementModal#achievementModal { color: var(--sc-text) !important; }
html body #cvTutorialPanel#cvTutorialPanel#cvTutorialPanel { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #cvTutorialPanel#cvTutorialPanel#cvTutorialPanel #cvTutorialPanel > div { color: var(--sc-text) !important; }
html body #cvTutorialPanel#cvTutorialPanel#cvTutorialPanel #cvTutorialBody { color: var(--sc-text) !important; }
html body #rciTutorialPanel#rciTutorialPanel#rciTutorialPanel { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #rciTutorialPanel#rciTutorialPanel#rciTutorialPanel #rciTutorialPanel > div { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel .help-panel-content { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel .help-categories { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel .help-category-btn { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel #helpContent { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #constructionPopup#constructionPopup#constructionPopup .popup-header.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .icon { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup #constructionTitle { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup #constructionPopupClose { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .popup-content { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup #constructionStatus { color: var(--sc-sub) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .construction-time-info { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .time-row { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .time-label { color: var(--sc-sub) !important; }
html body #constructionPopup#constructionPopup#constructionPopup #constructionTotalTime { color: var(--sc-text) !important; }
html body #constructionPopup#constructionPopup#constructionPopup #constructionTimeLeft { color: var(--sc-warn) !important; }
html body #constructionPopup#constructionPopup#constructionPopup .construction-progress-container { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #upgradePopup#upgradePopup#upgradePopup .popup-header.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .icon { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeTitle { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .popup-header-actions { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradePopupClose { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .popup-content { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeStatus { color: var(--sc-sub) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .upgrade-tier-info { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeFromTier { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .upgrade-tier-info > span { color: var(--sc-warn) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeToTier { color: var(--sc-pos) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .construction-time-info { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .time-row { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .time-label { color: var(--sc-sub) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeTotalTime { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeTimeLeft { color: var(--sc-warn) !important; }
html body #upgradePopup#upgradePopup#upgradePopup .construction-progress-container { color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeProgress { background: var(--sc-track) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #upgradePopup#upgradePopup#upgradePopup #upgradeInstantRow { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .warehouse-modal-content.city-window-frame { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .warehouse-modal-header.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .modal-title { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal #warehouseModalClose { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .warehouse-modal-body { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-select-list { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-select-item { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-icon { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-info { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-name { color: var(--sc-text) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-price { color: var(--sc-sub) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-price > span { color: var(--sc-sub) !important; }
html body #loginRewardBox#loginRewardBox#loginRewardBox { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #loginRewardBox#loginRewardBox#loginRewardBox #loginRewardBox > div { color: var(--sc-text) !important; }
html body #loginRewardBox#loginRewardBox#loginRewardBox #loginRewardText { color: var(--sc-pos) !important; }
html body #loginRewardBox#loginRewardBox#loginRewardBox #btnClaimReward { color: var(--sc-text) !important; }
html body #skinInventoryModal#skinInventoryModal#skinInventoryModal { color: var(--sc-text) !important; }
html body #buildingSkinPickerModal#buildingSkinPickerModal#buildingSkinPickerModal { color: var(--sc-text) !important; }
html body #skinLaunchModal#skinLaunchModal#skinLaunchModal { color: var(--sc-text) !important; }
html body #skinLaunchModal#skinLaunchModal#skinLaunchModal #btnSkinLaunchShop { background: var(--sc-accent-deep) !important; border-color: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body #dailyQuestModal#dailyQuestModal#dailyQuestModal { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-rim { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeDialFace { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-core { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-icon.time-dial-icon-noon { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-icon.time-dial-icon-dawn { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-horizon-icon { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-icon.time-dial-icon-dusk { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-icon.time-dial-icon-night { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeDialValue { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .time-dial-pause-box { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel > span { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeWeatherPicker { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-picker-head { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #weatherPickerTitle { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-auto { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-warn) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-auto > span { color: var(--sc-warn) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-cards { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-card { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-picture { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel .weather-card > span { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeWeatherRainCard { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeWeatherRainCard > span { color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeWeatherSnowCard { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeWeatherSnowCard > span { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-container.city-window-frame { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-header.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-title { color: var(--sc-warn) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-title > span { color: var(--sc-warn) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal #tsmClose { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-body { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal #tsmStep1 { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal .tsm-search-row { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal #tsmSearchInput { color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal #tsmSortSelect { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #tradeSendModal#tradeSendModal#tradeSendModal #tsmStep1 > div { color: var(--sc-warn) !important; }
html body #voucherCodeDialog#voucherCodeDialog#voucherCodeDialog #voucherCodeSubmit { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel #timeDialHand { color: var(--sc-text) !important; }
html body #tradeGiftBubble#tradeGiftBubble#tradeGiftBubble { color: var(--sc-text) !important; }
html body #tradeGiftBubble#tradeGiftBubble#tradeGiftBubble .gift-bubble-tail { color: var(--sc-text) !important; }
html body #disconnectModal#disconnectModal#disconnectModal { color: var(--sc-text) !important; }
html body #disconnectModal#disconnectModal#disconnectModal .city-window-frame { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #disconnectModal#disconnectModal#disconnectModal .city-window-frame > div { color: var(--sc-text) !important; }
html body #disconnectModal#disconnectModal#disconnectModal .city-window-frame > p { color: var(--sc-sub) !important; }
html body #bankruptcyFailedModal#bankruptcyFailedModal#bankruptcyFailedModal { color: var(--sc-text) !important; }
html body #bankruptcyInfoModal#bankruptcyInfoModal#bankruptcyInfoModal { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-card { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-title { color: var(--sc-accent-deep) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-intro { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-current { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-steps { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-step { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-note { color: var(--sc-accent-deep) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-actions { color: var(--sc-text) !important; }
html body #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-close { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-title { color: var(--sc-accent-deep) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-body { color: var(--sc-text) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-after { color: var(--sc-accent-deep) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-actions { color: var(--sc-text) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-later { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt .gpu-setup-prompt-manual { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .nh-chrome.city-window-titlebar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .nh-chrome-dots { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .nh-chrome-nav { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #btnNewsBack { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #btnNewsForward { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #btnNewsRefresh { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .nh-address-bar { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .nh-lock { color: var(--sc-pos) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #newsUrl { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #btnNewsCloseX { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #citySocialTab { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .cs-tab-icon { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay #citySocialTab > span { color: var(--sc-text) !important; }
html body #newsOverlay#newsOverlay#newsOverlay .cs-chip.is-active { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel #eventTabs { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-tab.is-pinned { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-tab-label { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel #eventMain { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-head { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel #eventPanelHeading { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-cards { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-empty { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; color: var(--sc-text) !important; }
/* 파산·안내 창 */
html body .bk-modal-overlay.bk-modal-overlay .bk-modal { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; box-shadow: var(--sc-shadow-panel) !important; color: var(--sc-text) !important; }
html body .bk-modal-overlay.bk-modal-overlay :is(.bk-modal-title, .bk-modal-option, .bk-modal-option *) { color: var(--sc-text) !important; }
html body .bk-modal-overlay.bk-modal-overlay .bk-modal-desc { color: var(--sc-sub) !important; }
html body .bk-modal-overlay.bk-modal-overlay .bk-modal-option { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; border-radius: calc(10px * var(--ui-scale)); clip-path: none; }
/* 저장 데이터 선택(백업 복구): 인라인 스타일 창 */
html body div[style*="rgb(30, 32, 40)"] { background: var(--sc-surface) !important; color: var(--sc-text) !important; border: 1px solid var(--sc-line); }
html body div[style*="rgb(30, 32, 40)"] :is(div, span, strong, label, h3) { color: var(--sc-text) !important; }
html body div[style*="rgb(30, 32, 40)"] label { border-color: var(--sc-line) !important; }
html body div[style*="rgb(30, 32, 40)"] button { background: var(--sc-chip) !important; color: var(--sc-text) !important; border: 1px solid var(--sc-line) !important; border-radius: 999px !important; }
html body div[style*="rgb(30, 32, 40)"] button:first-of-type { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; border-color: var(--sc-accent-deep) !important; }
/* 도시 순위 */
html body .crk-overlay.crk-overlay .crk-panel { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)); box-shadow: var(--sc-shadow-panel); color: var(--sc-text) !important; }
html body .crk-overlay.crk-overlay .crk-head { background: var(--sc-surface) !important; color: var(--sc-text) !important; border-bottom: 1px solid var(--sc-line-soft); }
html body .crk-overlay.crk-overlay :is(.crk-head h2, .crk-count) { color: var(--sc-text) !important; }
html body .crk-overlay.crk-overlay .crk-count { background: var(--sc-chip) !important; }
html body .crk-overlay.crk-overlay .crk-close { background: var(--sc-chip) !important; color: var(--sc-text) !important; border-radius: 50%; }
html body .crk-overlay.crk-overlay .crk-close:hover { background: var(--sc-danger) !important; color: var(--sc-accent-ink) !important; }
html body .crk-overlay.crk-overlay .crk-tab { background: var(--sc-panel) !important; border: 1px solid var(--sc-line) !important; border-radius: 999px; box-shadow: none !important; color: var(--sc-text) !important; }
html body .crk-overlay.crk-overlay .crk-tab.is-active { background: var(--sc-accent-deep) !important; border-color: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body .crk-overlay.crk-overlay .crk-row.is-mine a { box-shadow: inset 4px 0 0 var(--sc-accent); background: var(--sc-surface-2) !important; }
/* 게임 도움말 */
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-panel-header { background: var(--sc-surface) !important; border-bottom: 1px solid var(--sc-line-soft) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-panel-title { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-panel-close { background: var(--sc-chip) !important; color: var(--sc-text) !important; border-radius: 50%; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-category-btn { background: var(--sc-chip) !important; background-image: none !important; color: var(--sc-text) !important; border-radius: 999px !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-category-btn.active { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-content :is(div, span, p, li, strong, b, h3, h4, td, th) { color: var(--sc-text) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-content :is(.help-section, .help-system, .help-stat, .help-row) { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-content :is(.help-section-title, .help-system-title, .help-title) { color: var(--sc-accent-deep) !important; }
html body #gameHelpPanel#gameHelpPanel#gameHelpPanel#gameHelpPanel .help-content .help-section .help-row { background: transparent !important; }
/* 시스템 도움말(어드바이저 안내) */
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)); clip-path: none; box-shadow: var(--sc-shadow-panel) !important; color: var(--sc-text) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-header { background: var(--sc-surface) !important; border-color: var(--sc-line-soft) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content :is(div, span, p, li, strong, b, em, h2, h3, h4, td, summary, label) { color: var(--sc-text) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content :is(.system-help-title, .advisor-guide-section h3, h3, th, .help-bar-row.current .help-bar-label) { color: var(--sc-accent-deep) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content th { background: var(--sc-surface-2) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content :is(th, td) { border-color: var(--sc-line) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content :is(.help-tip, .help-compare-card, .advisor-guide-summary) { background: var(--sc-surface-2); border-color: var(--sc-line); }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content .help-compare-card.good { background: var(--sc-surface-2) !important; border-color: var(--sc-pos) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content .help-compare-card.bad { background: var(--sc-surface-2) !important; border-color: var(--sc-neg) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content :is(.help-rci-track, .help-rci-bar, .help-bar-track) { background-color: var(--sc-track) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content .help-num-up { color: var(--sc-pos) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content .help-num-down { color: var(--sc-neg) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-content .help-compare-gap { color: var(--sc-warn) !important; }
html body #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal .system-help-close { background: var(--sc-chip) !important; color: var(--sc-text) !important; border-radius: 50%; }
/* 첫 안내(공사 차량·수요) */
html body :is(#cvTutorialPanel#cvTutorialPanel#cvTutorialPanel#cvTutorialPanel, #rciTutorialPanel#rciTutorialPanel#rciTutorialPanel#rciTutorialPanel) :is(div, p, li) { color: var(--sc-text) !important; }
html body :is(#cvTutorialPanel#cvTutorialPanel#cvTutorialPanel#cvTutorialPanel, #rciTutorialPanel#rciTutorialPanel#rciTutorialPanel#rciTutorialPanel) span[style*="color"] { color: var(--sc-accent-deep) !important; }
/* 자원 선택 */
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-select-item { background: var(--sc-surface-2) !important; border: 1px solid var(--sc-line) !important; }
html body #warehouseResourceModal#warehouseResourceModal#warehouseResourceModal#warehouseResourceModal .resource-select-item:hover { border-color: var(--sc-accent) !important; }
/* 접속 끊김·그래픽 설정 */
html body #disconnectModal#disconnectModal#disconnectModal#disconnectModal .city-window-titlebar { color: var(--sc-text) !important; background: transparent !important; }
html body :is(#disconnectModal#disconnectModal#disconnectModal#disconnectModal #reconnectBtn, #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel .gpu-manual-setup-open) { background: var(--sc-accent-deep) !important; background-image: none !important; color: var(--sc-accent-ink) !important; border-color: var(--sc-accent-deep) !important; border-radius: 999px !important; }
/* 진입 창(출석·월정액·오프라인 결산): 크림·남색 판과 금색 테를 테마 판으로. 보상 버튼·보상 금색 글씨는 유지 */
body:is(*, .dark-mode) :is(#dailyRewardModal, #monthlyPassModal, #offlineProgressModal) { --lp-cream-frame: var(--sc-line); --lp-cream-edge: transparent; --lp-cream-lip: transparent; --lp-dpanel-hi: var(--sc-surface); --lp-dpanel-lo: var(--sc-surface); }
html body #dailyRewardModal#dailyRewardModal .dr-card, html body #monthlyPassModal#monthlyPassModal :is(.mp-card, .mp-scroll), html body #offlineProgressModal#offlineProgressModal :is(.offline-progress-content, .offline-progress-header, .offline-advisor-side) { background: var(--sc-surface) !important; }
html body #dailyRewardModal#dailyRewardModal .dr-card, html body #monthlyPassModal#monthlyPassModal .mp-card, html body #offlineProgressModal#offlineProgressModal .offline-progress-content { border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)) !important; box-shadow: var(--sc-shadow-panel) !important; }
html body #offlineProgressModal#offlineProgressModal :is(.offline-time-merged, .offline-section, .offline-summary, .offline-detail-toggle, .offline-advisor-bubble, #offlineConstructionSection .building-summary-box) { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; box-shadow: none !important; }
html body #offlineProgressModal#offlineProgressModal .offline-advisor-bubble::after { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; }
html body #offlineProgressModal#offlineProgressModal #offlineConstructionSection .building-summary-box.upgrade { border-color: var(--sc-warn) !important; }
html body #offlineProgressModal#offlineProgressModal #offlineConstructionSection .building-summary-box.public { border-color: var(--sc-pos) !important; }
html body #offlineProgressModal#offlineProgressModal .offline-report-kicker { color: var(--sc-accent-deep) !important; }
html body #offlineProgressModal#offlineProgressModal :is(.modal-subtitle, .time-label, .offline-advisor-name, .expand-icon) { color: var(--sc-sub) !important; }
html body :is(#dailyRewardModal#dailyRewardModal .dr-close, #monthlyPassModal#monthlyPassModal :is(.mp-close, .mp-btn-secondary), #offlineProgressModal#offlineProgressModal .offline-report-close) { background: var(--sc-chip) !important; border-color: var(--sc-line) !important; border-radius: 999px !important; box-shadow: none !important; }
html body #dailyRewardModal#dailyRewardModal #dailyRewardGrid > div { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; box-shadow: none; }
html body #dailyRewardModal#dailyRewardModal #dailyRewardGrid > div[style*="#3D7BFF"] { border-color: var(--sc-accent) !important; }
html body #monthlyPassModal#monthlyPassModal :is(.mp-reward-strip, .mp-day) { box-shadow: none; }
html body :is(#dailyRewardModal#dailyRewardModal .city-window-titlebar, #monthlyPassModal#monthlyPassModal .city-window-titlebar, #dailyRewardModal#dailyRewardModal .dr-card > div:has(> img), #monthlyPassModal#monthlyPassModal .mp-header) { background: transparent !important; box-shadow: none !important; border: 0 !important; }
html body :is(#dailyRewardModal#dailyRewardModal :is(.dr-title, #dailyRewardCountdown), #monthlyPassModal#monthlyPassModal :is(.mp-title, .mp-month-label)) { color: var(--sc-text) !important; }
html body :is(#dailyRewardModal#dailyRewardModal [data-i18n="dailyReward.eyebrow"], #monthlyPassModal#monthlyPassModal .mp-kicker) { color: var(--sc-accent-deep) !important; }
html body :is(#dailyRewardModal#dailyRewardModal .dr-watermark, #monthlyPassModal#monthlyPassModal .mp-watermark) { color: rgba(127, 150, 178, 0.08) !important; }
/* 다크: 옛 로우폴리 남색 변수를 컴팩트 토큰으로(면 분할 줄무늬·두께 제거) */
html body.dark-mode {
    --lp-dpanel-hi: var(--sc-surface); --lp-dpanel-lo: var(--sc-surface); --lp-dpanel-frame: var(--sc-line); --lp-dpanel-edge: transparent;
    --lp-dhead-hi: var(--sc-surface); --lp-dhead-lo: var(--sc-surface); --lp-lpanel-frame: var(--sc-line); --lp-lpanel-edge: transparent;
    --lp-dialog-hi: var(--sc-surface); --lp-dialog-lo: var(--sc-surface); --lp-dialog-frame: var(--sc-line); --lp-dialog-edge: transparent; --lp-dialog-facet: transparent;
    --lp-tip-hi: var(--sc-surface); --lp-tip-lo: var(--sc-surface); --lp-tip-facet: transparent; --lp-tip-frame: var(--sc-line); --lp-tip-edge: transparent; --lp-tip-lip: transparent;
    --lp-tile-hi: var(--sc-surface-2); --lp-tile-lo: var(--sc-surface-2); --lp-tile-hover-hi: var(--sc-panel-hover); --lp-tile-hover-lo: var(--sc-panel-hover); --lp-tile-facet: transparent; --lp-tile-line: var(--sc-line); --lp-tile-lip: transparent;
    --lp-sheet-hi: var(--sc-surface); --lp-sheet-lo: var(--sc-surface); --lp-panel-hi: var(--sc-surface); --lp-panel-lo: var(--sc-surface); --lp-panel-ink: var(--sc-line);
    --lp-pt-row-hi: var(--sc-surface-2); --lp-pt-row-lo: var(--sc-surface-2); --lp-pt-row-line: var(--sc-line); --lp-pt-row-lip: transparent; --lp-pt-head-hi: var(--sc-surface); --lp-pt-head-lo: var(--sc-surface); --lp-pt-track: var(--sc-track); --lp-pt-input: var(--sc-surface-2); --lp-pt-input-line: var(--sc-line); --lp-pt-off-bg: var(--sc-chip);
    --lp-cream-frame: var(--sc-line); --lp-cream-edge: transparent; --lp-cream-lip: transparent;
}
/* 다크: 공용 창 틀·제목 줄의 남색 면 분할 제거 */
html body.dark-mode .city-window-frame.city-window-frame.city-window-frame { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)) !important; box-shadow: var(--sc-shadow-panel) !important; }
html body.dark-mode :is(.city-window-titlebar.city-window-titlebar.city-window-titlebar, #cityChatPanel#cityChatPanel .city-chat-header) { background: var(--sc-surface) !important; color: var(--sc-text) !important; border-color: var(--sc-line) !important; box-shadow: none !important; }
html body.dark-mode .city-window-titlebar.city-window-titlebar :is(h2, h3, span, .panel-title) { color: var(--sc-text) !important; text-shadow: none !important; }
html body.dark-mode :is(#achievementCloseBtn, #achievementCloseBtn#achievementCloseBtn, #btnSkinInventoryClose#btnSkinInventoryClose, #btnBuildingSkinPickerClose#btnBuildingSkinPickerClose, #btnSkinLaunchClose#btnSkinLaunchClose, #cameraSettingsClose#cameraSettingsClose) { background: var(--sc-chip) !important; color: var(--sc-text) !important; border-color: var(--sc-line) !important; border-radius: 50% !important; box-shadow: none !important; }
html body.dark-mode :is(#btnDailyQuestClose#btnDailyQuestClose, #btnSkinLaunchLater#btnSkinLaunchLater, #cameraSettingsPanel#cameraSettingsPanel :is(.settings-tab:not(.active), .settings-action-btn, .camera-reset-btn), #friendInviteCard#friendInviteCard .friend-invite-button) { background: var(--sc-chip) !important; background-image: none !important; color: var(--sc-text) !important; border: 1px solid var(--sc-line) !important; border-radius: 999px !important; box-shadow: none !important; }
html body.dark-mode #cameraSettingsPanel#cameraSettingsPanel :is(#settingsCityName) { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; }
/* 다크: 소셜(채팅·친구 초대) */
html body.dark-mode #cityChatPanel#cityChatPanel { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; }
html body.dark-mode #cityChatPanel#cityChatPanel :is(.city-chat-tabs, .friend-add-row, .city-chat-friend-main, .friend-dm-header) { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; }
html body.dark-mode #cityChatPanel#cityChatPanel .city-chat-friend-sidebar { background: var(--sc-surface-2) !important; }
html body.dark-mode #cityChatPanel#cityChatPanel .city-chat-tab.active { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body.dark-mode #cityChatPanel#cityChatPanel :is(.city-chat-input, .city-chat-emoji-btn) { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; }
html body.dark-mode :is(#friendInviteCard#friendInviteCard) { background: var(--sc-surface-2) !important; border-color: var(--sc-line) !important; }
html body.dark-mode #friendInviteCard#friendInviteCard :is(.friend-invite-name-row, summary) { background: var(--sc-surface) !important; border-color: var(--sc-line) !important; }
html body.dark-mode :is(#cityChatPanel#cityChatPanel .city-chat-send, #friendInviteCard#friendInviteCard .friend-invite-copy) { background: var(--sc-accent-deep) !important; background-image: none !important; color: var(--sc-accent-ink) !important; }
/* 다크: 음악 플레이어 */
html body.dark-mode #bgmPlayer#bgmPlayer#bgmPlayer { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; color: var(--sc-text); }
html body.dark-mode #bgmPlayer#bgmPlayer :is(.bgm-player-icon, .bgm-player-art) { background: var(--sc-chip) !important; border-color: var(--sc-line) !important; box-shadow: none !important; }
html body.dark-mode #bgmPlayer#bgmPlayer .bgm-player-play { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
/* 다크: 파랑 안내 글씨 대비 */
html body.dark-mode { --sc-accent-text: #4db8f0; }
html body.dark-mode :is(#gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt#gpuSetupPrompt :is(.gpu-setup-prompt-title, .gpu-setup-prompt-after), #gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel#gpuManualSetupPanel :is(.gpu-manual-setup-title, .gpu-manual-setup-note), #systemHelpModal#systemHelpModal#systemHelpModal#systemHelpModal :is(h3, summary, th, .system-help-section h3), #rciTutorialPanel#rciTutorialPanel#rciTutorialPanel span[style*="color"], #cvTutorialPanel#cvTutorialPanel#cvTutorialPanel span[style*="color"]) { color: var(--sc-accent-text) !important; }
/* 스킨 창 탭 */
html body #skinInventoryModal#skinInventoryModal#skinInventoryModal :is(#cityCustomizeTabBuildings, #cityCustomizeTabEnvironment) { background: var(--sc-chip) !important; color: var(--sc-text) !important; border-color: var(--sc-line) !important; border-radius: 999px !important; }
html body #skinInventoryModal#skinInventoryModal#skinInventoryModal :is(#cityCustomizeTabBuildings, #cityCustomizeTabEnvironment):is(.active, [aria-selected="true"]) { background: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; border-color: var(--sc-accent-deep) !important; }
/* SC:팝업 끝 */
/* SC:통합 — 건설팀과 함께 실제 서버에서 확인한 빈틈: 퀘스트 추적·폐건물 알림·출석 카드·우상단 겹침 */
html body #questContainer#questContainer { background: var(--sc-panel) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)) !important; box-shadow: var(--sc-shadow-panel) !important; clip-path: none; }
html body #questContainer#questContainer :is(div, span) { color: var(--sc-text) !important; text-shadow: none !important; }
html body #questContainer#questContainer .quest-check { color: var(--sc-accent) !important; }
html body #abandonedCounter#abandonedCounter { background: var(--sc-panel) !important; border: 1px solid var(--sc-neg) !important; border-radius: calc(12px * var(--ui-scale)); box-shadow: var(--sc-shadow-panel); }
html body #abandonedCounter#abandonedCounter .counter-label, html body #abandonedCounter#abandonedCounter .nav-index { color: var(--sc-sub) !important; }
html body #abandonedCounter#abandonedCounter .nav-hint { color: var(--sc-sub) !important; }
/* MSG #76820: on desktop the demolish instructions sit above the toolbar; the ruin counter goes above them. */
@media (min-width: 900px) and (min-height: 541px) {
    html body #abandonedCounter#abandonedCounter { bottom: calc(205px * var(--ui-scale)); }
}
html body #abandonedCounter#abandonedCounter :is(.nav-btn, .counter-close) { background: var(--sc-chip) !important; color: var(--sc-text) !important; border: 1px solid var(--sc-line) !important; border-radius: 999px !important; box-shadow: none !important; }
/* 출석 등 이벤트 카드: 남색 판만 테마 판으로. 받기 가능(금색) 카드는 유지 */
html body #eventPanel#eventPanel .ev-card:not(.is-ready) { background: var(--sc-surface-2) !important; border: 1px solid var(--sc-line) !important; border-radius: calc(12px * var(--ui-scale)) !important; box-shadow: var(--sc-shadow-panel) !important; color: var(--sc-text) !important; }
html body #eventPanel#eventPanel .ev-card:not(.is-ready) :is(.ev-card-title, .ev-count) { color: var(--sc-text) !important; text-shadow: none !important; }
html body #eventPanel#eventPanel .ev-card:not(.is-ready) .ev-card-num { color: var(--sc-warn) !important; text-shadow: none !important; }
html body #eventPanel#eventPanel .ev-card:not(.is-ready) .ev-foot { background: var(--sc-chip) !important; color: var(--sc-sub) !important; }
html body #eventPanel#eventPanel .ev-card:not(.is-ready) .ev-chip { background: var(--sc-chip) !important; color: var(--sc-text) !important; box-shadow: inset 0 0 0 1px var(--sc-line) !important; text-shadow: none !important; }
html body #eventPanel#eventPanel .ev-card:not(.is-ready) .ev-chip * { color: var(--sc-text) !important; }
/* 우상단: 도구 안내는 이벤트 버튼 왼쪽에, 건설팀 창은 그 아래에서 시작 */
@media (min-width: 900px) and (min-height: 541px) {
    #civilWorksHub#civilWorksHub#civilWorksHub { top: calc(132px * var(--ui-scale)); }
}
/* 건설팀 창: 면 분할·남색 제목 줄 제거 */
#civilWorksHub#civilWorksHub#civilWorksHub, #civilAutoDialog#civilAutoDialog#civilAutoDialog { --lp-dhead-hi: var(--sc-surface); --lp-dhead-lo: var(--sc-surface); --lp-tile-facet: transparent; --lp-dialog-facet: transparent; --lp-tile-lip: transparent; }
#civilWorksHub#civilWorksHub#civilWorksHub :is(#civilWorksDock, #civilFleetBox, #civilReserveBox) { background-image: none !important; background-color: var(--sc-surface) !important; }
#civilWorksHub#civilWorksHub#civilWorksHub .civil-heading { background: var(--sc-surface) !important; color: var(--sc-text) !important; border-bottom: 1px solid var(--sc-line-soft); box-shadow: none !important; }
#civilWorksHub#civilWorksHub#civilWorksHub .civil-heading :is(strong, span) { color: var(--sc-text) !important; text-shadow: none !important; }
#civilWorksHub#civilWorksHub#civilWorksHub #civilCloseHub { background-image: none !important; background-color: var(--sc-chip) !important; border-color: var(--sc-line) !important; box-shadow: none !important; }
/* 하단 띠: 선으로 나누지 않고 하나씩 둥근 버튼(알약), 아이콘은 동그란 받침 (2026-11-29 사용자 참고 화면) */
@media (min-width: 900px) and (min-height: 541px) {
    body { --sc-strip-h: calc(48px * var(--ui-scale)); --sc-pill-h: calc(36px * var(--ui-scale)); }
    #bottomBar#bottomBar :is(.city-happiness, .money-display-center, .population-display-center, .rci-demand-bar, .rewarded-ad-btn) {
        align-self: center; height: var(--sc-pill-h); box-sizing: border-box; margin: 0 calc(4px * var(--ui-scale));
        padding: 0 calc(14px * var(--ui-scale)) 0 calc(5px * var(--ui-scale));
        display: flex; align-items: center; justify-content: center; gap: calc(7px * var(--ui-scale));
        background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 999px; box-shadow: var(--sc-shadow);
        transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.14s;
    }
    #bottomBar#bottomBar :is(.city-happiness, .money-display-center, .population-display-center, .rci-demand-bar):hover { background: var(--sc-panel-hover); border-color: var(--sc-accent); transform: translateY(calc(-2px * var(--ui-scale))); }
    #bottomBar#bottomBar .rci-demand-bar { padding: 0 calc(13px * var(--ui-scale)); gap: calc(3px * var(--ui-scale)); }
    #bottomBar#bottomBar .rci-bar-container { height: calc(19px * var(--ui-scale)); border-radius: 999px; }
    #bottomBar#bottomBar :is(.city-happiness .happiness-icon, .money-icon, .pop-icon) {
        display: inline-flex; align-items: center; justify-content: center; flex: none;
        width: calc(28px * var(--ui-scale)); height: calc(28px * var(--ui-scale)); border-radius: 50%; font-size: calc(17px * var(--ui-scale)); line-height: 1;
    }
    #bottomBar#bottomBar .city-happiness .happiness-icon { background: var(--sc-pos-bg); }
    #bottomBar#bottomBar .money-icon { background: var(--sc-warn-bg); }
    #bottomBar#bottomBar .pop-icon { background: rgba(27, 155, 224, 0.18); }
    #bottomBar#bottomBar .pop-progress-wrap { left: calc(38px * var(--ui-scale)); right: calc(14px * var(--ui-scale)); bottom: calc(2px * var(--ui-scale)); border-radius: 999px; }
    #timeHUD#timeHUD .time-hud-face, #topBar#topBar .top-center .city-name-display, #topBar#topBar .top-center .like-btn {
        height: var(--sc-pill-h); box-sizing: border-box; display: inline-flex; align-items: center;
        background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 999px; box-shadow: var(--sc-shadow);
    }
    #timeHUD#timeHUD .time-hud-face { padding: 0 calc(5px * var(--ui-scale)) 0 calc(12px * var(--ui-scale)); }
    #topBar#topBar .top-center { gap: calc(8px * var(--ui-scale)); left: calc(250px * var(--ui-scale)); }
    #topBar#topBar .top-center .city-name-display { display: block; line-height: calc(34px * var(--ui-scale)); padding: 0 calc(16px * var(--ui-scale)); border-left: 1px solid var(--sc-line); }
    #topBar#topBar .top-center .city-name-display:hover { background: var(--sc-panel-hover); border-color: var(--sc-accent); }
    #topBar#topBar .top-center .like-btn { padding: 0 calc(12px * var(--ui-scale)); }
}
/* 하단 카테고리 버튼: 아이콘은 색 그대로. 선택은 파란 원 */
#bottomBar#bottomBar#bottomBar :is(.tool-btn, .demolish-btn) .icon,
#bottomBar#bottomBar#bottomBar :is(.tool-btn, .demolish-btn):is(.active, :hover) .icon { filter: none; }
#bottomBar#bottomBar#bottomBar .tool-btn.active .icon { filter: drop-shadow(0 0 calc(1px * var(--ui-scale)) #ffffff) drop-shadow(0 0 calc(2px * var(--ui-scale)) #ffffff); }
/* 튜토리얼 퀘스트가 흐리게 하는 버튼도 흑백 처리는 하지 않는다(옅게만) */
#bottomBar#bottomBar#bottomBar :is(.tool-btn, .demolish-btn).quest-dimmed { filter: none; }
/* 합친 작업의 창: 예산(넓은 배치·대중교통 행)·인구 창의 크림·남색·갈색 칸, 설치 안내 툴팁 */
html body :is(#budgetPanel#budgetPanel#budgetPanel#budgetPanel, #populationPanel#populationPanel#populationPanel#populationPanel) :is(.budget-summary, .budget-total, .budget-section, .budget-service-expense, .budget-bond-section, .bond-selection, .bond-section, .bond-issued-info, .bp-table, .panel-icon) { background: var(--sc-surface-2) !important; background-image: none !important; border-color: var(--sc-line-soft) !important; box-shadow: none !important; clip-path: none; border-radius: calc(10px * var(--ui-scale)); }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel .budget-total { border-left: calc(3px * var(--ui-scale)) solid var(--sc-accent) !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel .bond-option { background: var(--sc-surface) !important; background-image: none !important; border-color: var(--sc-line) !important; box-shadow: none !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel .bond-option.selected { border-color: var(--sc-accent) !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel :is(.bond-tab, .bond-cancel-btn, .clear-history-btn) { background: var(--sc-chip) !important; background-image: none !important; border: 1px solid var(--sc-line) !important; color: var(--sc-text) !important; border-radius: 999px !important; box-shadow: none !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel :is(.bond-tab.active, .bond-approve-btn:not(:disabled)) { background: var(--sc-accent-deep) !important; background-image: none !important; border-color: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel .bond-approve-btn { border-radius: 999px !important; box-shadow: none !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel :is(.total-label, .total-value, .bond-selection-title, .section-title) { color: var(--sc-text) !important; text-shadow: none !important; }
html body #submenuTooltip#submenuTooltip#submenuTooltip :is(.tooltip-title-bar, .tooltip-preview-area, .tooltip-cost-bar) { background: var(--sc-surface-2) !important; background-image: none !important; border-color: var(--sc-line-soft) !important; }
html body #submenuTooltip#submenuTooltip#submenuTooltip :is(.tooltip-title-bar, .tooltip-title-bar *, .tooltip-cost-bar, .tooltip-cost-bar *) { color: var(--sc-text) !important; text-shadow: none !important; }
html body .warehouse-import-cost.warehouse-import-cost { background: var(--sc-warn-bg) !important; border-color: var(--sc-warn) !important; color: var(--sc-warn) !important; border-radius: calc(10px * var(--ui-scale)) !important; }
html body .warehouse-import-unused.warehouse-import-unused { color: var(--sc-neg) !important; }
html body #populationPanel#populationPanel#populationPanel #btnMilestoneUnlocks { background: var(--sc-chip) !important; background-image: none !important; border: 1px solid var(--sc-line) !important; color: var(--sc-text) !important; border-radius: 999px !important; box-shadow: none !important; }
html body #populationPanel#populationPanel#populationPanel #btnMilestoneUnlocks * { color: var(--sc-text) !important; }
html body #populationPanel#populationPanel#populationPanel .policy-category-button { background: var(--sc-chip) !important; background-image: none !important; border: 1px solid var(--sc-line) !important; color: var(--sc-text) !important; border-radius: 999px !important; box-shadow: none !important; }
html body #populationPanel#populationPanel#populationPanel .policy-category-button:is(.active, [aria-selected="true"], [aria-pressed="true"]) { background: var(--sc-accent-deep) !important; border-color: var(--sc-accent-deep) !important; color: var(--sc-accent-ink) !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel :is(.bp-income-col.bp-col-title, .bp-tax-col.bp-col-title, .transaction-empty, .bond-debt span) { color: var(--sc-sub) !important; opacity: 1 !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel :is(#valResidential, #valCommercial, #valIndustrial, #valExport, #valTransit, #totalExportValue) { color: var(--sc-pos) !important; opacity: 1 !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel #totalDebt { color: var(--sc-text) !important; }
html body #budgetPanel#budgetPanel#budgetPanel#budgetPanel .bond-approve-btn:disabled { background: var(--sc-chip) !important; color: var(--sc-sub) !important; border: 1px solid var(--sc-line) !important; opacity: 1 !important; }
/* SC:통합 끝 */
/* 이벤트창: 눈 테마 1분 체험 버튼, 루돌프 소리 끄기 토글 */
html body #eventPanel#eventPanel#eventPanel .ev-trial { display: flex; align-items: center; justify-content: center; min-height: calc(46px * var(--ev-u)); padding: 0 calc(14px * var(--ui-scale)); border: 2px solid var(--sc-accent-deep) !important; border-radius: 999px !important; background: var(--sc-surface) !important; color: var(--sc-text) !important; font: inherit; font-weight: 900; font-size: max(15px, var(--font-lg, 17px)); text-shadow: none; cursor: pointer; transition: transform .12s, filter .12s; }
html body #eventPanel#eventPanel#eventPanel .ev-trial:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
html body #eventPanel#eventPanel#eventPanel .ev-trial:disabled { border-color: var(--sc-line) !important; color: var(--sc-sub) !important; cursor: default; }
html body #eventPanel#eventPanel#eventPanel .ev-switch { display: flex; align-items: center; justify-content: space-between; gap: calc(12px * var(--ui-scale)); min-height: calc(44px * var(--ev-u)); padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale)); border: 1px solid var(--sc-line); border-radius: calc(12px * var(--ui-scale)); background: var(--sc-surface); color: var(--sc-text) !important; font-weight: 800; font-size: max(13px, var(--font-md, 14px)); text-shadow: none; cursor: pointer; }
html body #eventPanel#eventPanel#eventPanel .ev-switch span { color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-switch input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; position: relative; width: 44px; height: 24px; margin: 0; border: 0; border-radius: 999px; background: #8a97a8; cursor: pointer; transition: background .15s; }
html body #eventPanel#eventPanel#eventPanel .ev-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
html body #eventPanel#eventPanel#eventPanel .ev-switch input:checked { background: var(--sc-accent-deep); }
html body #eventPanel#eventPanel#eventPanel .ev-switch input:checked::after { transform: translateX(20px); }
html body #eventPanel#eventPanel#eventPanel :is(.ev-trial, .ev-switch input):focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
/* 수신 우선순위 목록(#76904): 인라인 어두운 바탕 + 테마 글씨색이 섞여 항목이 안 보였다. 칸과 펼친 항목 모두 테마 색으로. */
html body select:is(.warehouse-priority-select, .priority-select),
html body select:is(.warehouse-priority-select, .priority-select) option { background-color: var(--sc-surface) !important; color: var(--sc-text) !important; }
html body select:is(.warehouse-priority-select, .priority-select) { border-color: var(--sc-line) !important; }
/* SC-HUD-END */
/* SC:tram — 트램 차고 정보 창의 노선 등급(컴팩트 테마, docs/ui-compact-style.md).
   --sc-* 토큰은 claude/simcity-hud-20261128 통합 뒤에 생긴다. 그 전에는 같은 값의 대체값으로 보인다. */
.tram-grade { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale));
    margin: calc(2px * var(--ui-scale)) 0 calc(6px * var(--ui-scale)); padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
    background: var(--sc-surface-2, #f3f5f8); border: 1px solid var(--sc-line-soft, #e1e6ec); border-radius: calc(10px * var(--ui-scale)); }
.tram-grade-stars { grid-row: span 2; font-size: var(--font-lg); font-weight: 900; letter-spacing: 1px; color: var(--sc-accent-deep, #0f7fc0); white-space: nowrap; }
.tram-grade-bar { height: calc(8px * var(--ui-scale)); border-radius: 999px; background: var(--sc-track, #e3e8ee); overflow: hidden; }
.tram-grade-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--sc-accent, #1b9be0); transition: width .35s cubic-bezier(0.22, 1, 0.36, 1); }
.tram-grade small { font-size: var(--font-xs); font-weight: 700; color: var(--sc-sub, #6b7684); }
.tram-grade-reason { display: inline-block; margin: 0 0 calc(6px * var(--ui-scale)); padding: calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale));
    border-radius: 999px; font-size: var(--font-xs); font-weight: 800; color: var(--sc-warn, #b45309); background: var(--sc-warn-bg, #fff4d6); }
.tram-effects { display: flex; flex-wrap: wrap; gap: calc(4px * var(--ui-scale)); margin-top: calc(2px * var(--ui-scale)); }
.tram-chip { padding: calc(3px * var(--ui-scale)) calc(9px * var(--ui-scale)); border-radius: 999px; font-size: var(--font-xs); font-weight: 800;
    color: var(--sc-text, #37414d); background: var(--sc-chip, #eef1f5); border: 1px solid var(--sc-line-soft, #e1e6ec); white-space: nowrap; }
body.dark-mode .tram-grade { background: var(--sc-surface-2, #1c242e); border-color: var(--sc-line-soft, #3a4656); }
body.dark-mode .tram-grade-stars { color: var(--sc-accent, #1b8fd0); }
body.dark-mode .tram-grade-bar { background: var(--sc-track, #3a4656); }
body.dark-mode .tram-grade small { color: var(--sc-sub, #b1bdcb); }
body.dark-mode .tram-grade-reason { color: var(--sc-warn, #fbbf24); background: var(--sc-warn-bg, rgba(251, 191, 36, .16)); }
body.dark-mode .tram-chip { color: var(--sc-text, #edf2f8); background: var(--sc-chip, #303b49); border-color: var(--sc-line-soft, #3a4656); }
@media (prefers-reduced-motion: reduce) { .tram-grade-bar > i { transition: none; } }
/* SC5 — 심시티 5 배치(2026-11-29 사용자 참고 화면): 왼쪽 위 도시 카드, 오른쪽 세로 버튼 줄, 한 줄 광택 하단 띠 위 둥근 도구,
   오른쪽 아래 큰 원(업그레이드), 광택 흰 창(파란 제목·파란 선·안쪽 판·회색 테 알약). CSS만, 예산 도넛은 city-app renderBudgetRing. */
body {
    --sc5-glass: linear-gradient(180deg, #ffffff 0%, #f6f7f9 52%, #e6eaee 100%);
    --sc5-glass-soft: linear-gradient(180deg, #fbfcfd, #eef1f4);
    --sc5-rim: #aab3bd;
    --sc5-rim-strong: #7d8792;
    --sc5-inset: #f1f3f6;
    --sc5-inset-line: #d3d9df;
    --sc5-title: #1d64a3;
    --sc5-rule: linear-gradient(90deg, #1d8fd6, #63bff0 55%, #b9e4f8);
    --sc5-pill: linear-gradient(180deg, #ffffff, #e2e6ea);
    --sc5-tab: linear-gradient(180deg, #f7f8fa, #d9dee4);
    --sc5-tab-on: linear-gradient(180deg, #5cc0f0, #1f8bd0);
    --sc5-shadow: 0 calc(3px * var(--ui-scale)) calc(10px * var(--ui-scale)) rgba(20, 34, 50, 0.28);
}
body.dark-mode {
    --sc5-glass: linear-gradient(180deg, #34404e 0%, #2a3440 52%, #222a34 100%);
    --sc5-glass-soft: linear-gradient(180deg, #2d3743, #252e39);
    --sc5-rim: #4f5c6b;
    --sc5-rim-strong: #6d7b8b;
    --sc5-inset: #1d252f;
    --sc5-inset-line: #3a4656;
    --sc5-title: #7cc6f2;
    --sc5-pill: linear-gradient(180deg, #3a4757, #2b3542);
    --sc5-tab: linear-gradient(180deg, #3a4757, #2b3542);
    --sc5-shadow: 0 calc(3px * var(--ui-scale)) calc(12px * var(--ui-scale)) rgba(0, 0, 0, 0.55);
}

@media (min-width: 900px) and (min-height: 541px) {
    /* 하단 띠(심시티 5 실제 화면): 시각 | 도시 이름 | 행복도 | 자금(파란 칸, +시간당) | 인구 | 수요 — 칸마다 광택 둥근 판 */
    #bottomBar#bottomBar::before { background: var(--sc5-glass); border-top: 1px solid var(--sc5-rim); }
    #bottomBar#bottomBar :is(.city-happiness, .money-display-center, .population-display-center, .rci-demand-bar),
    #timeHUD#timeHUD .time-hud-face, #topBar#topBar .top-center .city-name-display {
        background: var(--sc5-pill); border: 1px solid var(--sc5-rim); border-radius: calc(12px * var(--ui-scale));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(20, 34, 50, 0.22);
    }
    body.dark-mode #bottomBar#bottomBar :is(.city-happiness, .money-display-center, .population-display-center, .rci-demand-bar),
    body.dark-mode #timeHUD#timeHUD .time-hud-face, body.dark-mode #topBar#topBar .top-center .city-name-display { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.45); }
    #bottomBar#bottomBar .money-display-center { background: var(--sc5-tab-on); border-color: #1f7fbf; }
    #bottomBar#bottomBar .money-display-center :is(.money-amount, .money-amount *) { color: #ffffff; text-shadow: 0 1px 0 rgba(10, 60, 100, 0.45); }
    #bottomBar#bottomBar .money-display-center .money-rate { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
    #bottomBar#bottomBar .money-display-center .money-icon { background: rgba(255, 255, 255, 0.25); }
    #bottomBar#bottomBar .money-display-center:hover { background: linear-gradient(180deg, #6fcaf4, #2a96d8); }
    #topBar#topBar .top-center .city-name-display { color: var(--sc5-title); }
    /* 도구: 회색 테 둥근 광택 버튼, 고른 것은 파란 칸 */
    #bottomBar#bottomBar .bottom-tools :is(.tool-btn, .demolish-btn) {
        background: var(--sc5-pill); border: calc(2px * var(--ui-scale)) solid var(--sc5-rim);
        box-shadow: 0 calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale)) rgba(20, 34, 50, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    #bottomBar#bottomBar .bottom-tools .tool-btn.active { background: var(--sc5-tab-on); border-color: #ffffff; box-shadow: 0 0 0 calc(2px * var(--ui-scale)) #1f8bd0, 0 calc(2px * var(--ui-scale)) calc(6px * var(--ui-scale)) rgba(20, 34, 50, 0.35); }
    /* 왼쪽 언덕: 심시티처럼 파란 테 */
    #bottomBar#bottomBar .bottom-left::before { filter: drop-shadow(0 calc(-2px * var(--ui-scale)) 0 #39a6dc) drop-shadow(0 calc(-2px * var(--ui-scale)) calc(6px * var(--ui-scale)) rgba(15, 28, 44, 0.18)); }
}

/* ---------- 창 공통(예산·인구·설정): 광택 흰 판, 파란 제목, 파란 선, 안쪽 판, 회색 테 알약 ---------- */
html body :is(#cameraSettingsPanel):is(#cameraSettingsPanel):is(#cameraSettingsPanel) {
    background: var(--sc5-glass) !important; border: 1px solid var(--sc5-rim) !important; border-radius: calc(16px * var(--ui-scale)) !important;
    box-shadow: var(--sc5-shadow), 0 calc(14px * var(--ui-scale)) calc(40px * var(--ui-scale)) rgba(20, 34, 50, 0.25) !important; clip-path: none !important;
}
html body :is(#cameraSettingsPanel .panel-header):is(*, *, *) {
    background: transparent !important; border: 0 !important; box-shadow: none !important; position: relative;
    padding-bottom: calc(10px * var(--ui-scale)) !important;
}
html body :is(#cameraSettingsPanel .panel-header):is(*, *, *)::after {
    content: ""; position: absolute; left: calc(12px * var(--ui-scale)); right: calc(12px * var(--ui-scale)); bottom: 0; height: calc(4px * var(--ui-scale));
    border-radius: 999px; background: var(--sc5-rule);
}
html body :is(#cameraSettingsPanel .panel-title, #cameraSettingsPanel #settingsPanelTitle):is(*, *, *, *) {
    color: var(--sc5-title) !important; font-weight: 800 !important; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    font-size: calc(20px * var(--ui-scale)) !important;
}
body.dark-mode :is(#cameraSettingsPanel .panel-title, #cameraSettingsPanel #settingsPanelTitle) { text-shadow: none !important; }
html body :is(#cameraSettingsPanel):is(*, *) :is(.panel-close):is(*, *, *) {
    width: calc(30px * var(--ui-scale)) !important; height: calc(30px * var(--ui-scale)) !important; border-radius: 50% !important;
    background: var(--sc5-pill) !important; border: calc(2px * var(--ui-scale)) solid var(--sc5-rim-strong) !important; color: var(--sc-text) !important; box-shadow: none !important;
}
/* 회색 테 알약(심시티 버튼): 보통은 회색 테, 고른 것은 파란 테 + 파란 글씨 */
html body :is(#cameraSettingsPanel):is(*, *) :is(.bond-tab, .bond-cancel-btn, .clear-history-btn, .milestone-unlocks-toggle, .policy-category-button, .settings-action-btn, .camera-reset-btn, button.settings-select-btn):is(*, *, *, *, *) {
    background: var(--sc5-pill) !important; border: calc(2px * var(--ui-scale)) solid var(--sc5-rim-strong) !important; color: var(--sc-text) !important;
    border-radius: 999px !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important; font-weight: 700;
}
html body :is(#cameraSettingsPanel):is(*, *) :is(.bond-tab.active, .policy-category-button.active, .policy-category-button[aria-selected="true"]):is(*, *, *, *, *) {
    background: var(--sc5-pill) !important; border-color: #39a6dc !important; color: #1f8bd0 !important; box-shadow: 0 0 0 calc(2px * var(--ui-scale)) rgba(57, 166, 220, 0.35) !important;
}
html body :is(#cameraSettingsPanel):is(*, *) :is(.bond-tab.active, .policy-category-button.active) * { color: #1f8bd0 !important; }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .camera-reset-btn { color: #c62828 !important; }

/* 예산 도넛 */

/* ---------- 설정 창: 제목 왼쪽, 탭은 제목 줄 오른쪽의 폴더 탭, 칸은 안쪽 판 ---------- */
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel { overflow: hidden; }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-tabs {
    display: flex; gap: calc(4px * var(--ui-scale)); background: none !important; border: 0 !important; padding: 0 calc(12px * var(--ui-scale)) !important;
    border-bottom: calc(3px * var(--ui-scale)) solid #39a6dc !important; margin: 0 calc(-4px * var(--ui-scale)) calc(10px * var(--ui-scale)) !important;
}
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-tab {
    flex: 1 1 0; border-radius: calc(10px * var(--ui-scale)) calc(10px * var(--ui-scale)) 0 0 !important; background: var(--sc5-tab) !important;
    border: 1px solid var(--sc5-rim) !important; border-bottom: 0 !important; color: var(--sc-sub) !important; font-weight: 800 !important; text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important; padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale)) !important;
}
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-tab.active { background: var(--sc5-tab-on) !important; color: #ffffff !important; border-color: #1f8bd0 !important; }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-page {
    background: var(--sc5-inset) !important; border: 1px solid var(--sc5-inset-line) !important; border-radius: calc(10px * var(--ui-scale)); padding: calc(10px * var(--ui-scale)) calc(12px * var(--ui-scale)) !important;
    box-shadow: inset 0 1px 2px rgba(20, 34, 50, 0.07);
}
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel :is(.camera-setting-row, .city-rename-settings) { border-bottom: 1px solid var(--sc5-inset-line); padding-block: calc(6px * var(--ui-scale)); }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-section-title { color: var(--sc5-title) !important; font-weight: 800 !important; }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .camera-setting-slider { accent-color: #39a6dc; }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel input[type="checkbox"] { accent-color: #2ea84a; width: calc(18px * var(--ui-scale)); height: calc(18px * var(--ui-scale)); }
html body #cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel#cameraSettingsPanel .settings-select { border: calc(2px * var(--ui-scale)) solid var(--sc5-rim-strong) !important; border-radius: 999px !important; background: var(--sc5-pill) !important; color: var(--sc-text) !important; }

/* ---------- 인구 통계: 막대는 파란 광택, 칸 안 줄은 얇은 선 ---------- */
#rciCursorGraph#rciCursorGraph { background: var(--sc-surface) !important; border: 1px solid var(--sc5-rim) !important; border-radius: calc(10px * var(--ui-scale)); box-shadow: var(--sc5-shadow) !important; }
html body #cameraSettingsPanel#cameraSettingsPanel { z-index: 1200 !important; }
/* 창: 빨간 X 닫기, 조언 말풍선은 옅은 하늘 판 */
html body :is(#cameraSettingsPanel):is(*, *) :is(.panel-close):is(*, *, *, *) {
    background: #ffffff !important; border: 1px solid #d0d6dc !important; color: #d32f2f !important; font-weight: 900 !important;
}
html body :is(#cameraSettingsPanel):is(*, *) :is(.panel-close):is(*, *, *, *):hover { background: #d32f2f !important; color: #ffffff !important; }
/* 2026-11-29 후속: 애드온 모드 뒤 하단바(인라인 display:flex가 grid를 덮음), 애드온 바는 회색, 관광 분류 탭은 그림 아래 가운데 */
@media (min-width: 900px) and (min-height: 541px) {
    body:not(.hide-ui):not(.showcase-mode) #bottomBar#bottomBar[style*="display: flex"] { display: grid !important; }
    #bottomBar#bottomBar { grid-template-columns: minmax(0, 1fr) auto auto auto auto auto auto auto minmax(0, 1fr); }
    #bottomBar#bottomBar .city-happiness { grid-column: 2; }
    #bottomBar#bottomBar .money-display-center { grid-column: 3; }
    #bottomBar#bottomBar .bar-gem { grid-column: 4; }
    #bottomBar#bottomBar .bar-shop-cart { grid-column: 5; }
    #bottomBar#bottomBar .population-display-center { grid-column: 6; }
    #bottomBar#bottomBar .rci-demand-bar { grid-column: 7; }
    #bottomBar#bottomBar .rewarded-ad-btn { grid-column: 8; }
    #bottomBar#bottomBar :is(.bar-gem, .bar-shop-cart) {
        grid-row: 2; align-self: center; pointer-events: auto; position: relative; z-index: 1; margin: 0 calc(4px * var(--ui-scale));
        height: calc(32px * var(--ui-scale)); display: inline-flex; align-items: center; justify-content: center; gap: calc(5px * var(--ui-scale));
        background: var(--sc5-pill); border: 1px solid var(--sc5-rim); color: var(--sc-text); text-decoration: none; font-weight: 800;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(20, 34, 50, 0.22); clip-path: none;
    }
    #bottomBar#bottomBar .bar-gem { padding: 0 calc(12px * var(--ui-scale)) 0 calc(8px * var(--ui-scale)); border-radius: calc(12px * var(--ui-scale)); font-size: calc(15px * var(--ui-scale)); }
    #bottomBar#bottomBar .bar-gem #gemDisplayCount { color: #7c3aed; }
    body.dark-mode #bottomBar#bottomBar .bar-gem #gemDisplayCount { color: #c4b5fd; }
    #bottomBar#bottomBar .bar-shop-cart { width: calc(32px * var(--ui-scale)); padding: 0; border-radius: 50%; font-size: calc(16px * var(--ui-scale)); }
    #bottomBar#bottomBar .bar-shop-cart .shop-shortcut-label { display: none; }
    #bottomBar#bottomBar :is(.bar-gem, .bar-shop-cart):hover { border-color: #39a6dc; transform: translateY(calc(-2px * var(--ui-scale))); }


    #subMenu#subMenu.has-tabs #submenuTabRow#submenuTabRow { order: 9; justify-content: center; margin: calc(2px * var(--ui-scale)) auto 0; position: relative; z-index: 3; }
}
/* 시간 창 전체가 버튼: 따로 있던 시간 변경 버튼은 감춘다(처리기는 그대로) */
#timeHUD#timeHUD .time-change-controls { display: none !important; }
#timeHUD#timeHUD .time-hud-face { cursor: pointer; }
#timeHUD#timeHUD .time-hud-face:hover { border-color: #39a6dc; }
#timeHUD#timeHUD .time-hud-face:focus-visible { outline: calc(3px * var(--ui-scale)) solid #39a6dc; outline-offset: 2px; }
/* 오른쪽 위 "⋯" 메뉴 */
.hud-more-wrap { position: relative; display: inline-flex; }
#btnHudMore { position: relative; font-weight: 900; letter-spacing: 1px; }
#btnHudMore.active { background: var(--sc5-tab-on) !important; color: #ffffff !important; }
#btnHudMore .hud-more-dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #ffffff; display: none; }
#btnHudMore.has-dot .hud-more-dot { display: block; }
#hudMorePanel {
    position: absolute; top: calc(100% + 6px * var(--ui-scale)); right: 0; z-index: 1300; min-width: calc(190px * var(--ui-scale));
    display: grid; gap: calc(4px * var(--ui-scale)); padding: calc(8px * var(--ui-scale));
    background: var(--sc5-glass); border: 1px solid var(--sc5-rim); border-radius: calc(12px * var(--ui-scale)); box-shadow: var(--sc5-shadow);
}
#hudMorePanel[hidden] { display: none; }
#hudMorePanel :is(.top-btn, .bgm-btn, .top-social-btn) {
    width: 100% !important; min-width: 0 !important; height: auto !important; min-height: calc(32px * var(--ui-scale)); margin: 0 !important;
    display: flex !important; align-items: center; justify-content: flex-start; gap: calc(8px * var(--ui-scale));
    padding: calc(5px * var(--ui-scale)) calc(10px * var(--ui-scale)) !important; border-radius: calc(9px * var(--ui-scale)) !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--sc-text) !important;
    font-size: var(--font-sm) !important; font-weight: 700; text-align: start; text-decoration: none; position: relative;
}
#hudMorePanel :is(.top-btn, .bgm-btn, .top-social-btn):hover { background: rgba(57, 166, 220, 0.14) !important; }
#hudMorePanel :is(.top-btn, .bgm-btn, .top-social-btn)[title]:not(:has(.hud-control-label))::after { content: attr(title); white-space: nowrap; }
#hudMorePanel .hud-control-label { display: inline !important; }
#hudMorePanel :is(.bgm-volume-container, .top-social-wrap) { display: block; position: relative; }
#hudMorePanel .top-lang-menu { right: calc(100% + 6px); left: auto; top: 0; }
#hudMorePanel :is(.top-btn-reward-badge, #newsUnreadDot, .cs-badge) { position: static !important; margin-inline-start: auto; }
#bottomBar#bottomBar a.bar-gem#gemDisplayBtn { background: var(--sc5-pill) !important; border: 1px solid var(--sc5-rim) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(20, 34, 50, 0.22) !important; }
#bottomBar#bottomBar a.bar-gem#gemDisplayBtn #gemDisplayCount { color: #6d28d9 !important; font-weight: 900; }
body.dark-mode #bottomBar#bottomBar a.bar-gem#gemDisplayBtn #gemDisplayCount { color: #c4b5fd !important; }
@media (min-width: 900px) and (min-height: 541px) {
}
#hudMorePanel { top: calc(100% + 58px * var(--ui-scale)); }
/* 1100px 이하에서는 .top-right가 가로 스크롤 상자라 absolute 메뉴가 통째로 잘린다 → fixed (MSG #76885) */
@media (max-width: 1100px) {
    /* 등장 애니메이션이 남기는 transform은 fixed 메뉴를 다시 가두므로 끝난 뒤에는 남기지 않는다 */
    #topBar#topBar > .top-right { animation-fill-mode: backwards; }
    /* 메뉴가 열린 동안에는 뉴스 띠보다 위에 둔다(휴대폰 폭에서 첫 항목이 가려짐) */
    #topBar#topBar:has(#hudMorePanel:not([hidden])) { z-index: 5000; }
    #topBar #hudMorePanel { position: fixed; top: calc(var(--bar-height) + 16px * var(--ui-scale)); right: calc(8px * var(--ui-scale)); }
    #topBar #hudMorePanel .top-lang-menu { position: absolute; top: 0; right: calc(100% + 6px); left: auto; }
}
#hudMorePanel .bgm-btn { font-size: var(--font-sm) !important; }
#hudMorePanel .bgm-btn :is(svg, img) { width: calc(16px * var(--ui-scale)) !important; height: calc(16px * var(--ui-scale)) !important; flex: none; }
#hudMorePanel .bgm-btn > :not(svg):not(img):empty { display: none; }
/* 상단 오른쪽: 소셜 · 도시 자랑 · 상점 카트 · ⋯ 를 같은 크기의 둥근 버튼으로 */
@media (min-width: 900px) and (min-height: 541px) {
    #topBar#topBar#topBar .top-right :is(#btnSocial, #btnCitySocial, #cityShopShortcut, #btnHudMore) {
        width: calc(40px * var(--ui-scale)) !important; min-width: 0 !important; height: calc(40px * var(--ui-scale)) !important; min-height: 0 !important;
        box-sizing: border-box; padding: 0 !important; margin: 0; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center;
        position: relative; font-size: calc(17px * var(--ui-scale)); line-height: 1; text-decoration: none;
    }
    #topBar#topBar#topBar .top-right { position: relative; top: calc(5px * var(--ui-scale)); }
    #topBar#topBar#topBar .top-right #cityShopShortcut .shop-shortcut-label { display: none !important; }
    #topBar#topBar#topBar .top-right #btnCitySocial .cs-badge { position: absolute; top: -5px; right: -6px; font-size: calc(9px * var(--ui-scale)); }
}
/* 2026-11-29: 카테고리 버튼 뒤 흰 곡선 판(앞·뒤 언덕, 도구 띠)을 없앤다. 버튼과 상태 띠만 남는다 */
@media (min-width: 900px) and (min-height: 541px) {
    #bottomBar#bottomBar#bottomBar::after,
    #bottomBar#bottomBar#bottomBar .bottom-left::before,
    #bottomBar#bottomBar#bottomBar .bottom-center::before { content: none; }
}
/* 이벤트 버튼: 상단바 오른쪽 줄에 다른 버튼과 같은 둥근 버튼으로 */
@media (min-width: 900px) and (min-height: 541px) {
    #topBar#topBar#topBar .top-right #btnEventPanel#btnEventPanel {
        position: relative; top: 0; right: auto; left: auto; bottom: auto; z-index: auto; flex: none; transform: none;
        width: calc(40px * var(--ui-scale)); height: calc(40px * var(--ui-scale)); min-width: 0; min-height: 0; margin: 0; padding: 0; box-sizing: border-box;
        display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 0; border-radius: 50%; clip-path: none;
        background: var(--sc5-pill); border: calc(2px * var(--ui-scale)) solid var(--sc5-rim); box-shadow: 0 calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale)) rgba(20, 34, 50, 0.25);
    }
    #topBar#topBar#topBar .top-right #btnEventPanel#btnEventPanel[hidden] { display: none; }
    #topBar#topBar#topBar .top-right #btnEventPanel#btnEventPanel:hover { border-color: #39a6dc; transform: scale(1.06); }
    #topBar #btnEventPanel .ev-hud-label { display: none; }
    #topBar #btnEventPanel .ev-hud-icon { font-size: calc(18px * var(--ui-scale)); }
    #topBar #btnEventPanel .ev-hud-badge { position: absolute; top: -5px; right: -5px; width: calc(15px * var(--ui-scale)); height: calc(15px * var(--ui-scale)); min-width: 0; font-size: calc(10px * var(--ui-scale)); }
    /* 이벤트 버튼 자리를 비워 두려던 우상단 보정은 필요 없어졌다 */
    #civilWorksHub#civilWorksHub#civilWorksHub#civilWorksHub { top: calc(104px * var(--ui-scale)); right: calc(10px * var(--ui-scale)); }
}
/* 곡선 판이 없어져 드러난 나침반은 업그레이드 버튼 위로 */
@media (min-width: 900px) and (min-height: 541px) {
    #compass#compass#compass.wind-compass { bottom: calc(var(--sc-strip-h) + 130px * var(--ui-scale)); }
}
/* 2026-11-29 ② 애드온 설치 모드: 시각·도시 이름·좋아요·자동 저장 표시·나침반을 치운다 */
body:has(#expansionModeBar[style*="flex"]) :is(#timeHUD#timeHUD#timeHUD, #topBar#topBar#topBar .top-center, #autoSaveStatus#autoSaveStatus, #saveIndicator#saveIndicator:not(.failed):not(.partial), #compass#compass#compass) { display: none !important; }
/* "⚙️ 애드온 관리" 버튼: 진한 회색 알약으로 눈에 띄게 */
html body :is(#publicBuildingPopup #btnExpansionGear#btnExpansionGear, #publicBuildingPopup .bus-line-addon-manage.bus-line-addon-manage, #cityHallPanel #btnCityHallAddon#btnCityHallAddon):is(*, *, *) {
    background: linear-gradient(180deg, #7a8592, #565f6b) !important; border: calc(2px * var(--ui-scale)) solid #454d58 !important; color: #ffffff !important;
    border-radius: 999px !important; font-weight: 800 !important; box-shadow: 0 calc(2px * var(--ui-scale)) calc(5px * var(--ui-scale)) rgba(20, 34, 50, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important; clip-path: none !important;
}
html body :is(#publicBuildingPopup #btnExpansionGear#btnExpansionGear, #cityHallPanel #btnCityHallAddon#btnCityHallAddon):is(*, *, *) * { color: #ffffff !important; }
html body :is(#publicBuildingPopup #btnExpansionGear#btnExpansionGear, #publicBuildingPopup .bus-line-addon-manage.bus-line-addon-manage, #cityHallPanel #btnCityHallAddon#btnCityHallAddon):is(*, *, *):hover { filter: brightness(1.12); }
@media (min-width: 900px) and (min-height: 541px) {
    /* ③ 철거는 오른쪽 아래 큰 빨간 원, 저장은 그 왼쪽 원(왼쪽 업그레이드 버튼과 마주 보게) */
    #bottomBar#bottomBar#bottomBar .bottom-tools :is(#btnDemolish#btnDemolish, #btnSave#btnSave) { position: fixed; margin: 0; z-index: 1001; }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnDemolish#btnDemolish {
        right: calc(14px * var(--ui-scale)); left: auto; bottom: calc(var(--sc-strip-h) + 8px * var(--ui-scale));
        width: calc(78px * var(--ui-scale)); height: calc(78px * var(--ui-scale)); border-radius: 50%;
        background: linear-gradient(180deg, #f4574c, #c62318) !important; border: calc(4px * var(--ui-scale)) solid #ffffff !important;
        box-shadow: 0 0 0 calc(2px * var(--ui-scale)) #9e1b12, 0 calc(4px * var(--ui-scale)) calc(12px * var(--ui-scale)) rgba(15, 28, 44, 0.35) !important;
    }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnDemolish#btnDemolish.active { box-shadow: 0 0 0 calc(3px * var(--ui-scale)) #ffd24a, 0 0 0 calc(6px * var(--ui-scale)) #9e1b12 !important; }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnDemolish#btnDemolish .icon { width: calc(52px * var(--ui-scale)); height: calc(52px * var(--ui-scale)); font-size: calc(40px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnDemolish#btnDemolish .icon img { width: 100% !important; height: 100% !important; max-width: none; max-height: none; object-fit: contain; transform: scale(1.45); filter: drop-shadow(0 1px 2px rgba(60, 0, 0, 0.55)); }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnSave#btnSave {
        right: calc(106px * var(--ui-scale)); left: auto; bottom: calc(var(--sc-strip-h) + 12px * var(--ui-scale));
        width: calc(58px * var(--ui-scale)); height: calc(58px * var(--ui-scale)); border-radius: 50%;
        background: var(--sc5-pill); border: calc(3px * var(--ui-scale)) solid var(--sc5-rim);
    }
    #bottomBar#bottomBar#bottomBar .bottom-tools #btnSave#btnSave .icon { width: calc(32px * var(--ui-scale)); height: calc(32px * var(--ui-scale)); font-size: calc(25px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar .bottom-tools :is(#btnDemolish#btnDemolish, #btnSave#btnSave):hover { transform: scale(1.07); }
    body :is(#autoSaveStatus#autoSaveStatus, #saveIndicator#saveIndicator#saveIndicator) { right: calc(180px * var(--ui-scale)); }
    #constructionHintPanel, .shortcut-hint-panel { margin-bottom: calc(70px * var(--ui-scale)); }
    /* ④ 분류 탭(랜드마크·카지노 등)은 도구 줄 바로 위에 */
    #subMenu#subMenu.has-tabs #submenuTabRow#submenuTabRow#submenuTabRow {
        position: absolute; left: 50%; right: auto; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 480px * var(--ui-scale));
        bottom: calc(var(--sc-tool-h) + 1px * var(--ui-scale)); top: auto; z-index: 6;
    }
}
/* ⑤ 왼쪽 범례(데이터) 버튼 아이콘은 색 그대로. 고른 것은 파란 테 */
body, body.dark-mode { --sc-icon-filter: none; }
html body :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(*, *) .sidebar-btn :is(.icon, img, svg) { filter: none !important; }
html body :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(*, *) .sidebar-btn.active { background: #e3f4fd !important; border: calc(3px * var(--ui-scale)) solid #1f8bd0 !important; color: #14557f !important; }
html body :is(#leftSidebar, #leftSidebarPower, #leftSidebarUtility, #leftSidebarFire, #leftSidebarPolice, #leftSidebarHospital, #leftSidebarSchool, #leftSidebarTourism, #rightSidebarRoad, #leftSidebarMining, #categoryLegendSidebar):is(*, *) .sidebar-btn.active * { color: #14557f !important; }
/* ⑥ 시그니처 컬러 = 하늘색(2026-11-29 사용자 지정). 강조색·제목·고문 버튼을 하늘색 하나로 */
body, body.dark-mode { --sc-accent: #29a9eb; --sc-accent-deep: #1b8fd0; --sc5-title: #1478b3; --sc5-tab-on: linear-gradient(180deg, #6fd0fa, #1f9fe0); --sc5-rule: linear-gradient(90deg, #29a9eb, #7fd2f8 55%, #c9ecfd); }
body.dark-mode { --sc5-title: #7cd0f7; }
html body #advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button):is(*, *) { background: linear-gradient(180deg, #34b4f2, #1b8fd0) !important; border-color: #157bb5 !important; color: #ffffff !important; }
html body #advisorPanel#advisorPanel :is(.advisor-panel-button, .advisor-locate-button):is(*, *) * { color: #ffffff !important; }
/* ⑦ 건설 목록: 건물 그림이 도구 줄·분류 탭에 가리지 않게 판 높이와 아래 여백을 맞춘다. 흰 판 위 흰 글씨 금지 */
@media (min-width: 900px) and (min-height: 541px) {
    #subMenu#subMenu#subMenu { height: calc(112px * var(--ui-scale) + var(--sc-tool-h)); padding-bottom: var(--sc-tool-h); box-sizing: border-box; }
    #subMenu#subMenu#subMenu.has-tabs { height: calc(148px * var(--ui-scale) + var(--sc-tool-h)); }
    #subMenu#subMenu#subMenu.has-tabs #submenuItems#submenuItems:has(.submenu-model-cutout) { bottom: calc(var(--sc-tool-h) + 30px * var(--ui-scale)); }
}
#subMenu#subMenu .submenu-item:not(.submenu-model-cutout) .name { color: var(--sc-text) !important; text-shadow: none !important; }
/* ⑧ 단축키 도움말: 타원 알약 → 둥근 사각형 판 */
html body :is(#zoneModeHint#zoneModeHint, #placementModeHint#placementModeHint, #demolishModeHint#demolishModeHint) {
    border-radius: calc(10px * var(--ui-scale)) !important; clip-path: none !important; background: var(--sc-surface) !important; background-image: none !important;
    border: 1px solid var(--sc-line) !important; box-shadow: var(--sc-shadow-panel) !important;
}
html body :is(#zoneModeHint#zoneModeHint, #placementModeHint#placementModeHint, #demolishModeHint#demolishModeHint)::before,
html body :is(#zoneModeHint#zoneModeHint, #placementModeHint#placementModeHint, #demolishModeHint#demolishModeHint)::after { content: none !important; }
/* 도구 줄의 등장 애니메이션(transform)이 남으면 고정 위치 버튼(철거·저장)이 줄 안에 갇힌다 */
@media (min-width: 900px) and (min-height: 541px) {
    #bottomBar#bottomBar#bottomBar#bottomBar .bottom-tools { animation: none !important; transform: none !important; }
}
/* 애드온 관리 버튼: 라이트 전용 옛 규칙보다 앞서게 */
html body #publicBuildingPopup#publicBuildingPopup#publicBuildingPopup#publicBuildingPopup :is(#btnExpansionGear, .bus-line-addon-manage),
html body #cityHallPanel#cityHallPanel#cityHallPanel#cityHallPanel #btnCityHallAddon#btnCityHallAddon {
    background: linear-gradient(180deg, #6f7a87, #4c545f) !important; border: calc(2px * var(--ui-scale)) solid #3c434c !important; color: #ffffff !important; border-radius: 999px !important; font-weight: 800 !important; opacity: 1 !important;
}
html body #publicBuildingPopup#publicBuildingPopup#publicBuildingPopup#publicBuildingPopup #btnExpansionGear#btnExpansionGear :is(span, *),
html body #cityHallPanel#cityHallPanel#cityHallPanel#cityHallPanel .panel-content #btnCityHallAddon#btnCityHallAddon span { color: #ffffff !important; }
/* ⑨ 건설 안내 창 고정: PC에서는 오른쪽 위 상단바 아래에 붙어 있고 떠다니지 않는다 */
@media (min-width: 900px) and (min-height: 541px) {
    /* 2026-11-29 ② 가운데 아래, 건물 설치 버튼(목록 그림) 바로 위에 */
    body #hintContainer#hintContainer#hintContainer#hintContainer.construction-hint { left: 50%; right: auto; top: auto; bottom: calc(var(--sc-strip-h) + var(--sc-tool-h) + 12px * var(--ui-scale)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 420px * var(--ui-scale)); justify-content: center; align-items: center; z-index: 1003; animation: none; }
    body:has(#subMenu.open) #hintContainer#hintContainer#hintContainer#hintContainer.construction-hint { bottom: calc(var(--sc-strip-h) + 208px * var(--ui-scale)); }
    body:has(#subMenu.open.has-tabs) #hintContainer#hintContainer#hintContainer#hintContainer.construction-hint { bottom: calc(var(--sc-strip-h) + 244px * var(--ui-scale)); }
    /* 보기 모드 안내(땅값·인구 등)도 같은 자리: 가운데 아래, 도구·목록 바로 위 */
    body #hintContainer#hintContainer#hintContainer#hintContainer:not(.construction-hint) { left: 50%; right: auto; top: auto; bottom: calc(var(--sc-strip-h) + var(--sc-tool-h) + 12px * var(--ui-scale)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 420px * var(--ui-scale)); }
    body:has(#subMenu.open) #hintContainer#hintContainer#hintContainer#hintContainer:not(.construction-hint) { bottom: calc(var(--sc-strip-h) + 208px * var(--ui-scale)); }
    body:has(#subMenu.open.has-tabs) #hintContainer#hintContainer#hintContainer#hintContainer:not(.construction-hint) { bottom: calc(var(--sc-strip-h) + 244px * var(--ui-scale)); }
    body #hintContainer#hintContainer.construction-hint #hint#hint { cursor: default; }
    body #hintContainer#hintContainer.construction-hint #hint#hint::before { content: none; }
    /* 목록이 많은 메뉴(공원 등)의 끝 그림이 닫기 버튼에 겹치지 않게 */
    #subMenu#subMenu#subMenu #submenuItems#submenuItems:has(.submenu-model-cutout) { padding-left: calc(24px * var(--ui-scale)); padding-right: calc(72px * var(--ui-scale)); }
}
/* ⑩ 넘치는 도구 줄(큰 UI 배율·좁은 화면)은 오른쪽 아래 고정 버튼(철거·저장) 밑에 깔리지 않게 양옆을 비우고 가로로 민다 */
@media (min-width: 900px) and (min-height: 541px) {
    #bottomBar#bottomBar#bottomBar .bottom-tools { justify-self: left; justify-content: safe center; box-sizing: border-box; min-width: 0; width: calc(100vw - 348px * var(--ui-scale)); margin-left: calc(174px * var(--ui-scale)); max-width: calc(100vw - 348px * var(--ui-scale)); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scroll-padding-inline: calc(8px * var(--ui-scale)); padding-top: calc(10px * var(--ui-scale)); margin-top: calc(-5px * var(--ui-scale)); }
}
/* ⑪ 하단 띠 1.2배(2026-11-29 사용자 지시): 띠 높이와 칸 내용을 함께 키우고, 수요(RCI) 칸은 행복도 왼쪽 */
@media (min-width: 900px) and (min-height: 541px) {
    body#cityBody, body { --sc-strip-h: calc(58px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .bar-gem, .bar-shop-cart, .population-display-center, .rewarded-ad-btn),
    #timeHUD#timeHUD#timeHUD .time-hud-face, #topBar#topBar#topBar .top-center :is(.city-name-display, .like-btn) { zoom: 1.2; }
    #topBar#topBar#topBar .top-center { left: calc(284px * var(--ui-scale)); }
    /* 왼쪽(시각·도시 이름·좋아요)이 쓰는 폭을 첫 열에 비워 두어 가운데 칸과 겹치지 않게 한다 */
    #bottomBar#bottomBar#bottomBar { grid-template-columns: minmax(min(calc(568px * var(--ui-scale)), 31vw), 1fr) auto auto auto auto auto auto auto minmax(0, 1fr); }
    #topBar#topBar#topBar .top-center .city-name-display { max-width: calc(150px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar .rci-demand-bar { grid-column: 2; }
    #bottomBar#bottomBar#bottomBar .city-happiness { grid-column: 3; }
    #bottomBar#bottomBar#bottomBar .money-display-center { grid-column: 4; }
    #bottomBar#bottomBar#bottomBar .bar-gem { grid-column: 5; }
    #bottomBar#bottomBar#bottomBar .bar-shop-cart { grid-column: 6; }
    #bottomBar#bottomBar#bottomBar .population-display-center { grid-column: 7; }
}
/* 넓은 창에서는 도시 이름을 덜 자른다 */
@media (min-width: 1280px) and (min-height: 541px) {
    #topBar#topBar#topBar .top-center .city-name-display:is(*, *) { max-width: calc(205px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar:is(*, *) { grid-template-columns: minmax(min(calc(634px * var(--ui-scale)), 31vw), 1fr) auto auto auto auto auto auto auto minmax(0, 1fr); }
}
/* 좁은 PC 창(900~1049px)은 칸이 다 들어가도록 내용 크기는 원래대로 두고 띠 높이만 키운다 */
@media (min-width: 900px) and (max-width: 1049px) and (min-height: 541px) {
    #bottomBar#bottomBar#bottomBar :is(.rci-demand-bar, .city-happiness, .money-display-center, .bar-gem, .bar-shop-cart, .population-display-center, .rewarded-ad-btn):is(*, *),
    #timeHUD#timeHUD#timeHUD .time-hud-face:is(*, *), #topBar#topBar#topBar .top-center :is(.city-name-display, .like-btn):is(*, *) { zoom: 1; }
    #topBar#topBar#topBar .top-center:is(*, *) { left: calc(236px * var(--ui-scale)); }
    #bottomBar#bottomBar#bottomBar:is(*, *) { grid-template-columns: minmax(min(calc(480px * var(--ui-scale)), 31vw), 1fr) auto auto auto auto auto auto auto minmax(0, 1fr); }
}
/* ⑫ 건설 목록 곡선 판 한 겹·절반 높이(2026-11-29 사용자 지시) */
@media (min-width: 900px) and (min-height: 541px) {
    #subMenu#subMenu#subMenu::after { content: none; }
    #subMenu#subMenu#subMenu::before { top: 50%; }
}
/* ⑬ 나침반: 팔각형으로 되돌리고 왼쪽 위(상단바 바로 아래)에. 풍향 글자가 잘리지 않게 판은 가상 요소로 그린다 */
@media (min-width: 900px) and (min-height: 541px) {
    #compass#compass#compass.wind-compass { top: calc(52px * var(--ui-scale)); bottom: auto; left: calc(12px * var(--ui-scale)); right: auto; z-index: 90; isolation: isolate; background: none; border-color: transparent; border-radius: 0; box-shadow: none; clip-path: none; filter: drop-shadow(0 calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale)) rgba(15, 28, 44, 0.4)); }
    #compass#compass#compass.wind-compass::before, #compass#compass#compass.wind-compass::after { content: ""; position: absolute; z-index: -1; pointer-events: none; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
    #compass#compass#compass.wind-compass::before { inset: calc(-1px * var(--ui-scale)); background: #ffffff; }
    #compass#compass#compass.wind-compass::after { inset: calc(2px * var(--ui-scale)); background: linear-gradient(180deg, #2f5f7f, #17364d); }
}
/* ⑭ 시간 정지 버튼 회색(2026-11-29 사용자 지시): 밝은 다이얼 위에서 보이게 */
html body #timeDialPanel#timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel#timeDialPauseLabel { background: #6b7785 !important; box-shadow: 0 calc(1px * var(--ui-scale)) calc(3px * var(--ui-scale)) rgba(15, 28, 44, 0.35) !important; color: #ffffff !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel#timeDialPauseLabel:hover { background: #56616e !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel#timeDialPauseLabel > span:not(.time-dial-pause-box) { color: #ffffff !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel#timeDialPauseLabel:has(input:checked) { background: #3f4954 !important; }
html body #timeDialPanel#timeDialPanel#timeDialPanel#timeDialPanel #timeDialPauseLabel#timeDialPauseLabel:has(input:checked) > span:not(.time-dial-pause-box) { color: #ffdf00 !important; }
/* ⑮ 좌우 하단 곡선 배경(2026-11-29 사용자 지시): 기본 화면에서 업그레이드·저장·철거 뒤에 옅은 흰 곡선. 건설 목록·설치·업그레이드 창·애드온 중에는 밀려나며 사라진다 */
@media (min-width: 900px) and (min-height: 541px) {
    body { --sc-corner: rgba(255, 255, 255, 0.8); }
    body.dark-mode { --sc-corner: rgba(30, 40, 52, 0.82); }
    #bottomBar#bottomBar#bottomBar#bottomBar .bottom-left::before, #bottomBar#bottomBar#bottomBar#bottomBar .bottom-center::before {
        content: ""; display: block; position: fixed; top: auto; bottom: var(--sc-strip-h); z-index: -1; pointer-events: none; animation: none; filter: none;
        background: var(--sc-corner); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    }
    #bottomBar#bottomBar#bottomBar#bottomBar .bottom-left::before {
        left: 0; right: auto; width: calc(270px * var(--ui-scale)); height: calc(200px * var(--ui-scale)); transform-origin: 0 100%;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 200' preserveAspectRatio='none'%3E%3Cpath d='M0 0C42 0 76 12 102 48C150 114 178 176 260 200H0Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 200' preserveAspectRatio='none'%3E%3Cpath d='M0 0C42 0 76 12 102 48C150 114 178 176 260 200H0Z'/%3E%3C/svg%3E");
    }
    #bottomBar#bottomBar#bottomBar#bottomBar .bottom-center::before {
        left: auto; right: 0; width: calc(250px * var(--ui-scale)); height: calc(165px * var(--ui-scale)); transform-origin: 100% 100%;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 160' preserveAspectRatio='none'%3E%3Cpath d='M230 0C196 0 170 16 146 52C108 108 70 142 0 160H230Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 160' preserveAspectRatio='none'%3E%3Cpath d='M230 0C196 0 170 16 146 52C108 108 70 142 0 160H230Z'/%3E%3C/svg%3E");
    }
    body:is(:has(#subMenu.open), :has(#hintContainer.construction-hint.visible), .civil-works-active, :has(#expansionModeBar[style*="flex"])) #bottomBar#bottomBar#bottomBar#bottomBar .bottom-left::before { transform: translate(-45%, 55%) scale(0.7); opacity: 0; }
    body:is(:has(#subMenu.open), :has(#hintContainer.construction-hint.visible), .civil-works-active, :has(#expansionModeBar[style*="flex"])) #bottomBar#bottomBar#bottomBar#bottomBar .bottom-center::before { transform: translate(45%, 55%) scale(0.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { #bottomBar#bottomBar#bottomBar#bottomBar .bottom-left::before, #bottomBar#bottomBar#bottomBar#bottomBar .bottom-center::before { transition: none; } }
/* ⑯ 꾸미기(스킨) 버튼: 상단바 오른쪽 둥근 버튼 */
@media (min-width: 900px) and (min-height: 541px) {
    #topBar#topBar#topBar .top-right #btnSkinInventory#btnSkinInventory {
        display: inline-flex; align-items: center; justify-content: center; flex: none; width: calc(40px * var(--ui-scale)); height: calc(40px * var(--ui-scale)); min-width: 0; min-height: 0; margin: 0; padding: 0; box-sizing: border-box;
        border-radius: 50%; clip-path: none; background: var(--sc5-pill); border: calc(2px * var(--ui-scale)) solid var(--sc5-rim); box-shadow: 0 calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale)) rgba(20, 34, 50, 0.25); font-size: calc(18px * var(--ui-scale)); line-height: 1;
    }
    #topBar#topBar#topBar .top-right #btnSkinInventory#btnSkinInventory:hover { border-color: #29a9eb; transform: scale(1.06); }
}
/* ⑰ 시간당 수입 색(2026-11-29 사용자 지시): 흑자는 초록, 적자는 빨강 */
html body #bottomBar#bottomBar#bottomBar .money-display-center .money-rate:is(*, *) { background: #15803d !important; color: #ffffff !important; text-shadow: none !important; }
html body #bottomBar#bottomBar#bottomBar .money-display-center .money-rate.negative:is(*, *) { background: #d92d20 !important; color: #ffffff !important; }
/* ⑱ 설치 불가 건물(2026-11-29 사용자 지시): 거의 안 보이던 투명도를 올리고, 색을 조금만 빼서 구분한다 */
html body #subMenu#subMenu#subMenu .submenu-item.submenu-item.disabled { opacity: 0.82; }
html body #subMenu#subMenu#subMenu .submenu-item.submenu-model-cutout.disabled .submenu-model-image { filter: grayscale(0.55) drop-shadow(0 2px 4px rgba(15, 28, 44, 0.35)); }
html body #mobileSubmenuSheet#mobileSubmenuSheet .submenu-sheet-item.submenu-sheet-item.disabled { opacity: 0.82; }
/* SC5 끝 */

/* SC-POPUP-COMPACT */
/* 건물 팝업(2026-11-29 사용자 지시): 작게, 가능하면 스크롤 없이. 길어질 때만 본문이 스크롤된다. */
html body #buildingPopup#buildingPopup { min-width: min(calc(300px * var(--ui-scale)), calc(100vw - 20px)); max-width: min(calc(330px * var(--ui-scale)), calc(100vw - 20px)); }
html body #publicBuildingPopup#publicBuildingPopup { min-width: min(calc(360px * var(--ui-scale)), calc(100vw - 20px)); max-width: min(calc(380px * var(--ui-scale)), calc(100vw - 20px)); }
html body :is(#buildingPopup#buildingPopup, #publicBuildingPopup#publicBuildingPopup) .popup-header { padding: calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale)); }
html body :is(#buildingPopup#buildingPopup, #publicBuildingPopup#publicBuildingPopup) .popup-content { padding: calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale)); scrollbar-width: thin; }
html body #publicBuildingPopup#publicBuildingPopup .popup-section-title { margin: calc(5px * var(--ui-scale)) 0 calc(3px * var(--ui-scale)); padding-top: calc(4px * var(--ui-scale)); font-size: max(10px, calc(12px * var(--ui-scale))); }
html body #publicBuildingPopup#publicBuildingPopup .popup-row { padding-top: calc(3px * var(--ui-scale)); padding-bottom: calc(3px * var(--ui-scale)); margin-bottom: calc(2px * var(--ui-scale)); }
html body #publicBuildingPopup#publicBuildingPopup .firetruck-status { padding: calc(6px * var(--ui-scale)) calc(8px * var(--ui-scale)); margin-bottom: 0; }
html body #publicBuildingPopup#publicBuildingPopup .firetruck-status > * { margin-top: 0; margin-bottom: calc(3px * var(--ui-scale)); }
html body #publicBuildingPopup#publicBuildingPopup .firetruck-status > :last-child { margin-bottom: 0; }
html body #publicBuildingPopup#publicBuildingPopup .firetruck-bar-container { margin-bottom: 0; }
html body #publicBuildingPopup#publicBuildingPopup .firetruck-bar-bg { height: calc(14px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #popupType { margin-bottom: calc(3px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #popupHappiness { margin-top: calc(3px * var(--ui-scale)); padding-top: calc(3px * var(--ui-scale)); padding-bottom: 0; gap: calc(8px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #happinessEmoji { font-size: calc(26px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup .happiness-info { gap: calc(3px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #popupResidentFlowRow { padding-bottom: calc(2px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #satisfactionSection { margin-top: calc(4px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup .happiness-item { padding-top: calc(2px * var(--ui-scale)); padding-bottom: calc(2px * var(--ui-scale)); margin-bottom: 1px; }
html body #buildingPopup#buildingPopup :is(#popupEducationLevelSection, #popupDensitySection) { margin-top: calc(5px * var(--ui-scale)); padding: calc(5px * var(--ui-scale)) calc(8px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup #densityProgressBar { height: calc(24px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup .density-badges { margin-top: calc(6px * var(--ui-scale)); }
html body #buildingPopup#buildingPopup .density-badges * { line-height: 1.15; }

/* SC-EVENT-PANEL: 하늘색 배경과 사진 위에서 읽히는 제목·알약·왼쪽 목록 */
html body:not(.dark-mode) #eventPanel#eventPanel#eventPanel .ev-title { padding: calc(4px * var(--ui-scale)) calc(18px * var(--ui-scale)); border-radius: calc(14px * var(--ui-scale)); background: rgba(255,255,255,.88); box-shadow: 0 4px 14px rgba(20,90,140,.18); text-shadow: none; color: #12608f !important; }
html body:not(.dark-mode) #eventPanel#eventPanel#eventPanel :is(.ev-pill, .ev-done) { background: rgba(255,255,255,.92) !important; box-shadow: inset 0 0 0 1px var(--sc-line); color: var(--sc-text) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-tab { background: var(--sc-surface) !important; border: 1px solid var(--sc-line) !important; box-shadow: 0 3px 10px rgba(15,50,80,.18); text-shadow: none; }
html body #eventPanel#eventPanel#eventPanel .ev-tab.is-active { background: var(--sc-accent-deep) !important; border-color: var(--sc-accent-deep) !important; }
html body #eventPanel#eventPanel#eventPanel .ev-tab.is-active .ev-tab-label { color: #fff !important; }
/* SC-POPUP-COMPACT 끝 */
