:root {
  overscroll-behavior-y: none;
  color-scheme: light;
  --background: #f4efe8;
  --surface: #fcfaf6;
  --surface-subtle: #f1ebe1;
  --ink: #1f2923;
  --muted: #666e66;
  --stroke: #e4ddd1;
  --stroke-strong: #d4cab9;
  --brand: #274234;
  --brand-deep: #1b3025;
  --pine: #22392d;
  --accent: #9c7248;
  --soft: #e9efe9;
  --amber-bg: #f6ebd9;
  --amber-ink: #7a5425;
  --red: #8e3531;
  --red-bg: #f7eae8;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(31, 41, 35, 0.04);
  --shadow-md: 0 14px 36px rgba(31, 41, 35, 0.07);
  --shadow-lg: 0 26px 70px rgba(20, 31, 25, 0.18);
  --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Times New Roman", serif;
  --num-font: ui-serif, "Songti SC", "STSong", "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(214, 198, 174, 0.28), transparent 62%),
    radial-gradient(860px 480px at 8% -12%, rgba(233, 239, 233, 0.55), transparent 60%),
    var(--background);
}

button, input, select, textarea { font: inherit; }
button {
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .16s ease, box-shadow .18s ease;
}
button:disabled { opacity: .55; cursor: progress; transform: none !important; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

h1, h2, h3, p { margin: 0; }
h1 {
  font-family: var(--display-font);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  letter-spacing: .04em;
  line-height: 1.2;
  font-weight: 500;
  color: var(--ink);
}
h2 { font-size: 1.12rem; line-height: 1.38; letter-spacing: .01em; font-weight: 600; }
h3 { font-size: 1.02rem; line-height: 1.38; font-weight: 600; }
small, .muted, .note { color: var(--muted); }
small, .note { font-size: .84rem; }

.eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Top Loading Progress Bar & Skeleton */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 45%, var(--accent) 75%, transparent 100%);
  background-size: 200% 100%;
  transition: opacity .22s ease;
}
.progress-bar.active {
  opacity: 1;
  animation: progress-slide 1.15s linear infinite;
}
@keyframes progress-slide {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}
.skeleton-page { display: grid; gap: 16px; }
.skeleton-line {
  height: 16px;
  border-radius: 999px;
  background: var(--stroke);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line.short { width: 120px; height: 12px; }
.skeleton-line.title { width: 200px; height: 30px; margin-bottom: 6px; }
.skeleton-card {
  height: 112px;
  background: linear-gradient(120deg, var(--surface) 25%, var(--surface-subtle) 50%, var(--surface) 75%);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-card.tall { height: 220px; }

/* Sticky Frosted Topbar & Pull Refresh */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(252, 250, 246, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(228, 221, 209, 0.88);
}

.pull-refresh-anchor { position: relative; z-index: 21; pointer-events: none; }
.pull-refresh {
  position: absolute;
  top: var(--pull-offset, 0px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 15px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-deep);
  box-shadow: var(--shadow-sm);
  font-size: .85rem;
  white-space: nowrap;
}

.bar-inner {
  max-width: 1180px;
  margin: auto;
  min-height: 70px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .65rem;
  font-family: var(--display-font);
  font-size: 1.16rem;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--pine);
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 4px 12px rgba(27, 48, 37, 0.18);
}
.brand-mark i {
  display: block;
  width: 1.8px;
  height: 12px;
  border-radius: 4px;
  background: #f5f0e8;
  transform: rotate(24deg);
}
.brand-mark i:nth-child(2) { height: 17px; }

.brand-tag {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
}

.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 .85rem;
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  font-size: .938rem;
  white-space: nowrap;
}
.topbar nav button::after {
  content: '';
  position: absolute;
  left: .85rem;
  right: .85rem;
  bottom: 6px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform .22s ease;
}
.topbar nav button:hover { color: var(--pine); }
.topbar nav button[aria-current="page"] { color: var(--brand-deep); font-weight: 600; }
.topbar nav button[aria-current="page"]::after { transform: scaleX(1); }

.profile {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bottom-nav { display: none; }

/* Weekly Booking Calendar & Cards */
.booking-calendar { padding: 18px 20px; }
.booking-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.booking-cal-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.booking-cal-title h2 {
  font-family: var(--display-font);
  font-size: 1.16rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.booking-cal-title p { margin-top: 2px; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.booking-cal-nav { display: flex; align-items: center; gap: 6px; }
.booking-cal-nav .is-current-week:disabled { cursor: default; opacity: .52; }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.week-strip button {
  display: grid;
  justify-items: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 9px 2px;
  background: transparent;
  color: var(--muted);
}
.week-strip button:hover { background: var(--surface-subtle); }
.week-strip button span { font-size: .75rem; }
.week-strip button strong {
  font-family: var(--num-font);
  font-size: 1.24rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.week-strip button small {
  min-height: 16px;
  font-size: .72rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.week-strip button[aria-current="date"] { background: rgba(156, 114, 72, 0.11); }
.week-strip button[aria-current="date"] strong { color: var(--brand); font-weight: 600; }
.week-strip button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: rgba(252, 250, 246, 0.85);
  box-shadow: 0 6px 16px rgba(39, 66, 52, 0.2);
}
.week-strip button[aria-pressed="true"] :is(strong, small) { color: #fcfaf6; }

.booking-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.booking-subbar form { margin: 0; display: flex; align-items: center; gap: 8px; }
.date-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.date-pill:hover { border-color: var(--brand); background: #fffdf9; }
.date-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(39, 66, 52, 0.12); }
.date-pill-icon { width: 15px; height: 15px; color: var(--brand); flex: 0 0 auto; }
.date-pill-caret { font-size: .72rem; color: var(--muted); margin-left: 1px; }
.month-pill {
  min-height: 40px;
  min-width: 146px;
  justify-content: center;
  padding: 0 15px;
  background: #fffdf9;
  color: var(--pine);
  font-family: var(--num-font);
  font-size: .96rem;
  font-weight: 400;
}
.date-field-pill {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--stroke-strong);
  background: #fffdf9;
  color: var(--ink);
  font-family: var(--num-font);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.date-field-pill:hover { border-color: var(--brand); background: #fff; }
.date-field-pill:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(39, 66, 52, 0.12); }
.date-field-pill .date-pill-caret { margin-left: auto; }
.date-native-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.date-native-overlay::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.switch {
  display: inline-flex;
  border-radius: 999px;
  background: var(--surface-subtle);
  padding: 3px;
  border: 1px solid rgba(212, 202, 185, 0.65);
}
.switch button {
  padding: 0 13px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  white-space: nowrap;
}
.switch button[aria-pressed="true"] {
  border-color: rgba(228, 221, 209, 0.9);
  background: var(--surface);
  color: var(--brand-deep);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(31, 41, 35, 0.06);
}

.booking-week { display: grid; gap: 10px; }
.booking-day { margin: 0; padding: 14px 18px; }
.booking-day.is-empty { padding: 11px 16px; background: rgba(252, 250, 246, 0.62); }
.booking-today { border-color: var(--brand); }
.booking-day.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(156, 114, 72, 0.24), var(--shadow-sm); }
.booking-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.booking-day-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.booking-day-head h2 {
  font-family: var(--display-font);
  font-size: 1.06rem;
  font-weight: 500;
}
.booking-day-head small { margin-left: 4px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-weight: 400; }
.booking-empty-inline { font-size: .82rem; color: var(--muted); }

.booking-list { padding: 0; margin: 10px 0 0; list-style: none; display: grid; gap: 8px; }
.booking-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(244, 239, 232, 0.42);
  border: 1px solid var(--stroke);
}
.booking-item.status-scheduled { border-left: 3.5px solid var(--accent); }
.booking-item.status-completed { border-left: 3.5px solid var(--brand); }
.booking-item.status-cancelled { opacity: .66; background: rgba(244, 239, 232, 0.22); }
.booking-item.status-cancelled .booking-name { text-decoration: line-through; text-decoration-color: rgba(102, 110, 102, 0.55); }

.booking-time {
  padding-right: 12px;
  border-right: 1px solid var(--stroke);
  font-family: var(--num-font);
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.booking-details { min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.booking-member {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.booking-name { font-size: .98rem; font-weight: 600; color: var(--ink); }
.booking-note { font-size: .84rem; color: var(--muted); }

/* Main Container */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 36px 96px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  gap: 14px;
  flex-wrap: wrap;
}
.page-head p { color: var(--muted); margin-top: .35rem; font-size: .9rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.annual-page-head { align-items: center; margin-bottom: 14px; }
.annual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 16px;
}
.annual-toolbar form { margin: 0; display: block; }
.annual-range-note {
  font-size: .85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 16px;
}

/* Refined Buttons */
.button, .icon-button, .text-button {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.15rem;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 550;
  font-size: .9rem;
  letter-spacing: .02em;
}
.button.compact, .text-button.compact {
  min-height: 36px;
  padding: 0 .85rem;
  font-size: .83rem;
}

.primary {
  background: var(--brand);
  color: #fcfaf6;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(39, 66, 52, 0.16);
}
.primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 48, 37, 0.22);
}

.secondary, .icon-button {
  color: var(--brand);
  background: var(--surface);
  border-color: var(--stroke-strong);
}
.secondary:hover, .icon-button:hover {
  background: var(--surface-subtle);
  border-color: #bfb3a0;
}

.soft-btn {
  color: var(--brand-deep);
  background: var(--soft);
  border-color: rgba(39, 66, 52, 0.14);
}
.soft-btn:hover { background: #dce6dd; }

.danger {
  color: var(--red);
  background: var(--red-bg);
  border-color: #ebd0cb;
}
.danger:hover { background: #f2dcd8; }

.text-button {
  background: transparent;
  color: var(--brand);
  padding-inline: .75rem;
}
.text-button:hover { background: rgba(39, 66, 52, 0.07); }
.text-button.danger-text { color: var(--red); }
.text-button.danger-text:hover { background: var(--red-bg); }

.icon-button { min-width: 40px; min-height: 40px; padding: 0; font-size: 1.25rem; }

.mobile-more { display: none; }
.desktop-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.desktop-only-btn { display: inline-flex; }

.lesson-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.lesson-summary-tile {
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}
.lesson-summary-tile span {
  display: block;
  font-size: .76rem;
  color: var(--muted);
}
.lesson-summary-tile strong {
  display: block;
  margin-top: 2px;
  font-family: var(--num-font);
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--brand-deep);
}

.panel.lesson-day { margin: 0; padding: 0; }
.lesson-day-summary {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 38px 14px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}
.lesson-day-summary::-webkit-details-marker { display: none; }
.lesson-day-summary::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 18px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.lesson-day[open] .lesson-day-summary::after { transform: rotate(225deg); }
.lesson-day-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.lesson-day-amount { color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.lesson-day-meta { color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.lesson-day-entries { padding: 0 12px 12px; }
.lesson-day-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

/* Lesson Quick Day Jump & List Controls */
.lesson-day-jump {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin: 0 -2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lesson-day-jump::-webkit-scrollbar { display: none; }
.lesson-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  font-size: .83rem;
  font-weight: 550;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.lesson-day-pill small {
  font-size: .72rem;
  font-weight: 450;
  color: var(--muted);
}
.lesson-day-pill:hover { border-color: var(--stroke-strong); background: #fffdf9; }
.lesson-day-pill[aria-current="date"] {
  border-color: rgba(156, 114, 72, 0.45);
  background: rgba(246, 235, 217, 0.55);
}
.lesson-day-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  box-shadow: 0 4px 12px rgba(39, 66, 52, 0.2);
}
.lesson-day-pill.active small { color: rgba(252, 250, 246, 0.8); }

.lesson-list-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lesson-tool-btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 550;
  white-space: nowrap;
}
.lesson-tool-btn:hover { background: var(--surface-subtle); border-color: var(--brand); }

/* Status Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 550;
  letter-spacing: .02em;
}
.pill::before {
  content: '';
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
}
.pill.green { background: var(--soft); color: var(--brand); }
.pill.amber { color: var(--amber-ink); background: var(--amber-bg); }
.pill.stopped { color: var(--red); background: var(--red-bg); }
.pill-btn {
  border: 1px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--brand);
}
.pill-btn:hover {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-deep);
}

/* Gallery Login Layout (Shared with Small-Group Booking) */
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  max-width: 1020px;
  margin: min(7vh, 64px) auto 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  background: #e5ddd0;
}
.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 36, 30, 0.04) 40%, rgba(25, 36, 30, 0.52) 100%);
  pointer-events: none;
}
.login-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.visual-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 1;
  color: #fcfaf6;
}
.visual-caption span {
  display: block;
  font-family: var(--num-font);
  font-size: .84rem;
  letter-spacing: .24em;
  font-weight: 500;
}
.visual-caption small {
  display: block;
  margin-top: 4px;
  color: rgba(252, 250, 246, 0.82);
  font-size: .78rem;
  letter-spacing: .08em;
}
.login-card {
  padding: clamp(32px, 5vw, 64px);
  align-content: center;
  background: var(--surface);
}
.login-card h1 { margin-bottom: 10px; font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.login-card form { margin-top: 24px; }
.login-card form button[type="submit"] { width: 100%; min-height: 46px; }
.login-card input { border-color: var(--stroke-strong); }

/* Forms & Inputs */
form { display: grid; gap: 14px; }
.field-group { display: grid; gap: 6px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 550;
  font-size: .88rem;
  color: var(--ink);
}
.field-label-hint {
  font-weight: 450;
  font-size: .76rem;
  color: var(--muted);
}
label { display: grid; gap: 6px; font-weight: 550; font-size: .88rem; color: var(--ink); }

/* Visual Booking Date Picker inside Dialog */
.editor-date-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(244, 239, 232, 0.45);
}
.editor-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.editor-date-current { display: grid; gap: 2px; min-width: 0; }
.editor-date-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.editor-date-main strong {
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.editor-date-current small { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.editor-date-nav { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.icon-button.compact-icon { min-width: 34px; min-height: 34px; font-size: 1.08rem; }
.editor-date-nav .button.compact { min-height: 34px; padding: 0 .72rem; font-size: .8rem; }
.editor-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.editor-week-strip button {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 7px 2px 6px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--muted);
}
.editor-week-strip button:hover { border-color: var(--stroke-strong); background: #fffdf9; }
.editor-week-strip button span { font-size: .72rem; line-height: 1.2; }
.editor-week-strip button strong {
  font-family: var(--num-font);
  font-size: 1.06rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.editor-week-strip button i {
  min-height: 13px;
  font-style: normal;
  font-size: .66rem;
  line-height: 1.1;
  color: var(--accent);
}
.editor-week-strip button[aria-current="date"] {
  background: rgba(156, 114, 72, 0.12);
  border-color: rgba(156, 114, 72, 0.28);
}
.editor-week-strip button[aria-current="date"] strong { color: var(--brand); font-weight: 600; }
.editor-week-strip button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: rgba(252, 250, 246, 0.85);
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.22);
}
.editor-week-strip button.active :is(strong, i) { color: #fcfaf6; }

/* Visual Booking Time Picker inside Dialog */
.editor-time-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(244, 239, 232, 0.45);
}
.editor-time-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.editor-time-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.editor-time-current strong {
  font-family: var(--num-font);
  font-size: 1.16rem;
  font-weight: 400;
  color: var(--pine);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.editor-time-current strong.is-placeholder {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: .92rem;
  color: var(--muted);
}
.time-custom-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface);
  color: var(--brand);
  font-size: .8rem;
  font-weight: 550;
  flex: 0 0 auto;
  transition: border-color .18s ease, background-color .18s ease;
}
.time-custom-pill:hover { border-color: var(--brand); background: #fffdf9; }
.time-custom-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(39, 66, 52, 0.12); }

.editor-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(228, 221, 209, 0.55);
}
.editor-period-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}
.editor-period-tabs button small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(156, 114, 72, 0.16);
  color: var(--amber-ink);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.editor-period-tabs button[aria-selected="true"] {
  border-color: rgba(228, 221, 209, 0.9);
  background: var(--surface);
  color: var(--brand-deep);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(31, 41, 35, 0.06);
}

.editor-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.editor-time-grid button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.editor-time-grid button:hover { border-color: var(--stroke-strong); background: #fffdf9; }
.editor-time-grid button strong {
  font-family: var(--num-font);
  font-size: .96rem;
  font-weight: 400;
  line-height: 1.15;
}
.editor-time-grid button i {
  min-height: 12px;
  font-style: normal;
  font-size: .66rem;
  line-height: 1.1;
  color: var(--accent);
}
.editor-time-grid button.is-booked {
  background: rgba(246, 235, 217, 0.45);
  border-color: rgba(156, 114, 72, 0.3);
}
.editor-time-grid button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.22);
}
.editor-time-grid button.active :is(strong, i) { color: #fcfaf6; }

/* Tactile Choice Cards inside Dialog (Package Kind / Payment Channel) */
.editor-choice-tray {
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(244, 239, 232, 0.52);
}
.editor-choice-grid {
  display: grid;
  gap: 6px;
}
.editor-choice-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-choice-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-choice-grid button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}
.editor-choice-grid button:hover {
  border-color: var(--stroke-strong);
  background: #fffdf9;
}
.editor-choice-grid button .choice-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.editor-choice-grid button strong {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.editor-choice-grid button small {
  font-size: .74rem;
  line-height: 1.2;
  color: var(--muted);
}
.choice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--accent);
}
.choice-dot.is-alipay { background: #1677ff; }
.choice-dot.is-wechat { background: #07c160; }
.choice-dot.is-douyin { background: #26292b; }
.choice-dot.is-none { background: var(--stroke-strong); }
.choice-dot.is-scheduled { background: var(--accent); }
.choice-dot.is-completed { background: var(--brand); }
.editor-choice-grid button.active .choice-dot.is-completed { background: #b8d8c2; }
.editor-choice-grid button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.2);
}
.editor-choice-grid button.active strong { color: #fcfaf6; }
.editor-choice-grid button.active small { color: rgba(252, 250, 246, 0.78); }
.editor-choice-grid button.active .choice-dot { box-shadow: 0 0 0 2px rgba(252, 250, 246, 0.32); }
.editor-choice-grid button.active .choice-dot.is-douyin { background: #f4efe8; }

label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .56rem .85rem;
  margin: 0;
  border-radius: 11px;
  border: 1px solid var(--stroke-strong);
  background: #fffdf9;
  color: var(--ink);
  font-size: .96rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(39, 66, 52, 0.12);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23274234' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 13px center / 14px 14px no-repeat,
    #fffdf9;
}
select:hover {
  border-color: var(--brand);
  background-color: #fff;
}
input[type="search"] {
  border-radius: 999px;
  padding-inline: 16px;
}

.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover { color: var(--brand); background: rgba(39, 66, 52, 0.06); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

/* Searchable Tappable Member Picker in Dialog */
.member-picker { display: grid; gap: 8px; }
.member-pick-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
}
.member-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fffdf9;
  color: var(--ink);
  text-align: left;
}
.member-pick-item:hover { border-color: var(--stroke-strong); background: var(--surface-subtle); }
.member-pick-item.selected {
  border-color: var(--brand);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--brand);
}
.member-pick-main { display: grid; gap: 1px; min-width: 0; }
.member-pick-name { font-weight: 600; font-size: .94rem; overflow-wrap: anywhere; }
.member-pick-sub { font-size: .76rem; color: var(--muted); }
.member-pick-item.is-zero { opacity: .68; }
.member-pick-empty { padding: 14px 8px; text-align: center; font-size: .86rem; color: var(--muted); }
.member-pick-toggle {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px dashed var(--stroke-strong);
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 550;
}
.member-pick-toggle:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--surface-subtle);
}
.selected-member-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid rgba(39, 66, 52, 0.16);
}
.selected-member-bar strong { color: var(--brand-deep); }

/* Mobile Action Sheet List */
.operation-list { display: grid; gap: 8px; }
.operation-list button {
  width: 100%;
  min-height: 46px;
  justify-content: flex-start;
  padding-inline: 18px;
  border-radius: 13px;
}

/* Account Credential Section inside Dialog */
.credential-section {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
}
.credential-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88rem;
  letter-spacing: .06em;
  background: var(--surface-subtle);
  resize: none;
}

/* Filter Bar & Month Stepper */
.filter-panel { padding: 16px 20px; }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 14px;
}
.filter-bar label { flex: 1 1 170px; }
.filter-bar .search-field { flex: 1.5 1 210px; }
.filter-bar-chips {
  display: grid;
  gap: 12px;
}
.filter-bar-chips .search-field { width: 100%; }
.filter-chip-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.filter-chip-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.filter-chip-label {
  font-size: .8rem;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.filter-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(244, 239, 232, 0.75);
  border: 1px solid var(--stroke);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--pine); background: rgba(252, 250, 246, 0.72); }
.filter-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  font-weight: 550;
  box-shadow: 0 3px 9px rgba(39, 66, 52, 0.18);
}
.filter-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 2 1 280px;
}

.month-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.year-stepper-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: #fffdf9;
  color: var(--pine);
  font-family: var(--num-font);
  font-size: .98rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.month-stepper .icon-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  font-size: 1.15rem;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 12px;
  font-size: .86rem;
  color: var(--muted);
}
.focus-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--brand-deep);
  font-size: .88rem;
}
.report-filter-banner {
  background: var(--amber-bg);
  color: var(--amber-ink);
  border: 1px solid rgba(156, 114, 72, 0.28);
}
.copy-preview { display: grid; gap: 8px; }
.copy-preview-summary strong { color: var(--brand-deep); }
.copy-conflict-box { display: grid; gap: 6px; }
.copy-conflict-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  font-size: .8rem;
}
.refund-detail-list { margin: 12px 0; }

/* Quick Chips inside Forms */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.chip-row.time-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-height: 156px;
  overflow-y: auto;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
}
.chip-row.time-chips .chip {
  width: 100%;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: var(--surface-subtle);
  color: var(--brand-deep);
  font-size: .83rem;
  font-weight: 550;
}
.chip:hover, .chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
}
.form-hint {
  font-size: .82rem;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 10px;
  padding: 9px 12px;
}
.form-hint.is-warn {
  color: var(--amber-ink);
  background: var(--amber-bg);
  border: 1px solid rgba(156, 114, 72, 0.28);
}
.lesson-booking-box { display: grid; }
.lesson-booking-card { display: grid; gap: 8px; }
.booking-link-options { display: grid; gap: 6px; }
.booking-link-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(252, 250, 246, 0.72);
  border: 1px solid rgba(156, 114, 72, 0.22);
  font-size: .84rem;
  font-weight: 550;
  color: var(--ink);
  cursor: pointer;
}
.booking-link-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
.refund-preview { display: grid; }
.refund-preview-card { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.refund-preview-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.refund-preview-card strong { color: var(--ink); font-weight: 600; }

/* Metrics Dashboard & Channel Breakdown */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.metric.highlight {
  background: linear-gradient(150deg, #f3ece0 0%, #fcfaf6 100%);
  border-color: var(--stroke-strong);
}
@media (min-width: 821px) {
  .metrics:has(> .metric:nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics:has(> .metric:nth-child(5):last-child) .metric.highlight { grid-column: span 2; }
  .metrics:has(> .metric:nth-child(7):last-child) .metric.highlight { grid-column: span 2; }
  .metrics:has(> .metric:nth-child(9):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.metrics.annual-credit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.annual-reconciliation-table {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.annual-reconciliation-table th,
.annual-reconciliation-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--stroke);
  text-align: right;
}
.annual-reconciliation-table th:first-child { text-align: left; }
.annual-reconciliation-table td span { display: block; font-size: .84rem; color: var(--muted); }
.annual-reconciliation-table tbody tr:last-child { background: var(--surface-subtle); }
.annual-reconciliation > .muted { margin-bottom: 8px; }
.annual-reconciliation > details { border-top: 1px solid var(--stroke); }
.metric span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}
.metric.is-clickable {
  text-align: left;
  width: 100%;
}
.metric.is-clickable:hover {
  border-color: var(--brand);
  background: #fffdf9;
  transform: translateY(-1px);
}
.metric.is-filtered {
  border-color: var(--brand);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm);
}
.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}
.metric-head small {
  font-size: .72rem;
  color: var(--accent);
  font-weight: 550;
}
.metric.is-filtered .metric-head small { color: var(--brand-deep); }
.metric strong {
  margin-top: 8px;
  color: var(--brand-deep);
  font-family: var(--num-font);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.15;
  font-variant-numeric: lining-nums tabular-nums;
  overflow-wrap: anywhere;
}
.report-filter-panel { margin-bottom: 12px; }

/* Renewal Follow-up Strip on Directory Page */
.renewal-strip {
  margin-bottom: 14px;
}
.renewal-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--pine);
}
.renewal-strip-head small { font-weight: 400; font-size: .78rem; color: var(--muted); }
.renewal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.renewal-tile {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.renewal-tile:hover { border-color: var(--stroke-strong); background: #fffdf9; }
.renewal-tile-title { font-size: .82rem; font-weight: 600; color: var(--ink); }
.renewal-tile strong {
  font-family: var(--num-font);
  font-size: 1.22rem;
  font-weight: 400;
  color: var(--brand-deep);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.renewal-tile strong small { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: .74rem; color: var(--muted); }
.renewal-tile-sub { font-size: .73rem; color: var(--muted); }
.renewal-tile.active {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.2);
}
.renewal-tile.active :is(.renewal-tile-title, strong) { color: #fcfaf6; }
.renewal-tile.active :is(strong small, .renewal-tile-sub) { color: rgba(252, 250, 246, 0.78); }

.channel-panel { padding: 16px 20px; }
.channel-panel h2 {
  font-size: .92rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.channel-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--stroke);
  font-variant-numeric: tabular-nums;
}
.channel-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: .82rem;
  color: var(--muted);
}
.channel-item strong {
  display: block;
  margin-top: 4px;
  font-family: var(--num-font);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--brand-deep);
}

/* Responsive Record / Member / Package / Month Cards */
.card-list { display: grid; gap: 10px; }

.entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.entry-card:hover { border-color: var(--stroke-strong); }
.entry-card.is-void { opacity: .72; background: rgba(252, 250, 246, 0.65); }

.entry-main { min-width: 0; display: grid; gap: 5px; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.entry-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.entry-date {
  font-size: .84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.entry-note {
  font-size: .85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.entry-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}
.entry-figures {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry-credits {
  display: block;
  font-family: var(--num-font);
  font-size: 1.15rem;
  color: var(--pine);
  line-height: 1.2;
}
.entry-credits.neg { color: var(--brand-deep); }
.entry-credits.pos { color: var(--accent); }
.entry-amount {
  display: block;
  margin-top: 2px;
  font-size: .84rem;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Member Directory Rows */
.directory-panel { padding: 6px 22px; }
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--stroke);
}
.member-row:last-child { border-bottom: 0; }
.member-info { min-width: 0; display: grid; gap: 4px; }
.member-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.member-meta { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Member Package Group Panel */
.member-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
}
.member-group-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.member-group-title h2 {
  font-family: var(--display-font);
  font-size: 1.24rem;
  font-weight: 500;
}

.package-list { display: grid; gap: 10px; }
.package-disclosure > summary { border: 1px solid var(--stroke); color: var(--brand-deep); }
.package-disclosure[open] > .package-list { margin-top: 10px; }
.package-collapse-label,
.package-disclosure[open] .package-expand-label { display: none; }
.package-disclosure[open] .package-collapse-label { display: inline; }
.package-card {
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(244, 239, 232, 0.45);
  border: 1px solid var(--stroke);
  display: grid;
  gap: 10px;
}
.package-card.finished { opacity: .76; background: rgba(244, 239, 232, 0.22); }
.package-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.package-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}
.package-credits-big {
  font-family: var(--num-font);
  font-size: 1.15rem;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}
.package-credits-big small {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: .8rem;
  color: var(--muted);
}
.package-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  font-variant-numeric: tabular-nums;
}
.package-meta-item span {
  display: block;
  font-size: .76rem;
  color: var(--muted);
}
.package-meta-item strong {
  display: block;
  margin-top: 2px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.meta-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: rgba(39, 66, 52, 0.35);
  text-underline-offset: 3px;
}
.meta-link-btn:hover {
  color: var(--brand-deep);
  text-decoration-color: var(--brand-deep);
}
.package-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--stroke);
}

/* Annual Monthly Breakdown Cards */
.month-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.month-badge {
  font-family: var(--num-font);
  font-size: 1.35rem;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}
.month-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  font-variant-numeric: tabular-nums;
}
.month-stat span { display: block; font-size: .76rem; color: var(--muted); }
.month-stat strong { display: block; margin-top: 2px; font-size: .92rem; font-weight: 600; }

/* Empty State */
.empty {
  text-align: center;
  padding: 44px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--stroke-strong);
  background: rgba(252, 250, 246, 0.55);
}
.empty h3 { font-family: var(--display-font); font-weight: 500; font-size: 1.12rem; letter-spacing: .03em; }
.empty p { color: var(--muted); margin-top: 6px; font-size: .9rem; }
.empty .button { margin-top: 14px; }

/* Dialog with Motion & Mobile Bottom Sheet */
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sheet-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.dialog {
  width: min(500px, calc(100% - 28px));
  max-height: min(88vh, 820px);
  max-height: min(88dvh, 820px);
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overscroll-behavior: contain;
}
.filter-search-row { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.filter-search-row .search-field { flex: 1 1 auto; min-width: 0; }
.filter-toggle-btn { display: none; flex: 0 0 auto; min-height: 44px; }
.filter-toggle-btn.has-active { border-color: var(--brand); background: var(--soft); color: var(--brand-deep); }
.member-name-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.member-name-chevron {
  font-size: 1.08em;
  line-height: 1;
  color: var(--muted);
  font-weight: 400;
}
.member-name-btn:hover,
.member-name-btn:hover .member-name-chevron { color: var(--brand); }
.month-card.is-future { opacity: .62; }
.future-months-toggle { display: flex; justify-content: center; margin-top: 12px; }
.dialog[open] { animation: dialog-in .22s cubic-bezier(.16, 1, .3, 1); }
.dialog::backdrop {
  background: rgba(20, 31, 25, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dialog-body { padding: 22px 24px 24px; }
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dialog-head h2 {
  font-family: var(--display-font);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.dialog-error {
  color: var(--red);
  background: var(--red-bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: .88rem;
}
.dialog-context {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  font-size: .88rem;
  color: var(--ink);
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* Custom Studio Calendar & Month Picker */
.cal-dialog {
  width: min(356px, calc(100% - 28px));
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cal-dialog[open] { animation: dialog-in .2s cubic-bezier(.16, 1, .3, 1); }
.cal-dialog::backdrop {
  background: rgba(20, 31, 25, 0.32);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.cal-body {
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-title {
  min-width: 84px;
  text-align: center;
  font-family: var(--display-font);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.cal-title-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-family: var(--display-font);
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cal-title-btn:hover { background: var(--surface-subtle); border-color: var(--stroke); }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-size: .74rem;
  font-weight: 550;
  color: var(--muted);
  padding-bottom: 2px;
}
.cal-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-day-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 42px;
  padding: 4px 0 3px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cal-day-cell span {
  font-family: var(--num-font);
  font-size: 1rem;
  line-height: 1.15;
}
.cal-day-cell i {
  min-height: 11px;
  font-style: normal;
  font-size: .62rem;
  line-height: 1;
  color: var(--accent);
}
.cal-day-cell:hover { background: var(--surface-subtle); border-color: var(--stroke); }
.cal-day-cell.is-outside { opacity: .34; }
.cal-day-cell.is-today {
  background: rgba(156, 114, 72, 0.13);
  border-color: rgba(156, 114, 72, 0.3);
}
.cal-day-cell.is-today span { color: var(--brand-deep); font-weight: 600; }
.cal-day-cell.is-selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  opacity: 1;
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.24);
}
.cal-day-cell.is-selected :is(span, i) { color: #fcfaf6; }

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.cal-month-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 8px 6px;
  border-radius: 13px;
  border: 1px solid var(--stroke);
  background: #fffdf9;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cal-month-cell strong {
  font-family: var(--num-font);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.2;
}
.cal-month-cell i {
  min-height: 12px;
  font-style: normal;
  font-size: .68rem;
  line-height: 1;
  color: var(--accent);
}
.cal-month-cell:hover { border-color: var(--stroke-strong); background: var(--surface-subtle); }
.cal-month-cell.is-current {
  background: rgba(156, 114, 72, 0.12);
  border-color: rgba(156, 114, 72, 0.34);
}
.cal-month-cell.is-current strong { color: var(--brand-deep); font-weight: 600; }
.cal-month-cell.is-selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf6;
  box-shadow: 0 5px 14px rgba(39, 66, 52, 0.22);
}
.cal-month-cell.is-selected :is(strong, i) { color: #fcfaf6; }

.cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
}
.cal-quick-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Floating Back-to-Top Button */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  background: rgba(252, 250, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--brand-deep);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.back-to-top svg { width: 15px; height: 15px; flex: 0 0 auto; }
.back-to-top:hover {
  border-color: var(--brand);
  background: #fff;
  transform: translateY(-2px);
}

/* Floating Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 35;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: rgba(27, 48, 37, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fcfaf6;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: 0 10px 28px rgba(20, 31, 25, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(0.96);
  transition: opacity .22s ease, transform .24s cubic-bezier(.16, 1, .3, 1);
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.toast.error { background: rgba(142, 53, 49, 0.95); }

/* Tablet */
@media (max-width: 820px) {
  .bar-inner { padding-inline: 20px; gap: 18px; }
  .wrap { padding: 24px 20px 84px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics:has(> .metric:nth-child(odd):last-child) .metric.highlight { grid-column: 1 / -1; }
  .month-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile-First Primary Experience */
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px; }
  .filter-toggle-btn { display: inline-flex; }
  .filter-bar-chips .filter-chip-groups { display: none; }
  .filter-bar-chips .filter-chip-groups.is-open { display: flex; }
  .bar-inner {
    min-height: 56px;
    padding: 0 16px;
    justify-content: space-between;
    gap: 10px;
  }
  .brand { font-size: 1.06rem; gap: .55rem; }
  .brand-mark { width: 30px; height: 30px; }
  .topbar .desktop-nav { display: none; }
  .profile .text-button { min-height: 34px; padding-inline: .55rem; font-size: .85rem; }

  .desktop-actions { display: none; }
  .desktop-only-btn { display: none; }
  .mobile-more { display: inline-flex; }
  .lesson-summary-strip { gap: 6px; }
  .lesson-summary-tile { padding: 9px 10px; }
  .lesson-summary-tile strong { font-size: 1rem; }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    justify-content: space-around;
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(252, 250, 246, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(228, 221, 209, 0.92);
    box-shadow: 0 -6px 24px rgba(31, 41, 35, 0.06);
  }
  .bottom-nav button {
    display: inline-flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 4px 1px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.2;
  }
  .booking-calendar { padding: 14px 12px; }
  .week-strip { gap: 3px; }
  .week-strip button { padding: 8px 1px; border-radius: 11px; }
  .week-strip button strong { font-size: 1.08rem; }
  .booking-day { padding: 12px 13px; }
  .booking-day.is-empty { padding: 10px 13px; }
  .booking-item { grid-template-columns: 58px minmax(0, 1fr); gap: 8px 10px; padding: 11px 12px; }
  .booking-time { grid-row: span 2; padding-right: 10px; font-size: 1.08rem; }
  .booking-item .row-actions { grid-column: 2; justify-content: flex-start; }
  .bottom-nav button[aria-current="page"] { color: var(--brand-deep); font-weight: 600; }
  .bottom-nav .nav-icon { display: inline-flex; width: 20px; height: 20px; }
  .bottom-nav .nav-icon svg { width: 20px; height: 20px; }

  .wrap { padding: 18px 14px 40px; }
  body.has-bottom-nav .wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .back-to-top { right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); min-height: 38px; padding: 0 12px; }

  .page-head { align-items: center; margin-bottom: 16px; gap: 10px; }
  .annual-page-head { margin-bottom: 12px; }
  .annual-toolbar { gap: 8px 10px; margin-bottom: 14px; }
  .annual-toolbar .month-stepper { gap: 5px; }
  .annual-toolbar .month-stepper .icon-button { flex: 0 0 36px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
  .annual-toolbar .year-stepper-value { min-width: 78px; min-height: 36px; padding: 0 12px; font-size: .92rem; }
  .annual-toolbar .month-pill { min-width: 120px; min-height: 36px; padding: 0 12px; font-size: .88rem; }
  .panel { padding: 14px 16px; border-radius: 15px; }
  .directory-panel { padding: 4px 16px; }
  .filter-panel { padding: 14px; }
  .filter-chip-group { display: grid; gap: 5px; width: 100%; min-width: 0; }
  .filter-chip-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    border-radius: 999px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-chip-row::-webkit-scrollbar { display: none; }

  .month-filter-group { width: 100%; }
  .month-filter-group .month-stepper { width: 100%; }
  .month-filter-group .month-pill { flex: 1; }
  .month-pill { min-width: 132px; }

  /* Entry card stacks cleanly on phone */
  .entry-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }
  .entry-aside {
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--stroke);
  }
  .entry-figures { text-align: left; }

  /* Member row stacks cleanly on phone */
  .member-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 0;
  }
  .member-row .row-actions { justify-content: flex-start; }

  /* Package meta grid 2x2 on phone */
  .package-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Month card on phone */
  .month-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }
  .month-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .month-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Metrics compact 2-col */
  .metrics { gap: 10px; }
  .metric { min-height: 92px; padding: 13px 14px; }
  .metric strong { font-size: 1.32rem; }

  /* Gallery Login Mobile */
  .login-layout {
    grid-template-columns: 1fr;
    margin: 4px auto 0;
    border-radius: 18px;
  }
  .login-card { order: -1; padding: 28px 22px 30px; }
  .login-visual { min-height: 0; aspect-ratio: 1.6; }
  .visual-caption { left: 18px; bottom: 16px; }

  /* Mobile Bottom Sheet Dialog */
  .dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    max-height: 88dvh;
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .dialog[open] {
    display: flex;
    flex-direction: column;
    animation: sheet-up .26s cubic-bezier(.16, 1, .3, 1);
  }
  .dialog-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 10px 18px calc(16px + env(safe-area-inset-bottom));
  }
  .dialog-body::before {
    content: '';
    display: block;
    flex: 0 0 auto;
    width: 38px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: var(--stroke-strong);
  }
  .dialog-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--surface);
    padding: 4px 0 10px;
    margin: 0 0 12px;
    border-bottom: 1px solid rgba(228, 221, 209, 0.72);
  }
  .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    background: linear-gradient(180deg, rgba(252, 250, 246, 0.86) 0%, var(--surface) 24%);
    padding: 12px 0 2px;
    margin-top: 8px;
  }
  .dialog-actions.has-continue { grid-template-columns: 1fr 1fr; }
  .dialog-actions.has-continue button[data-action="close"] { grid-column: 1 / -1; min-height: 38px; }
  .dialog-actions button { width: 100%; min-height: 46px; }

  .cal-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cal-dialog[open] { animation: sheet-up .24s cubic-bezier(.16, 1, .3, 1); }
  .cal-body { padding: 10px 16px 18px; }
  .cal-body::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 2px;
    border-radius: 999px;
    background: var(--stroke-strong);
  }
  .cal-day-cell { min-height: 44px; }
  .cal-month-cell { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
