/* ==========================================================================
   행정 체크리스트 통합 스타일 (checklist.css)
   - 원본 체크리스트.html의 아이보리·금색 교회 디자인을 .cl-* / #panel-checklist 스코프로 적용
   - 기존 styles.css (AI·공지·카톡 패널)와 충돌 없음
   ========================================================================== */

.cl-hero-wrap,
#panel-checklist {
  --cl-bg: #f6f1e8;
  --cl-surface: #fffdf8;
  --cl-ink: #2e2822;
  --cl-muted: #8b8074;
  --cl-line: #e9e0d1;
  --cl-gold: #b08d57;
  --cl-gold-soft: #efe4cf;
  --cl-glow: #f3e6cb;
  --cl-navy: #2f4363;
  --cl-accent: #2f4363;
  --cl-accent-ink: #fffdf8;
  --cl-done: #5f7d4e;
  --cl-late: #9e3b3b;
  --cl-late-bg: #f7e9e5;
  --cl-today: #b07a1e;
  --cl-today-bg: #fbf2df;
  --cl-soon: #3f5d86;
  --cl-soon-bg: #eef2f7;
  --cl-none: #b3a899;
  --cl-shadow: 0 1px 2px rgba(80, 60, 30, 0.05), 0 6px 18px rgba(80, 60, 30, 0.06);
  --cl-font-title: "Gowun Batang", "Nanum Myeongjo", "Batang", serif;
  --cl-font-body: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --cl-tag-l1: 93%;
  --cl-tag-l2: 34%;
  --cl-tag-s: 35%;
}

/* 상단 로고 헤더 완전 고정 (PC·모바일 모든 브라우저 100% 보장: position: fixed) */
.app-shell {
  padding-top: var(--hdr-h, 66px);
}
.app-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 95 !important;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid rgba(176, 141, 87, 0.28);
}

.cl-nav-sticky {
  position: static !important;
  background: rgba(253, 247, 248, 0.94);
  border-bottom: 1px solid var(--border);
}

.cl-nav-sticky .nav-bar {
  padding-top: 9px;
  padding-bottom: 9px;
}

/* ==========================================================================
   1. 머리 카드 (.cl-hero): 십자가 · 날짜 · 오늘 날씨 · 큰 시계 · 오늘의 말씀
   ========================================================================== */

.cl-hero-wrap {
  width: 100%;
  max-width: var(--max-width, 960px);
  margin: 0 auto;
  padding: 12px 16px 8px;
}

.cl-hero {
  position: relative;
  border: 1px solid var(--cl-line);
  border-radius: 20px;
  background: radial-gradient(90% 120% at 0% 0%, var(--cl-glow) 0%, var(--cl-surface) 65%);
  padding: 18px 20px 20px;
  box-shadow: var(--cl-shadow);
  overflow: hidden;
  color: var(--cl-ink);
  font-family: var(--cl-font-body);
}

.cl-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cl-gold), transparent);
}

.cl-hero-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cl-cross {
  width: 13px;
  height: 18px;
  color: var(--cl-gold);
  flex: none;
}

.cl-today {
  font-family: "Nanum Myeongjo", var(--cl-font-title);
  font-size: 0.95rem;
  color: var(--cl-muted);
  letter-spacing: 0.06em;
}

.cl-today b {
  color: var(--cl-gold);
  font-weight: 700;
}

.cl-wx-btn {
  margin-left: auto;
  flex: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cl-navy);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--cl-gold) 55%, transparent);
  border-radius: 999px;
  padding: 3px 12px;
  background: color-mix(in srgb, var(--cl-surface) 75%, transparent);
  transition: background 0.15s ease;
}

.cl-wx-btn:hover {
  background: var(--cl-gold-soft);
  color: var(--cl-navy);
}

.cl-clock {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 2px;
  color: var(--cl-navy);
  font-family: "Cormorant Garamond", var(--cl-font-title);
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
}

.cl-clock .ap {
  font-family: "Nanum Myeongjo", var(--cl-font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cl-gold);
  letter-spacing: 0.1em;
}

.cl-clock .hm {
  font-size: clamp(3.2rem, 14vw, 4.8rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cl-clock .sec {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--cl-gold);
  min-width: 1.4em;
}

.cl-rule {
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(90deg, var(--cl-gold), transparent 85%);
  opacity: 0.7;
}

.cl-verse {
  margin: 0;
  font-family: "Nanum Myeongjo", var(--cl-font-title);
  font-size: clamp(1.16rem, 4.2vw, 1.38rem);
  font-weight: 700;
  line-height: 1.7;
  color: var(--cl-ink);
  word-break: keep-all;
}

.cl-verse cite {
  display: block;
  font-style: normal;
  font-family: "Gowun Batang", var(--cl-font-title);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--cl-gold);
  margin-top: 6px;
  letter-spacing: 0.08em;
  text-align: right;
}

.cl-verse cite::before {
  content: "— ";
}

@media (min-width: 600px) {
  .cl-wx-btn {
    position: absolute;
    top: 14px;
    right: 16px;
  }

  .cl-hero .cl-verse {
    padding-top: 24px;
  }

  .cl-hero-in {
    display: grid;
    grid-template-columns: auto 1px 1fr;
    gap: 0 26px;
    align-items: center;
  }

  .cl-rule {
    width: 1px;
    height: auto;
    align-self: stretch;
    margin: 4px 0;
    background: linear-gradient(180deg, transparent, var(--cl-gold), transparent);
  }
}

/* ==========================================================================
   2. 체크리스트 패널 레이아웃 & 입력 폼 (#panel-checklist)
   ========================================================================== */

#panel-checklist {
  color: var(--cl-ink);
  font-family: var(--cl-font-body);
}

#panel-checklist .cl-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#panel-checklist #cl-add {
  background: var(--cl-surface);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  box-shadow: var(--cl-shadow);
}

#panel-checklist #cl-add button[type="submit"],
#panel-checklist #cl-add .cl-fl.w2 {
  grid-column: span 2;
}

#panel-checklist .cl-fl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.74rem;
  color: var(--cl-muted);
}

#panel-checklist #cl-add input,
#panel-checklist #cl-add select {
  font: inherit;
  font-size: 0.92rem;
  color: var(--cl-ink);
  background: var(--cl-bg);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 11px;
  min-width: 0;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#panel-checklist #cl-add input:focus,
#panel-checklist #cl-add select:focus {
  border-color: var(--cl-gold);
  outline: none;
  background: var(--cl-surface);
}

#panel-checklist #cl-f-title {
  grid-column: 1 / -1;
  font-size: 1rem;
  padding: 10px 12px;
}

#panel-checklist #cl-f-btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--cl-accent);
  color: var(--cl-accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

#panel-checklist #cl-f-btn:hover {
  opacity: 0.92;
}

#panel-checklist #cl-f-btn:active {
  transform: translateY(1px);
}

#panel-checklist #cl-f-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

#panel-checklist :focus-visible {
  outline: 2px solid var(--cl-gold);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  #panel-checklist #cl-add {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   3. 체크리스트 내 빠른 검색 (#cl-search-wrap)
   ========================================================================== */

#panel-checklist .cl-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

#panel-checklist .cl-search-ic {
  position: absolute;
  left: 13px;
  font-size: 0.92rem;
  pointer-events: none;
  opacity: 0.7;
}

#panel-checklist .cl-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--cl-line);
  border-radius: 999px;
  background: var(--cl-surface);
  color: var(--cl-ink);
  font-size: 0.92rem;
  box-shadow: var(--cl-shadow);
  outline: none;
  transition: border-color 0.15s ease;
}

#panel-checklist .cl-search-input::placeholder {
  color: var(--cl-muted);
}

#panel-checklist .cl-search-input:focus {
  border-color: var(--cl-gold);
}

/* ==========================================================================
   4. 5칸 기간 탭 (#cl-tabs: 오늘 · 이번 주 · 이번 달 · 전체 · 달력)
   ========================================================================== */

#panel-checklist #cl-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  background: var(--cl-surface);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  padding: 4px;
  box-shadow: var(--cl-shadow);
}

#panel-checklist #cl-tabs button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--cl-muted);
  padding: 8px 2px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

#panel-checklist #cl-tabs button:hover {
  background: var(--cl-bg);
}

#panel-checklist #cl-tabs .n {
  font-family: "Cormorant Garamond", var(--cl-font-title);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  color: var(--cl-navy);
  font-variant-numeric: lining-nums tabular-nums;
}

#panel-checklist #cl-tabs .n.late {
  color: var(--cl-late);
}

#panel-checklist #cl-tabs .ic {
  width: 24px;
  height: 1.65rem;
  color: var(--cl-navy);
}

#panel-checklist #cl-tabs .l {
  font-family: var(--cl-font-title);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

#panel-checklist #cl-tabs button[aria-pressed="true"] {
  background: var(--cl-navy);
  color: var(--cl-surface);
}

#panel-checklist #cl-tabs button[aria-pressed="true"] .n,
#panel-checklist #cl-tabs button[aria-pressed="true"] .ic {
  color: var(--cl-surface);
}

/* ==========================================================================
   5. 진행 상태 막대 & 범례 버튼 (#cl-prog-box)
   ========================================================================== */

#panel-checklist .s-todo { --sc: var(--cl-muted); }
#panel-checklist .s-doing { --sc: var(--cl-soon); }
#panel-checklist .s-hold { --sc: var(--cl-gold); }
#panel-checklist .s-done { --sc: var(--cl-done); }

#panel-checklist #cl-prog-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#panel-checklist #cl-prog {
  display: flex;
  gap: 2px;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--cl-line);
}

#panel-checklist #cl-prog span {
  min-width: 4px;
  background: var(--sc);
}

#panel-checklist #cl-legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#panel-checklist #cl-legend button {
  font: inherit;
  font-size: 0.84rem;
  border: 1px solid var(--cl-line);
  background: var(--cl-surface);
  color: var(--cl-ink);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.14s ease, border-color 0.14s ease;
}

#panel-checklist #cl-legend button:hover {
  border-color: var(--cl-gold);
}

#panel-checklist #cl-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sc);
}

#panel-checklist #cl-legend b {
  font-weight: 700;
  color: var(--cl-muted);
  font-variant-numeric: tabular-nums;
}

#panel-checklist #cl-legend button[aria-pressed="true"] {
  background: var(--cl-ink);
  color: var(--cl-surface);
  border-color: var(--cl-ink);
}

#panel-checklist #cl-legend button[aria-pressed="true"] b {
  color: inherit;
}

/* ==========================================================================
   6. 분류 칩 (#cl-chips)
   ========================================================================== */

#panel-checklist #cl-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

#panel-checklist #cl-chips::-webkit-scrollbar {
  display: none;
}

#panel-checklist #cl-chips .chip,
#panel-checklist #cl-chips .cl-chip,
#panel-checklist #cl-chips button {
  flex: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--cl-line);
  background: var(--cl-surface);
  color: var(--cl-muted);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

#panel-checklist #cl-chips .chip:hover,
#panel-checklist #cl-chips .cl-chip:hover,
#panel-checklist #cl-chips button:hover {
  border-color: var(--cl-gold);
  color: var(--cl-navy);
  background: var(--cl-bg);
}

#panel-checklist #cl-chips .chip[aria-pressed="true"],
#panel-checklist #cl-chips .cl-chip[aria-pressed="true"],
#panel-checklist #cl-chips button[aria-pressed="true"] {
  background: var(--cl-navy);
  color: var(--cl-surface);
  border-color: var(--cl-navy);
  font-weight: 700;
}

#panel-checklist #cl-chips .cn {
  font-size: 0.76rem;
  margin-left: 4px;
  opacity: 0.78;
}

/* ==========================================================================
   7. 할 일 목록 묶음 & 카드 (#cl-lists, #cl-cal 내부 group 포함)
   ========================================================================== */

#panel-checklist #cl-lists {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#panel-checklist .group h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cl-font-title);
  font-size: 1rem;
  color: var(--cl-navy);
  margin: 0 0 8px 2px;
  font-weight: 700;
}

#panel-checklist .group h2::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--c, var(--cl-gold));
}

#panel-checklist .group h2 .cnt {
  font-family: var(--cl-font-body);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--cl-muted);
}

#panel-checklist .group.late { --c: var(--cl-late); }
#panel-checklist .group.late h2 { color: var(--cl-late); }
#panel-checklist .group.today { --c: var(--cl-today); }
#panel-checklist .group.today h2 { color: var(--cl-today); }
#panel-checklist .group.soon { --c: var(--cl-soon); }
#panel-checklist .group.later { --c: var(--cl-gold); }
#panel-checklist .group.none { --c: var(--cl-none); }

#panel-checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#panel-checklist li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "body side"
    "seg seg";
  align-items: center;
  gap: 8px 12px;
  padding: 12px 10px 12px 16px;
  background: var(--cl-surface);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  box-shadow: var(--cl-shadow);
  overflow: hidden;
}

#panel-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--stripe, transparent);
}

#panel-checklist li.st-late {
  --stripe: var(--cl-late);
  background: var(--cl-late-bg);
  border-color: color-mix(in srgb, var(--cl-late) 25%, var(--cl-line));
}

#panel-checklist li.st-today {
  --stripe: var(--cl-today);
  background: var(--cl-today-bg);
  border-color: color-mix(in srgb, var(--cl-today) 25%, var(--cl-line));
}

#panel-checklist li.st-soon {
  --stripe: var(--cl-soon);
}

#panel-checklist li.st-later {
  --stripe: var(--cl-gold-soft);
}

#panel-checklist li.st-none {
  --stripe: transparent;
}

#panel-checklist li.is-done {
  --stripe: var(--cl-done);
  background: var(--cl-surface);
  opacity: 0.62;
  box-shadow: none;
}

@media (min-width: 600px) {
  #panel-checklist li {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "body seg side";
  }
}

#panel-checklist .body {
  grid-area: body;
  min-width: 0;
}

#panel-checklist .t {
  font-size: 1rem;
  font-weight: 500;
  color: var(--cl-ink);
  overflow-wrap: anywhere;
}

#panel-checklist li.pri-top .t {
  font-weight: 700;
}

#panel-checklist li.s-hold .t {
  color: var(--cl-muted);
}

#panel-checklist li.is-done .t {
  text-decoration: line-through;
  color: var(--cl-muted);
  font-weight: 400;
}

#panel-checklist .meta {
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--cl-muted);
  margin-top: 4px;
}

/* 중요도 배지 (최우선 · 중요 · 일반) */
#panel-checklist .pri {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.55;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid;
  cursor: pointer;
}

#panel-checklist .pri.top {
  color: var(--cl-late);
  background: var(--cl-late-bg);
  border-color: color-mix(in srgb, var(--cl-late) 35%, transparent);
}

#panel-checklist .pri.high {
  color: var(--cl-soon);
  background: var(--cl-soon-bg);
  border-color: color-mix(in srgb, var(--cl-soon) 30%, transparent);
}

#panel-checklist .pri.normal {
  color: var(--cl-done);
  background: color-mix(in srgb, var(--cl-done) 10%, var(--cl-surface));
  border-color: color-mix(in srgb, var(--cl-done) 30%, transparent);
}

/* 분류 태그 */
#panel-checklist .cat {
  border-radius: 6px;
  padding: 0 7px;
  font-weight: 500;
  background: hsl(var(--h, 35) var(--cl-tag-s) var(--cl-tag-l1));
  color: hsl(var(--h, 35) 40% var(--cl-tag-l2));
}

#panel-checklist .cat.gray {
  background: var(--cl-bg);
  color: var(--cl-muted);
}

#panel-checklist .due {
  font-variant-numeric: tabular-nums;
}

#panel-checklist .bell {
  white-space: nowrap;
}

#panel-checklist .note {
  overflow-wrap: anywhere;
}

/* 4버튼 상태 세그먼트 (미착수 · 진행중 · 보류 · 완료) */
#panel-checklist .seg {
  grid-area: seg;
  justify-self: start;
  display: inline-flex;
  border: 1px solid var(--cl-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--cl-surface);
}

#panel-checklist .seg button {
  font: inherit;
  font-size: 0.78rem;
  border: 0;
  border-left: 1px solid var(--cl-line);
  background: none;
  color: var(--cl-muted);
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}

#panel-checklist .seg button:first-child {
  border-left: 0;
}

#panel-checklist .seg button[aria-pressed="true"] {
  background: var(--sc);
  color: var(--cl-surface);
  font-weight: 700;
}

/* 우측 D-day & 삭제 버튼 */
#panel-checklist .side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#panel-checklist .dday {
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 999px;
  padding: 1px 9px;
  border: 1px solid var(--cl-line);
  color: var(--cl-muted);
  font-variant-numeric: tabular-nums;
}

#panel-checklist .dday.late {
  background: var(--cl-late);
  border-color: var(--cl-late);
  color: #fff;
}

#panel-checklist .dday.today {
  background: var(--cl-today);
  border-color: var(--cl-today);
  color: #fff;
}

#panel-checklist .dday.soon {
  background: var(--cl-soon-bg);
  border-color: transparent;
  color: var(--cl-soon);
}

#panel-checklist .del {
  font: inherit;
  font-size: 0.76rem;
  background: none;
  border: 0;
  color: var(--cl-muted);
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.6;
}

#panel-checklist .del:hover {
  opacity: 1;
}

#panel-checklist .del.armed {
  color: #fff;
  background: var(--cl-late);
  border-radius: 6px;
  opacity: 1;
  font-weight: 700;
  padding: 2px 8px;
}

#panel-checklist details.done-box summary {
  cursor: pointer;
  color: var(--cl-muted);
  font-size: 0.9rem;
  padding: 4px 2px 10px;
}

#panel-checklist .empty {
  color: var(--cl-muted);
  text-align: center;
  padding: 28px 14px;
  background: var(--cl-surface);
  border: 1px dashed var(--cl-line);
  border-radius: 14px;
  font-size: 0.92rem;
}

#panel-checklist .empty b {
  display: block;
  font-family: var(--cl-font-title);
  color: var(--cl-navy);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

#panel-checklist .hint {
  font: inherit;
  font-size: 0.86rem;
  color: var(--cl-muted);
  background: var(--cl-surface);
  border: 1px dashed var(--cl-line);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.14s ease, color 0.14s ease;
}

#panel-checklist .hint:hover {
  border-color: var(--cl-gold);
  color: var(--cl-navy);
}

/* ==========================================================================
   8. 월별 달력 (#cl-cal)
   ========================================================================== */

body.cal-view .app-main {
  max-width: 1120px;
}

#panel-checklist #cl-cal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#panel-checklist .cal-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

#panel-checklist .cal-head h2 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-family: var(--cl-font-title);
  font-size: 1.22rem;
  color: var(--cl-navy);
  font-variant-numeric: tabular-nums;
}

#panel-checklist .cal-head button {
  font: inherit;
  font-size: 0.86rem;
  background: var(--cl-surface);
  color: var(--cl-muted);
  border: 1px solid var(--cl-line);
  border-radius: 10px;
  padding: 5px 12px;
  cursor: pointer;
}

#panel-checklist .cal-head button:hover {
  border-color: var(--cl-gold);
  color: var(--cl-navy);
}

#panel-checklist .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--cl-line);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--cl-shadow);
}

#panel-checklist .wd {
  background: var(--cl-surface);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cl-muted);
  padding: 6px 0;
}

#panel-checklist .wd.sun,
#panel-checklist .day.sun .num {
  color: var(--cl-late);
}

#panel-checklist .wd.sat,
#panel-checklist .day.sat .num {
  color: var(--cl-soon);
}

#panel-checklist .day {
  min-width: 0;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  font: inherit;
  color: var(--cl-ink);
  text-align: left;
  background: var(--cl-surface);
  border: 0;
  cursor: pointer;
}

#panel-checklist .day.out {
  background: var(--cl-bg);
}

#panel-checklist .day.out > * {
  opacity: 0.45;
}

#panel-checklist .day.is-picked {
  box-shadow: inset 0 0 0 2px var(--cl-gold);
}

#panel-checklist .num {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#panel-checklist .day.is-today .num {
  background: var(--cl-gold);
  color: var(--cl-surface);
  border-radius: 50%;
}

#panel-checklist .ev {
  display: block;
  font-size: 0.7rem;
  line-height: 1.3;
  padding: 1px 3px;
  border-radius: 3px;
  overflow-wrap: anywhere;
  background: hsl(var(--h, 35) var(--cl-tag-s) var(--cl-tag-l1));
  color: hsl(var(--h, 35) 40% var(--cl-tag-l2));
}

#panel-checklist .ev.gray {
  background: var(--cl-bg);
  color: var(--cl-muted);
}

#panel-checklist .ev.late {
  background: var(--cl-late-bg);
  color: var(--cl-late);
  box-shadow: inset 2px 0 var(--cl-late);
}

#panel-checklist .ev.done {
  opacity: 0.5;
  text-decoration: line-through;
}

#panel-checklist .more {
  font-size: 0.68rem;
  color: var(--cl-muted);
  padding-left: 3px;
}

@media (min-width: 700px) {
  #panel-checklist .day {
    min-height: 112px;
    padding: 5px;
  }

  #panel-checklist .ev {
    font-size: 0.78rem;
    padding: 1px 5px;
  }

  #panel-checklist .more {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   9. 하단 도구 바 (#cl-tools-bar: 기존 Claude 체크리스트 링크 + JSON 백업/복원) & 푸터
   ========================================================================== */

#panel-checklist .cl-tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: var(--cl-surface);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  box-shadow: var(--cl-shadow);
}

#panel-checklist .cl-tools-io {
  display: flex;
  align-items: center;
  gap: 6px;
}

#panel-checklist .cl-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--cl-line);
  background: var(--cl-bg);
  color: var(--cl-ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease;
}

#panel-checklist .cl-tool-btn:hover {
  border-color: var(--cl-gold);
  background: var(--cl-gold-soft);
}

#panel-checklist .cl-tool-primary {
  background: var(--cl-navy);
  border-color: var(--cl-navy);
  color: var(--cl-surface);
}

#panel-checklist .cl-tool-primary:hover {
  background: #23334d;
  border-color: #23334d;
  color: var(--cl-surface);
}

#panel-checklist .cl-footer {
  text-align: center;
  font-family: var(--cl-font-title);
  font-size: 0.82rem;
  color: var(--cl-muted);
  letter-spacing: 0.12em;
  padding: 4px 0 8px;
}

@media (max-width: 640px) {
  .cl-hero-wrap {
    padding: 10px 12px 6px;
  }

  .cl-hero {
    padding: 15px 16px 16px;
    border-radius: 16px;
  }

  #panel-checklist .cl-tools-bar {
    flex-direction: column;
    align-items: stretch;
  }

  #panel-checklist .cl-tools-io {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #panel-checklist li {
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  }
}


/* ── 모바일 달력 가독성 개선 & 날짜 크게 보기 모달 (2026-11-22) ── */
@media (max-width: 699px) {
  #panel-checklist .day {
    min-height: 92px;
    padding: 4px 2px;
    gap: 3px;
  }
  #panel-checklist .num {
    font-size: 0.88rem;
    width: 24px;
    height: 24px;
  }
  #panel-checklist .ev {
    font-size: 0.78rem;
    line-height: 1.28;
    padding: 2px 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }
  #panel-checklist .more {
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #a32a57;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
  }
}
#panel-checklist .more {
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #a32a57;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}

.cl-day-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) {
  .cl-day-modal { align-items: center; padding: 20px; }
}
.cl-day-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 18, 20, 0.55);
  backdrop-filter: blur(2px);
}
.cl-day-sheet {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  background: #fdf7f8;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 640px) {
  .cl-day-sheet { border-radius: 20px; max-height: 82vh; }
}
.cl-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #eedde2;
}
.cl-day-title-wrap {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.cl-day-title-wrap h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2f4363;
}
.cl-day-cnt {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a32a57;
}
.cl-day-nav, .cl-day-close {
  border: 1px solid #dfc5ce;
  background: #fff;
  color: #231f20;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.cl-day-close {
  border-color: transparent;
  background: #fceef2;
  color: #a32a57;
}
.cl-day-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.cl-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cl-day-list li {
  background: #fff;
  border: 1px solid #e9e0d1;
  border-radius: 14px;
  padding: 14px 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(80, 60, 30, 0.06);
}
.cl-day-list li .t {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
  color: #231f20;
}
.cl-day-list li.is-done .t {
  text-decoration: line-through;
  color: #8b8074;
}
.cl-day-list li .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font-size: 0.86rem;
}
.cl-day-list li .seg {
  display: inline-flex;
  border: 1px solid #e9e0d1;
  border-radius: 10px;
  overflow: hidden;
  align-self: flex-start;
}
.cl-day-list li .seg button {
  border: 0;
  border-left: 1px solid #e9e0d1;
  background: #fff;
  padding: 6px 11px;
  font-size: 0.86rem;
  cursor: pointer;
}
.cl-day-list li .seg button:first-child { border-left: 0; }
.cl-day-list li .seg button[aria-pressed="true"] {
  background: #2f4363;
  color: #fff;
  font-weight: 700;
}
.cl-day-list li .side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.cl-day-add {
  display: flex;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #eedde2;
}
.cl-day-add input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #dfc5ce;
  border-radius: 999px;
  font-size: 0.96rem;
  outline: none;
}
.cl-day-add input:focus { border-color: #a32a57; }
.cl-day-add button {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #a32a57;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}


/* ── 윈도우 달력 스타일 월별·연도별 빠른 이동 그리드 (2026-11-22 v19) ── */
#panel-checklist .cal-title-btn {
  flex: 1;
  font-family: 'Gowun Batang', 'Nanum Myeongjo', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2f4363;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
#panel-checklist .cal-title-btn:hover {
  background: #fbf2df;
  border-color: rgba(176, 141, 87, 0.45);
}
.cal-pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: #fffdf8;
  border: 1px solid #e9e0d1;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(80, 60, 30, 0.06);
}
@media (max-width: 480px) {
  .cal-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
}
.cal-pick-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 76px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1px solid #e9e0d1;
  background: #ffffff;
  color: #2e2822;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.cal-pick-cell:hover {
  background: #fdf4f6;
  border-color: #a32a57;
  transform: translateY(-1px);
}
.cal-pick-cell.is-now {
  background: linear-gradient(135deg, #a32a57, #871f46);
  border-color: #a32a57;
  color: #ffffff;
}
.cal-pick-cell.is-cur:not(.is-now) {
  border: 2px solid #b08d57;
  background: #fbf2df;
}
.cal-pick-cell .cp-main {
  font-size: 1.08rem;
  font-weight: 700;
}
.cal-pick-cell .cp-cnt {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fceef2;
  color: #a32a57;
}
.cal-pick-cell.is-now .cp-cnt {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.cal-pick-cell .cp-empty {
  font-size: 0.74rem;
  color: #b3a899;
}
.cal-pick-cell.is-now .cp-empty {
  color: rgba(255, 255, 255, 0.75);
}


/* ── 체크리스트 AI 일정 명령 바 (2026-11-22 v24) ── */
.cl-ai-bar {
  background: linear-gradient(135deg, #fffdf9 0%, #fdf2f5 100%);
  border: 1.5px solid #e6c6d1;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 3px 14px rgba(163, 42, 87, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cl-ai-form {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.cl-ai-icon {
  font-size: 1.15rem;
  flex: none;
  padding-left: 4px;
}
#cl-ai-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e6d3da;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 0.96rem;
  color: #231f20;
  outline: none;
}
#cl-ai-input:focus {
  border-color: #a32a57;
  box-shadow: 0 0 0 3px rgba(163, 42, 87, 0.12);
}
#cl-ai-btn {
  flex: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #a32a57, #871f46);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
}
#cl-ai-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.cl-ai-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f7ef;
  border: 1px solid #cfe0c2;
  color: #2d4c1e;
  font-size: 0.9rem;
  font-weight: 500;
  word-break: keep-all;
}
.cl-ai-result.is-err {
  background: #fdf0ee;
  border-color: #e9c2bc;
  color: #9e3b3b;
}
.cl-ai-undo {
  border: 1px solid #b5cca4;
  background: #ffffff;
  color: #2d4c1e;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}


/* ── AI 일정 명령 바: 캡처·사진 첨부 (📷 · Ctrl+V · 드래그) ── */
.cl-ai-bar.is-drag {
  border-color: #a32a57;
  background: #fceef2;
}
.cl-ai-img-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e6d3da;
  background: #ffffff;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.cl-ai-img-btn:hover {
  background: #fceef2;
  border-color: #a32a57;
}
.cl-ai-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}
.cl-ai-thumb {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #dfc5ce;
  background: #fff;
}
.cl-ai-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cl-ai-thumb-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(35, 31, 32, 0.78);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
