  * { margin: 0; padding: 0; box-sizing: border-box; }
  /* 2026-07-10: 모든 select 드롭다운 화살표(v) 제거 — 전 폼 통일 (사장님 지정). 개별 폼 CSS 무관 전역 적용. */
  select { -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important; background-image: none !important; }
  select::-ms-expand { display: none !important; }
  /* 2026-07-10: 진태양시 KST 블록의 생시(시진) select — 폼별 클래스 무관 다크 통일 (흰박스 방지) */
  /* block 이라야 자식(생시 select 또는 select+버튼 flex div)이 폭 100% 채움 (flex면 쪼그라듦) */
  .ts-kst-bt { display: block; }
  /* 🔴 2026-08-30 — 이 줄이 `> div` 였다. 시각 고르는 줄(select+🕐버튼)만 가로로
     놓으려던 것인데, **그 아래 안내 문단까지** 잡아 flex 로 만들었다.
     그러면 문장 조각들이 나란히 서서 칸이 좁아지고 **글자가 한 글자씩 세로로 쌓인다**
     (교수님 "정통사주 명단선택시 펼쳐지는 데서 내용이 알아보기 힘듦").
     ▶ select 를 품은 줄만 집는다. 글만 있는 div 는 그대로 문단으로 흐른다. */
  .ts-kst-bt > div:has(> select) { display: flex; gap: 6px; align-items: stretch; }
  /* :has 를 못 읽는 옛 브라우저 대비 — 안내 문단은 어떤 경우에도 문단으로 */
  .ts-kst-bt > .vo2-bt-why,
  .ts-kst-bt > .cf-help { display: block; }
  .ts-kst-bt select {
    flex: 1; min-width: 0; width: 100%;
    padding: 10px 12px;
    background: rgba(var(--black-rgb), 0.25);
    border: 1px solid rgba(var(--lav-main-rgb), 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px; font-family: inherit; outline: none;
  }
  /* 2026-07-10: 생시 옆 🕐 시간? 버튼 — 폼별 인라인 차이(그라디언트/투라인/그림자) 강제 통일 */
  .ts-kst-bt button {
    flex: 0 0 auto !important;
    padding: 0 14px !important;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--on-accent) !important;
    border: 0 !important; border-radius: 10px !important;
    font-weight: 800 !important; font-size: 12px !important;
    cursor: pointer !important; white-space: nowrap !important; box-shadow: none !important;
    display: inline-flex !important; flex-direction: row !important;
    align-items: center !important; justify-content: center !important; gap: 4px !important;
  }
  .ts-kst-bt button span { font-size: 13px !important; font-weight: 800 !important; letter-spacing: 0 !important; line-height: 1 !important; }

  /* 페이지 간 cross-fade (View Transitions) — chips 갱신 안 되는 이슈 발견되어 임시 비활성화
   * @view-transition { navigation: auto; }
   * ::view-transition-old(root),
   * ::view-transition-new(root) { animation-duration: 0.18s; }
   */

  /* 스크롤바 항상 보이도록 강제 (페이지 콘텐츠 길이에 따라 폭이 변하지 않게) */
  /* 2026-07-10: html 배경을 다크로 — 페이지 이동·페이드인 동안 흰색이 새어나와 '깜박' 보이던 것 제거 (전역).
     View Transitions는 칩 갱신 버그로 비활성 상태라, 흰 배경 자체를 없애는 안전한 방식 채택. */
  /* 배경은 html 이 통째로 깐다 — 본문(480px)에만 깔면 넓은 화면에서 안팎 경계가 보인다
     (2026-08-04 교수님 "뒷배경과 아이템 배경이 차이가 나지? 원천 뒷배경과 같이 하라고").
     폰에서는 여백이 없어 보이는 결과가 동일하다. */
  html { overflow-y: scroll; scrollbar-gutter: stable;
    background: var(--bg-deep);
    /* 바탕 물빛은 **테마가 정한다** (2026-09-03 교수님 「바탕도 완전히 흰색으로」).
       흰 테마는 none 이라 순백이 된다. 여기 그라디언트를 박아 두면 테마가 못 끈다.
       ⚠️ 같은 그라디언트가 세 곳에 있었다(_brand_chrome 둘 · home 하나). 한쪽만
          고치면 화면마다 바탕이 갈린다 — 셋 다 이 토큰을 본다. */
    background-image: var(--bg-tint);
    background-attachment: fixed; }
  body {
    /* 2026-06-04: static/fonts 자체 호스팅 Noto Sans KR (Apache 2.0) 만 사용.
       시스템 폰트 제거 — 라이센스 안정성. */
    font-family: 'Noto Sans KR', sans-serif;
    background: transparent;      /* 배경은 html 이 깐다 (위 주석 참조) */
    color: var(--text-primary);
    max-width: 480px;  
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 86px;
    -webkit-font-smoothing: antialiased;
    /* 2026-06-07: 페이지 진입 시 부드러운 페이드인 — opacity 만 사용 (transform 쓰면 자식 position:fixed 좌표계 깨짐) */
    animation: brand-page-fadein 0.5s ease-out both;
  }
  @keyframes brand-page-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  /* reduced-motion 회원 — 애니메이션 비활성화 (접근성) */
  @media (prefers-reduced-motion: reduce) {
    body { animation: none !important; }
  }

  /* 반짝이 파티클 */
  .sparkles {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 600px; height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .sparkle {
    position: absolute;
    border-radius: 50%;
    animation: sparkle-anim var(--dur, 4s) ease-in-out infinite;
    opacity: 0;
  }
  .sparkle.type-lav { background: var(--lav-light); }
  .sparkle.type-gold { background: var(--gold); }
  @keyframes sparkle-anim {
    0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    50% { opacity: var(--op, 0.5); transform: scale(1) rotate(180deg); }
  }

  /* 상단 chrome (헤더 + 슬라이더 한 덩어리 sticky) */
  .app-chrome-top {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(var(--bg-deep-rgb), 0.5);
    /* 2026-08-04 교수님 "투명도가 좀 있나보다 뒷배경이 좀 보여" — 헤더가 반투명(0.9~0.98)이라
       스크롤된 본문 글자가 메뉴 뒤로 비쳤다. 완전 불투명으로 덮는다.
       배경 그림은 html 과 똑같이 깔고 attachment:fixed 로 고정 — 화면에 붙어 있어
       뒤 배경과 이음매 없이 정확히 이어진다(단색으로 덮으면 그라데이션과 어긋난다). */
    background: var(--bg-deep);
    /* 바탕 물빛은 **테마가 정한다** (2026-09-03 교수님 「바탕도 완전히 흰색으로」).
       흰 테마는 none 이라 순백이 된다. 여기 그라디언트를 박아 두면 테마가 못 끈다.
       ⚠️ 같은 그라디언트가 세 곳에 있었다(_brand_chrome 둘 · home 하나). 한쪽만
          고치면 화면마다 바탕이 갈린다 — 셋 다 이 토큰을 본다. */
    background-image: var(--bg-tint);
    background-attachment: fixed;
  }
  .top-header {
    background: transparent;   /* 불투명 처리는 위 .app-chrome-top 이 담당 */
    padding: 8px 16px 6px;
    border-bottom: 1px solid var(--border);
  }
  .top-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
  }
  .brand-logo {
    display: inline-flex; flex-direction: column;
    line-height: 1.05;
    text-decoration: none;
    filter: drop-shadow(0 0 10px rgba(var(--lav-light-rgb), 0.45));
    align-self: flex-end;
    /* 2026-07-18: 삼성폰 큰 글꼴 등 좁은 폭에서 '도솔'이 한 글자씩 세로로 깨지던 것 방지 —
       로고는 절대 줄이지 않고, 우측 버튼이 대신 줄바꿈되게(아래 .header-icons flex-wrap). */
    flex-shrink: 0;
  }
  .brand-corp {
    font-family: 'Noto Serif KR', serif;
    font-size: 19px; font-weight: 900;
    letter-spacing: 6px;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--text-secondary) 0%, var(--gold) 60%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .brand-institute {
    font-size: 9.5px; font-weight: 700;
    color: var(--gold-ink);
    letter-spacing: 1.5px;
    opacity: 0.78;
    margin-top: 1px;
    white-space: nowrap;
  }
  /* 분석 진행 중일 때 펄스하는 골드 점 — body.brand-busy 시 노출 */
  .brand-busy-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    margin-left: 8px;
    vertical-align: middle;
    -webkit-text-fill-color: initial; /* 부모 그라디언트 영향 차단 */
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0.65);
  }
  body.brand-busy .brand-busy-dot {
    opacity: 1;
    transform: scale(1);
    animation: brand-busy-pulse 1.2s ease-in-out infinite;
  }
  @keyframes brand-busy-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(var(--gold-rgb), 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(var(--gold-rgb), 0);   }
    100% { box-shadow: 0 0 0 0   rgba(var(--gold-rgb), 0);   }
  }
  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .weather-badge {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--gold-ink);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
  }
  .header-icons {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    /* 2026-07-18: 큰 글꼴/좁은 폭에서 버튼이 로고를 짓눌러 세로로 깨뜨리던 것 방지 —
       공간 부족하면 버튼이 다음 줄로 내려가게(로고는 그대로 유지). */
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .header-icons button,
  .header-icons .hdr-icon-btn {
    background: rgba(var(--lav-main-rgb), 0.12);
    border: 1px solid var(--border);
    border-radius: 14px;
    /* 2026-06-16: 좌우만 키움, 상하 유지 (가독성 + 클릭 영역 확보) */
    min-width: 50px;
    padding: 5px 9px 4px;
    cursor: pointer;
    color: var(--lav-light);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    line-height: 1;
  }
  .header-icons .hdr-icon-btn .hdr-icon-label {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: rgba(var(--gold-light-rgb), 0.85);
    white-space: nowrap;
  }
  /* 모바일 — 좁은 viewport 에서 라벨 더 작게 + 아이콘 padding 줄임 */
  @media (max-width: 414px) {
    .header-icons { gap: 3px; }
    .header-icons .hdr-icon-btn {
      min-width: 44px;
      padding: 4px 7px 3px;
    }
    .header-icons .hdr-icon-btn .hdr-icon-label {
      font-size: 7.5px;
      letter-spacing: -0.4px;
    }
  }
  @media (max-width: 360px) {
    .header-icons .hdr-icon-btn {
      min-width: 38px;
      padding: 4px 5px 3px;
    }
    .header-icons .hdr-icon-btn .hdr-icon-label { font-size: 7px; }
  }
  .header-icons .hdr-icon-btn:focus,
  .header-icons .hdr-icon-btn:active {
    transform: none !important;
    outline: none !important;
  }
  .header-icons button:hover,
  .header-icons .hdr-icon-btn:hover {
    background: rgba(var(--lav-main-rgb), 0.25);
    box-shadow: var(--glow-lav);
  }
  .header-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .user-greeting {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
  }
  .user-greeting span {
    color: var(--gold-ink);
    font-weight: 600;
  }
  /* 2026-05-11: 헤더 우측 — 날씨 한 줄 (greeting 자리 대체) */
  .user-weather {
    font-size: 10.5px;
    color: rgba(var(--lav-pale-rgb), 0.85);
    /*  🔴 2026-09-06 — 굵기 500 = 글꼴 한 벌 264KB. 400 으로 내린다  */
    font-weight: 400;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.4;
  }
  .user-weather .uw-region {
    color: var(--gold-ink, var(--gold-light));
    font-weight: 800;
    font-size: 11.5px;
    margin-right: 5px;
  }
  /* 미세먼지 등급 — 좋음 초록, 보통 하늘, 나쁨 주황, 매우나쁨 빨강 */
  .user-weather .wg-good  { color: var(--green); font-weight: 700; }
  .user-weather .wg-mid   { color: var(--blue); font-weight: 700; }
  .user-weather .wg-bad   { color: var(--gold); font-weight: 700; }
  .user-weather .wg-vbad  { color: var(--red-dark); font-weight: 700; }
  /* 온도 — 추울수록 파랑, 더울수록 빨강 */
  .user-weather .wt-cold  { color: var(--green); font-weight: 700; }
  .user-weather .wt-cool  { color: var(--blue); font-weight: 700; }
  .user-weather .wt-mild  { color: var(--gold-ink); font-weight: 700; }
  .user-weather .wt-warm  { color: var(--gold); font-weight: 700; }
  .user-weather .wt-hot   { color: var(--red-dark); font-weight: 700; }
  @media (max-width: 480px) {
    .user-weather { font-size: 9.5px; }
    .user-weather .uw-region { font-size: 10.5px; }
  }
  .tier-badge {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
  }
  .tier-badge:hover { transform: scale(1.15); }

  /* 서비스 슬라이더 */
  .service-slider-wrap {
    background: linear-gradient(180deg, rgba(var(--bg-deep-rgb), 0.95) 0%, rgba(var(--bg-deep-rgb), 0.92) 100%);
    backdrop-filter: blur(14px);
    padding: 4px 0 4px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
    overflow: hidden;
  }
  .service-slider-wrap::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 16px;
    background: linear-gradient(to right, transparent, rgba(var(--bg-deep-rgb), 0.55));
    pointer-events: none;
  }
  .service-slider {
    display: flex;
    overflow-x: auto;
    gap: 2px;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    will-change: scroll-position;
  }
  .service-slider::-webkit-scrollbar { display: none; }
  .service-slider::after { content: ''; flex: 0 0 0; }
  /* 2026-08-22 교수님 "PC 에서 메뉴가 왼쪽으로 붙어 있다" —
     body 가 max-width:480px 이라 화면 자체는 이미 가운데 있다(margin:0 auto).
     문제는 그 480px **안에서** 메뉴 여섯이 왼쪽에 몰리고 오른쪽이 비는 것이었다.
     ⚠️ justify-content:center 는 답이 아니다 — 항목이 늘어 스크롤이 생기면
        왼쪽 끝이 잘려 손이 닿지 않는다(널리 알려진 flex 버그).
     그래서 **항목들이 남는 자리를 나눠 갖게** 한다. 늘어나면 자연스럽게 넘쳐 스크롤된다. */
  .service-slider > .service-item { flex: 1 1 0; }

  /* 2026-08-22 교수님 "PC 에서 메뉴가 왼쪽으로 붙어 있다" —
     ⚠️ 그냥 justify-content:center 를 주면 **모바일이 깨진다**:
        스크롤이 생길 때 왼쪽 끝 항목이 잘려 손이 닿지 않는다(널리 알려진 flex 버그).
     그래서 화면이 넓어 스크롤이 필요 없을 때만 가운데로 모은다. */
  .service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1 1 0;
    cursor: pointer;
    padding: 2px 2px 3px;
    border-radius: 14px;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    position: relative;
    scroll-snap-align: start;
  }
  .service-item, .service-item:visited, .service-item:focus, .service-item:focus-visible {
    color: inherit; outline: none;
    background: transparent;  /* visited/focus 가 browser default 배경 흡수 못하게 */
  }
  /* hover 효과는 마우스 있는 환경에만 — 모바일 탭 후 stuck 방지 */
  @media (hover: hover) {
    .service-item:hover { background: rgba(var(--lav-main-rgb), 0.12); transform: translateY(-2px); }
  }
  .service-item.active { background: rgba(var(--lav-main-rgb), 0.15); }
  .service-icon {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;   /* 2026-07-17 사장님: 상자 유지, 이모지만 확대 */
    background: linear-gradient(145deg, rgba(var(--lav-dark-rgb), 0.9), rgba(var(--lav-mid-rgb), 0.7));
    border: 1px solid rgba(var(--lav-main-rgb), 0.35);
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(var(--bg-deep-rgb), 0.4);
    position: relative;
  }
  .service-year-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 9px;
    font-weight: 900;
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    padding: 1px 4px;
    border-radius: 7px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(var(--gold-rgb), 0.5);
    border: 1px solid rgba(var(--gold-pale-rgb), 0.5);
  }
  /* 무료 배지 — 빨간 톤으로 시선 끌기 */
  .service-free-badge {
    position: absolute;
    top: 2px; right: 2px;
    font-size: 8.5px; font-weight: 900;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--error), var(--red-dark));
    padding: 1px 5px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(var(--red-dark-rgb), 0.55);
    border: 1px solid rgba(var(--lav-pale-rgb), 0.5);
    animation: free-blink 1.6s ease-in-out infinite;
  }
  @keyframes free-blink {
    0%, 100% { box-shadow: 0 2px 6px rgba(var(--red-dark-rgb), 0.45); }
    50% { box-shadow: 0 2px 14px rgba(var(--red-dark-rgb), 0.85); }
  }
  .service-item.active .service-icon {
    background: linear-gradient(145deg, var(--lav-dark), var(--lav-mid));
    border-color: var(--lav-light);
    box-shadow: var(--glow-lav), 0 2px 8px rgba(var(--bg-deep-rgb), 0.4);
  }
  .service-item.active .service-icon::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.65);  /* 큰 32px 글로우는 가장자리에서 클리핑되며 번쩍임 → 8px로 축소 */
  }
  .service-label {
    font-size: 10px;
    color: var(--text-muted);
    /*  🔴 2026-09-06 — 500(Medium) 을 쓰면 **글꼴 한 벌 264KB** 를 통째로 받는다.
        첫 화면에서 500 을 쓰는 곳은 여기와 .user-weather 둘뿐이었다.
        400 으로 내려 그 한 벌을 안 받는다 (4G 첫 방문 FCP 1,254ms 의 절반쯤). */
    font-weight: 400;
    white-space: nowrap;
  }
  .service-item.active .service-label {
    color: var(--lav-ink);
    font-weight: 700;
  }

  /* 메인 콘텐츠 영역 */
  .main-content {
    padding: 16px 14px;
    position: relative;
    z-index: 1;
  }

  /* 분석 대상 인디케이터 — 본인이 아닌 지인 기준일 때 상단 배너 */
  .subject-banner {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.18), rgba(var(--lav-main-rgb), 0.18));
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.4);
    font-size: 12px;
    color: var(--gold-ink);
    font-weight: 700;
  }
  .subject-banner-em { font-size: 16px; }
  .subject-banner-name { color: var(--text-primary); font-weight: 800; }
  .subject-banner-clear {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 10px;
    border: 1px solid var(--border);
    text-decoration: none;
  }
  .subject-banner-clear:hover { color: var(--gold); border-color: rgba(var(--gold-rgb), 0.5); }

  /* 분석 대상 선택 시트 (bottom sheet) */
  .subj-sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(var(--bg-deep-rgb), 0.6);
    backdrop-filter: blur(4px);
    z-index: 1500;
    display: none;
  }
  .subj-sheet-overlay.open { display: block; }
  .subj-sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;  
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-deep) 100%);
    border-top: 1px solid rgba(var(--gold-rgb), 0.5);
    border-radius: 22px 22px 0 0;
    z-index: 1501;
    transform: translate(-50%, 100%);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.18);
    box-shadow: 0 -16px 40px rgba(var(--black-rgb), 0.5);
    padding-bottom: env(safe-area-inset-bottom, 0);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
  }
  .subj-sheet.open { transform: translate(-50%, 0); }
  .subj-sheet-grip {
    width: 40px; height: 4px;
    background: rgba(var(--lav-main-rgb), 0.5);
    border-radius: 2px;
    margin: 10px auto;
    flex-shrink: 0;
  }
  .subj-sheet-head {
    padding: 6px 18px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .subj-sheet-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px; font-weight: 800;
    color: var(--gold-ink);
    margin-bottom: 4px;
  }
  .subj-sheet-sub {
    font-size: 11.5px; color: var(--text-muted);
  }
  .subj-sheet-list {
    overflow-y: auto;
    padding: 8px 14px 18px;
    flex: 1;
  }
  .subj-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(var(--lav-main-rgb), 0.1);
    border: 1px solid rgba(var(--lav-main-rgb), 0.25);
    text-decoration: none;
    margin-bottom: 8px;
    transition: all 0.18s;
  }
  .subj-item:hover {
    border-color: rgba(var(--gold-rgb), 0.5);
    background: rgba(var(--lav-main-rgb), 0.18);
  }
  .subj-item.active {
    background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.18), rgba(var(--lav-main-rgb), 0.18));
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.3);
  }
  .subj-item-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    background: linear-gradient(145deg, rgba(var(--lav-main-rgb), 0.35), rgba(var(--gold-rgb), 0.18));
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    flex-shrink: 0;
  }
  .subj-item-body { flex: 1; min-width: 0; }
  .subj-item-name {
    font-size: 14px; font-weight: 800;
    color: var(--gold-ink);
    line-height: 1.2;
  }
  .subj-item-meta {
    font-size: 11px; color: var(--text-secondary);
    margin-top: 2px;
  }
  .subj-item-check {
    color: var(--gold);
    font-size: 18px;
    font-weight: 900;
    opacity: 0;
  }
  .subj-item.active .subj-item-check { opacity: 1; }
  .subj-empty {
    text-align: center;
    padding: 18px 16px 8px;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.6;
  }
  .subj-empty a {
    color: var(--gold-ink);
    text-decoration: underline;
    font-weight: 700;
  }
  /* 새 지인 등록 — 점선 테두리로 추가형 항목임을 표시 */
  .subj-item-add {
    background: rgba(var(--gold-rgb), 0.06);
    border: 1.5px dashed rgba(var(--gold-rgb), 0.45);
  }
  .subj-item-add:hover {
    background: rgba(var(--gold-rgb), 0.14);
    border-color: var(--gold);
  }
  .subj-item-add .subj-item-icon {
    background: linear-gradient(145deg, rgba(var(--gold-rgb), 0.32), rgba(var(--lav-main-rgb), 0.18));
    color: var(--gold);
  }
  .subj-item-add .subj-item-name { color: var(--gold); }

  /* 하단 탭바 */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(var(--bg-card-light-rgb), 0.96), rgba(var(--bg-card-rgb), 0.96));
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(var(--gold-rgb), 0.35);
    display: flex;
    overflow-x: auto;            /* 7개 가로 스크롤 (상단 슬라이더처럼) */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    z-index: 1000;
    box-shadow: 0 -6px 32px rgba(var(--lav-mid-rgb), 0.5);
    padding-bottom: env(safe-area-inset-bottom, 0);
    gap: 2px;
  }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 2px 3px;
    gap: 3px;
    cursor: pointer;
    text-decoration: none;
    gap: 3px;
    transition: all 0.2s;
    border: none;
    background: none;
    position: relative;
  }
  /* 상단 service-icon 과 동일한 박스 (둥근 사각형 + 라벤더 그라데이션 + 테두리) — 하단 높이 고려해 42px */
  .nav-icon {
    /* 2026-07-17 사장님: 상단 서비스 아이콘(46px/25px)과 크기 통일 — 2026-08-22 7칸에 맞춰 함께 줄임 */
    width: 46px; width: 46px; height: 46px;
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 25px;
    line-height: 1;
    background: linear-gradient(145deg, rgba(var(--lav-dark-rgb), 0.9), rgba(var(--lav-mid-rgb), 0.7));
    border: 1px solid rgba(var(--lav-main-rgb), 0.35);
    box-shadow: 0 2px 8px rgba(var(--bg-deep-rgb), 0.4);
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    opacity: 1;
  }
  .nav-item.active .nav-icon {
    background: linear-gradient(145deg, var(--lav-dark), var(--lav-mid));
    border-color: var(--lav-light);
    box-shadow: var(--glow-lav), 0 2px 8px rgba(var(--bg-deep-rgb), 0.4);
    transform: scale(1.06);
  }
  @media (hover: hover) { .nav-item:hover .nav-icon { transform: translateY(-2px); } }
  .nav-label {
    font-size: 10px;
    color: var(--lav-ink);
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .nav-item.active .nav-label {
    color: var(--gold-ink);
    font-weight: 800;
    opacity: 1;
  }
  .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 32px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--lav-light), var(--gold));
    border-radius: 0 0 3px 3px;
    box-shadow: 0 0 10px var(--gold);
  }

  /* ===== 공통 로딩 오버레이 (페이지 진입 직후 ~2초) ===== */
  /* 본문 위에 absolute 로 겹쳐 같은 자리에서 크로스페이드 */
  main.main-content { position: relative; }
  .cp-loader {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 5;
    display: flex; flex-direction: column; align-items: center;
    padding: 64px 20px 48px;
    text-align: center;
    animation: cp-fadein 0.4s ease;
    transition: opacity 0.9s ease;
  }
  .cp-loader.hidden { display: none; }
  .cp-loader-orb {
    position: relative;
    width: 96px; height: 96px;
    margin-bottom: 22px;
  }
  .cp-loader-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-right-color: var(--gold-light);
    animation: cp-spin 1.4s linear infinite;
    box-shadow: 0 0 24px rgba(var(--gold-rgb), 0.35);
  }
  .cp-loader-ring--inner {
    inset: 12px;
    border-top-color: rgba(var(--lav-light-rgb), 0.85);
    border-right-color: transparent;
    border-bottom-color: rgba(var(--lav-light-rgb), 0.6);
    animation: cp-spin-rev 1.8s linear infinite;
    box-shadow: none;
  }
  @keyframes cp-spin     { to { transform: rotate(360deg); } }
  @keyframes cp-spin-rev { to { transform: rotate(-360deg); } }
  .cp-loader-star {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    color: var(--gold);
    text-shadow: 0 0 16px rgba(var(--gold-rgb), 0.7);
    animation: cp-pulse-star 1.8s ease-in-out infinite;
  }
  @keyframes cp-pulse-star {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50%      { transform: scale(1.18); opacity: 1; }
  }
  .cp-loader-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px; font-weight: 800;
    color: var(--gold-ink);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
  }
  .cp-loader-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.55;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
  }
  .cp-loader-dots { display: inline-flex; gap: 4px; margin-top: 4px; }
  .cp-loader-dots i {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.45;
    animation: cp-loader-bounce 1.1s ease-in-out infinite;
  }
  .cp-loader-dots i:nth-child(2) { animation-delay: 0.18s; }
  .cp-loader-dots i:nth-child(3) { animation-delay: 0.36s; }
  @keyframes cp-loader-bounce {
    0%, 100% { transform: translateY(0);   opacity: 0.45; }
    50%      { transform: translateY(-5px); opacity: 1; }
  }
  @keyframes cp-fadein { from { opacity: 0; } to { opacity: 1; } }

  .cp-results {
    opacity: 0;
    transition: opacity 0.9s ease;
  }
  .cp-results.shown { opacity: 1; }
