/* MONZOO 고객 관리 — v1.3 글래스 UI (design-glass/*.dc.html 시안 기준)
 * 색: 크림 종이 #FDF8F3 · 적갈 #8A3B1C · 흰 유리 · 피치 빛(rgba 242,165,122) 만. 서체 Gaegu.
 * 알림장 출력물(.sticky-note)은 인쇄물이라 유리 효과 없이 v1 그대로 (파일 아래쪽). */
:root {
  --paper: #FDF8F3;
  --ink: #8A3B1C;
  --ink-soft: rgba(138, 59, 28, .62);
  --ink-faint: rgba(138, 59, 28, .45);
  --line: rgba(138, 59, 28, .25);
  --hair: rgba(138, 59, 28, .15);
  --card: #FFFFFF;
  --danger: #B3261E;
  --peach: rgba(242, 165, 122, 1);

  --glass: rgba(255, 255, 255, .55);
  --glass-soft: rgba(255, 255, 255, .5);
  --glass-strong: rgba(255, 255, 255, .6);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-edge-strong: rgba(255, 255, 255, .95);
  --glass-shadow: 0 10px 26px rgba(138, 59, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .9);
  --glass-blur: blur(18px) saturate(1.2);
  --grad-ink: linear-gradient(180deg, rgba(160, 74, 40, .95), rgba(138, 59, 28, .98));
  --tint: rgba(138, 59, 28, .08);
  --ring: 0 0 0 1px rgba(138, 59, 28, .12); /* 흰 유리 위 흰 입력칸이 안 보이지 않게 아주 옅은 잉크 테두리 */
  --radius: 13px;
  --font: 'Gaegu', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; min-height: 100vh; background: transparent; /* 배경 빛이 보이도록 html 이 종이색 */
  font-family: var(--font); font-weight: 400; font-size: 19px; line-height: 1.4;
  color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden;
}
/* 고정된 흐린 빛 3개 (피치 좌상 · 적갈 우중 · 흰 하단). filter blur 대신 방사형 그라데이션 → 폰에서도 가벼움 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 260px at 8% 10%, rgba(242, 165, 122, .50), rgba(242, 165, 122, .28) 40%, rgba(242, 165, 122, 0) 100%),
    radial-gradient(circle 240px at 104% 52%, rgba(138, 59, 28, .20), rgba(138, 59, 28, .10) 45%, rgba(138, 59, 28, 0) 100%),
    radial-gradient(circle 230px at 42% 104%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .5) 45%, rgba(255, 255, 255, 0) 100%);
}
@media (min-width: 760px) {
  body::before {
    background:
      radial-gradient(circle 460px at 12% 8%, rgba(242, 165, 122, .45), rgba(242, 165, 122, .22) 45%, rgba(242, 165, 122, 0) 100%),
      radial-gradient(circle 420px at 92% 55%, rgba(138, 59, 28, .18), rgba(138, 59, 28, .08) 45%, rgba(138, 59, 28, 0) 100%),
      radial-gradient(circle 380px at 40% 104%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .5) 45%, rgba(255, 255, 255, 0) 100%);
  }
}
body[data-view="print"]::before { display: none; } /* 알림장 출력 화면은 v1 그대로 */

h1, h2, h3 { font-weight: 700; margin: 0; line-height: 1.2; }
a { color: var(--ink); }
a:hover { color: #6E2E15; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.soft { color: var(--ink-soft); font-weight: 300; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ---------- 유리 공통 ---------- */
.card, .topbar, .search-big input, .stat, .login-card, .crop-box, .dropzone, .banner, .toast {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .stat, .login-card, .crop-box, .dropzone, .banner, .search-big input { background: rgba(255, 255, 255, .85) !important; }
  .topbar { background: rgba(253, 248, 243, .92) !important; }
}

/* ---------- 상단바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(253, 248, 243, .65); border-bottom: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.topbar-in { max-width: 720px; margin: 0 auto; padding: 14px 16px 12px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; min-width: 0; }
.brand img { width: 38px; height: 38px; }
.wm { font-weight: 700; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.brand .wm { font-size: 26px; }
.top-search { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.top-search input { max-width: 300px; height: 44px; border-radius: 14px; }
.top-actions { display: flex; gap: 8px; flex: none; margin-left: auto; }

/* ---------- 레이아웃 (데스크톱도 카드 최대폭 720px 가운데) ---------- */
.main { max-width: 720px; margin: 0 auto; padding: 16px 16px 64px; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: 4px 4px 14px; }
.page-head h1 { font-size: 32px; }
.page-head .soft { font-size: 16px; }
.crumb {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 14px; margin: 0 0 12px;
  border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--glass-edge); box-shadow: var(--ring);
  font-size: 17px; text-decoration: none; color: var(--ink);
}
.crumb:hover { background: var(--glass-strong); }
.section-title { font-size: 24px; margin: 22px 4px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-title .soft { font-size: 15px; }
.section-title .btn-sm { font-size: 17px; }
hr.rule { border: 0; border-top: 1px solid var(--hair); margin: 18px 0; }

/* ---------- 유리 카드 ---------- */
.card {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 20px;
  box-shadow: var(--glass-shadow); padding: 14px 16px; min-width: 0;
}
a.card, button.card { display: block; text-decoration: none; color: inherit; text-align: left; width: 100%; cursor: pointer; transition: background .15s, transform .15s; }
a.card:hover, button.card:hover { background: rgba(255, 255, 255, .7); }
a.card:active { transform: scale(.99); }
a.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }

/* 검색 결과 · 최근 방문 · 반려견 카드 */
a.card.row-card, .row-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
a.card.with-avatar, .with-avatar { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: start; }
.wa-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.r-top { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.r-name { font-size: 24px; font-weight: 700; line-height: 1.1; }
.r-meta { font-size: 15px; font-weight: 300; }
.r-line { font-size: 16px; }
.r-phone { display: block; }
@media (min-width: 560px) { .r-phone { display: inline; } .r-phone::before { content: ' · '; } }
.r-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hair); font-size: 16px; font-weight: 300; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rc-side { flex: none; display: grid; justify-items: end; gap: 2px; text-align: right; }
.rc-date { font-size: 15px; font-weight: 300; }
.rc-price { font-size: 19px; font-weight: 700; }

/* 대시보드 통계 */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat {
  text-align: center; padding: 14px 8px; border-radius: 18px;
  background: var(--glass-soft); box-shadow: 0 8px 22px rgba(138, 59, 28, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.stat b { display: block; font-size: 34px; line-height: 1; font-weight: 700; }
.stat span { display: block; margin-top: 4px; font-size: 15px; font-weight: 300; }

/* ---------- 검색창 ---------- */
.search-big { position: relative; margin: 2px 0 12px; }
.search-big input {
  height: 54px; font-size: 20px; padding: 0 16px 0 46px; border-radius: 18px;
  background: rgba(255, 255, 255, .58) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%238A3B1C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E") no-repeat 16px center;
  border: 1px solid var(--glass-edge);
  box-shadow: 0 10px 28px rgba(138, 59, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.search-hint { font-size: 15px; font-weight: 300; color: var(--ink-soft); margin: -4px 6px 14px; }

/* ---------- 폼 ---------- */
.form { display: grid; gap: 14px; }
.form.card { padding: 16px; border-radius: 22px; box-shadow: 0 12px 30px rgba(138, 59, 28, .11), inset 0 1px 0 rgba(255, 255, 255, .9); }
.field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-weight: 700; font-size: 17px; }
.req { color: var(--danger); margin-left: 2px; }
.help { font-size: 15px; color: var(--ink-soft); font-weight: 300; }
.row2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 44px; height: 46px; padding: 0 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge-strong); border-radius: var(--radius);
  box-shadow: inset 0 1px 2px rgba(138, 59, 28, .08), var(--ring);
  font-size: 18px; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 92px; padding: 10px 14px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(138, 59, 28, .55);
  box-shadow: inset 0 1px 2px rgba(138, 59, 28, .08), 0 0 0 1px rgba(138, 59, 28, .45), 0 0 0 4px rgba(242, 165, 122, .35);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); font-weight: 300; opacity: 1; }
input[type=date] { display: block; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; }
select {
  padding-right: 40px; cursor: pointer;
  background: var(--glass-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%238A3B1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
select.is-empty { color: var(--ink-faint); }
select option, optgroup { color: var(--ink); background: #FFFFFF; }
optgroup { font-weight: 700; }
.price-input { position: relative; }
.price-input input { height: 50px; padding-right: 44px; font-size: 24px; font-weight: 700; }
.price-input .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 300; pointer-events: none; }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.suggest .parts, .parts { color: var(--ink-soft); font-weight: 300; font-size: 15px; }

/* 체크 칩 (체크박스/라디오): 미선택 유리 · 선택 적갈 채움 + 크림 글자 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--glass-edge-strong); border-radius: 999px; background: var(--glass-strong);
  font-size: 17px; cursor: pointer; user-select: none; white-space: nowrap; transition: background .15s, color .15s;
  box-shadow: var(--ring);
}
.chip span::before {
  content: ''; width: 16px; height: 16px; border: 1.5px solid var(--ink-soft); border-radius: 5px; flex: none;
  background: rgba(255, 255, 255, .8) no-repeat center / 11px 11px;
}
.chip input[type=radio] + span::before { border-radius: 50%; }
.chip input:checked + span {
  background: rgba(138, 59, 28, .92); border-color: rgba(255, 255, 255, .5); color: var(--paper); font-weight: 700;
  box-shadow: 0 4px 12px rgba(138, 59, 28, .2);
}
.chip input:checked + span::before {
  border-color: var(--paper); background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.8 9 10 3' fill='none' stroke='%23FDF8F3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip.plain span { border: 0; background: transparent; padding: 0 4px; box-shadow: none; }
.chip.plain input:checked + span { background: transparent; color: var(--ink); box-shadow: none; }
.chip.plain input:checked + span::before {
  border-color: var(--ink); background-color: var(--ink);
}
.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.fieldset legend { padding: 0; font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.note-group { display: grid; gap: 10px; }
.note-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: start; }
.note-row > .label { font-weight: 700; font-size: 16px; padding-top: 11px; }
.note-row .chip span { min-height: 40px; padding: 0 12px; font-size: 16px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border-radius: 14px;
  font-weight: 700; font-size: 19px; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--glass-edge-strong); background: var(--glass-strong); color: var(--ink);
  box-shadow: 0 4px 12px rgba(138, 59, 28, .06), inset 0 1px 0 rgba(255, 255, 255, .9), var(--ring);
  transition: filter .15s, background .15s, transform .1s;
}
.btn:hover { background: rgba(255, 255, 255, .75); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-primary {
  background: var(--grad-ink); color: var(--paper); border-color: rgba(255, 255, 255, .35);
  box-shadow: 0 10px 24px rgba(138, 59, 28, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { background: var(--grad-ink); color: var(--paper); filter: brightness(1.06); }
.btn-ghost { }
.btn-danger { color: var(--danger); border-color: rgba(179, 38, 30, .3); }
.btn-danger:hover { color: var(--danger); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 17px; border-radius: 12px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; flex: none; }
.btn-icon svg { display: block; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; cursor: pointer; font-size: 16px; }
.section-title .btn-link { font-weight: 300; font-size: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.form-actions { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.form-actions .btn { min-height: 52px; border-radius: 16px; font-size: 20px; padding: 0 12px; }
.form-actions:has(> :nth-child(3)) > .btn-primary { grid-column: 1 / -1; }

/* ---------- 알림/상태 ---------- */
.msg-error { color: var(--danger); font-weight: 700; font-size: 17px; margin: 0; }
.msg-error:empty { display: none; }
.banner {
  border: 1px solid var(--glass-edge); border-radius: 20px; background: var(--glass); box-shadow: var(--glass-shadow);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.empty { text-align: center; color: var(--ink-soft); padding: 26px 14px; }
.card.empty p { margin: 0 0 12px; }
.loading { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; width: max-content;
  background: var(--grad-ink); color: var(--paper); padding: 10px 20px; border-radius: 999px; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 12px 28px rgba(138, 59, 28, .3);
  max-width: calc(100% - 32px); text-align: center;
}

/* ---------- 로그인 ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 28px; }
.login-card {
  width: 100%; max-width: 334px; padding: 40px 28px 30px; border-radius: 28px;
  background: rgba(255, 255, 255, .52); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 18px 50px rgba(138, 59, 28, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
}
.login-card .form { gap: 12px; }
.login-card .field { gap: 6px; }
.login-card input { height: 48px; border-radius: 14px; font-size: 19px; background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .9); }
.login-card .btn-primary { margin-top: 6px; min-height: 50px; border-radius: 16px; font-size: 21px; letter-spacing: .1em; }
.lockup { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; }
.lockup img { width: 112px; height: 112px; }
.lockup .wm { font-size: 40px; letter-spacing: .08em; }
.lockup .cap { font-size: 17px; font-weight: 300; letter-spacing: .3em; padding-left: .3em; white-space: nowrap; }
.login-foot { margin: 20px 0 0; text-align: center; font-size: 15px; font-weight: 300; color: rgba(138, 59, 28, .7); }

/* ---------- 고객/반려견 상세 ---------- */
.profile.card { padding: 18px 18px 16px; border-radius: 24px; box-shadow: 0 14px 34px rgba(138, 59, 28, .12), inset 0 1px 0 rgba(255, 255, 255, .9); }
.profile h1 { font-size: 40px; line-height: 1; }
.profile .sub { font-size: 17px; font-weight: 300; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px; margin: 14px 0 0; font-size: 17px; }
.kv dt { color: var(--ink-soft); font-weight: 300; }
.kv dd { margin: 0; }
.tel { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px;
  background: rgba(138, 59, 28, .10); border: 1px solid var(--glass-edge); font-size: 16px;
}
.notebox {
  margin-top: 12px; padding: 12px 14px; border-radius: 16px; white-space: pre-wrap; font-size: 17px;
  background: rgba(255, 255, 255, .45); border: 1px dashed rgba(138, 59, 28, .35);
}
.notebox .t { font-weight: 700; display: block; font-size: 16px; margin-bottom: 2px; }
.detail-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.detail-actions .btn { min-height: 46px; padding: 0 6px; font-size: 18px; border-radius: 14px; }

/* 미용 이력 타임라인 */
.timeline { display: grid; gap: 10px; }
.v-card { display: grid; gap: 8px; }
.v-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.v-date, .v-price { font-size: 22px; font-weight: 700; }
.v-svc { font-size: 18px; }
.v-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--tint); font-size: 15px; line-height: 1.2; }
.v-memo { font-size: 16px; font-weight: 300; border-top: 1px solid var(--hair); padding-top: 8px; white-space: pre-wrap; }
.v-memo:empty { display: none; }
.v-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 759px) { .top-search { display: none; } }
@media (max-width: 400px) {
  .brand .wm { font-size: 24px; }
  .top-actions .btn-sm { padding: 0 12px; }
  .page-head h1 { font-size: 28px; }
  .profile h1 { font-size: 36px; }
}

/* ================= 사진 (v1.1) — 유리 톤 ================= */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  border-radius: 50%; border: 1.5px solid var(--glass-edge-strong); background: rgba(242, 165, 122, .35);
}
.avatar img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar img.ph { width: 63%; height: 63%; opacity: .8; }
.avatar .spin { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(253, 248, 243, .72); }
.avatar .spin::after {
  content: ''; width: 34%; height: 34%; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--ink); animation: mz-spin .8s linear infinite;
}
@keyframes mz-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .avatar .spin::after { animation-duration: 2.4s; } }

.dropzone {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px; cursor: pointer; min-width: 0;
  border: 1.5px dashed rgba(138, 59, 28, .35); border-radius: 18px; background: rgba(255, 255, 255, .45);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--ink); outline: none; background: rgba(255, 255, 255, .6); }
.dropzone.drag { border: 2px dashed var(--ink); padding: 11.5px 13.5px; background: rgba(242, 165, 122, .18); }
.dz-body { display: grid; gap: 4px; min-width: 0; }
.dz-text { font-weight: 700; font-size: 17px; }
.dz-links { display: flex; gap: 14px; flex-wrap: wrap; }
.dz-links .btn-link { min-height: 32px; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-title { min-width: 0; }
.photo-col { display: grid; justify-items: center; gap: 2px; flex: none; }
.photo-zone { border-radius: 50%; cursor: pointer; outline-offset: 3px; }
.photo-zone .avatar { border-width: 2px; background: rgba(242, 165, 122, .4); box-shadow: 0 8px 20px rgba(138, 59, 28, .15); }
.photo-zone .avatar img.ph { width: 67%; height: 67%; }
.photo-zone:focus-visible { outline: 2px solid var(--ink); }
.photo-zone.drag { outline: 2px dashed var(--ink); }
.photo-zone:hover .avatar { border-color: rgba(138, 59, 28, .5); }
.photo-hint { font-size: 15px; font-weight: 300; text-align: center; max-width: 110px; line-height: 1.2; }
.photo-err { margin-top: 8px; }

/* 크롭 모달 — 유리 톤 */
body.modal-open { overflow: hidden; }
.crop-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 12px 8px; overflow: auto;
  background: rgba(253, 248, 243, .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.crop-box {
  width: 100%; max-width: 560px; display: grid; justify-items: center; gap: 10px; padding: 16px 0 14px;
  border-radius: 24px; background: rgba(255, 255, 255, .5); border: 1px solid var(--glass-edge);
  box-shadow: 0 18px 50px rgba(138, 59, 28, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.crop-title { font-size: 22px; text-align: center; padding: 0 12px; }
.crop-canvas {
  display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  border-radius: 16px; border: 1px solid var(--glass-edge-strong); background: #FFFFFF;
  box-shadow: inset 0 1px 2px rgba(138, 59, 28, .08);
}
.crop-canvas.grabbing { cursor: grabbing; }
.crop-canvas:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.zoom-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 440px; padding: 0 12px; }
.zoom-row input[type=range] { flex: 1; min-width: 0; height: 44px; accent-color: var(--ink); cursor: pointer; background: transparent; box-shadow: none; border: 0; }
.zoom-btn { width: 44px; padding: 0; font-size: 24px; }
.zoom-val { width: 44px; text-align: right; font-size: 16px; color: var(--ink-soft); }
.crop-help { margin: 0; text-align: center; padding: 0 12px; }
.crop-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; width: 100%; max-width: 440px; padding: 0 12px; }
.crop-box .msg-error { padding: 0 12px; }

/* ---------- 알림장 출력 화면 (도구 막대만 유리 버튼, 알림장 자체는 v1 그대로) ---------- */
.print-page { min-height: 100vh; padding: 16px; background: var(--paper); }
.print-bar { max-width: 720px; margin: 0 auto 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-bar .title { font-weight: 700; font-size: 20px; }
.note-box {
  --s: .3; width: calc(1252px * var(--s)); height: calc(1252px * var(--s));
  margin: 0 auto; overflow: hidden; background: #FDF8F3;
  box-shadow: 0 0 0 1.5px var(--line);
}
.note-box > .slide { transform: scale(var(--s)); transform-origin: 0 0; }
.print-help { max-width: 720px; margin: 14px auto 0; text-align: center; font-size: 16px; }
.print-opts { max-width: 720px; margin: -6px auto 14px; display: flex; justify-content: center; }

/* sticky_note.html 원본 스타일 (범위: .sticky-note) */
.sticky-note { position: relative; overflow: hidden; width: 1252px; height: 1252px; margin: 0; background: #FDF8F3;
  font-family: 'Gaegu', cursive; font-weight: 400; color: #8A3B1C; word-break: keep-all; line-height: 1.3;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sticky-note * { box-sizing: border-box; }
.sticky-note .abs { position: absolute; }
.sticky-note .wm { font-family: 'Gaegu', cursive; font-weight: 700; letter-spacing: 0.06em; line-height: 1; white-space: nowrap; }
.sticky-note .sn-col { display: flex; flex-direction: column; justify-content: space-between; }
.sticky-note .sn-block { flex: none; }
.sticky-note .sn-title, .sticky-note .sn-sec, .sticky-note .sn-sign { font-family: 'Gaegu', cursive; font-weight: 700; }
.sticky-note .blank { display: inline-block; width: 300px; height: 48px; border-bottom: 3px solid #8A3B1C; position: relative; }
.sticky-note .blank .fill { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); font-size: 68px; line-height: 1; white-space: nowrap; }
.sticky-note .sn-head { display: flex; flex-direction: column; align-items: center; }
.sticky-note .sn-lockup { display: flex; align-items: center; }
.sticky-note .sn-lockup img { width: 115px; height: 115px; display: block; }
.sticky-note .sn-title { display: flex; align-items: baseline; margin-top: 22px; font-size: 76px; letter-spacing: 0; line-height: 1.1; white-space: nowrap; }
.sticky-note .sn-rule { flex: none; height: 2px; background: #8A3B1C; }
.sticky-note .sn-sec { text-align: center; font-size: 48px; letter-spacing: 0; line-height: 1.2; }
.sticky-note .sn-stylewrap { display: flex; flex-direction: column; align-items: flex-start; width: max-content; margin: 18px auto 0; }
.sticky-note .sn-style { display: flex; column-gap: 32px; font-size: 34px; }
.sticky-note .opt { display: inline-flex; align-items: center; height: 48px; white-space: nowrap; }
.sticky-note .opt .cb { flex: none; margin-right: 6px; display: block; }
.sticky-note .opt.on > span { font-weight: 700; }
.sticky-note .sn-rows { margin-top: 20px; }
.sticky-note .sn-row { display: flex; align-items: center; height: 48px; font-size: 34px; }
.sticky-note .sn-row + .sn-row { margin-top: 22px; }
.sticky-note .sn-lb { flex: none; width: 130px; }
.sticky-note .sn-items { display: flex; flex-wrap: nowrap; column-gap: 30px; }
.sticky-note .sn-etc { align-items: baseline; }
.sticky-note .line { display: inline-block; height: 30px; border-bottom: 2px solid #8A3B1C; position: relative; }
.sticky-note .line .fill { position: absolute; left: 6px; right: 6px; bottom: 3px; font-size: 32px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-note .sn-foot { display: flex; flex-direction: column; align-items: center; }
.sticky-note .sn-thanks { display: flex; align-items: center; font-size: 32px; line-height: 1.3; white-space: nowrap; }
.sticky-note .sn-sign { margin-top: 10px; font-size: 34px; letter-spacing: 0.2em; margin-right: -0.2em; line-height: 1.3; }
/* 알림장 사진 옵션 (v1.1) */
.sticky-note .sn-headtext { display: flex; flex-direction: column; align-items: center; }
.sticky-note .sn-photo { display: none; flex: none; width: 275px; height: 275px; border-radius: 50%; overflow: hidden; border: 3px solid #8A3B1C; background: #FFFFFF; }
.sticky-note .sn-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticky-note.with-photo .sn-head { flex-direction: row; justify-content: center; column-gap: 34px; }
.sticky-note.with-photo .sn-photo { display: block; }
.sticky-note.with-photo .sn-title { margin-top: 16px; }

/* ================= 인쇄 ================= */
@media print {
  @page { size: 100mm 100mm; margin: 0; }
  html, body { background: #FDF8F3; }
  body::before { display: none !important; }
  .no-print, .topbar, .toast { display: none !important; }
  .print-page { padding: 0; min-height: 0; }
  /* 1252px 원본 → 100mm (= 377.95 CSS px) */
  .note-box { --s: 0.30188 !important; margin: 0; box-shadow: none; }
}

/* ================= v1.2 PWA: 노치/상태바 safe-area (홈 화면 앱으로 열었을 때) ================= */
.topbar { padding-top: env(safe-area-inset-top, 0px); }
.topbar-in, .main {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.login-wrap { padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.print-page { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.crop-overlay { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.toast.update { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 20px; white-space: nowrap; }
.toast.update button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(253, 248, 243, .95); color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap;
}
@media print { .print-page { padding-top: 0; } }

/* ================= v1.4 체중·출생년도: 목록 + 직접 입력 (input + datalist) ================= */
.unit-input { position: relative; }
.unit-input input[type=number] { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
.unit-input input[type=number]::-webkit-inner-spin-button,
.unit-input input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* 드롭다운과 같은 화살표 → 목록이 있다는 신호. 크롬의 기본 목록 아이콘은 투명하게 겹쳐 눌리게 */
.unit-input.has-list input {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%238A3B1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.unit-input.has-list input::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; width: 28px; height: 100%; margin-right: -30px; }
.unit-input.with-unit input { padding-right: 70px; }
.unit-input .unit { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--ink-soft); font-weight: 300; pointer-events: none; }
.unit-input.has-list .unit { right: 42px; }
