/* A/S 접수 관리 – 휴대폰·PC 모두 보기 좋게 */
:root {
  --navy: #0b2347;
  --blue: #1d5bd8;
  --blue-l: #e8effc;
  --sky: #7fb2ff;
  --ink: #16202f;
  --ink-2: #424d5e;
  --ink-3: #7a8394;
  --line: #dfe4ec;
  --gray: #f4f6f9;
  --white: #fff;
  --new: #d9480f;
  --new-l: #fff1ea;
  --done: #2b8a3e;
  --done-l: #ebf8ee;
  --plan: #6741d9;
  --plan-l: #f1edff;
  --warn: #c92a2a;
  --warn-l: #fff0f0;
  --r: 8px;
  --wrap: 980px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--gray); color: var(--ink);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; /* 내용이 적어도 푸터는 맨 아래 */
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.55; letter-spacing: -0.015em; word-break: keep-all;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- 홈페이지와 같은 상단 안내바 ---------- */
.topbar { background: var(--navy); color: #aebcd4; font-size: 13px; padding-top: env(safe-area-inset-top); }
.topbar__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 36px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar p { margin: 0; }
@media (max-width: 900px) { .topbar { display: none; } }

/* ---------- 사이트 상단 메뉴 ---------- */
.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.site__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; min-height: 72px;
  display: flex; align-items: center; gap: 20px;
}
@media (max-width: 900px) { .site { padding-top: env(safe-area-inset-top); } }
.site__logo { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; flex: none; }
.site__logo strong { font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -0.04em; }
.site__logo small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.site__nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site__nav::-webkit-scrollbar { display: none; }
.site__nav a {
  flex: none; padding: 8px 12px; border-radius: 6px; text-decoration: none;
  font-size: 15.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.site__logout { color: var(--ink-2) !important; }
.site__nav a:hover { color: var(--blue); }
.site__nav a.is-on { background: var(--navy); color: var(--white); }
.site__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.site__actions button {
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
}
.site__actions button:hover { border-color: var(--navy); }
.site__actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.site__badge {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--new); color: var(--white); font-size: 13px; font-weight: 800; line-height: 24px; text-align: center;
}
#refreshBtn.is-spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .site__inner { flex-wrap: wrap; gap: 0 12px; padding: 10px 16px 0; }
  .site__actions { margin-left: auto; }
  .site__nav { order: 3; width: 100%; margin: 8px -16px 0; padding: 0 12px 8px; }
  .site__nav a { font-size: 14px; padding: 7px 10px; }
}

/* ---------- 로그인 ---------- */
.login { display: grid; place-items: center; padding: 72px 16px 96px; background: var(--gray); }
.login__box {
  width: 100%; max-width: 380px; padding: 32px 24px; border-radius: 14px;
  background: var(--white); text-align: center; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(11, 35, 71, .06);
}
.login__hint { margin: 14px 0 0 !important; font-size: 13.5px !important; line-height: 1.6; }
.login__hint b { color: var(--navy); }
.login__home { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--ink-3); text-decoration: none; }
.login__home:hover { color: var(--blue); }

/* ---------- 푸터 ---------- */
.foot { margin-top: auto; background: #061630; color: #7f8faa; font-size: 13.5px; }
.foot__inner {
  max-width: 1200px; margin: 0 auto; padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
}
.foot p { margin: 0; }
.foot strong, .foot b { color: var(--white); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.login h1 { margin: 0; font-size: 22px; color: var(--navy); }
.login p { margin: 6px 0 20px; font-size: 15px; color: var(--ink-3); }
.login input {
  width: 100%; height: 54px; padding: 0 16px; border: 1.5px solid #cfd6e1; border-radius: var(--r);
  font-size: 22px; letter-spacing: .3em; text-align: center;
}
.login input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 91, 216, .15); }
.login button {
  width: 100%; height: 54px; margin-top: 10px; border: 0; border-radius: var(--r);
  background: var(--blue); color: var(--white); font-size: 17px; font-weight: 800;
}
.login button:disabled { opacity: .6; }
.login__err { min-height: 1.4em; margin: 12px 0 0 !important; color: #d93a3f !important; font-weight: 600; }

.demo { margin: 0; padding: 10px 16px; background: #fff8db; color: #6b5300; font-size: 13.5px; text-align: center; }

/* ---------- 요약 ---------- */
.stats {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 16px 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.stat {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
button.stat:hover { border-color: var(--navy); }
.stat span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.stat strong { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.25; }
.stat small { font-size: 12.5px; color: var(--ink-3); }
.stat--warn strong { color: var(--warn); }
.stat--sum { background: var(--navy); border-color: var(--navy); }
.stat--sum span, .stat--sum small { color: #9fb3d6; }
.stat--sum strong { color: var(--white); font-size: 20px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat--sum { grid-column: 1 / -1; }
}

/* ---------- 도구 ---------- */
.tools { padding: 14px 16px 0; max-width: var(--wrap); margin: 0 auto; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 19px;
  background: var(--white); color: var(--ink-2); font-size: 14.5px; font-weight: 700;
}
.filter span { margin-left: 2px; color: var(--blue); }
.filter--sub span { color: var(--warn); }
.filter.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter.is-on span { color: #9cc0ff; }
.tools__row { display: flex; gap: 8px; margin-top: 10px; }
.tools__row input, .tools__row select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink);
}
.tools__row input { flex: 1; min-width: 0; }
.tools__btn {
  flex: none; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
}
.search { position: relative; flex: 1; min-width: 0; display: flex; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--ink-3); pointer-events: none; }
.tools__row .search input { width: 100%; padding-left: 38px; font-size: 15px; }
.tools__row input:focus, .tools__row select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 91, 216, .12); }
@media (max-width: 600px) {
  .tools__row { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .tools__row select, .tools__btn { flex: 1; }
}

/* 접수일 기간 */
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.period__label { font-size: 13.5px; font-weight: 800; color: var(--ink-2); flex: none; }
.period__chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.period__chips::-webkit-scrollbar { display: none; }
.period__chips button {
  flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--white); color: var(--ink-2); font-size: 13.5px; font-weight: 700;
}
.period__chips button.is-on { background: var(--blue-l); border-color: var(--blue); color: var(--blue); }
.period__range { display: flex; align-items: center; gap: 6px; }
.period__range input {
  height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink); font-size: 14px;
}
.period__range span { color: var(--ink-3); }
@media (max-width: 600px) {
  .period { flex-wrap: nowrap; }
  .period:has(.period__range:not([hidden])) { flex-wrap: wrap; }
  .period__range { flex-basis: 100%; }
  .period__range input { flex: 1; min-width: 0; }
}

/* 검색 결과 건수 */
.result { max-width: var(--wrap); margin: 8px auto 0; padding: 0 16px; display: flex; align-items: center; gap: 10px; }
.result p { margin: 0; font-size: 14px; font-weight: 800; color: var(--navy); }
.result__reset {
  height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--white); color: var(--ink-2); font-size: 12.5px; font-weight: 700;
}

/* 페이지 번호 */
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; padding: 0 16px 48px; margin-top: -28px; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); color: var(--ink-2); font-size: 14.5px; font-weight: 700;
}
.pager button.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager__arrow { font-size: 18px !important; }
.pager__gap { min-width: 20px; text-align: center; color: var(--ink-3); }
.notify-btn {
  margin-top: 10px; width: 100%; min-height: 42px; padding: 8px 12px; border: 1px dashed var(--blue); border-radius: var(--r);
  background: var(--blue-l); color: var(--blue); font-size: 14px; font-weight: 700; line-height: 1.4;
}
.notify-btn[hidden] { display: none; }
.notify-btn:disabled { opacity: .7; }
.notify-btn--on { border-style: solid; border-color: var(--done); background: var(--done-l); color: var(--done); }
.updated { max-width: var(--wrap); margin: 10px auto 0; padding: 0 16px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 접수 카드 ---------- */
.list { display: grid; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 10px 16px 48px; }
.card { background: var(--white); border-radius: 12px; border: 1px solid var(--line); }
.card > :last-child { border-radius: 0 0 11px 11px; }
.card.is-new { border-color: #f3b896; box-shadow: 0 0 0 2px var(--new-l); }
.card.is-cancel { opacity: .7; }

/* 두 줄 요약 (누르면 펼침) */
.card__sum { display: grid; gap: 5px; padding: 11px 14px; cursor: pointer; border-radius: 11px; }
.card__sum:hover { background: #fafbfd; }
.card__sum:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.card.is-open .card__sum { border-radius: 11px 11px 0 0; border-bottom: 1px solid var(--line); }
.sum__r1, .sum__r2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sum__r1 .status { flex: none; }
.sum__who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum__who b { font-size: 15.5px; font-weight: 800; color: var(--navy); }
.sum__who small { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.sum__r2 { font-size: 13.5px; color: var(--ink-2); }
.sum__r2 .tags { flex: none; flex-wrap: nowrap; gap: 4px; }
.sum__r2 .tag { padding: 1px 7px; font-size: 12px; }
.sum__r2 .tag--price { display: none; }
.sum__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum__time { flex: none; font-size: 12.5px; color: var(--ink-3); }
.sum__time::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 2px 3px 8px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg);
  transition: transform .15s;
}
.card.is-open .sum__time::after { transform: rotate(-135deg); margin-bottom: -1px; }
.card__meta { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.card .sched__chip { height: 30px; padding: 0 10px; font-size: 13px; }
.card__head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3);
}
.status {
  padding: 2px 9px; border-radius: 4px; font-size: 12.5px; font-weight: 800;
  background: var(--new-l); color: var(--new);
}
.status[data-s="확인함"] { background: var(--blue-l); color: var(--blue); }
.status[data-s="일정 확정"] { background: var(--plan-l); color: var(--plan); }
.status[data-s="완료"] { background: var(--done-l); color: var(--done); }
.status[data-s="취소"] { background: #eceef2; color: var(--ink-3); }
.card__time { margin-left: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 4px; font-size: 13px; font-weight: 700; background: var(--gray); color: var(--ink-2); }
.tag--visit { background: var(--plan-l); color: var(--plan); }
.tag--price { background: var(--blue-l); color: var(--navy); }
.tag--ok { background: var(--done-l); color: var(--done); }
.tag--warn { background: var(--warn-l); color: var(--warn); }

.card__body { padding: 14px 16px; display: grid; gap: 10px; }
.card__who { font-size: 17px; font-weight: 800; color: var(--navy); }
.card__who small { margin-left: 6px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.contact a {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border-radius: var(--r); text-decoration: none; font-weight: 800; font-size: 15px;
}
.contact .call { background: var(--blue); color: var(--white); }
.contact .sms, .contact .map { background: var(--gray); color: var(--navy); border: 1px solid var(--line); }
.contact svg { width: 18px; height: 18px; fill: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 3px 10px; border-radius: 4px; background: var(--gray); font-size: 13.5px; font-weight: 700; color: var(--navy); }
.memo { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--gray); font-size: 15px; white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos button { padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--gray); aspect-ratio: 1 / 1; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.nophoto { margin: 0; font-size: 13.5px; color: var(--ink-3); }

/* 처리 상태 버튼 */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 16px 14px; }
.steps button {
  height: 40px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--white); color: var(--ink-2); font-size: 14px; font-weight: 700;
}
.steps button.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.steps button[data-s="취소"].is-on { background: var(--ink-3); border-color: var(--ink-3); }
@media (max-width: 480px) { .steps button { font-size: 13px; padding: 0 2px; } }

/* 방문 일정: 카드 오른쪽 위 버튼 + 작은 일정 창 */
.sched { position: relative; flex: none; }
.sched__chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px dashed #b9a8f0; border-radius: 999px; background: var(--white);
  color: var(--plan); font-size: 13.5px; font-weight: 800; white-space: nowrap;
}
.sched__chip svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.sched__chip.is-set { border: 1px solid var(--plan-l); background: var(--plan-l); }
.sched__chip[aria-expanded="true"] { border-color: var(--plan); box-shadow: 0 0 0 3px rgba(103, 65, 217, .14); }
.sched__pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 300px;
  display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); box-shadow: 0 16px 40px -12px rgba(11, 35, 71, .35);
}
.sched__top { display: flex; align-items: center; justify-content: space-between; }
.sched__top strong { font-size: 15px; color: var(--navy); }
.sched__x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--gray); color: var(--ink-2); font-size: 20px; line-height: 1; }
.sched__quick { display: flex; border: 1px solid #cfd6e1; border-radius: var(--r); overflow: hidden; }
.sched__quick button { flex: 1; height: 36px; border: 0; background: var(--white); color: var(--ink-2); font-size: 14px; font-weight: 700; }
.sched__quick button + button { border-left: 1px solid #cfd6e1; }
.sched__quick button.is-on { background: var(--navy); color: var(--white); }
.sched__row { display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.sched__row input, .sched__row select {
  width: 100%; min-width: 0; height: 40px; padding: 0 8px; border: 1px solid #cfd6e1; border-radius: var(--r);
  background: var(--white); color: var(--ink); font-size: 14.5px;
}
.sched__row input:focus, .sched__row select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 91, 216, .12); }
.sched__save { height: 42px; border: 0; border-radius: var(--r); background: var(--plan); color: var(--white); font-size: 15px; font-weight: 800; }
.sched__pop :disabled { opacity: .5; }
.sched__msg { margin: 0; font-size: 13px; font-weight: 600; color: var(--warn); }
.sched__msg:empty { display: none; }
.sched__acts { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sched__sms, .sched__clear {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 10px;
  border-radius: var(--r); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.sched__sms { background: var(--plan-l); color: var(--plan); }
.sched__clear { flex: none; border: 1px solid #f0c4c4; background: var(--white); color: var(--warn); }
.sched__short { display: none; }
@media (max-width: 480px) {
  .sched__chip { height: 34px; padding: 0 10px; font-size: 13px; }
  .sched__long { display: none; }
  .sched__short { display: inline; }
  .sched__pop { width: min(300px, calc(100vw - 48px)); }
}

/* 관리 정보 (금액·입금·계산서·메모) */
.manage { border-top: 1px solid var(--line); background: #fafbfd; }
.manage > summary {
  list-style: none; cursor: pointer; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--navy);
}
.manage > summary::-webkit-details-marker { display: none; }
.manage > summary::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 500; color: var(--ink-3); }
.manage[open] > summary::after { content: "–"; }
.manage__form { display: grid; gap: 12px; padding: 0 16px 16px; }
.mrow { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; }
.mrow > span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.mrow input, .mrow textarea {
  width: 100%; height: 40px; padding: 0 10px; border: 1px solid #cfd6e1; border-radius: var(--r);
  background: var(--white); color: var(--ink); font-size: 15px;
}
.mrow textarea { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
.mrow input:focus, .mrow textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 91, 216, .12); }
.mrow__pair { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrow__pair input[type="date"] { width: auto; flex: 1; min-width: 150px; }
.price { position: relative; }
.price input { padding-right: 32px; text-align: right; font-weight: 700; }
.price::after { content: "원"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; }
.seg { display: inline-flex; border: 1px solid #cfd6e1; border-radius: var(--r); overflow: hidden; flex: none; }
.seg button { height: 38px; padding: 0 12px; border: 0; background: var(--white); color: var(--ink-2); font-size: 14px; font-weight: 700; }
.seg button + button { border-left: 1px solid #cfd6e1; }
.seg button.is-on { background: var(--navy); color: var(--white); }
.seg button.is-on[data-v="미입금"], .seg button.is-on[data-v="미발행"] { background: var(--warn); }
.manage__foot { display: flex; align-items: center; gap: 10px; }
.manage__save {
  height: 44px; padding: 0 22px; border: 0; border-radius: var(--r);
  background: var(--blue); color: var(--white); font-size: 15px; font-weight: 800;
}
.manage__save:disabled { opacity: .5; }
.manage__msg { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.manage__msg.is-ok { color: var(--done); }
.manage__msg.is-err { color: var(--warn); }
.manage__del {
  margin-left: auto; height: 36px; padding: 0 12px; border: 1px solid #f0c4c4; border-radius: var(--r);
  background: var(--white); color: var(--warn); font-size: 13.5px; font-weight: 700;
}
@media (max-width: 480px) { .mrow { grid-template-columns: 1fr; gap: 6px; } }

.empty { text-align: center; color: var(--ink-3); padding: 40px 16px; }

/* ---------- 사진 크게 보기 ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: 16px; background: rgba(0, 0, 0, .92);
}
.viewer img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.viewer__close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: var(--white); font-size: 30px; line-height: 1;
}

@media (min-width: 700px) {
  .photos { grid-template-columns: repeat(6, 1fr); }
}

/* 사진 넘겨보기 */
.viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .14); color: var(--white); font-size: 34px; line-height: 1;
}
.viewer__nav--prev { left: 10px; }
.viewer__nav--next { right: 10px; }
.viewer__count {
  position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  margin: 0; padding: 4px 12px; border-radius: 14px; background: rgba(0, 0, 0, .5); color: var(--white); font-size: 14px; font-weight: 700;
}
.viewer__count:empty { display: none; }

/* 요약 줄의 첫 사진 */
.card__sum { display: flex; align-items: center; gap: 10px; }
.sum__main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.sum__thumb {
  position: relative; flex: none; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: var(--gray);
}
.sum__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sum__thumb span {
  position: absolute; right: 2px; bottom: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: rgba(11, 35, 71, .85); color: var(--white); font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center;
}

/* ---------- 목록 / 캘린더 전환 ---------- */
.views { display: inline-flex; padding: 3px; margin-bottom: 10px; border-radius: 10px; background: #e6eaf1; }
.views button {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font-size: 14.5px; font-weight: 800;
}
.views svg { width: 17px; height: 17px; fill: currentColor; }
.views button.is-on { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(11, 35, 71, .15); }

/* 날짜 기준 선택 */
.period__basis {
  flex: none; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--white); color: var(--navy); font-size: 13.5px; font-weight: 800;
}

/* 활동 종류 색 */
.ev--recv { --ev: var(--blue); --ev-l: var(--blue-l); }
.ev--visit { --ev: var(--plan); --ev-l: var(--plan-l); }
.ev--done { --ev: var(--done); --ev-l: var(--done-l); }
.ev--paid { --ev: #0c8599; --ev-l: #e3f6f8; }
.tag[class*="ev--"] { background: var(--ev-l); color: var(--ev); }

/* ---------- 캘린더 ---------- */
.cal { max-width: var(--wrap); margin: 10px auto 0; padding: 0 16px; }
.cal__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 10px; }
.cal__title { min-width: 120px; text-align: center; font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.cal__nav {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--white);
  color: var(--navy); font-size: 22px; line-height: 1;
}
.cal__today {
  height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white);
  color: var(--ink-2); font-size: 13px; font-weight: 700;
}
.cal__legend { display: flex; gap: 12px; margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.cal__legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal__legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--ev); }
.cal__grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line);
}
.cal__dow { padding: 8px 0; background: #f8f9fb; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.cal__dow.is-sun { color: var(--warn); }
.cal__dow.is-sat { color: var(--blue); }
.cal__blank { background: #fafbfc; }
.cal__day {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 104px; min-width: 0;
  padding: 6px 6px 8px; border: 0; background: var(--white); text-align: left; color: var(--ink);
}
.cal__day:hover { background: #f7f9fd; }
.cal__num {
  align-self: flex-start; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; line-height: 24px; text-align: center;
}
.cal__day.is-sun .cal__num { color: var(--warn); }
.cal__day.is-sat .cal__num { color: var(--blue); }
.cal__day.is-today .cal__num { background: var(--navy); color: var(--white); }
.cal__day.is-sel { background: var(--blue-l); box-shadow: inset 0 0 0 2px var(--blue); }
.cal__lines { display: grid; gap: 2px; min-width: 0; }
.cal__line {
  display: flex; align-items: center; gap: 4px; min-width: 0; padding: 1px 5px; border-radius: 4px;
  background: var(--ev-l); color: var(--ev); font-size: 11.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal__line i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ev); }
.cal__more { padding-left: 5px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.cal__counts { display: none; }
@media (max-width: 700px) {
  .cal { padding: 0 10px; }
  .cal__legend { flex-basis: 100%; justify-content: center; margin: 2px 0 0; }
  .cal__head { justify-content: center; }
  .cal__day { min-height: 62px; align-items: center; padding: 4px 2px 6px; }
  .cal__num { align-self: center; }
  .cal__lines { display: none; }
  .cal__counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .cal__counts span {
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ev); color: var(--white);
    font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center;
  }
}

/* ---------- 체크해서 받기 ---------- */
.result { flex-wrap: wrap; }
.result__all {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 8px; border: 1px solid var(--line);
  border-radius: 15px; background: var(--white); font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.result__all input, .sum__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.sum__check { flex: none; display: grid; place-items: center; width: 26px; height: 40px; margin: -6px -4px -6px -6px; cursor: pointer; }
.card.is-sel { border-color: #9dbcf3; box-shadow: 0 0 0 2px var(--blue-l); }

/* 고객 영상 */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.videos__item { margin: 0; border-radius: 8px; overflow: hidden; background: #0d1420; }
.videos__item video { display: block; width: 100%; max-height: 420px; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.videos__item figcaption {
  display: flex; justify-content: space-between; align-items: center; padding: 7px 10px;
  background: #f4f6f9; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.videos__item figcaption a { color: var(--blue); text-decoration: none; }
.sum__thumb--video { display: block; background: #1b2433; }
.sum__thumb--video::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- 앱 설치 안내 ---------- */
.install {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 12px 12px 14px;
  border-radius: 12px; background: var(--navy); color: var(--white);
}
.install[hidden] { display: none; }
.install img { flex: none; border-radius: 10px; }
.install p { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; }
.install p span { display: block; font-size: 13px; color: #c9d6ee; }
.install__btn {
  flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 8px;
  background: var(--white); color: var(--navy); font-size: 15px; font-weight: 800; cursor: pointer;
}
.install__close {
  flex: none; width: 32px; height: 32px; border: 0; background: none; color: #c9d6ee;
  font-size: 24px; line-height: 1; cursor: pointer;
}
@media (max-width: 480px) {
  .install { flex-wrap: wrap; }
  .install p { flex-basis: calc(100% - 100px); }
  .install__btn { order: 4; width: 100%; height: 44px; }
}

.iguide {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(11, 35, 71, .6);
}
.iguide[hidden] { display: none; }
.iguide__box {
  width: 100%; max-width: 380px; padding: 28px 22px 22px; border-radius: 14px;
  background: var(--white); color: var(--ink); text-align: center;
}
.iguide__box img { border-radius: 12px; }
.iguide__box h2 { margin: 12px 0 14px; font-size: 19px; color: var(--navy); }
.iguide__box ol { margin: 0 0 20px; padding-left: 22px; text-align: left; font-size: 15px; line-height: 1.6; }
.iguide__box li + li { margin-top: 8px; }
.iguide__box button {
  width: 100%; height: 46px; border: 0; border-radius: 10px;
  background: var(--navy); color: var(--white); font-size: 16px; font-weight: 700; cursor: pointer;
}
.videos__err { margin: 6px 0 0; font-size: 13px; color: var(--warn); }
.videos__err--busy { color: var(--blue); }
