/* ---- 기본 초기화 (artifact 환경이 자동으로 넣어주던 것을 직접 포함) ---- */
:root{ color-scheme:light; padding-block:env(safe-area-inset-top,0px) env(safe-area-inset-bottom,0px); }
body{ margin:0; font-size:14px; }
img{ max-width:100%; }
[hidden]{ display:none!important; }

  :root{
    --bg:#FAF6EF;
    --surface:#FFFDF8;
    --surface-2:#F3ECDC;
    --ink:#2B2420;
    --ink-soft:#6B5D4F;
    --ink-faint:#9C8E7B;
    --accent:#B87F2E;
    --accent-ink:#5A3E14;
    --accent-soft:#EFDCB8;
    --line:#E8DFCF;
    --danger:#A6432F;
    --danger-soft:#F4DDD6;
    --good:#5B7A55;
    --good-soft:#DEE8D8;
    --shadow: 0 1px 2px rgba(43,36,32,.06), 0 6px 20px rgba(43,36,32,.06);
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --bg:#1B1712;
      --surface:#241F18;
      --surface-2:#2E2719;
      --ink:#F2E9D8;
      --ink-soft:#BFB09A;
      --ink-faint:#8B7F6C;
      --accent:#DCA855;
      --accent-ink:#FCEFD4;
      --accent-soft:#3B2F1B;
      --line:#3A3225;
      --danger:#E08D77;
      --danger-soft:#3A2521;
      --good:#8FB088;
      --good-soft:#233022;
      --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"]{
    --bg:#1B1712;
    --surface:#241F18;
    --surface-2:#2E2719;
    --ink:#F2E9D8;
    --ink-soft:#BFB09A;
    --ink-faint:#8B7F6C;
    --accent:#DCA855;
    --accent-ink:#FCEFD4;
    --accent-soft:#3B2F1B;
    --line:#3A3225;
    --danger:#E08D77;
    --danger-soft:#3A2521;
    --good:#8FB088;
    --good-soft:#233022;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }

  *{box-sizing:border-box;}
  body{
    background:var(--bg);
    color:var(--ink);
    font-family:'Gowun Dodum','Apple SD Gothic Neo',-apple-system,BlinkMacSystemFont,'Malgun Gothic',sans-serif;
    display:flex;
    justify-content:center;
    padding-block:0;
  }
  h1,h2,h3,.serif{
    font-family:'Noto Serif KR',Georgia,'Nanum Myeongjo',serif;
    text-wrap:balance;
  }

  .shell{
    width:100%;
    max-width:430px;
    min-height:100vh;
    background:var(--bg);
    display:flex;
    flex-direction:column;
    position:relative;
    box-shadow: var(--shadow);
  }
  @media (min-width:470px){
    body{ padding-block:24px; background:var(--surface-2); }
    .shell{ min-height:calc(100vh - 48px); border-radius:28px; overflow:hidden; border:1px solid var(--line); }
  }

  header.top{
    position:sticky; top:env(safe-area-inset-top,0px);
    z-index:5;
    background:var(--bg);
    border-bottom:1px solid var(--line);
    padding:18px 20px 14px;
  }
  header.top .eyebrow{
    font-size:12px; letter-spacing:.08em; color:var(--ink-faint); font-weight:500;
  }
  header.top h1{ font-size:22px; margin:2px 0 0; font-weight:600; }
  header.top .sub{ font-size:13px; color:var(--ink-soft); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

  main{ flex:1; overflow-y:auto; padding:16px 20px 96px; }
  .panel[hidden]{ display:none!important; }

  /* cards */
  .card{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
    box-shadow: var(--shadow);
  }
  .stack{ display:flex; flex-direction:column; gap:14px; }
  .row{ display:flex; align-items:center; gap:10px; }
  .between{ display:flex; align-items:center; justify-content:space-between; gap:10px; }

  textarea{
    width:100%; min-height:76px; resize:vertical;
    background:var(--surface-2); border:1px solid var(--line); border-radius:14px;
    padding:12px 14px; font:inherit; color:var(--ink); font-size:15px; line-height:1.55;
  }
  textarea:focus{ outline:2px solid var(--accent); outline-offset:1px; }

  button{ font:inherit; border:none; cursor:pointer; }
  .btn-primary{
    background:var(--accent); color:var(--accent-ink);
    padding:12px 18px; border-radius:14px; font-weight:600; font-size:15px;
    width:100%;
  }
  .btn-primary:active{ transform:translateY(1px); }
  .btn-ghost{
    background:transparent; color:var(--ink-soft); font-size:13px;
    padding:6px 4px; text-decoration:underline; text-underline-offset:3px;
  }

  .chip{
    display:inline-flex; align-items:center; gap:6px;
    padding:7px 13px; border-radius:999px; font-size:13px; font-weight:500;
    background:var(--surface-2); color:var(--ink-soft); border:1px solid var(--line);
    white-space:nowrap;
  }
  .chip.on{ background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent); }
  .chip.good.on{ background:var(--good-soft); color:var(--good); border-color:var(--good); }
  .chip-row{ display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
  .chip-row::-webkit-scrollbar{ display:none; }
  .chip-grid{ display:flex; flex-wrap:wrap; gap:8px; }
  .chip-btn{ background:none; }
  .chip-label{ font-size:12.5px; color:var(--ink-faint); margin-bottom:8px; }

  .result-card{
    border:1px solid var(--line); border-radius:14px; padding:12px 14px;
    background:var(--surface); display:flex; flex-direction:column; gap:6px;
  }
  .result-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .badge{ font-size:11px; font-weight:600; padding:3px 8px; border-radius:999px; letter-spacing:.02em; white-space:nowrap; flex-shrink:0; }
  .badge.news{ background:var(--good-soft); color:var(--good); }
  .badge.video{ background:var(--accent-soft); color:var(--accent-ink); }
  .badge.demo{ background:var(--surface-2); color:var(--ink-faint); }
  .result-title{ font-size:14.5px; font-weight:600; line-height:1.4; }
  .result-cat{ font-size:12px; color:var(--ink-faint); }

  .notice{
    font-size:12.5px; color:var(--ink-faint); background:var(--surface-2);
    border-radius:12px; padding:10px 12px; line-height:1.5;
  }

  /* calendar */
  .cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .cal-head button{ background:var(--surface-2); color:var(--ink); width:32px; height:32px; border-radius:10px; font-size:15px; }
  .cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
  .cal-dow{ text-align:center; font-size:11px; color:var(--ink-faint); padding-bottom:4px; }
  .cal-day{
    aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    border-radius:12px; font-size:13px; color:var(--ink); background:transparent; position:relative;
    font-variant-numeric: tabular-nums;
  }
  .cal-day.other{ color:var(--ink-faint); opacity:.4; }
  .cal-day.today{ border:1.5px solid var(--accent); font-weight:700; }
  .cal-day.selected{ background:var(--accent); color:var(--accent-ink); font-weight:700; }
  .cal-day .dot{ width:5px; height:5px; border-radius:50%; background:var(--accent); margin-top:2px; }
  .cal-day.selected .dot{ background:var(--accent-ink); }

  /* profile */
  .avatar{
    width:64px; height:64px; border-radius:50%; background:var(--accent-soft);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
  }
  .kv{ display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; }
  .kv:last-child{ border-bottom:none; }
  .kv .k{ color:var(--ink-faint); }
  .kv .v{ font-weight:600; text-align:right; }
  .goal-box{
    background:var(--accent-soft); border-radius:16px; padding:16px; text-align:center;
  }
  .goal-box .num{ font-family:'Noto Serif KR',serif; font-size:26px; font-weight:700; color:var(--accent-ink); font-variant-numeric: tabular-nums; }
  .goal-box .cap{ font-size:12px; color:var(--accent-ink); opacity:.8; margin-top:2px; }
  ul.checklist{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
  ul.checklist li{ display:flex; gap:8px; align-items:flex-start; font-size:13.5px; color:var(--ink-soft); line-height:1.5; }
  ul.checklist li::before{ content:'—'; color:var(--accent); flex-shrink:0; }
  .footnote{ font-size:11.5px; color:var(--ink-faint); text-align:center; line-height:1.6; padding:4px 8px; }

  /* bottom nav */
  nav.tabs{
    position:sticky; bottom:0; left:0; right:0;
    display:flex; background:var(--surface); border-top:1px solid var(--line);
    padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));
    z-index:5;
  }
  nav.tabs button{
    flex:1; background:none; display:flex; flex-direction:column; align-items:center; gap:4px;
    padding:6px 2px; color:var(--ink-faint); font-size:11px; border-radius:12px;
  }
  nav.tabs button.active{ color:var(--accent); }
  nav.tabs svg{ width:20px; height:20px; }

  h2.section-title{ font-size:16px; font-weight:600; margin:0 0 10px; }
  .empty{ text-align:center; padding:28px 10px; color:var(--ink-faint); font-size:13.5px; }

  /* 일러스트 토큰 + 고양이 */
  :root{ --fur:#E8B26A; --fur-deep:#C98A3F; --fur-light:#F8E2B8; --ear:#F2A9A0; --face-ink:#4A3526; }
  .cat{ display:block; flex-shrink:0; }
  .cat-row{ display:flex; align-items:center; gap:12px; background:var(--accent-soft); border-radius:16px; padding:10px 14px; }
  .cat-say{ font-size:14px; color:var(--accent-ink); line-height:1.45; font-weight:500; }

  /* 오늘의 질문 */
  .q-box{ background:var(--surface-2); border-radius:16px; padding:14px; display:flex; flex-direction:column; gap:10px; }
  .q-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .q-label{ font-size:11.5px; letter-spacing:.06em; color:var(--ink-faint); font-weight:600; }
  .q-text{ font-family:'Noto Serif KR',Georgia,serif; font-size:15.5px; font-weight:600; line-height:1.45; text-wrap:balance; }
  .q-box textarea{ background:var(--surface); min-height:64px; }

  /* 사진 */
  .btn-soft{ background:var(--surface-2); color:var(--ink-soft); border:1px dashed var(--ink-faint); border-radius:14px; padding:11px 14px; font-size:14px; width:100%; }
  .photo-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
  .photo-row:empty{ display:none; }
  .thumb{ position:relative; width:84px; height:84px; border-radius:12px; overflow:hidden; border:1px solid var(--line); }
  .thumb img{ width:100%; height:100%; object-fit:cover; display:block; cursor:zoom-in; }
  .thumb .x{ position:absolute; top:4px; right:4px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:14px; line-height:22px; padding:0; }
  .lightbox{ position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.86); display:flex; align-items:center; justify-content:center; padding:20px; cursor:zoom-out; }
  .lightbox img{ max-width:100%; max-height:100%; border-radius:12px; }

  /* 일기장 */
  .diary-card{ cursor:pointer; display:flex; flex-direction:column; gap:10px; }
  .diary-head{ display:flex; align-items:center; gap:10px; }
  .diary-date{ font-weight:600; font-size:14px; }
  .diary-q{ font-size:12.5px; color:var(--ink-faint); line-height:1.4; }
  .diary-a{ font-size:15px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
  .diary-memo{ font-size:13.5px; color:var(--ink-soft); line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
  .diary-photos{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
  .diary-photos img{ width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; display:block; }
  .month-label{ font-size:12.5px; letter-spacing:.06em; color:var(--ink-faint); font-weight:600; }
  .stat-line{ font-size:12.5px; color:var(--ink-faint); }

  /* 탭을 오갈 때 스크롤바가 생겼다 사라지며 화면이 흔들리지 않도록 자리를 고정 */
  :root{ overflow-y:scroll; scrollbar-gutter:stable; }

  /* 접이식 상태 선택 */
  .fold{ border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--surface); }
  .fold-head{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--surface-2); padding:13px 14px; color:var(--ink); text-align:left; font-size:14.5px; font-weight:600; }
  .fold-meta{ display:flex; align-items:center; gap:8px; color:var(--ink-faint); font-size:12.5px; font-weight:500; flex-shrink:0; }
  .chev{ display:inline-block; transition:transform .15s; }
  .fold-head[aria-expanded="true"] .chev{ transform:rotate(180deg); }
  .fold-summary{ padding:10px 14px 12px; }
  .fold-summary:empty{ display:none; }
  .fold-body{ padding:12px 14px 14px; }

  /* 여러 아이 전환 바 */
  .pet-bar{ display:flex; gap:8px; overflow-x:auto; margin-top:12px; padding-bottom:2px; min-height:38px; -webkit-overflow-scrolling:touch; }
  .pet-bar::-webkit-scrollbar{ display:none; }
  .pet-chip{ display:inline-flex; align-items:center; gap:6px; padding:5px 13px 5px 6px; border-radius:999px; font-size:13.5px; font-weight:600; background:var(--surface-2); color:var(--ink-soft); border:1px solid var(--line); white-space:nowrap; flex-shrink:0; }
  .pet-chip.on{ background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent); }
  .pet-chip.add{ padding:7px 13px; background:transparent; border-style:dashed; color:var(--ink-faint); font-weight:500; }

  /* 아이 등록 폼 */
  .setup-hero{ display:flex; align-items:center; gap:14px; }
  .field{ display:flex; flex-direction:column; gap:6px; }
  .field > span{ font-size:13.5px; font-weight:600; color:var(--ink); }
  .field small{ font-size:12px; color:var(--ink-faint); line-height:1.4; }
  input[type="text"], input[type="date"]{ width:100%; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:11px 13px; font:inherit; font-size:15px; color:var(--ink); }
  input[type="text"]:focus, input[type="date"]:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .swatches{ display:flex; gap:10px; flex-wrap:wrap; }
  .swatch{ width:42px; height:42px; border-radius:50%; border:2px solid var(--line); padding:0; }
  .swatch[aria-pressed="true"]{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
  select{ width:100%; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:11px 13px; font:inherit; font-size:15px; color:var(--ink); }
  select:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .area-pills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
  .area-pill{ font-size:12px; font-weight:600; padding:3px 10px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink); white-space:nowrap; }

  /* 품종별 살펴볼 곳 */
  .breed-lead{ font-size:13px; color:var(--ink-soft); line-height:1.5; word-break:keep-all; overflow-wrap:break-word; }
  #breedWatch:empty{ display:none; }
  .watch{ display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
  .watch:first-child{ padding-top:0; }
  .watch:last-child{ border-bottom:none; padding-bottom:0; }
  .watch-area{ flex:0 0 66px; align-self:flex-start; text-align:center; font-size:11.5px; font-weight:700; padding:4px 0; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink); }
  .watch-body{ min-width:0; }

  /* 기록 백업 */
  .backup-last{ font-size:12.5px; color:var(--ink-faint); }
  .watch-text{ font-size:13.5px; line-height:1.55; color:var(--ink); word-break:keep-all; overflow-wrap:break-word; }
  .watch-look{ font-size:12.5px; line-height:1.5; color:var(--ink-faint); margin-top:4px; word-break:keep-all; overflow-wrap:break-word; }
  .breed-foot{ font-size:11.5px; line-height:1.6; color:var(--ink-faint); word-break:keep-all; overflow-wrap:break-word; }
  .breed-foot:empty{ display:none; }
  .btn-soft.danger{ color:var(--danger); border-color:var(--danger); }
  #delConfirm .row .btn-soft{ flex:1; }

  /* 오늘 탭: 사진을 크게 */
  .photo-row:not(.multi) .thumb{ width:100%; height:auto; aspect-ratio:4/3; }
  .photo-row.multi{ display:grid; grid-template-columns:repeat(2,1fr); }
  .photo-row.multi .thumb{ width:100%; height:auto; aspect-ratio:1; }
  .photo-row.multi .thumb:first-child{ grid-column:1 / -1; aspect-ratio:4/3; }
  .photo-add{
    width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
    min-height:120px; border-radius:16px; border:1.5px dashed var(--ink-faint);
    background:var(--surface-2); color:var(--ink-soft); font-size:14px;
  }
  .photo-row:not(:empty) + .photo-add{ min-height:0; flex-direction:row; padding:11px 14px; }
  .photo-row:not(:empty) + .photo-add svg{ width:18px; height:18px; }
  textarea.memo-line{ min-height:52px; }
  .health-note{
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    font-size:12.5px; color:var(--ink-soft); background:var(--surface-2);
    border-radius:12px; padding:6px 8px 6px 12px; line-height:1.5;
  }
  .health-note[hidden]{ display:none; }
  .health-note strong{ color:var(--accent-ink); font-weight:600; }

  /* 기록 탭: 달력 / 일기장 전환 */
  .seg{ display:flex; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:3px; gap:3px; }
  .seg button{ flex:1; background:none; color:var(--ink-soft); font-size:14px; padding:8px 0; border-radius:9px; }
  .seg button.on{ background:var(--surface); color:var(--ink); font-weight:600; box-shadow:var(--shadow); }
  .health-note .nudge-actions{ display:flex; gap:6px; flex-shrink:0; }
  .install-tip{ gap:8px; }
  .thumb img.missing{ background:var(--surface-2); }

  /* 기록 탭: 사진 격자 */
  .photo-month{ gap:8px; }
  .photo-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
  .photo-tile{ position:relative; aspect-ratio:1; padding:0; border-radius:10px; overflow:hidden; background:var(--surface-2); }
  .photo-tile img{ width:100%; height:100%; object-fit:cover; display:block; }
  .tile-date{
    position:absolute; left:6px; bottom:5px; font-size:11.5px; font-weight:600; color:#fff;
    text-shadow:0 1px 3px rgba(0,0,0,.55);
  }

  /* 달력: 사진을 남긴 날 */
  .cal-day.has-photo{ overflow:hidden; }
  .cal-day.has-photo img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
  .cal-day.has-photo .num{ position:relative; color:#fff; font-weight:700; text-shadow:0 1px 3px rgba(0,0,0,.6); }
  .cal-day.has-photo.selected{ background:transparent; box-shadow:0 0 0 2px var(--accent); }
  .cal-day.has-photo.today{ z-index:1; }

  /* 기념일 · 지난 오늘 */
  .anniv-banner{ display:flex; align-items:center; gap:12px; border:1.5px solid var(--accent); background:var(--surface); border-radius:16px; padding:10px 14px; }
  .anniv-banner[hidden]{ display:none; }
  .anniv-title{ font-size:14.5px; font-weight:700; color:var(--ink); line-height:1.4; word-break:keep-all; }
  .anniv-sub{ font-size:12.5px; color:var(--ink-soft); margin-top:2px; }
  .anniv-sub:empty{ display:none; }
  .memories{ gap:8px; }
  .memory-card{
    display:flex; align-items:center; gap:12px; width:100%; text-align:left;
    background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:10px; box-shadow:var(--shadow);
  }
  .memory-card img{ width:64px; height:64px; border-radius:12px; object-fit:cover; flex-shrink:0; }
  .memory-body{ min-width:0; padding:2px 4px; }
  .memory-label{ font-size:11.5px; font-weight:600; letter-spacing:.04em; color:var(--accent); }
  .memory-text{ font-size:14px; color:var(--ink); margin-top:3px; line-height:1.45; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .cal-day .anniv-mark{ position:absolute; top:1px; right:4px; font-size:9px; color:var(--danger); line-height:1; }
  .cal-day.has-photo .anniv-mark{ color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); }
  .next-anniv{ font-size:12.5px; color:var(--accent-ink); font-weight:600; margin-top:8px; }
  img:not([src]){ visibility:hidden; } /* 사진 저장소에서 불러오는 동안 깨진 그림·대체 글이 잠깐 보이지 않게 */

  /* 건강 탭 */
  .stat-tiles{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
  .stat-tile{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:12px 8px; text-align:center; }
  .stat-num{ font-family:'Noto Serif KR',serif; font-size:22px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
  .stat-cap{ font-size:11.5px; color:var(--ink-soft); margin-top:2px; }
  .signal-list{ gap:14px; }
  .signal-row{ display:flex; flex-direction:column; gap:6px; }
  .signal-name{ font-size:14px; font-weight:600; color:var(--ink); }
  .signal-meta{ font-size:12px; color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums; }
  .strip{ display:grid; gap:1px; height:16px; }
  .strip .cell{ border-radius:2px; }
  .strip .cell.sig{ background:var(--accent); }
  .strip .cell.rec{ background:var(--line); }
  .strip .cell.none{ background:transparent; box-shadow:inset 0 0 0 1px var(--line); }
  .strip-legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-soft); }
  .strip-legend[hidden]{ display:none; }
  .strip-legend span{ display:inline-flex; align-items:center; gap:5px; }
  .strip-legend .sw{ width:10px; height:10px; border-radius:2px; display:inline-block; }
  .strip-legend .sw.sig{ background:var(--accent); }
  .strip-legend .sw.rec{ background:var(--line); }
  .strip-legend .sw.none{ box-shadow:inset 0 0 0 1px var(--ink-faint); }

  /* 병원 가기 전 요약 */
  .vet-range{ font-size:12.5px; color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums; }
  .vet-table{ width:100%; border-collapse:collapse; font-size:13px; }
  .vet-table th{ text-align:left; font-size:11.5px; font-weight:600; color:var(--ink-faint); padding:0 6px 6px 0; border-bottom:1px solid var(--line); }
  .vet-table td{ padding:8px 6px 8px 0; border-bottom:1px solid var(--line); vertical-align:top; color:var(--ink); line-height:1.45; }
  .vet-table td:nth-child(2){ white-space:nowrap; font-variant-numeric:tabular-nums; }
  .vet-table tr:last-child td{ border-bottom:none; }
  .vet-day{ display:flex; flex-direction:column; gap:4px; padding-bottom:12px; border-bottom:1px solid var(--line); }
  .vet-day:last-child{ border-bottom:none; padding-bottom:0; }
  .vet-day-date{ font-size:13px; font-weight:700; color:var(--ink); }
  .vet-day-tags{ font-size:12.5px; color:var(--accent-ink); font-weight:600; }
  .vet-day-text{ font-size:13.5px; color:var(--ink-soft); line-height:1.5; white-space:pre-line; }
  .vet-day-photo{ width:140px; aspect-ratio:4/3; object-fit:cover; border-radius:10px; margin-top:4px; cursor:zoom-in; }
  .vet-actions .btn-soft, .vet-actions .btn-primary{ flex:1; }

  @media print{
    /* 다크 모드에서 인쇄해도 흰 종이에 읽히게 라이트 토큰으로 */
    :root{ --bg:#fff !important; --surface:#fff !important; --surface-2:#F3ECDC !important; --ink:#2B2420 !important; --ink-soft:#6B5D4F !important;
           --ink-faint:#9C8E7B !important; --accent:#B87F2E !important; --accent-ink:#5A3E14 !important; --line:#E8DFCF !important; color-scheme:light; }
    header.top, nav.tabs, .vet-actions, .lightbox{ display:none !important; }
    .shell{ min-height:0 !important; border:none !important; border-radius:0 !important; overflow:visible !important; }
    body, .shell, main{ background:#fff !important; }
    main{ padding:0 !important; overflow:visible !important; }
    .shell{ max-width:none !important; box-shadow:none !important; }
    .card{ box-shadow:none !important; break-inside:avoid; }
    .vet-day{ break-inside:avoid; }
  }
  .vet-table th{ white-space:nowrap; }
  .vet-table td small{ display:block; font-size:11.5px; color:var(--ink-faint); margin-top:1px; }
