/* 코알라 베이비 성장 일지 — 공통 스타일 (관리자·보호자 공용)
   design_mockups/baby_swim_growth_book.html 목업에서 이전 */

  :root {
    --accent: #B5703C;
    --accent-soft: #F7E8D6;
    --accent-deep: #7A4524;
    --paper: #FFFCF6;
    --paper-line: #F3EADC;
    --ink: #3D2E26;
    --ink-soft: #8C786A;
    --mint: #CFF3E8;
    --peach: #FFE3D3;
    --sky: #DDEEFF;
    --yellow: #FFF1B8;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    background: linear-gradient(180deg, #FBF3E8 0%, #F4EADF 100%);
    min-height: 100vh;
    font-family: 'Pretendard', -apple-system, sans-serif;
    color: var(--ink);
    word-break: keep-all;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 40px;
    overflow-x: hidden;
  }

  .book-wrap { width: 100%; max-width: 980px; display: flex; justify-content: center; }
  #book { margin: 0 auto; }

  .page {
    background: var(--paper);
    border: 1px solid #EDE2D2;
    overflow: hidden;
  }
  .page-inner { height: 100%; padding: 28px 26px 22px; display: flex; flex-direction: column; position: relative; }
  .page-number { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--ink-soft); }

  /* 표지 */
  .cover { background: var(--paper); background-image: none; color: var(--ink); border: 1px solid #EDE2D2; }
  .cover .page-inner { background: radial-gradient(circle at 50% 38%, #FFFFFF 0%, var(--paper) 55%, var(--accent-soft) 100%); align-items: center; justify-content: center; text-align: center; gap: 12px; }
  /* 로고 원본이 흰 배경 JPG라 multiply로 흰 부분을 종이색에 녹인다 */
  .cover-logo { width: 78%; max-width: 300px; mix-blend-mode: multiply; }
  .cover-title { font-family: 'Jua', 'Pretendard', sans-serif; font-size: 32px; line-height: 1.25; font-weight: 400; letter-spacing: 0; color: var(--accent-deep); }
  .cover-name { background: var(--accent-soft); color: var(--accent-deep); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; }
  .cover-hint { position: absolute; bottom: 26px; font-size: 14px; color: var(--accent); opacity: .9; animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
  .wave { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; opacity: .35; }

  /* 프로필 */
  .profile-photo {
    width: 140px; height: 140px; border-radius: 40px; margin: 12px auto 16px;
    background: radial-gradient(circle at 30% 30%, var(--sky), var(--accent-soft));
    display: flex; align-items: center; justify-content: center; font-size: 66px;
  }
  .profile-name { text-align: center; font-size: 24px; font-weight: 700; color: var(--accent-deep); }
  .profile-sub { text-align: center; color: var(--ink-soft); margin-bottom: 18px; }
  .profile-table { width: 100%; border-collapse: collapse; font-size: 15px; }
  .profile-table td { padding: 8px 4px; border-bottom: 1px dashed #E2D9C6; }
  .profile-table td:first-child { color: var(--ink-soft); width: 38%; }
  .letter { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--ink); }

  /* 목차 달력 */
  .section-title { font-size: 20px; font-weight: 700; color: var(--accent-deep); }
  .section-sub { font-size: 14px; color: var(--ink-soft); margin: 2px 0 16px; }
  .calendar-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .calendar-month strong { font-size: 16px; font-weight: 600; }
  .month-nav { border: none; background: var(--accent-soft); color: var(--accent-deep); width: 30px; height: 30px; border-radius: 999px; font-size: 11px; cursor: pointer; }
  .month-nav:disabled { opacity: .3; cursor: default; }
  .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .calendar-weekday { text-align: center; font-size: 12px; color: var(--ink-soft); padding-bottom: 4px; }
  .calendar-weekday.sunday { color: #E26A6A; }
  .calendar-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: 14px; border-radius: 12px; color: var(--ink-soft); background: transparent; border: none; font-family: inherit;
  }
  .calendar-day.lesson {
    background: var(--accent); color: #fff; cursor: pointer; position: relative; font-weight: 700;
    box-shadow: 0 3px 0 var(--accent-deep);
    transition: transform .15s;
  }
  .calendar-day.lesson:hover { transform: translateY(-2px); }
  .calendar-legend { margin-top: 16px; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
  .legend-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); display: inline-block; }
  .toc-list { margin-top: 14px; list-style: none; }
  .toc-list li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; border-bottom: 1px dotted #E2D9C6; }
  .toc-list button { all: unset; cursor: pointer; display: flex; justify-content: space-between; width: 100%; }
  .toc-list button:hover { color: var(--accent-deep); }

  /* 회차 페이지 */
  .lesson-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .lesson-round { background: var(--accent); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; }
  .lesson-date { font-size: 13px; color: var(--ink-soft); }
  .lesson-title { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 16px; }
  .lesson-photo {
    height: 150px; border-radius: 18px; margin-bottom: 20px; position: relative;
    display: flex; align-items: center; justify-content: center; font-size: 56px;
    box-shadow: 0 4px 12px rgba(90,60,35,.12); border: 6px solid #fff;
  }
  .lesson-photo span { position: absolute; bottom: 6px; right: 10px; font-size: 11px; color: var(--ink-soft); }
  .mood { font-size: 15px; font-weight: 600; }
  .block-label { font-size: 13px; color: var(--accent-deep); font-weight: 700; margin: 20px 0 8px; }
  .activity { display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding: 4px 0; }
  .stamp { font-size: 12px; border-radius: 999px; padding: 2px 9px; }
  .stamp.done { background: var(--mint); color: #1F7A5C; }
  .stamp.trying { background: var(--yellow); color: #8A6A00; }
  .teacher-note {
    /* 쪽지 느낌의 줄노트: 줄 간격 = line-height(24px)이라 글자가 항상 줄 위에 앉는다.
       줄 무늬는 content-box 안에서만 그려서 위아래 여백에 줄이 새지 않게 한다 */
    background:
      repeating-linear-gradient(180deg, transparent 0 23px, rgba(122,69,36,.16) 23px 24px) content-box,
      var(--accent-soft);
    border-radius: 14px; padding: 8px 14px 9px; font-size: 14px; line-height: 24px;
  }
  .next-time { font-size: 13px; color: var(--ink-soft); margin-top: 20px; }

  /* 성장 요약 */
  .skill { margin-bottom: 14px; }
  .skill-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
  .skill-bar { height: 12px; border-radius: 999px; background: #F3EBE1; overflow: hidden; }
  .skill-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E2B48A, var(--accent)); }
  .summary-note { margin-top: 10px; font-size: 15px; line-height: 1.6; font-weight: 600; }

  /* 뒷표지 */
  .back-cover .page-inner { background: var(--accent-deep); color: #fff; align-items: center; justify-content: center; text-align: center; gap: 10px; }
  .back-cover { border: none; background-image: none; }

  /* 하단 조작부 */
  .controls { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
  .controls button {
    border: none; background: #fff; color: var(--accent-deep); font-family: inherit; font-size: 15px;
    padding: 10px 16px; border-radius: 999px; cursor: pointer; box-shadow: 0 2px 8px rgba(110,70,40,.12);
  }
  .controls button.primary { background: var(--accent); color: #fff; }
  .page-indicator { font-size: 14px; color: var(--ink-soft); min-width: 64px; text-align: center; }
  .test-note { margin-top: 14px; font-size: 12px; color: var(--ink-soft); text-align: center; }

  /* 화면 전환 */
  .screen { width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; }
  .screen[hidden] { display: none; }
  .screen.entering { animation: rise .45s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

  .mode-tabs { display: flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 2px 10px rgba(110,70,40,.1); margin-bottom: 20px; }
  .mode-tabs[hidden] { display: none; }
  .mode-tabs button { border: none; background: transparent; padding: 9px 16px; border-radius: 999px; font-family: inherit; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
  .mode-tabs button.active { background: var(--accent); color: #fff; }

  .panel { width: 100%; max-width: 640px; background: var(--paper); border-radius: 24px; padding: 24px 20px 28px; box-shadow: 0 8px 24px rgba(110,70,40,.1); }
  .panel[hidden] { display: none; }
  .panel-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent-deep); }
  .panel-sub { font-size: 14px; color: var(--ink-soft); margin: 2px 0 22px; }

  /* 이름표 스티커: 체크무늬 테두리 + 흰 속지 */
  .tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
  .tag-grid.family { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .name-tag {
    --tag-color: #F2C14E;
    border: none; cursor: pointer; padding: 7px; border-radius: 999px; font-family: inherit;
    background-color: var(--tag-color);
    /* 가로·세로 반투명 흰 줄을 겹쳐 깅엄(체크) 무늬를 만든다 */
    background-image:
      repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 3px, transparent 3px 7px),
      repeating-linear-gradient(0deg, rgba(255,255,255,.5) 0 3px, transparent 3px 7px);
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--tag-color) 75%, #000 25%), 0 4px 8px rgba(90,60,35,.15);
    transform: rotate(var(--tag-tilt, 0deg));
    transition: transform .18s;
  }
  .name-tag:hover { transform: rotate(0deg) scale(1.05); }
  .name-tag:active { transform: scale(.95); }
  .name-tag-inner {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: #fff; border-radius: 999px; height: 52px; padding: 0 14px;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tag-color) 75%, #000 25%);
  }
  .tag-grid.family .name-tag-inner { height: 68px; }
  .name-tag-emoji { font-size: 20px; }
  .name-tag-name { font-size: 18px; font-weight: 700; color: var(--ink); }
  .tag-grid.family .name-tag-name { font-size: 22px; }
  .name-tag-age { font-size: 12px; color: var(--ink-soft); }
  .name-tag.add { background: transparent; background-image: none; box-shadow: none; border: 2px dashed #DCC2A6; padding: 5px; }
  .name-tag.add .name-tag-inner { background: transparent; box-shadow: none; color: var(--accent); font-size: 15px; }

  /* 부모님 확인 코드 */
  .pin-box { text-align: center; }
  .pin-koala { font-size: 60px; margin-bottom: 6px; }
  .pin-logo { width: 170px; mix-blend-mode: multiply; margin-bottom: 4px; }
  .pin-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 4px 0 14px; }
  .pin-tags .name-tag { display: inline-block; cursor: default; }
  .pin-tags .name-tag:hover { transform: rotate(var(--tag-tilt, 0deg)); }
  .pin-input {
    width: 180px; font-size: 28px; letter-spacing: 12px; text-align: center; padding: 10px;
    border: 2px solid #E8D5C0; border-radius: 16px; font-family: inherit; color: var(--ink); background: #fff; outline: none;
  }
  .pin-input:focus { border-color: var(--accent); }
  .pin-button { display: block; margin: 14px auto 0; border: none; background: var(--accent); color: #fff; font-family: inherit; font-size: 16px; padding: 12px 34px; border-radius: 999px; cursor: pointer; }
  .pin-error { color: #D9534F; font-size: 13px; min-height: 18px; margin-top: 8px; }
  .pin-hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
  .tag-hint { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ink-soft); }

  /* 책 화면 상단 */
  .book-topbar { width: 100%; max-width: 920px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
  .book-topbar button { border: none; background: #fff; color: var(--accent-deep); font-family: inherit; font-size: 14px; padding: 9px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 2px 8px rgba(110,70,40,.12); }
  .book-topbar .write-button { background: var(--accent); color: #fff; }
  .book-topbar button[hidden] { display: none; }
  /* 링크 보내기 시트 */
  .sheet-overlay { position: fixed; inset: 0; background: rgba(50,35,25,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
  .sheet-overlay[hidden] { display: none; }
  .sheet { width: 100%; max-width: 480px; background: var(--paper); border-radius: 24px 24px 0 0; overflow: hidden; animation: sheetUp .28s ease-out; }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
  .sheet-body { padding: 24px 20px 16px; }
  .sheet-title { font-size: 20px; font-weight: 700; color: var(--accent-deep); }
  .sheet-sub { font-size: 13px; color: var(--ink-soft); margin: 2px 0 16px; }
  .chat-preview { background: #B2C7DA; border-radius: 16px; padding: 16px; display: flex; justify-content: flex-end; }
  .chat-bubble { background: #FEE500; color: #1E1E1E; border-radius: 14px 4px 14px 14px; padding: 10px 13px; font-size: 14px; line-height: 1.5; max-width: 88%; white-space: pre-line; word-break: break-all; }
  .share-meta { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
  .reissue-link { all: unset; cursor: pointer; font-size: 12px; color: var(--accent); text-decoration: underline; margin-top: 8px; display: inline-block; }
  /* 저장/등록 버튼 규칙: 하단 full-width 밀착, 둥근 모서리·사이드 패딩 없음 */
  .sheet-actions { display: flex; }
  .sheet-actions button { flex: 1; border: none; border-radius: 0; padding: 18px 0; font-family: inherit; font-size: 16px; cursor: pointer; }
  .sheet-close { background: #F3EBE1; color: var(--ink-soft); }
  .sheet-copy { background: var(--accent); color: #fff; flex: 2 !important; }
  .toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: rgba(50,35,25,.9); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; z-index: 60; white-space: nowrap; }
  .toast[hidden] { display: none; }

  /* 출석 체크 & 오늘 상태 배지 */
  .start-session-button { width: 100%; border: none; background: var(--accent); color: #fff; font-family: inherit; font-size: 16px; padding: 14px; border-radius: 16px; cursor: pointer; margin-bottom: 22px; box-shadow: 0 3px 0 var(--accent-deep); }
  .start-session-button[hidden] { display: none; }
  .name-tag { position: relative; }
  .tag-badge { position: absolute; top: -10px; right: 10px; font-size: 11px; border-radius: 999px; padding: 2px 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
  .tag-badge.written { background: var(--mint); color: #1F7A5C; }
  .tag-badge.pending { background: var(--yellow); color: #8A6A00; }
  .tag-badge.picked { background: var(--accent); color: #fff; }
  .name-tag.dimmed { opacity: .45; filter: grayscale(.5); }
  .attendance-actions { display: flex; gap: 10px; margin-top: 24px; }
  .attendance-actions[hidden] { display: none; }
  .attendance-actions button { border: none; font-family: inherit; font-size: 15px; padding: 14px; border-radius: 16px; cursor: pointer; }
  .attendance-cancel { flex: 1; background: #F3EBE1; color: var(--ink-soft); }
  .attendance-confirm { flex: 2; background: var(--accent); color: #fff; }
  .attendance-confirm:disabled { background: #E0C7AC; cursor: default; }

  /* 오늘 일지 쓰기 시트 */
  /* 아이폰은 주소창에 따라 화면 높이가 바뀌어 dvh(실제 보이는 높이) 우선 */
  .journal-sheet { max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; }
  /* flex 자식은 기본적으로 내용 길이만큼 늘어나 스크롤이 안 생기므로 min-height:0 으로 줄어들게 한다 */
  .journal-sheet .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .journal-sheet .sheet-actions { flex-shrink: 0; }
  .journal-top { display: flex; justify-content: space-between; align-items: center; }
  .journal-header { font-size: 13px; color: var(--ink-soft); }
  .sheet-x { border: none; background: transparent; font-size: 18px; color: var(--ink-soft); cursor: pointer; padding: 4px 8px; }
  .photo-picker {
    display: flex; align-items: center; justify-content: center; height: 120px; margin-top: 14px;
    border: 2px dashed #E3CDB5; border-radius: 16px; color: var(--accent); cursor: pointer; font-size: 14px;
    background-size: cover; background-position: center;
  }
  .photo-picker.has-photo { border-style: solid; color: transparent; }
  .field-label { font-size: 13px; font-weight: 700; color: var(--accent-deep); margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .hint { font-size: 11px; color: var(--ink-soft); font-weight: 400; }
  .mood-row { display: flex; gap: 6px; }
  .mood-button {
    flex: 1; border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 8px 0; font-family: inherit; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--ink-soft);
  }
  .mood-button .mood-emoji { font-size: 24px; }
  .mood-button.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .preset-row { margin-top: 10px; }
  .phrase-row { margin-bottom: 8px; }
  .activity-chip { border: none; border-radius: 999px; padding: 8px 12px; font-family: inherit; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
  .activity-chip.done { background: var(--mint); color: #1F7A5C; }
  .activity-chip.trying { background: var(--yellow); color: #8A6A00; }
  .activity-chip.skip { background: #EEE; color: #999; text-decoration: line-through; }
  .chip-origin { font-size: 10px; background: rgba(255,255,255,.75); border-radius: 999px; padding: 1px 6px; text-decoration: none; }
  .preset-chip, .phrase-chip { border: 1.5px dashed #E0C7AC; background: transparent; color: var(--accent-deep); border-radius: 999px; padding: 6px 10px; font-family: inherit; font-size: 12px; cursor: pointer; }
  .phrase-chip { border-style: solid; border-color: transparent; background: #F8EFE4; }
  .custom-activity-row { display: flex; gap: 8px; margin-top: 10px; }
  .text-input { width: 100%; border: 1.5px solid #E8D5C0; border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 14px; background: #fff; color: var(--ink); outline: none; }
  .text-input:focus { border-color: var(--accent); }
  textarea.text-input { min-height: 72px; resize: vertical; }
  .small-button { border: none; background: var(--accent-soft); color: var(--accent-deep); border-radius: 12px; padding: 0 16px; font-family: inherit; cursor: pointer; white-space: nowrap; }
  .common-toggle { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; margin-top: 10px; }
  .journal-error { color: #D9534F; font-size: 13px; min-height: 18px; margin-top: 12px; }
  .journal-save { background: #F3EBE1; color: var(--accent-deep); }

  .sibling-area { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center; }
  .sibling-label { font-size: 12px; color: var(--ink-soft); }
  .book-topbar .name-tag.small { padding: 5px; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--tag-color) 75%, #000 25%), 0 3px 6px rgba(90,60,35,.15); }
  .name-tag.small .name-tag-inner { height: 36px; padding: 0 12px; }
  .name-tag.small .name-tag-name { font-size: 15px; }
  .name-tag.small .name-tag-emoji { font-size: 15px; }
  /* 짧은 제목과 아기 이름만 둥근 Jua — 로고 글자와 결을 맞추고, 긴 글은 읽기 편한 Pretendard 유지 */
  .cover-title, .lesson-title, .section-title, .profile-name, .name-tag-name, .back-cover-title {
    font-family: 'Jua', 'Pretendard', sans-serif;
    font-weight: 400; /* Jua는 한 굵기뿐이라 700이면 가짜 굵게가 적용돼 뭉개진다 */
    letter-spacing: 0;
  }
  .lesson-title, .section-title { font-size: 23px; }
  /* 회차 사진: 선생님 + 엄마 업로드 (최대 3장) */
  .lesson-photo.has-photos { display: grid; grid-template-columns: 1fr; gap: 4px; background: #fff; align-items: stretch; justify-content: stretch; }
  .lesson-photo.count-2 { grid-template-columns: 1fr 1fr; }
  .lesson-photo.count-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .lesson-photo.count-3 .photo-tile:first-child { grid-row: span 2; }
  .photo-tile { position: relative; background-size: cover; background-position: center; border-radius: 12px; overflow: hidden; }
  .photo-tile.is-hidden { opacity: .35; filter: grayscale(1); }
  .photo-hide { position: absolute; top: 6px; right: 6px; border: none; font-family: inherit; font-size: 10px; background: rgba(50,35,25,.75); color: #fff; border-radius: 999px; padding: 3px 8px; cursor: pointer; }
  .photo-upload {
    position: absolute; right: 8px; bottom: 8px; z-index: 2; border: none; font-family: inherit; font-size: 12px; font-weight: 600;
    background: var(--accent); color: #fff; border-radius: 999px; padding: 6px 11px; cursor: pointer; box-shadow: 0 2px 6px rgba(90,60,35,.25);
  }
  /* 체험: 예고 페이지 / 배지 / 전환 버튼 */
  .ghost-pages { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
  .ghost-page {
    display: flex; align-items: center; gap: 10px; padding: 14px 14px;
    border: 1.5px dashed #E0C7AC; border-radius: 14px; background: rgba(255,255,255,.6);
  }
  .ghost-round { font-size: 12px; font-weight: 600; color: #fff; background: #D9B89A; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
  .ghost-goal { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
  .ghost-empty { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
  .trial-note { margin-top: 20px; font-size: 14px; line-height: 1.6; color: var(--ink); }
  .consult-button {
    display: block; text-align: center; text-decoration: none; box-sizing: border-box;
    margin-top: 16px; width: 100%; border: none; border-radius: 14px; padding: 14px; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 700; background: var(--accent); color: #fff;
  }
  .tag-badge.trial { right: auto; left: 10px; background: #FFE3D3; color: #B5532F; }
  .convert-button { background: #FFE3D3 !important; color: #B5532F !important; }
  /* 사진 크게 보기 */
  .photo-open { position: absolute; inset: 0; z-index: 1; border: none; background: transparent; cursor: zoom-in; padding: 0; }
  .photo-hide { z-index: 2; }
  .lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20,14,10,.94); display: flex; flex-direction: column; color: #fff; }
  .lightbox[hidden] { display: none; }
  .lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
  .lightbox-caption { font-size: 14px; font-weight: 600; opacity: .9; }
  .lightbox-close { border: none; background: rgba(255,255,255,.12); color: #fff; width: 36px; height: 36px; border-radius: 999px; font-size: 16px; cursor: pointer; flex-shrink: 0; }
  .lightbox-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
  .lightbox-image { max-width: calc(100% - 96px); max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
  .lightbox-nav { border: none; background: rgba(255,255,255,.12); color: #fff; width: 40px; height: 40px; border-radius: 999px; font-size: 24px; line-height: 1; cursor: pointer; flex-shrink: 0; }
  .lightbox-nav[hidden] { visibility: hidden; display: block; }
  .lightbox-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 16px 22px; font-size: 13px; }
  .lightbox-hint { font-size: 11px; opacity: .55; }
  @media (max-width: 520px) {
    .lightbox-nav { display: none; }
    .lightbox-nav[hidden] { display: none; }
    .lightbox-image { max-width: 100%; }
  }
  .back-cover-title { font-size: 26px; line-height: 1.35; }

/* 실제 데이터용: 빈 목차 · 성장 요약 */
.toc-empty { font-size: 13px; color: var(--ink-soft); padding: 8px 0; }
.summary-empty { margin-top: 24px; font-size: 15px; color: var(--ink-soft); text-align: center; }
.summary-date { font-size: 12px; color: var(--ink-soft); }

/* 뒷표지 로고: 진한 바탕에 흰 배경 로고가 네모로 뜨지 않게 둥근 스티커 판에 담는다 */
.back-cover-logo {
  width: 150px; background: #fff; border-radius: 28px; padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transform: rotate(-2deg); margin-bottom: 8px;
}
