/* ════════════════════════════════════════════════════════════════
   m166.css — 166 금융 앱 문법 (11-13 v2 · 시안 = 166/시안/시안_v2_금융앱.html)
   사용자: "제대로 개발한 느낌 · AI 가 아닌 · 현대 금융 앱 · 쉽고 직관적"
   - 장식 없음: 빛 번짐·그레인·유리·글로우·그라디언트 버튼 ⛔ (v1 에서 넣었다가 걷어냄 — 그게 AI 티)
   - 면은 평평한 3단 · 테두리 대신 배경 차이와 여백 · 숫자가 주인공 · 색은 의미에만
   - base.html 인라인 스타일 다음에 읽혀 이긴다. 다크 테마만.
   ════════════════════════════════════════════════════════════════ */

:root:not([data-theme="light"]) {
  --bg:        #0F0F12;
  --bg-1:      #131317;
  --bg-2:      #17171B;
  --bg-3:      #1F1F25;
  --surface:   #17171B;
  --surface-2: #1F1F25;
  --surface-3: #2A2A31;
  --border:    rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --divider:   rgba(255, 255, 255, 0.06);

  --text:   #F3F3F6;
  --text-2: #A2A2AC;
  --text-3: #6C6C76;
  --text-4: #4A4A52;

  --brand-300: #FFA45C;
  --brand-400: #FF8A33;
  --brand-500: #FF7A1A;
  --brand-600: #E86A10;

  --elev-1: none; --elev-2: none; --elev-3: none; --elev-4: none; --elev-5: none;
  --glow-brand: none; --glow-success: none; --glow-warning: none;
  --glass-bg: #0F0F12; --glass-border: rgba(255, 255, 255, 0.06); --glass-blur: 0px;
}

/* 글자 — Pretendard (구글 폰트엔 없어 윈도우에선 맑은 고딕으로 보이던 문제 → base.html 에서 jsdelivr 로) */
body { font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
       -webkit-font-smoothing: antialiased; letter-spacing: -0.01em;
       word-break: keep-all; overflow-wrap: break-word; }   /* 한국어는 낱말 단위로 줄바꿈("시작하/기" 방지) */
/* 짧은 꼬리표·버튼은 한 줄로 */
:is(button, .v2-btn, .v2-tag, .lesson-badge, [class*="-badge"], [class*="-pill"], [class*="-tag"]) { white-space: nowrap; }
.num, [class*="-px"], [class*="-price"], [class*="-pnl"], [class*="-chg"] {
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
}

/* 위 메뉴 · 아래 탭 — 평평한 바닥색 + 가는 선 */
:root:not([data-theme="light"]) .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none;
                                        border-bottom: 1px solid var(--border); }
:root:not([data-theme="light"]) .bnav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none;
                                         border-top: 1px solid var(--border); }
:root:not([data-theme="light"]) :is(.nav-dd-menu, .user-dd-menu) { background: var(--surface-2); border: 1px solid var(--border-strong);
                                         box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* 카드 — 면만 (테두리·그림자 없음) */
:root:not([data-theme="light"]) :is(.card, .card-glass, .card-gradient-border) {
  background: var(--surface); border: 0; box-shadow: none; background-image: none;
}
:root:not([data-theme="light"]) .card-hover:hover { transform: none; background: var(--surface-2); }

/* 버튼 — 단색 */
:root:not([data-theme="light"]) .btn-primary { background: var(--brand-500); box-shadow: none; color: #fff; }
:root:not([data-theme="light"]) .btn-primary:hover { background: var(--brand-600); box-shadow: none; }
:root:not([data-theme="light"]) .btn-secondary { background: var(--surface-2); border-color: transparent; box-shadow: none; }

/* 입력칸 — 면 + 초점 때만 얇은 선 */
:root:not([data-theme="light"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  background-color: var(--surface); border-color: transparent;
}
:root:not([data-theme="light"]) :is(input, select, textarea):focus { outline: none; border-color: rgba(255, 122, 26, 0.6); box-shadow: none; }
:root:not([data-theme="light"]) :is(button, a, [tabindex]):focus-visible { outline: 2px solid rgba(255, 122, 26, 0.6); outline-offset: 2px; }

/* 스크롤바 */
:root:not([data-theme="light"]) { scrollbar-color: #2A2A31 transparent; scrollbar-width: thin; }
:root:not([data-theme="light"]) ::-webkit-scrollbar { width: 8px; height: 8px; }
:root:not([data-theme="light"]) ::-webkit-scrollbar-thumb { background: #2A2A31; border-radius: 8px; }
:root:not([data-theme="light"]) ::-webkit-scrollbar-track { background: transparent; }

/* 71 공용 조각 — 그라디언트·글로우 걷기 */
:root:not([data-theme="light"]) :is(.tf-btn, .tab-btn).active { box-shadow: none; }

/* ── 상태 점 · 자산 칩 · 3D · 아이콘 정렬 (이모지 대체, 11-13) ── */
.m-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 0.08em; background: #52525B; flex: none; }
.m-dot--open { background: #22C55E; }
.m-dot--pre  { background: #EAB308; }
.m-dot--closed { background: #52525B; }
.m-dot--live { background: var(--up); animation: m-blink 1.4s ease-in-out infinite; }
@keyframes m-blink { 50% { opacity: 0.3; } }
.m-ac { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -0.02em; flex: none; }
.m-ac--fx { background: #8B5CF6; }
.m-e3d { display: inline-block; vertical-align: middle; object-fit: contain; }
.lot-row-rank .m-e3d { display: block; margin: 0 auto; }
.lot-avatar-flag:has(.m-e3d) { background: none; border: 0; width: auto; height: auto; top: -8px; right: -8px; }
.lot-avatar-flag .m-e3d { width: 24px; height: 24px; }
.lc-icon { vertical-align: -0.16em; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.m-lang-code { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px;
               font-size: 11px !important; font-weight: 700; letter-spacing: 0.02em; background: var(--surface-2); color: var(--text-2); }

/* ════════════════════════════════════════════════════════════════
   공용 조각 (시안 v2) — 새로 짜는 화면이 함께 쓴다
   ════════════════════════════════════════════════════════════════ */
.v2-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.v2-tag.buy  { background: rgba(var(--up-rgb), 0.12); color: var(--up); }
.v2-tag.sell { background: rgba(var(--down-rgb), 0.12); color: var(--down); }
.v2-av { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; flex: none; }
.v2-seg { display: flex; gap: 2px; background: var(--surface); padding: 3px; border-radius: 10px; width: fit-content; }
.v2-seg button { padding: 6px 12px; font-size: 13px; color: var(--text-2); border-radius: 8px; white-space: nowrap; }
.v2-seg button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.v2-btn { height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600; background: var(--surface-3); color: var(--text);
          display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.v2-btn.pri { background: var(--brand-500); color: #fff; }
.v2-btn.pri:hover { background: var(--brand-600); }
.v2-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.up { color: var(--up); } .down { color: var(--down); }

/* 흐르는 '따라하기' 띠 — 주황 이름표 고정 + 오른쪽으로 흐름 · 마우스 올리면 멈춤 */
.tk { display: flex; align-items: center; height: 44px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.tk-lb { flex: none; display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 14px; background: var(--brand-500); color: #fff;
         font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.tk-lb i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: m-blink 1.4s ease-in-out infinite; }
.tk-lb svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tk-view { flex: 1; min-width: 0; overflow: hidden; height: 100%;
           -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
           mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent); }
.tk-track { display: flex; align-items: center; height: 100%; width: max-content; animation: tk-flow var(--tk-dur, 36s) linear infinite; }
.tk:hover .tk-track { animation-play-state: paused; }
@keyframes tk-flow { to { transform: translateX(-50%); } }
.tk-it { display: flex; align-items: center; gap: 8px; padding: 0 18px; font-size: 14px; white-space: nowrap; height: 100%; color: var(--text); text-decoration: none; }
a.tk-it:hover { background: var(--surface-2); }
.tk-it .rk { font-size: 13px; font-weight: 700; color: var(--brand-500); }
.tk-it .v2-av { width: 24px; height: 24px; font-size: 11px; }
.tk-it .nm { font-weight: 600; }
.tk-it .r { font-weight: 700; }
.tk-it .t2 { color: var(--text-2); } .tk-it .t3 { color: var(--text-3); font-size: 13px; }
.tk-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--surface-3); flex: none; }
.tk-empty { padding: 0 18px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .tk-track, .tk-lb i, .m-dot--live { animation: none; } }

/* ════════════════════════════════════════════════════════════════
   v2 화면 공용 틀 (11-13 밤 · todo ④) — 랭킹·프로필·카피·퀘스트·대회·커뮤니티·매매일지·AI 코치·시세표·포트폴리오가 함께 쓴다
   홈(index.html)·거래 화면과 같은 문법: 평평한 면 · 카드 대신 목록 · 숫자가 주인공 · 색은 의미에만 · 그라디언트·글로우 ⛔
   JS 조각 = base.html window.v2 (esc · av · line · pct · usd · cls · ago)
   ════════════════════════════════════════════════════════════════ */
.v2-page { max-width: 1120px; margin: 0 auto; padding: 28px var(--page-px) 48px; }
.v2-page.wide { max-width: 1320px; }
.v2-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.v2-sub { font-size: 14px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.v2-head { margin-bottom: 20px; }
.t2 { color: var(--text-2); } .t3 { color: var(--text-3); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 밑줄 탭 (시안 .tabs) */
.v2-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.v2-tabs::-webkit-scrollbar { display: none; }
/* 옆으로 넘기는 줄(탭·기간 단추)이 잘려 있으면 오른쪽 끝을 흐리게 — "더 있어요" 표시 (base.html scMore · 11-14 모바일 점검) */
.sc-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.v2-tabs button, .v2-tabs a { padding: 14px 0 12px; font-size: 15px; color: var(--text-3); font-weight: 500; border-bottom: 2px solid transparent;
                              margin-bottom: -1px; white-space: nowrap; text-decoration: none; background: none; }
.v2-tabs :is(button, a).on { color: var(--text); font-weight: 600; border-color: var(--text); }
.v2-tabs .n { color: var(--brand-500); margin-left: 4px; font-weight: 600; }

/* 섹션 제목 */
.v2-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.v2-h:first-child { margin-top: 0; }
.v2-h b { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.v2-h .sub { font-size: 13px; color: var(--text-3); font-weight: 500; }
.v2-h a, .v2-h .more { font-size: 14px; color: var(--text-3); text-decoration: none; white-space: nowrap; }

/* 면 · 줄 */
.v2-box { background: var(--surface); border-radius: 18px; }
.v2-box.pad { padding: 20px; }
.v2-list > * + * { border-top: 1px solid var(--border); }
.v2-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; font-size: 14px; }
.v2-kv > span:first-child { color: var(--text-2); }
.v2-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); border-radius: 18px; overflow: hidden; }
.v2-stats > div { background: var(--surface); padding: 16px 18px; }
.v2-stats span { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.v2-stats b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.v2-empty { padding: 36px 20px; text-align: center; color: var(--text-3); font-size: 14px; line-height: 1.6; }
.v2-empty .v2-btn { margin-top: 14px; }
.v2-skel { background: var(--surface); border-radius: 18px; min-height: 64px; }
.v2-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--brand-500); background: rgba(255,122,26,0.12);
            padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.v2-badge.gray { color: var(--text-2); background: var(--surface-2); }
.v2-badge.up { color: var(--up); background: rgba(var(--up-rgb), 0.12); }
.v2-badge.down { color: var(--down); background: rgba(var(--down-rgb), 0.12); }
.v2-me { background: rgba(255,122,26,0.06); }
.v2-bar { height: 6px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.v2-bar i { display: block; height: 100%; background: var(--brand-500); border-radius: 9px; }
.v2-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* 트레이더 줄 — 순위 · 얼굴 · 이름(따라 하는 사람) · 30일 곡선 · 수익률 · 버튼 (홈 HOT 과 같은 꼴) */
.v2-trow { display: grid; grid-template-columns: 36px 44px minmax(0, 1fr) 110px 120px var(--act, 40px); align-items: center; gap: 12px;   /* --act = 버튼 칸 너비(줄마다 같게) */
           padding: 12px 18px; color: var(--text); text-decoration: none; }
.v2-trow:hover { background: var(--surface-2); }
.v2-trow .rk { font-size: 16px; font-weight: 700; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.v2-trow .rk .m-e3d { display: block; margin: 0 auto; }
.v2-trow .v2-av { width: 42px; height: 42px; }
.v2-trow .who { min-width: 0; }
.v2-trow .who b { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.v2-trow .who b .nm { overflow: hidden; text-overflow: ellipsis; }
.v2-trow .who > span { font-size: 13px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-trow .ret { text-align: right; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-trow .ret span { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); margin-top: 2px; }
.v2-trow .act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.v2-trow .cp { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--surface-2); display: grid; place-items: center; white-space: nowrap; }
.v2-trow .cp.pri { background: var(--brand-500); color: #fff; }
.v2-trow .eq { display: block; }
@media (max-width: 699px) {
  .v2-page { padding: 14px 16px 32px; }
  .v2-title { font-size: 22px; }
  .v2-tabs { gap: 18px; }
  .v2-trow { grid-template-columns: 28px 38px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .v2-trow .v2-av { width: 38px; height: 38px; }
  .v2-trow .eq, .v2-trow .act { display: none; }      /* 좁은 화면: 줄을 누르면 프로필(팔로우·따라하기는 거기서) */
}

/* 상담 둥근 버튼 — 주황 빛 번짐(AI 티) 대신 평평한 회색 · 모바일은 숨김(목록 숫자·따라하기 글자를 가렸다 · todo ⑥)
   모바일 고객지원 = 아래 탭 [더보기] 안에 있다 */
:root:not([data-theme="light"]) .lot-chat-fab { background: var(--surface-3); color: var(--text-2); box-shadow: 0 4px 14px rgba(0,0,0,0.45); }
:root:not([data-theme="light"]) .lot-chat-fab:hover { background: #34343C; color: var(--text); transform: none; }
@media (max-width: 767px) { .lot-chat-fab { display: none !important; } }

/* 버튼 규격 (11-13 밤 통일감 점검) — 화면마다 36·38·40px 로 따로 정하던 것을 셋으로
   기본 .v2-btn 44px · 작은 .sm 36px(줄 안·머리줄 보조) · 큰 .lg 52px(화면의 단 하나 큰 행동) · 연한 주황 .soft(한 화면에 여러 개인 행동) */
.v2-btn.sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.v2-btn.lg { height: 52px; border-radius: 14px; font-size: 17px; }
.v2-btn.soft { background: rgba(255,122,26,0.12); color: var(--brand-500); }
.v2-btn.soft:hover { background: rgba(255,122,26,0.2); }


/* ── 따라 하기 설정 창(카피 목록·리더 상세·프로필 공용 · 11-14 화면 세 곳에서 올림) — JS = base.html window.CopySettings ── */
.cs-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, 0.6); display: none; align-items: center; justify-content: center; padding: 16px; }
.cs-ov.on { display: flex; }
.cs-box { background: var(--surface); border-radius: 20px; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; }
.cs-hd { display: flex; align-items: center; gap: 12px; padding: 20px 22px 4px; }
.cs-hd b { font-size: 18px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-hd .v2-av { width: 36px; height: 36px; }
.cs-x { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); display: grid; place-items: center; flex: none; }
.cs-bd { padding: 12px 22px 4px; }
.cs-lb { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 14px 0 10px; }
.cs-amt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cs-amt b { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cs-amt span { font-size: 13px; color: var(--text-3); }
.cs-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-pick button { height: 36px; min-width: 58px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--text-2); }
.cs-pick button.on { background: var(--text); color: #111; }
.cs-in { display: inline-flex; align-items: center; height: 38px; border-radius: 10px; background: var(--surface-2); padding: 0 10px; gap: 2px; }
.cs-in input { width: 44px; background: none !important; border: 0; outline: 0; color: var(--text); font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.cs-in input::-webkit-outer-spin-button, .cs-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cs-in i { font-style: normal; font-size: 13px; color: var(--text-3); }
.cs-in:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand-500); }
.cs-help { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-top: 8px; word-break: keep-all; }
.cs-notes { list-style: none; margin: 18px 0 0; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; display: grid; gap: 8px; }
.cs-notes li { font-size: 13px; color: var(--text-2); line-height: 1.55; display: flex; gap: 8px; word-break: keep-all; }
.cs-notes li::before { content: ''; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); margin-top: 8px; }
.cs-ft { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; padding: 18px 22px 8px; }
.cs-stop { display: block; margin: 0 auto 14px; padding: 8px 12px; font-size: 13px; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.cs-tg { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.cs-tg b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.cs-tg span { display: block; font-size: 13px; color: var(--text-3); line-height: 1.55; margin-top: 4px; word-break: keep-all; }
.cs-sw { width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; }
.cs-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .18s; }
.cs-sw.on { background: var(--brand-500); }
.cs-sw.on::after { left: 21px; }
.cs-state { margin: 2px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--text-2); line-height: 1.55; word-break: keep-all; }
.cs-state b { color: var(--text); font-weight: 600; }
/* 비율 미리 보기 — 내 몫이 최소 랏보다 작아지는 주문 (11-15) */
.cs-fit { margin-top: 12px; display: grid; gap: 10px; }
.cs-fit-msg { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--text-2); line-height: 1.6; word-break: keep-all; }
.cs-fit-msg b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.cs-fit-msg.warn { box-shadow: inset 0 0 0 1px var(--warning-500); }
.cs-fit-msg.warn b { color: var(--warning-400); }
.cs-fit-msg .cs-fit-go { margin-top: 10px; height: 32px; padding: 0 12px; border-radius: 9px; background: var(--warning-500); color: #111; font-size: 13px; font-weight: 600; }
.cs-fit-lb { font-size: 13px; font-weight: 600; color: var(--text-2); }
.cs-fit ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cs-fit li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.cs-fit li span { color: var(--text-2); min-width: 0; }
.cs-fit li b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cs-fit li em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--text-3); word-break: keep-all; }
.cs-fit li.no b, .cs-fit li.no em { color: var(--warning-400); }
@media (max-width: 699px) {
  .cs-ov { align-items: flex-end; padding: 0; }
  .cs-box { border-radius: 20px 20px 0 0; max-width: none; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
}

/* ── 알림 목록(헤더 종 · base.html · 11-14) ── */
.nt-panel { position: fixed; top: 64px; right: 16px; z-index: 8000; width: 360px; max-width: calc(100vw - 32px); max-height: 70vh;
            display: none; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.nt-panel.on { display: flex; }
@media (max-width: 767px) { .nt-panel { top: 56px; right: 8px; max-width: calc(100vw - 16px); max-height: 75vh; } }
.nt-hd { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.nt-hd b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.nt-hd span { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); line-height: 1.5; word-break: keep-all; }
.nt-list { overflow-y: auto; }
.nt-row { display: block; padding: 12px 18px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text-2); }
.nt-row:last-child { border-bottom: 0; }
.nt-row:hover { background: var(--surface-2); }
.nt-row b { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); }
.nt-row.new b { font-weight: 700; color: var(--text); }
.nt-row.new b::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--brand-500); }
.nt-row span { display: block; margin-top: 3px; font-size: 13px; color: var(--text-3); }
.nt-row i { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--text-3); }
.nt-empty { padding: 32px 18px; text-align: center; font-size: 14px; color: var(--text-3); }
/* 아이폰 홈 화면 추가 · 앱 안 → 사파리 안내 창(base.html M166Push.guide · 11-14) */
.ig-ov { position: fixed; inset: 0; z-index: 9100; background: rgba(0,0,0,.62); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; }
.ig-ov.on { display: flex; }
.ig-box { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; padding: 22px 20px 16px; }
.ig-box h3 { font-size: 19px; font-weight: 700; }
.ig-sub { font-size: 14px; color: var(--text-2); line-height: 1.55; margin-top: 6px; word-break: keep-all; }
.ig-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.ig-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text); line-height: 1.45; word-break: keep-all; }
.ig-steps i { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: #0A84FF; }
.ig-steps i svg { width: 22px; height: 22px; }
.ig-steps i img { width: 40px; height: 40px; border-radius: 10px; }
.ig-steps small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ig-note { font-size: 13px; color: var(--text-3); line-height: 1.55; margin-top: 14px; word-break: keep-all; }
.ig-go, .ig-copy { width: 100%; margin-top: 12px; }
.ig-close { width: 100%; margin-top: 14px; }
.ig-arrow { display: none; }
.ig-ov.arrow .ig-arrow { display: block; position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); width: 34px; height: 34px; margin-left: -17px;
  border-right: 5px solid #fff; border-bottom: 5px solid #fff; transform: rotate(45deg); animation: igb 1.1s ease-in-out infinite; }
@keyframes igb { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
.nt-ft { display: block; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); text-decoration: none; text-align: center; }
.nt-ft:hover { background: var(--surface-2); color: var(--text); }

/* ── 안내 띠(관리자 화면에서 켜고 끔 · 서버 재시작 없음 · 11-15) ──
   위 메뉴가 fixed 이고 화면마다 윗여백이 달라(거래 화면 = 0) 흐름에 두면 메뉴 밑에 숨는다 → 메뉴 바로 아래 떠 있는 띠 */
.live-bn { position: fixed; top: calc(var(--nav-h, 52px) + 8px); left: 50%; transform: translateX(-50%); z-index: 900;
           display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100vw - 24px)); padding: 9px 8px 9px 16px;
           border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 13px; line-height: 1.5;
           box-shadow: 0 6px 24px rgba(0, 0, 0, .35); word-break: keep-all; }
.live-bn[hidden] { display: none; }
.live-bn.warn { background: var(--warning-500); color: #111; }
.live-bn button { flex: none; width: 28px; height: 28px; border-radius: 50%; background: transparent; color: inherit;
                  font-size: 18px; line-height: 1; opacity: .7; }
.live-bn button:hover { opacity: 1; }

/* ── 오늘의 안내 한 줄 · 시작하기 체크리스트(11-15 · nudge_service.py) — 막는 창 없음 ── */
.ndg { position: fixed; top: calc(var(--nav-h, 52px) + 8px); left: 50%; transform: translate(-50%, -8px); opacity: 0; z-index: 890;
       display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 24px)); padding: 8px 8px 8px 16px;
       border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: 14px; line-height: 1.45;
       box-shadow: 0 8px 28px rgba(0, 0, 0, .4); transition: opacity .22s, transform .22s; word-break: keep-all; }
.ndg.on { opacity: 1; transform: translate(-50%, 0); }
.ndg .t { flex: 1; min-width: 0; }
.ndg .go { flex: none; height: 32px; padding: 0 14px; border-radius: 9px; background: var(--brand-500); color: #fff; font-size: 13px; font-weight: 600; }
.ndg .x { flex: none; width: 28px; height: 28px; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 18px; line-height: 1; }
.ck { position: fixed; left: 20px; bottom: 20px; z-index: 880; }
.ck-pill { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
           background: var(--surface-2); color: var(--text); font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); border: 1px solid var(--border); }
.ck-pill span { color: var(--brand-500); font-weight: 700; }
.ck-pill i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand-500); }
.ck-panel { position: absolute; left: 0; bottom: 48px; width: 290px; padding: 14px; border-radius: 16px; background: var(--surface);
            border: 1px solid var(--border); box-shadow: 0 12px 36px rgba(0, 0, 0, .45); }
.ck-panel[hidden] { display: none; }
.ck-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.ck-off { font-size: 12px; color: var(--text-3); background: transparent; }
.ck-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ck-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.ck-panel a:hover { background: var(--surface-2); }
.ck-panel .c { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text-4, #666); display: grid; place-items: center; font-size: 12px; flex: none; }
.ck-panel li.done .c { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.ck-panel li.done .n { color: var(--text-3); text-decoration: line-through; }
.ck-panel .n { flex: 1; }
.ck-panel .ar { color: var(--text-3); }
@media (max-width: 699px) {
  .ck { left: 12px; bottom: calc(var(--bnav-h, 60px) + var(--safe-bottom, 0px) + 12px); }
  .ndg { font-size: 13px; left: 12px; right: 12px; max-width: none; transform: translateY(-8px); }
  .ndg.on { transform: none; }
}
