:root {
  --bg: #e8eef7;
  --bg-accent: linear-gradient(145deg, #e8eef7 0%, #dce6f2 45%, #ebe6f6 100%);
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #c5d1e3;
  --text: #1a2740;
  --muted: #5a6882;
  --accent: #2f4f7a;
  --accent-deep: #243d63;
  --accent-mid: #4a6fa5;
  --accent-soft: #e4ebf7;
  --highlight: #4a60a9;
  --highlight-deep: #3d4f8f;
  --highlight-soft: #e4eaf7;
  --sun: #b8475a;
  --sun-bg: #faf0f3;
  --sat: #3d6ea8;
  --sat-bg: #eaf1fa;
  --cal-bg: #b8c8de;
  --cal-border: #a8bcd4;
  --cal-header: linear-gradient(180deg, #2f4f7a 0%, #243d63 100%);
  --cal-header-sun: #f0b8c0;
  --cal-header-sat: #a8c8f0;
  --today-bg: linear-gradient(165deg, #e8dff8 0%, #f4effc 42%, #ebe3f9 100%);
  --today-border: #4a60a9;
  --today-border-hover: #3f528f;
  --today-glow: rgba(74, 96, 169, 0.22);
  --today-glow-strong: rgba(74, 96, 169, 0.28);
  --shadow: 0 10px 30px rgba(26, 39, 63, 0.08);
  --shadow-sm: 0 2px 8px rgba(26, 39, 63, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Nanum Gothic", sans-serif;
  --font-extrabold: "Nanum Gothic", sans-serif;
  --font-schedule: "Gmarket Sans", "Nanum Gothic", sans-serif;
  --font-schedule-weight: 500;
  --font-sidebar: "Nanum Gothic", sans-serif;
  --font-sidebar-weight: 700;
  --font-sidebar-weight-emphasis: 800;
  --hour-unit: 34px;
  --hour-unit-modal: 34px;
  --scrollbar-size: 7px;
  --scrollbar-size-compact: 5px;
  --scrollbar-track: rgba(47, 79, 122, 0.07);
  --scrollbar-thumb: rgba(74, 111, 165, 0.42);
  --scrollbar-thumb-hover: rgba(47, 79, 122, 0.62);
  --scrollbar-thumb-active: rgba(36, 61, 99, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── 스크롤바: 모달·모바일 목록만 얇게 표시. 캘린더 칸·사이드바는 숨김 ── */
.day-modal-body,
.mobile-agenda {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.day-modal-body::-webkit-scrollbar,
.mobile-agenda::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

.day-modal-body::-webkit-scrollbar-track,
.mobile-agenda::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
  margin: 3px;
}

.day-modal-body::-webkit-scrollbar-thumb,
.mobile-agenda::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
  border-radius: 999px;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.day-modal-body::-webkit-scrollbar-thumb:hover,
.mobile-agenda::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover) 0%, var(--accent-deep) 100%);
}

.day-modal-body::-webkit-scrollbar-thumb:active,
.mobile-agenda::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--scrollbar-thumb-active) 0%, var(--accent-deep) 100%);
}

.day-modal-body::-webkit-scrollbar-corner,
.mobile-agenda::-webkit-scrollbar-corner {
  background: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .day-modal-body::-webkit-scrollbar-thumb,
  .mobile-agenda::-webkit-scrollbar-thumb {
    transition: background 0.18s ease;
  }
}

/* 캘린더 페이지: 페이지·사이드바·일정 칸 스크롤바 완전 숨김 (스크롤은 유지) */
html.display-timeline,
html.display-timeline body,
html.display-timeline .sidebar,
html.display-timeline .calendar-column,
html.display-timeline #calendar,
html.display-timeline #calendar .day-cell,
html.display-timeline #calendar .day-parts,
html.display-timeline #calendar .day-part,
html.display-timeline #calendar .slot-list,
html.display-timeline .highlights,
html.display-timeline .highlight-list,
.sidebar,
#calendar,
#calendar .day-cell,
#calendar .slot-list {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html.display-timeline::-webkit-scrollbar,
html.display-timeline body::-webkit-scrollbar,
html.display-timeline .sidebar::-webkit-scrollbar,
html.display-timeline .calendar-column::-webkit-scrollbar,
html.display-timeline #calendar::-webkit-scrollbar,
html.display-timeline #calendar *::-webkit-scrollbar,
html.display-timeline .highlights::-webkit-scrollbar,
html.display-timeline .highlight-list::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.sidebar *::-webkit-scrollbar,
#calendar::-webkit-scrollbar,
#calendar *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html {
  height: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 10px 14px;
  overflow: hidden;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.mode-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
}

.mode-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.mode-label.active {
  color: var(--text);
}

.mode-control--compact {
  padding: 0;
  gap: 6px;
  background: transparent;
  border: none;
}

.mode-control--compact .toggle-track {
  width: 34px;
  height: 20px;
}

.mode-control--compact .toggle-track::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
}

.mode-control--compact .toggle-switch input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.mode-control--compact .auth-role-badge {
  font-size: 0.68rem;
  padding: 4px 8px;
}

.mode-control--compact .mode-status {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.mode-control--compact .mode-status--streamer {
  color: var(--highlight);
}

.auth-login-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.auth-login-input {
  width: 108px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  background: #fff;
  color: var(--text);
}

.auth-login-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--highlight) 45%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--highlight) 16%, transparent);
}

.auth-login-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-auth .auth-login-form .btn-sm {
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: #fff;
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.beta-badge.hidden {
  display: none;
}

html.is-beta .page-title {
  display: inline-flex;
  align-items: center;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c8d0dc;
  position: relative;
  transition: background 0.2s;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--accent) 0%, var(--highlight) 100%);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.76rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-google {
  background: #fff;
  color: #333;
  border-color: #dadce0;
  box-shadow: var(--shadow-sm);
}

.btn-google:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.header--sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.header--sidebar .header-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.calendar-edit-mode-wrap {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 28%, #fff);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.calendar-edit-mode-wrap.hidden {
  display: none;
}

.calendar-mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.calendar-mode-btn:hover {
  color: var(--text);
}

.calendar-mode-btn.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 10%, transparent);
}

.header-title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.musicbook-promo-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-decoration: none;
  color: #1b4332;
  border-top: 3px solid #2d6a4f;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #d8f0e4 75%, var(--surface)) 0%,
    var(--surface) 100%
  );
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.links-promo-panel {
  display: none;
}

.calendar-subscribe-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  text-align: left;
  text-decoration: none;
  color: #2c3f75;
  font: inherit;
  cursor: pointer;
  border-top: 3px solid var(--brand, #4a60a9);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand, #4a60a9) 14%, var(--surface)) 0%,
    var(--surface) 100%
  );
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.calendar-subscribe-panel:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm), 0 4px 14px color-mix(in srgb, var(--brand, #4a60a9) 18%, transparent);
  border-top-color: color-mix(in srgb, var(--brand, #4a60a9) 85%, #000);
}

.calendar-subscribe-panel:active {
  transform: translateY(0);
}

.calendar-subscribe-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand, #4a60a9) 14%, #fff);
  color: var(--brand, #4a60a9);
}

.calendar-subscribe-icon svg {
  width: 20px;
  height: 20px;
}

.calendar-subscribe-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.calendar-subscribe-title {
  font-family: var(--font-sidebar, inherit);
  font-size: 0.95rem;
  font-weight: var(--font-sidebar-weight, 700);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.calendar-subscribe-desc {
  font-family: var(--font-sidebar, inherit);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  color: color-mix(in srgb, #2c3f75 72%, var(--muted));
}

/* 컨텐츠 메모 — /test 미리보기용 */
.content-memo-panel {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  border-top: 3px solid color-mix(in srgb, var(--brand, #4a60a9) 55%, #8a93a5);
  background: var(--surface, #fff);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.content-memo-panel:not(.hidden) {
  display: flex;
}

.content-memo-panel:hover {
  background: color-mix(in srgb, var(--brand, #4a60a9) 5%, #fff);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.content-memo-panel:active {
  transform: translateY(0);
}

.content-memo-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand, #4a60a9) 10%, #fff);
  color: color-mix(in srgb, var(--brand, #4a60a9) 75%, #5b6578);
}

.content-memo-icon svg {
  width: 18px;
  height: 18px;
}

.content-memo-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.content-memo-title {
  font-family: var(--font-sidebar, inherit);
  font-size: 0.95rem;
  font-weight: var(--font-sidebar-weight, 700);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.content-memo-desc {
  font-family: var(--font-sidebar, inherit);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-memo-desc.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.content-memo-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 20px 16px;
}

.content-memo-modal.hidden {
  display: none;
}

.content-memo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 32, 48, 0.4);
}

.content-memo-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(600px, 100%);
  max-height: min(86vh, 720px);
  padding: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border) 85%, #fff);
  box-shadow:
    0 4px 6px rgba(20, 28, 45, 0.04),
    0 18px 48px rgba(20, 28, 45, 0.16);
  overflow: hidden;
  animation: content-memo-in 0.18s ease-out;
}

@keyframes content-memo-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.content-memo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px 16px;
  background: #fff;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  flex-shrink: 0;
}

.content-memo-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.content-memo-header-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--brand, #4a60a9) 12%, #f4f6fa);
  color: color-mix(in srgb, var(--brand, #4a60a9) 80%, #3d4a63);
}

.content-memo-header-icon svg {
  width: 18px;
  height: 18px;
}

.content-memo-header-text {
  min-width: 0;
}

.content-memo-header h2 {
  margin: 0;
  font-family: var(--font-sidebar, inherit);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--accent-deep, #1a2233);
  line-height: 1.25;
}

.content-memo-header-sub {
  margin: 2px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}

.content-memo-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.content-memo-close svg {
  width: 16px;
  height: 16px;
}

.content-memo-close:hover {
  background: color-mix(in srgb, var(--border) 55%, #fff);
  color: var(--text);
}

.content-memo-editor {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fbfcfe;
}


.content-memo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  background: #fff;
  flex-shrink: 0;
}

/* display:flex 가 [hidden] 의 display:none 을 덮어쓰지 않도록 */
.content-memo-toolbar[hidden] {
  display: none !important;
}

.content-memo-modal.is-readonly .content-memo-toolbar {
  display: none !important;
}

.content-memo-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.content-memo-tool-sep {
  width: 1px;
  height: 1.35rem;
  margin: 0 4px;
  background: color-mix(in srgb, var(--border) 85%, transparent);
  flex-shrink: 0;
}

.content-memo-tool-sep:has(+ .content-memo-colors) {
  display: none;
}

.content-memo-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 2rem;
  height: 2rem;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.content-memo-tool-icon {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
}

.content-memo-tool-svg {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.content-memo-tool-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.content-memo-tool-label {
  font-size: 0.74rem;
  font-weight: 650;
}

.content-memo-tool:hover {
  background: color-mix(in srgb, var(--brand, #4a60a9) 6%, #fff);
  border-color: color-mix(in srgb, var(--brand, #4a60a9) 28%, var(--border));
}

.content-memo-tool--bold .content-memo-tool-icon {
  font-weight: 800;
}

.content-memo-tool--unbold .content-memo-tool-icon--unbold {
  font-weight: 500;
}

.content-memo-tool--unbold:hover {
  background: color-mix(in srgb, #c0392b 6%, #fff);
  border-color: color-mix(in srgb, #c0392b 28%, var(--border));
  color: #8a2f24;
}



.content-memo-colors {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.content-memo-color {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 999px;
  background: var(--swatch, #1a2233);
  cursor: pointer;
}

.content-memo-color:hover {
  transform: scale(1.08);
}

.content-memo-color--custom {
  position: relative;
  overflow: hidden;
  background:
    conic-gradient(from 90deg, #c0392b, #e67e22, #2d8f6f, #4a60a9, #c0392b);
}

.content-memo-color--custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}

.content-memo-body-editor {
  flex: 1 1 auto;
  min-height: 240px;
  overflow: auto;
  padding: 14px 20px 18px;
  outline: none;
  font-family: "Nanum Gothic", var(--font-sidebar, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.65;
  color: #1a2233;
  word-break: break-word;
}

.content-memo-body-editor:focus {
  background: #fff;
}

.content-memo-body-editor.is-readonly {
  color: #1a2233;
  cursor: default;
}

.content-memo-body-editor:empty:before {
  content: attr(data-placeholder);
  color: color-mix(in srgb, var(--muted) 85%, #fff);
  pointer-events: none;
}

.content-memo-sr-only,
.content-memo-tool-select .sr-only,
.content-memo-color--custom .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.content-memo-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: #fff;
  flex-shrink: 0;
}

.content-memo-count {
  margin-right: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.content-memo-status {
  font-size: 0.72rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--brand, #4a60a9) 55%, var(--muted));
}

.content-memo-status.is-error {
  color: #c0392b;
}

body.theme-birthday > .content-memo-modal {
  position: fixed;
  z-index: 260;
}

.musicbook-promo-panel:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm), 0 4px 14px rgba(45, 106, 79, 0.12);
  border-top-color: #1b4332;
}

.musicbook-promo-panel:active {
  transform: translateY(0);
}

.musicbook-promo-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, #2d6a4f 14%, #fff);
  color: #2d6a4f;
}

.musicbook-promo-icon svg {
  width: 20px;
  height: 20px;
}

.musicbook-promo-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.musicbook-promo-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #2d6a4f;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, #2d6a4f 12%, #fff);
  border: 1px solid color-mix(in srgb, #2d6a4f 22%, transparent);
}

.musicbook-promo-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #1b4332;
}

.musicbook-promo-desc {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: color-mix(in srgb, #1b4332 62%, var(--muted));
}

.site-nav--sidebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.72rem;
  color: #8a96a8;
  margin-bottom: 4px;
}

.site-nav--sidebar .site-nav-link {
  color: var(--brand-deep, #3a4f8a);
  text-decoration: none;
  font-weight: 700;
}

.site-nav--sidebar .site-nav-link:hover {
  text-decoration: underline;
}

.site-nav--sidebar .site-nav-sep {
  opacity: 0.45;
}

.site-nav--sidebar .site-nav-current {
  font-weight: 700;
  color: #5a6a84;
}

.header--sidebar .page-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.2;
}

.header--sidebar .calendar-page-nav {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}

.header--sidebar .calendar-page-nav .page-title {
  flex: 0 1 auto;
  height: auto;
  line-height: 1.2;
}

.header--sidebar .header-top-row .header-auth {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: 0;
  padding-top: 0;
}

.header--sidebar .header-auth .mode-control--auth {
  align-items: center;
}

.header--sidebar .header-auth .auth-login-btn {
  height: 24px;
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.header--sidebar .header-auth .auth-login-btn:hover {
  transform: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.auth-user-menu {
  position: relative;
}

.auth-user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.auth-user-trigger:hover {
  transform: scale(1.04);
}

.auth-user-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--highlight) 55%, transparent);
  outline-offset: 2px;
}

.auth-user-avatar-wrap {
  position: relative;
  display: inline-flex;
}

.auth-user-avatar {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 85%, transparent);
}

.auth-user-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--highlight) 100%);
}

.auth-user-streamer-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #43a047;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, #43a047 35%, transparent);
}

.auth-user-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  min-width: 196px;
  padding: 0;
  border-radius: 14px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border) 90%, #fff);
  box-shadow:
    0 4px 6px -2px rgba(20, 28, 45, 0.06),
    0 16px 32px -8px rgba(20, 28, 45, 0.16);
  overflow: hidden;
}

.auth-user-popover::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3f9 100%);
  border-top: 1px solid color-mix(in srgb, var(--border) 90%, #fff);
  border-left: 1px solid color-mix(in srgb, var(--border) 90%, #fff);
  transform: rotate(45deg);
}

.auth-user-popover.hidden {
  display: none;
}

.auth-user-popover-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3f9 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.auth-user-popover-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(20, 28, 45, 0.1);
}

.auth-user-popover-avatar.auth-user-avatar--fallback {
  font-size: 0.72rem;
}

.auth-user-popover-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.auth-user-popover-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.auth-user-popover-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-deep, #243a6e);
  line-height: 1.2;
  word-break: break-all;
  letter-spacing: -0.02em;
}

.auth-user-popover-name-row .auth-role-badge {
  font-size: 0.6rem;
  padding: 3px 8px;
  font-weight: 700;
  flex-shrink: 0;
}

.auth-user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-user-menu-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.72;
}

.auth-user-menu-item:hover {
  background: #f4f6fa;
}

.auth-user-menu-item--logout {
  color: #5c6578;
}

.auth-user-menu-item--logout:hover {
  background: #fff5f5;
  color: #c62828;
}

.auth-user-menu-item--logout:hover .auth-user-menu-icon {
  opacity: 1;
}

.auth-dev-perm-panel {
  margin: 4px 0 2px;
  padding: 10px 12px 8px;
  border-top: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 80%, transparent);
}

.auth-dev-perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.auth-dev-perm-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #3d4658;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-dev-perm-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c5cbf;
  flex-shrink: 0;
}

.auth-dev-perm-lead {
  margin: 0 0 8px;
  font-size: 0.66rem;
  line-height: 1.35;
  color: #7a8496;
}

.auth-dev-perm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.72rem;
  color: #3d4658;
  cursor: pointer;
  user-select: none;
}

.auth-dev-perm-row--locked {
  cursor: default;
  opacity: 0.72;
}

.auth-dev-perm-row input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.auth-dev-perm-label {
  line-height: 1.25;
  font-weight: 600;
}

.auth-dev-perm-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.auth-dev-perm-subtitle {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.auth-dev-perm-locked {
  font-size: 0.62rem;
  color: #8b95a8;
}

.auth-dev-perm-reset {
  flex-shrink: 0;
  padding: 2px 6px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 0.64rem;
  font-weight: 600;
  color: #7c5cbf;
  cursor: pointer;
}

.auth-dev-perm-reset:hover:not(:disabled) {
  background: color-mix(in srgb, #7c5cbf 10%, transparent);
}

.auth-dev-perm-reset:disabled {
  opacity: 0.4;
  cursor: default;
}

.header--sidebar .header-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

.header--sidebar .header-month .month-title {
  min-width: 0;
  flex: 1;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.header--sidebar .header-month .nav-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

/* 일정 사이드바 — 월·구독 사이 라이브 패널 */
.calendar-live-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 12px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, #43a047 55%, var(--border));
  border-top: 3px solid #43a047;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #e8f5e9 70%, var(--surface)) 0%,
      var(--surface) 42%
    );
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, #43a047 10%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.calendar-live-panel.hidden {
  display: none;
}

.calendar-live-panel:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, #2e7d32 70%, var(--border));
  border-top-color: #2e7d32;
  box-shadow: var(--shadow-sm), 0 8px 22px color-mix(in srgb, #43a047 18%, transparent);
}

.calendar-live-panel:active {
  transform: translateY(0);
}

.calendar-live-panel__media {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  /* absolute 자식만 있어도 16:9 높이 유지 (iPad Safari aspect-ratio 붕괴 대비) */
  height: 0;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 35%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #43a047 12%, transparent);
}

.calendar-live-panel .calendar-live-panel__thumb.links-live-thumb-wrap,
.calendar-live-panel .links-live-thumb-wrap.calendar-live-panel__thumb {
  position: absolute;
  inset: 0;
  display: block;
  flex: none;
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #dfe8f4 0%, #c8d4e6 100%);
}

.calendar-live-panel .calendar-live-panel__thumb .links-live-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.calendar-live-panel .calendar-live-panel__thumb.hidden {
  display: none;
}

.calendar-live-panel__media:has(.calendar-live-panel__thumb.hidden) {
  /* 썸네일 없어도 배지는 보이게 미디어 영역 유지 */
  background: linear-gradient(145deg, #dfe8f4 0%, #c8d4e6 100%);
}

.calendar-live-panel__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  box-shadow: 0 2px 8px rgb(0 0 0 / 28%);
}

.calendar-live-panel__title {
  flex: 0 0 auto;
  font-family: var(--font-sidebar, inherit);
  font-size: 0.95rem;
  font-weight: var(--font-sidebar-weight, 700);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 생일 전용 라이브 패널 (일정 사이드바) */
.calendar-live-panel--birthday {
  border-color: color-mix(in srgb, var(--birthday-rose, #d4788c) 50%, var(--border));
  border-top-color: #c45f78;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #ffe8ef 75%, var(--surface)) 0%,
      var(--surface) 48%
    );
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--birthday-gold, #c9a24a) 18%, transparent);
}

.calendar-live-panel--birthday:hover {
  border-color: color-mix(in srgb, #c45f78 65%, var(--border));
  border-top-color: #a34e66;
}

.calendar-live-panel--birthday .calendar-live-panel__badge {
  background: linear-gradient(135deg, #e891a8 0%, #c45f78 55%, #b8893f 100%);
}

.calendar-live-panel--birthday.calendar-live-panel--preview {
  border-top-style: dashed;
}

/* 중간·모바일: 라이브 원형 프로필 오버레이 (데스크톱에서는 숨김) */
.calendar-live-orb {
  display: none;
  position: fixed;
  z-index: 70;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: 64px;
  height: 64px;
  border-radius: 50%;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgb(26 39 63 / 16%);
}

.calendar-live-orb.hidden {
  display: none !important;
}

.calendar-live-orb__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #43a047;
  opacity: 0.85;
  animation: calendar-live-orb-pulse 2.8s ease-in-out infinite;
}

.calendar-live-orb__ring::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--surface, #fff);
}

.calendar-live-orb__face {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #e8eef6;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 50%);
}

.calendar-live-orb__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.calendar-live-orb--empty .calendar-live-orb__face {
  background: #c8e6c9;
}

.calendar-live-orb__badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #fff;
  background: #2e7d32;
  box-shadow: 0 1px 4px rgb(46 125 50 / 28%);
  white-space: nowrap;
}

.calendar-live-orb--birthday .calendar-live-orb__ring {
  background: #d4788c;
}

.calendar-live-orb--birthday .calendar-live-orb__badge {
  background: #c45f78;
}

@keyframes calendar-live-orb-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-live-orb__ring {
    animation: none;
    opacity: 0.9;
  }
}

.header-mobile-foot {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  min-height: 34px;
  margin: 4px 0 2px;
  padding-top: 2px;
}

.header-mobile-quick-btn {
  display: none;
}

.header-home-icon-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--brand, #4a60a9) 18%, var(--border));
  background: color-mix(in srgb, var(--brand, #4a60a9) 10%, #fff);
  color: var(--brand, #4a60a9);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.header-home-icon-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand, #4a60a9) 32%, var(--border));
  background: color-mix(in srgb, var(--brand, #4a60a9) 16%, #fff);
  box-shadow: var(--shadow-sm), 0 2px 8px color-mix(in srgb, var(--brand, #4a60a9) 14%, transparent);
}

.header-home-icon-btn:active {
  transform: translateY(0);
}

.header-home-icon-btn__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.header-home-icon-btn__glyph svg {
  width: 18px;
  height: 18px;
  display: block;
}

.header-mobile-foot .debut-day {
  margin: 0;
  min-width: 0;
}

.debut-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin: 6px 0 2px;
  padding: 0;
  line-height: 1;
  text-align: center;
}

.debut-day.hidden {
  display: none;
}

.debut-day-value {
  font-size: 1.45rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep, #243a6e);
}

.debut-day-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--highlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-month {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-month .month-title {
  min-width: 112px;
  font-size: 1.45rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  letter-spacing: -0.02em;
  text-align: center;
}

.header-month .nav-btn {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.header-auth {
  flex-shrink: 0;
}

.header-auth .mode-control {
  padding: 4px 8px;
  gap: 8px;
}

.main-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 12px;
  align-items: stretch;
}

.calendar-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.calendar-column .calendar-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--font-sidebar);
}

html.display-timeline .sidebar {
  max-height: none;
}

.sidebar .panel {
  padding: 14px 14px 12px;
}

.sidebar .panel-foot {
  margin-top: 10px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.panel-head h3::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent-deep) 100%);
}

.panel-head .hl-count,
.panel-head .btn-sm {
  flex-shrink: 0;
  margin: 0;
  height: 26px;
  min-height: 26px;
  line-height: 1;
}

.panel-head .btn-sm {
  padding: 0 11px;
  font-size: 0.74rem;
}

.panel-foot {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand, #4a60a9) 22%, var(--border));
  background: color-mix(in srgb, var(--brand, #4a60a9) 10%, #fff);
  color: var(--brand, #4a60a9);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand, #4a60a9) 34%, var(--border));
  box-shadow: var(--shadow-sm);
}

.pwa-install-btn.hidden {
  display: none;
}

.app-dialog {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.app-dialog::backdrop {
  background: rgba(14, 18, 28, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.app-dialog form {
  display: flex;
  flex-direction: column;
  max-height: min(85dvh, 760px);
  padding: 0;
  overflow: hidden;
}

.app-dialog-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 10px;
}

.ics-dialog {
  width: min(600px, calc(100vw - 32px));
}

.ics-dialog form {
  max-height: min(88dvh, 760px);
}

.app-dialog-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-deep, #243a6e);
}

.app-dialog-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.app-dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  background: var(--surface);
}

.ics-subscribe-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.ics-action-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ics-action-hint {
  margin: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ics-guide {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 72%, #fff);
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
}

.ics-guide-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-deep, #243a6e);
}

.ics-guide-section + .ics-guide-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.ics-guide-heading {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
}

.ics-guide-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.ics-guide-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.ics-guide-note strong {
  color: var(--text);
}

.ics-url-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.ics-subscribe-btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ics-url-details {
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-2) 72%, #fff);
}

.ics-url-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  user-select: none;
}

.ics-url-details[open] summary {
  margin-bottom: 12px;
}

.ics-field {
  display: block;
  margin-bottom: 10px;
}

.ics-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.ics-tap-link {
  display: block;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand, #4a60a9) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand, #4a60a9) 22%, var(--border));
  color: var(--brand, #4a60a9);
  font-size: 0.76rem;
  line-height: 1.45;
  word-break: break-all;
  text-decoration: none;
}

.ics-url-box {
  display: flex;
  gap: 8px;
}

.ics-url-box input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  background: #fff;
  font: inherit;
  font-size: 0.76rem;
  color: var(--text);
}

.ics-help {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.install-steps {
  margin: 12px 0 16px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.install-steps strong {
  color: var(--text);
}

.edit-hint--inline {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.brand h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
}

.month-title {
  margin: 0;
  min-width: 84px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
}

.nav-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend--edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-panel--readonly .legend--edit,
body:not(.edit-mode) .legend-panel .cat-editor,
body:not(.edit-mode) .legend-panel #cat-add-btn {
  display: none !important;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: var(--font-sidebar-weight, 700);
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
}

.edit-mode .legend-item--editable {
  cursor: context-menu;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.cat-editor {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cat-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  background: var(--chip-bg, #fff);
  color: var(--chip-text, #333);
  border: 1px solid color-mix(in srgb, var(--chip-text, #333) 18%, transparent);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.cat-color-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.cat-color-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
}

.cat-color-field input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.cat-label-input {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.cat-delete-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 8px;
  background: #fff5f4;
  color: #c0392b;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
}

.cat-delete-btn:hover {
  background: #fdecea;
}

.calendar-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  --cal-grid-gap: 3px;
  --cal-grid-pad: 3px;
  background: var(--cal-bg);
  border: 1px solid var(--cal-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.weekdays {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--cal-grid-gap);
  padding: var(--cal-grid-pad) var(--cal-grid-pad) 2px;
  background: var(--cal-bg);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.weekdays span {
  padding: 8px 2px;
  border-radius: 10px;
  background: var(--cal-header);
  color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 1px 2px rgba(20, 28, 45, 0.1);
}

.weekdays span:first-child {
  color: var(--cal-header-sun);
}

.weekdays span:last-child {
  color: var(--cal-header-sat);
}

.calendar {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(var(--calendar-rows, 6), minmax(0, 1fr));
  gap: var(--cal-grid-gap);
  padding: var(--cal-grid-pad);
  background: var(--cal-bg);
}

.calendar.calendar--week {
  grid-template-rows: minmax(0, 1fr);
}

.calendar.calendar--week .day-cell:not(.empty) {
  min-height: 0;
}

.day-cell {
  min-height: 0;
  height: 100%;
  padding: 7px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 3px rgba(26, 34, 51, 0.06);
  isolation: isolate;
  cursor: default;
  transition: box-shadow 0.15s;
  overflow: hidden;
}

.day-cell:not(.empty):not(.today):hover {
  border-color: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.65));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 12px rgba(26, 34, 51, 0.08);
}

.day-head--detail {
  cursor: pointer;
  border-radius: 8px;
  margin: -2px -4px 0;
  padding: 2px 4px 0;
  transition: background 0.15s;
}

.day-head--detail:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.day-head--detail:focus-visible {
  outline: 2px solid rgba(26, 34, 51, 0.35);
  outline-offset: 1px;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 28px;
  flex-shrink: 0;
}

.day-bangon-time {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  max-width: 58%;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7faff 0%, #edf2fa 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #d5dde8);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 1px 2px rgba(26, 39, 63, 0.05);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--accent) 82%, #1a2233);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-part-head .day-bangon-time {
  margin-left: auto;
  max-width: none;
  flex-shrink: 0;
}

.day-head-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

@keyframes today-badge-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--highlight) 35%, transparent);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 0 5px transparent;
  }
}

@keyframes today-cell-glow {
  0%,
  100% {
    border-color: var(--today-border);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--today-border) 16%, transparent),
      0 4px 14px var(--today-glow);
  }

  50% {
    border-color: color-mix(in srgb, var(--today-border) 55%, var(--highlight) 45%);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--today-border) 28%, transparent),
      0 0 0 4px color-mix(in srgb, var(--today-border) 12%, transparent),
      0 8px 22px var(--today-glow-strong);
  }
}

@keyframes today-num-pulse {
  0%,
  100% {
    box-shadow:
      0 1px 4px color-mix(in srgb, var(--highlight-deep) 32%, transparent),
      0 0 0 0 color-mix(in srgb, var(--highlight) 0%, transparent);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 2px 10px color-mix(in srgb, var(--highlight-deep) 48%, transparent),
      0 0 0 3px color-mix(in srgb, var(--highlight) 22%, transparent);
    transform: scale(1.04);
  }
}

.today-badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--highlight);
  animation: today-badge-blink 1.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .today-badge {
    animation: none;
  }

  .day-cell.today,
  .day-cell.today .day-num,
  .day-cell--all-day.today,
  .day-cell--all-day-mixed.today {
    animation: none !important;
  }
}

.day-cell.empty {
  background: linear-gradient(180deg, #e3eaf4 0%, #d8e1ed 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  opacity: 0.92;
}

.day-cell.today {
  --today-pulse-base: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 3px rgba(26, 34, 51, 0.06);
  z-index: 2;
}

.day-cell.today::before,
.day-cell.today::after {
  display: none;
}

@keyframes today-cal-cell-pulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--highlight) 26%, rgba(255, 255, 255, 0.65));
    box-shadow:
      var(--today-pulse-base),
      0 0 0 1px color-mix(in srgb, var(--highlight) 14%, transparent),
      0 0 0 2px color-mix(in srgb, var(--highlight) 7%, transparent),
      0 3px 10px color-mix(in srgb, var(--highlight) 16%, transparent);
  }

  50% {
    border-color: color-mix(in srgb, var(--highlight) 40%, rgba(255, 255, 255, 0.65));
    box-shadow:
      var(--today-pulse-base),
      0 0 0 1px color-mix(in srgb, var(--highlight) 22%, transparent),
      0 0 0 4px color-mix(in srgb, var(--highlight) 10%, transparent),
      0 5px 16px color-mix(in srgb, var(--highlight) 22%, transparent);
  }
}

.day-cell.today,
.day-cell--all-day.today,
.day-cell--all-day-mixed.today {
  animation: today-cal-cell-pulse 2.5s ease-in-out infinite;
}

.day-cell.today .day-num,
.day-cell.today.sun .day-num,
.day-cell.today.sat .day-num,
.day-cell--all-day.today .day-num,
.day-cell--all-day.today.sun .day-num,
.day-cell--all-day.today.sat .day-num,
.day-cell--all-day-mixed.today .day-num,
.day-cell--all-day-mixed.today.sun .day-num,
.day-cell--all-day-mixed.today.sat .day-num {
  color: #fff;
  background: linear-gradient(135deg, var(--highlight) 0%, var(--highlight-deep) 100%);
  border-color: transparent;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--highlight-deep) 22%, transparent);
}

.day-num {
  font-size: 0.88rem;
  font-weight: 800;
  min-width: 28px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 7px;
  background: var(--surface-2);
  border: 1px solid rgba(26, 39, 63, 0.06);
}

.day-cell.sun .day-num {
  color: var(--sun);
  background: var(--sun-bg);
}

.day-cell.sat .day-num {
  color: var(--sat);
  background: var(--sat-bg);
}

.slot-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

/* ── 2부 방송 분할(흰 박스 2분할) ── */
.day-parts {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

/* 각 부: 내용 높이에 맞춤 — 여유 공간은 칩(JS)이 흡수 */
.day-part {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  min-height: var(--part-min-height, 0);
}

.day-part + .day-part {
  border-top: 1px dashed color-mix(in srgb, var(--accent) 26%, #d5dde8);
  padding-top: 4px;
}

.day-cell--multipart .day-part .slot-list:not(.slot-list--all-day) {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

.day-part-head {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
}

.day-part-label {
  flex-shrink: 0;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 2.5px 7px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 78%, #1a2233);
  border: none;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* 분할 셀 slot-list 규칙은 .day-cell--multipart .day-part .slot-list 로 통합 */

/* 캘린더 칸: 피팅으로 맞추므로 칸 안 스크롤바는 표시하지 않음 */
.calendar .day-cell,
.calendar .day-cell .slot-list,
.calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day),
.calendar.calendar--week .slot-list:not(.slot-list--all-day) {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.calendar .day-cell::-webkit-scrollbar,
.calendar .day-cell .slot-list::-webkit-scrollbar,
.calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day)::-webkit-scrollbar,
.calendar.calendar--week .slot-list:not(.slot-list--all-day)::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

html.display-timeline .calendar .day-cell .slot-list:not(.slot-list--all-day),
html.display-timeline .calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day),
html.display-timeline .calendar.calendar--week .slot-list:not(.slot-list--all-day) {
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

html:not(.display-timeline) .calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day),
html:not(.display-timeline) .calendar.calendar--week .slot-list:not(.slot-list--all-day) {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.day-cell--scroll::after {
  display: none;
}

.day-cell--scroll .slot-list:not(.slot-list--all-day) {
  padding-bottom: 4px;
  scroll-padding-bottom: 4px;
}

.day-cell:has(.slot-overflow-hint:not(.is-collapsed)) .slot-list:not(.slot-list--all-day) {
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 14px), rgba(0, 0, 0, 0.45) calc(100% - 6px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 14px), rgba(0, 0, 0, 0.45) calc(100% - 6px), transparent 100%);
}

.slot-overflow-hint {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  z-index: 3;
  height: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 1px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: rgba(47, 79, 122, 0.92);
  pointer-events: none;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.26s ease,
    transform 0.26s ease,
    height 0.3s ease,
    padding 0.3s ease;
}

.slot-overflow-hint::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.72) 52%,
    rgba(255, 255, 255, 0) 100%
  );
  backdrop-filter: blur(5px) saturate(1.1);
  -webkit-backdrop-filter: blur(5px) saturate(1.1);
  transition: opacity 0.26s ease;
}

.slot-overflow-hint.is-collapsed {
  opacity: 0;
  transform: translateY(4px);
  height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.slot-overflow-hint.is-collapsed::before {
  opacity: 0;
}

.day-cell.today .slot-overflow-hint::before {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.94) 0%,
    color-mix(in srgb, var(--chip-bg, #f1f5f9) 24%, rgba(255, 255, 255, 0.78)) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

.day-cell.today .slot-overflow-hint {
  color: color-mix(in srgb, var(--highlight-deep) 95%, transparent);
}

.calendar[data-calendar-rows="6"] .day-cell:not(.empty) {
  padding: 5px 6px 4px;
  gap: 4px;
}

.calendar[data-calendar-rows="6"] .day-head {
  min-height: 28px;
}

.calendar[data-calendar-rows="6"] .day-bangon-time {
  max-width: 62%;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 0.52rem;
}

.calendar[data-calendar-rows="6"] .day-num {
  height: 22px;
  min-width: 24px;
  font-size: 0.8rem;
}

.calendar[data-calendar-rows="6"] .today-badge {
  font-size: 0.52rem;
  padding: 2px 5px;
}

.calendar[data-calendar-rows="6"] .slot-list:not(.slot-list--all-day) {
  gap: 3px;
}

/* ── 전체(시간) 보기: 페이지 스크롤 + 사이드바 화면 고정 ── */
html.display-timeline,
html.display-timeline body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html.display-timeline .page {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

html.display-timeline .layout {
  flex: none;
  min-height: auto;
  align-items: start;
}

html.display-timeline .calendar-column {
  height: auto;
  min-height: 0;
  overflow: visible;
}

@media (min-width: 901px) {
  html.display-timeline .layout {
    display: block;
  }

  html.display-timeline .calendar-column {
    margin-right: 284px;
  }

  html.display-timeline .sidebar {
    position: fixed;
    top: 10px;
    right: max(14px, env(safe-area-inset-right, 0px));
    width: 272px;
    height: auto;
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
  }
}

html.display-timeline .sidebar .header--sidebar,
html.display-timeline .sidebar .calendar-live-panel,
html.display-timeline .sidebar .calendar-subscribe-panel,
html.display-timeline .sidebar .highlights-panel,
html.display-timeline .sidebar .layout-panel,
html.display-timeline .sidebar .legend-panel {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}

html.display-timeline .day-head {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  /* 뱅온·공휴일 유무와 관계없이 헤더 슬롯 높이 통일 → 하단 칩 여백 통일 */
  min-height: var(--day-head-band, 30px);
  box-sizing: border-box;
}

html.display-timeline .slot-list:not(.slot-list--all-day) {
  position: relative;
  z-index: 1;
}

html.display-timeline .calendar:not(.calendar--week) .slot-chip,
html.display-timeline .calendar.calendar--week .slot-chip,
html.display-timeline .day-cell:not(.day-cell--scroll) .slot-chip {
  flex: var(--slot-hours, 1) 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}

html.display-timeline .day-cell--all-day,
html.display-timeline .day-cell.empty {
  min-height: var(--calendar-row-min, 212px);
}

html.display-timeline .calendar-column .calendar-wrap {
  flex: none;
  min-height: auto;
  /* visible이면 로딩 후 day-cell/배경이 radius 밖으로 삐져 뾰족 모서리가 남음 */
  overflow: hidden;
  overscroll-behavior: auto;
}

html.display-timeline .calendar {
  flex: none;
  min-height: 0;
  height: auto;
  align-items: stretch;
  overscroll-behavior: auto;
}

html.display-timeline .day-cell {
  /* 행 트랙(px)을 꽉 채워 같은 주 칸 높이·배경이 들쭉날쭉하지 않게 */
  height: 100%;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: auto;
  box-sizing: border-box;
}

html.display-timeline .calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day),
html.display-timeline .calendar.calendar--week .slot-list:not(.slot-list--all-day),
html.display-timeline .slot-list:not(.slot-list--all-day) {
  /* 남는 칸 높이를 리스트가 먹고, 칩은 JS가 list.clientHeight에 맞춰 채움 → 날짜별 하단 여백 통일 */
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden !important;
  overflow-y: hidden !important;
  overscroll-behavior: contain;
}

html.display-timeline .day-cell:has(.slot-overflow-hint:not(.is-collapsed)) .slot-list:not(.slot-list--all-day),
html.display-timeline .day-cell--scroll .slot-list:not(.slot-list--all-day) {
  mask-image: none;
  -webkit-mask-image: none;
  padding-bottom: 0;
  scroll-padding-bottom: 0;
}

html.display-timeline .slot-overflow-hint {
  display: none !important;
}

html.display-timeline .slot-chip-body {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  overflow: hidden;
  box-sizing: border-box;
}

html.display-timeline .slot-chip {
  grid-template-columns: 1fr;
  align-items: stretch;
  position: relative;
  box-sizing: border-box;
}

html.display-timeline .slot-chip--has-start:not(.slot-chip--editable):not(.slot-chip--all-day),
html.display-timeline .slot-chip--all-day:not(.slot-chip--editable),
html.display-timeline .slot-chip--has-start.slot-chip--editable:not(.slot-chip--all-day),
html.display-timeline .slot-chip--all-day.slot-chip--editable {
  grid-template-columns: 1fr !important;
}

html.display-timeline .slot-chip--has-start > .slot-duration,
html.display-timeline .slot-chip--all-day > .slot-duration {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
}

/* 종일 칩이 작아지거나 시간 일정과 섞이면 왼쪽 시간칸 숨김 */
html.display-timeline .slot-chip--all-day.slot-chip--all-day-compact > .slot-duration,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  > .slot-duration {
  display: none !important;
}

html.display-timeline .slot-chip--has-start:not(.slot-chip--all-day) .slot-chip-body,
html.display-timeline .slot-chip--all-day .slot-chip-body {
  grid-column: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  min-height: 100%;
  height: 100%;
  text-align: center;
  padding: 0 8px 0 30px;
}

html.display-timeline .slot-chip--all-day.slot-chip--all-day-compact .slot-chip-body,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  .slot-chip-body {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html.display-timeline .slot-chip--all-day.slot-chip--all-day-compact .slot-text,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  .slot-text {
  text-align: center !important;
}

html.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact.slot-chip--has-members
  .slot-chip-body,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--has-members
  .slot-chip-body {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html.display-timeline .slot-chip--editable {
  grid-template-columns: 1fr !important;
  position: relative;
  align-items: stretch;
}

html.display-timeline .slot-chip:not(.slot-chip--has-start):not(.slot-chip--all-day) .slot-chip-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  grid-column: 1;
  min-height: 100%;
  height: 100%;
  padding: 0 8px;
}

html.display-timeline .slot-chip--all-day .slot-text {
  text-align: center;
  width: 100%;
  padding-top: 1px;
}

html.display-timeline .slot-chip--has-start .slot-text {
  text-align: center;
  width: 100%;
  padding-top: 1px;
}

html.display-timeline .slot-chip--has-start:not(.slot-chip--all-day).slot-chip--has-members .slot-chip-body,
html.display-timeline .slot-chip--all-day.slot-chip--has-members .slot-chip-body {
  /* JS가 제목+멤버를 묶음으로 절대배치 — 그리드 분배로 사이가 벌어지지 않게 */
  position: relative;
  display: block;
  text-align: center;
  padding: 4px 8px 4px 30px;
  gap: 0;
  row-gap: 0;
}

html.display-timeline .slot-chip--meta-icons.slot-chip--has-start:not(.slot-chip--all-day).slot-chip--has-members .slot-chip-body,
html.display-timeline .slot-chip--meta-icons.slot-chip--all-day.slot-chip--has-members .slot-chip-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  row-gap: 0 !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

html.display-timeline .slot-chip--has-members .slot-text {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}

html.display-timeline .slot-chip--meta-icons .slot-text {
  line-height: 1.12 !important;
}

html.display-timeline .slot-chip--has-members .slot-chip-meta {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

html.display-timeline .slot-chip:not(.slot-chip--has-start):not(.slot-chip--all-day).slot-chip--has-members .slot-chip-body {
  position: relative;
  display: block;
  padding-top: 3px;
  padding-bottom: 4px;
}

html.display-timeline .slot-chip--has-members .slot-text,
html.display-timeline .slot-chip--has-members .slot-chip-meta {
  width: 100%;
}

html.display-timeline .slot-chip--has-start.slot-chip--has-members .slot-text,
html.display-timeline .slot-chip--all-day.slot-chip--has-members .slot-text {
  grid-row: 1;
  align-self: center;
  justify-self: center;
  text-align: center;
  min-height: max-content;
  overflow: visible;
}

html.display-timeline .slot-chip--has-start.slot-chip--has-members .slot-members,
html.display-timeline .slot-chip--all-day.slot-chip--has-members .slot-members,
html.display-timeline .slot-chip--has-start.slot-chip--has-members .slot-chip-meta,
html.display-timeline .slot-chip--all-day.slot-chip--has-members .slot-chip-meta {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  justify-content: center;
}

html.display-timeline .slot-chip--has-members .slot-chip-meta {
  flex: 0 0 auto;
  width: 100%;
  margin-top: 0;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  opacity: 0.92;
  color: color-mix(in srgb, var(--chip-text, #333) 72%, #000);
}

html.display-timeline .slot-chip--has-members .slot-members {
  flex: 0 1 auto;
  /* 폭은 내용만큼 — 가운데는 부모 .slot-chip-meta 의 justify-content */
  width: max-content;
  max-width: 100%;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  opacity: 0.92;
  color: color-mix(in srgb, var(--chip-text, #333) 72%, #000);
}

html.display-timeline .slot-chip--has-members .slot-members-mark {
  width: 10px;
  height: 10px;
  opacity: 0.8;
}

html.display-timeline .slot-chip--has-members .slot-members-label {
  display: none;
}

/* 멤버+링크 동시·소형칩: 아이콘만 가로 한 줄 (텍스트 숨김) */
html.display-timeline .slot-chip--meta-icons .slot-chip-meta,
html.display-timeline .slot-chip--meta-icons.slot-chip--has-members .slot-chip-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
}

html.display-timeline .slot-chip--meta-icons .slot-members,
html.display-timeline .slot-chip--meta-icons .slot-broadcast,
html.display-timeline .slot-chip--meta-icons a.slot-broadcast,
html.display-timeline .slot-chip--meta-icons.slot-chip--has-members .slot-members,
html.display-timeline .slot-chip--meta-icons.slot-chip--has-members .slot-broadcast,
html.display-timeline .slot-chip--meta-icons.slot-chip--has-members a.slot-broadcast {
  display: inline-flex !important;
  flex-direction: row !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  gap: 0 !important;
}


/* 멤버·링크: 가로로 나란히여도 묶음 전체 가운데 (자식 margin:auto 금지) */
html.display-timeline .slot-chip--has-members .slot-chip-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 2px 8px;
  width: 100%;
  text-align: center;
}

html.display-timeline .slot-chip--has-members .slot-members,
html.display-timeline .slot-chip--has-members .slot-broadcast,
html.display-timeline .slot-chip--has-members a.slot-broadcast {
  display: inline-flex;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  gap: var(--slot-members-icon-gap, 3px);
}

/* 여유 칩 2줄: 제목처럼 줄마다 가운데 (아이콘은 첫 줄 인라인) */
html.display-timeline .slot-chip--meta-wrap .slot-members,
html.display-timeline .slot-chip--meta-wrap .slot-broadcast,
html.display-timeline .slot-chip--meta-wrap a.slot-broadcast {
  display: inline-block !important;
  text-align: center !important;
  width: auto !important;
  max-width: 100%;
  line-height: 1.2;
  max-height: 2.55em;
  overflow: hidden;
  white-space: normal;
  gap: 0 !important;
}

html.display-timeline .slot-chip--meta-wrap .slot-members-mark,
html.display-timeline .slot-chip--meta-wrap .slot-broadcast-mark,
html.display-timeline .slot-chip--meta-wrap .slot-link-icon {
  display: inline-block !important;
  vertical-align: middle;
  margin-right: var(--slot-members-icon-gap, 7px);
}

html.display-timeline .slot-chip--meta-wrap .slot-members-text,
html.display-timeline .slot-chip--meta-wrap .slot-broadcast-text,
html.display-timeline .slot-chip--meta-wrap .slot-link-label {
  display: inline !important;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: center;
  line-height: 1.2;
}

html.display-timeline .slot-chip--meta-icons .slot-members-text,
html.display-timeline .slot-chip--meta-icons .slot-members-label,
html.display-timeline .slot-chip--meta-icons .slot-broadcast-text,
html.display-timeline .slot-chip--meta-icons .slot-link-label {
  display: none !important;
}

html.display-timeline .slot-chip--meta-icons .slot-members-mark,
html.display-timeline .slot-chip--meta-icons .slot-broadcast-mark,
html.display-timeline .slot-chip--meta-icons .slot-broadcast .slot-link-icon,
html.display-timeline .slot-chip--meta-icons .slot-link-icon {
  /* 기본값; 실제 크기는 JS가 칩 높이에 비례해 인라인 지정 (10~14px) */
  width: 12px;
  height: 12px;
  opacity: 0.88;
}

html.display-timeline .slot-duration--all-day {
  background-image: none !important;
}

html.display-timeline .calendar:not(.calendar--week) .slot-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 28px;
  width: auto;
  min-height: 100%;
  height: 100%;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  white-space: nowrap;
  color: #1e3a5f;
  background-color: rgba(255, 255, 255, 0.55);
  background-image: none;
  border-right: 1px dashed rgba(30, 58, 95, 0.18);
}

html.slot-chip-style-inline .slot-chip--inline-timed:not(.slot-chip--inline-compact) > .slot-duration--inline-fallback {
  display: none !important;
}

html.display-timeline .slot-duration--start {
  position: relative;
  z-index: 1;
}

html.display-timeline .slot-chip:not(.slot-chip--all-day):not(.slot-chip--has-start) .slot-text {
  width: 100%;
  margin: 0;
  text-align: center;
  padding-top: 1px;
}

html.display-timeline .day-cell:not(.day-cell--scroll) .slot-chip {
  flex: var(--slot-hours, 1) 1 0 !important;
  align-self: stretch;
  overflow: hidden;
}

html.display-timeline .calendar:not(.calendar--week) .slot-text,
html.display-timeline .calendar.calendar--week .slot-text {
  margin: 0;
  font-size: 1rem;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: normal;
  width: 100%;
}

html.display-timeline .slot-drag-handle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0 2px;
  margin: 0;
  pointer-events: auto;
  cursor: grab;
}

html.display-timeline .slot-list:not(.slot-list--all-day) > .slot-chip--all-day {
  flex: 0 0 auto !important;
  align-self: stretch;
  min-height: var(--hour-unit, 34px);
}

/* 종일만 있는 날도 시간 일정과 같은 슬롯 높이·여백 (100% 채우기 금지) */
html.display-timeline
  .slot-list:not(.slot-list--all-day):not(:has(> .slot-chip:not(.slot-chip--all-day)))
  > .slot-chip--all-day,
html.display-timeline .slot-list:not(.slot-list--all-day) > .slot-chip--all-day:only-child {
  flex: 0 0 auto !important;
  align-self: stretch;
  min-height: 0;
}

/* 1시간 1칸 */
html.cal-layout-hourly.display-timeline .calendar:not(.calendar--week) .slot-list:not(.slot-list--all-day),
html.cal-layout-hourly.display-timeline .calendar.calendar--week .slot-list:not(.slot-list--all-day),
html.cal-layout-hourly.display-timeline .slot-list:not(.slot-list--all-day) {
  flex: 0 0 auto;
  height: auto;
  min-height: var(--day-slots-height, 148px);
  max-height: none;
  overflow: hidden !important;
  overflow-y: hidden !important;
}

html.cal-layout-hourly.display-timeline .day-cell:not(.day-cell--scroll) .slot-chip {
  flex: 0 0 auto !important;
  height: calc(var(--slot-hours, 1) * var(--hour-unit, 34px));
  min-height: calc(var(--slot-hours, 1) * var(--hour-unit, 34px));
  max-height: none;
}

.layout-panel {
  margin-top: 0;
}

.layout-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layout-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.layout-option:hover {
  border-color: color-mix(in srgb, var(--highlight) 35%, var(--border));
  background: #fafcff;
}

.layout-option.is-active {
  border-color: color-mix(in srgb, var(--highlight) 55%, var(--border));
  background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
  box-shadow: 0 2px 10px rgba(36, 58, 110, 0.08);
}

.layout-option.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.layout-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.layout-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.layout-option-text strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-deep, #243a6e);
  letter-spacing: -0.02em;
}

.layout-option-text small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.layout-option-preview {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f2f6fb;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  display: grid;
  place-items: center;
}

.layout-preview-cell {
  width: 30px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.layout-preview-slot {
  display: block;
  height: 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--highlight) 28%, #fff);
  border: 1px solid color-mix(in srgb, var(--highlight) 18%, transparent);
}

.layout-option-preview--proportional .layout-preview-slot--a {
  height: 6px;
}

.layout-option-preview--proportional .layout-preview-slot--b {
  height: 12px;
}

.layout-option-preview--hourly .layout-preview-slot--a {
  height: 5px;
}

.layout-option-preview--hourly .layout-preview-slot--b {
  height: 14px;
  border-left: 3px solid color-mix(in srgb, var(--accent-deep) 55%, transparent);
}

.layout-hourly-options {
  margin-top: 4px;
  padding: 10px 12px 12px;
  border: 1.5px solid color-mix(in srgb, var(--highlight) 35%, var(--border));
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.layout-hourly-options.hidden {
  display: none;
}

.layout-hourly-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layout-hourly-field.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.layout-hourly-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-deep, #243a6e);
  letter-spacing: -0.02em;
}

.layout-hourly-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  background: #fff;
}

.layout-hourly-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.layout-font-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px 12px;
  border: 1.5px solid color-mix(in srgb, var(--highlight) 35%, var(--border));
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.layout-hourly-field-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layout-font-bold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.layout-font-bold-row.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.layout-font-bold-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.layout-font-toggle .toggle-track {
  width: 36px;
  height: 20px;
}

.layout-font-toggle .toggle-track::after {
  width: 14px;
  height: 14px;
}

.layout-font-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.slot-chip {
  --hour-size: var(--hour-unit);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: calc(var(--slot-hours, 1) * var(--hour-size));
  height: calc(var(--slot-hours, 1) * var(--hour-size));
  background: var(--chip-bg, #fff);
  color: var(--chip-text, #333);
  border: 1px solid var(--chip-border, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    filter 0.16s ease;
}

body:not(.edit-mode) .day-cell .slot-chip {
  position: relative;
  cursor: pointer;
}

body:not(.edit-mode) .day-cell .slot-chip:hover {
  z-index: 2;
  transform: translateY(0);
  border-color: color-mix(in srgb, var(--chip-text, #333) 30%, var(--chip-border, rgba(0, 0, 0, 0.08)));
  box-shadow:
    inset 0 0 0 999px color-mix(in srgb, #fff 14%, transparent),
    0 4px 14px color-mix(in srgb, var(--chip-text, #333) 12%, transparent),
    0 1px 3px rgba(0, 0, 0, 0.08);
  filter: saturate(1.06);
}

.calendar:not(.calendar--week) .slot-chip:not(.slot-chip--all-day) {
  flex: 0 0 auto;
  height: var(--cell-slot-min, 28px);
  min-height: var(--cell-slot-min, 28px);
}

/* 멤버 + 줄바꿈/긴 텍스트가 있을 때는 칩을 조금 더 키워서 여유를 줌 */
.calendar:not(.calendar--week) .slot-chip.slot-chip--has-members:not(.slot-chip--all-day) {
  --cell-slot-min: 36px;
}

.calendar.calendar--week .slot-chip.slot-chip--has-members:not(.slot-chip--all-day) {
  --cell-slot-min: 36px;
}

.day-cell:not(.day-cell--scroll):not(.day-cell--all-day) .slot-chip:not(.slot-chip--all-day) {
  flex: 1 1 0;
  height: auto;
  min-height: var(--cell-slot-min, 28px);
}

.calendar:not(.calendar--week) .slot-duration {
  background-image: none;
  align-self: stretch;
}

.slot-chip--editable {
  grid-template-columns: auto 1fr auto;
}

.slot-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e3a5f;
  background-color: rgba(255, 255, 255, 0.55);
  background-image: none;
  border-right: 1px dashed rgba(30, 58, 95, 0.18);
}

.slot-chip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5px;
  overflow: hidden;
}

.slot-index {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.55;
  line-height: 1.5;
  min-width: 10px;
}

.slot-text {
  font-family: var(--font-schedule);
  font-size: 1rem;
  font-weight: var(--font-schedule-weight, 500);
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  padding-inline: 4px;
  padding-block: 2px;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

/* 파스텔 칩: 카테고리 hue 글자색 (은은한·선명한 공통) */
html.chip-color-default .slot-chip,
html.chip-color-tinted .slot-chip {
  color: var(--chip-text, #333);
}

html.chip-color-default .slot-text,
html.chip-color-tinted .slot-text {
  color: var(--chip-text, #333);
}

html.chip-color-default .slot-members,
html.chip-color-default .slot-chip--has-members .slot-members,
html.chip-color-tinted .slot-members,
html.chip-color-tinted .slot-chip--has-members .slot-members {
  color: color-mix(in srgb, var(--chip-text, #333) 86%, #000);
}

html.chip-color-default .slot-time-text,
html.chip-color-tinted .slot-time-text {
  color: color-mix(in srgb, var(--chip-text, #333) 80%, #000);
  opacity: 1;
}

html.chip-color-default.display-timeline .slot-duration,
html.chip-color-default .slot-duration,
html.chip-color-default .slot-duration--inline-fallback,
html.chip-color-tinted.display-timeline .slot-duration,
html.chip-color-tinted .slot-duration,
html.chip-color-tinted .slot-duration--inline-fallback {
  color: var(--chip-text, #333) !important;
  border-right-color: color-mix(in srgb, var(--chip-text, #333) 20%, transparent) !important;
  background-color: color-mix(in srgb, var(--chip-bg, #fff) 42%, #fff) !important;
}

html.chip-color-default .highlight-item .hl-text,
html.chip-color-tinted .highlight-item .hl-text,
html.chip-color-original .highlight-item .hl-text {
  color: var(--chip-text, var(--text));
}

html.chip-color-original.display-timeline .slot-duration,
html.chip-color-original .slot-duration,
html.chip-color-original .slot-duration--inline-fallback {
  color: var(--chip-text, #333) !important;
  border-right-color: color-mix(in srgb, var(--chip-text, #333) 20%, transparent) !important;
  background-color: color-mix(in srgb, var(--chip-bg, #fff) 42%, #fff) !important;
}

html.chip-color-default .day-detail-duration,
html.chip-color-tinted .day-detail-duration,
html.chip-color-original .day-detail-duration {
  color: var(--item-text, #333) !important;
  border-right-color: color-mix(in srgb, var(--item-text, #333) 20%, transparent) !important;
  background-color: color-mix(in srgb, var(--item-accent, #fff) 42%, #fff) !important;
}

.slot-members {
  display: flex;
  align-items: center;
  gap: var(--slot-members-icon-gap, 4px);
  width: 100%;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  color: color-mix(in srgb, var(--chip-text, #333) 72%, #000);
  opacity: 0.92;
  min-width: 0;
}

.slot-members-mark {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  background: currentColor;
  opacity: 0.78;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.slot-members-label {
  display: none;
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: color-mix(in srgb, currentColor 88%, #000);
  background: color-mix(in srgb, currentColor 10%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.slot-members-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-duration--start {
  font-size: 0.72rem;
  letter-spacing: -0.04em;
}

.calendar--week .slot-text {
  white-space: pre-line;
  overflow: hidden;
}

.hl-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(47, 79, 122, 0.18);
}

.highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.highlight-item {
  display: block;
  margin: 0;
  cursor: pointer;
  border-radius: 12px;
}

.hl-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 0;
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 14%, #fff);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--chip-text, #333) 12%, var(--border));
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 28, 45, 0.04);
  overflow: hidden;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.highlight-item:not(.highlight-item--today):hover .hl-card {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 24%, #fff);
  box-shadow: 0 4px 14px rgba(20, 28, 45, 0.07);
  border-color: color-mix(in srgb, var(--chip-text, #333) 20%, var(--border));
}

.highlight-item:not(.highlight-item--today):hover .hl-date-col {
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 42%, #fff);
}

.highlight-item:not(.highlight-item--today):hover .hl-main,
.highlight-item:not(.highlight-item--today):hover .hl-body {
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 16%, #fff);
}

.highlight-item--today:hover .hl-card {
  transform: translateY(-1px);
}

.highlight-item--today:hover .hl-date-col {
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 40%, #fff);
}

.highlight-item--today:hover .hl-main,
.highlight-item--today:hover .hl-body {
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 18%, #fff);
}

.hl-date-col,
.hl-date-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 32%, #fff);
  border-right: 1px solid color-mix(in srgb, var(--chip-text, #333) 10%, transparent);
  transition: background 0.15s ease;
}

.hl-date-col::before,
.hl-date-pill::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--chip-bg, var(--accent));
}

.hl-date-num {
  font-size: 0.82rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  color: var(--chip-text, var(--text));
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hl-date-dow {
  font-size: 0.62rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--chip-text, var(--text)) 72%, var(--muted));
  line-height: 1;
}

.hl-main,
.hl-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 11px 10px;
  transition: background 0.15s ease;
}

.hl-head,
.hl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hl-head-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.hl-head-aside {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.hl-cat {
  display: inline-flex;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-bg, #f1f5f9) 42%, #fff);
  color: var(--chip-text, var(--text));
  border: 1px solid color-mix(in srgb, var(--chip-text, #333) 16%, transparent);
  white-space: nowrap;
}

.hl-meta {
  font-size: 0.62rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--chip-text, #333) 78%, var(--muted));
  white-space: nowrap;
}

.hl-text {
  margin: 0;
  width: 100%;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: var(--font-sidebar-weight-emphasis, 800);
  line-height: 1.34;
  color: var(--text);
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.magenda-day.today {
  --today-pulse-base: 0 2px 8px rgba(26, 34, 51, 0.05);
}

@keyframes today-chip-pulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--highlight) 22%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 12%, transparent),
      0 2px 10px var(--today-glow, rgba(74, 96, 169, 0.12));
  }

  50% {
    border-color: color-mix(in srgb, var(--highlight) 44%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 26%, transparent),
      0 0 0 4px color-mix(in srgb, var(--highlight) 12%, transparent),
      0 6px 20px var(--today-glow-strong, rgba(74, 96, 169, 0.22));
  }
}

@keyframes today-hl-card-pulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--highlight) 55%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 34%, transparent),
      0 2px 12px var(--today-glow, rgba(74, 96, 169, 0.2));
  }

  50% {
    border-color: color-mix(in srgb, var(--highlight) 82%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 52%, transparent),
      0 0 0 5px color-mix(in srgb, var(--highlight) 26%, transparent),
      0 8px 26px var(--today-glow-strong, rgba(74, 96, 169, 0.35));
  }
}

.highlight-item--today .hl-card {
  animation: today-hl-card-pulse 2.5s ease-in-out infinite;
}

.magenda-day.today {
  animation: today-chip-pulse 2.5s ease-in-out infinite;
}

.highlight-item--today .hl-date-num {
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  .highlight-item--today .hl-card,
  .magenda-day.today {
    animation: none;
  }

  .day-cell.today,
  .day-cell--all-day.today,
  .day-cell--all-day-mixed.today,
  .day-cell.today .day-num,
  .day-cell--all-day.today .day-num,
  .day-cell--all-day-mixed.today .day-num {
    animation: none !important;
  }

  .highlight-item--today .hl-card {
    border-color: color-mix(in srgb, var(--highlight) 62%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 38%, transparent),
      0 0 0 4px color-mix(in srgb, var(--highlight) 16%, transparent),
      0 4px 16px var(--today-glow, rgba(74, 96, 169, 0.28));
  }

  .magenda-day.today {
    border-color: color-mix(in srgb, var(--highlight) 30%, var(--border, rgba(255, 255, 255, 0.65)));
    box-shadow:
      var(--today-pulse-base, 0 1px 2px rgba(20, 28, 45, 0.04)),
      0 0 0 1px color-mix(in srgb, var(--highlight) 16%, transparent),
      0 4px 14px var(--today-glow, rgba(74, 96, 169, 0.16));
  }

  .day-cell.today,
  .day-cell--all-day.today,
  .day-cell--all-day-mixed.today {
    border-color: color-mix(in srgb, var(--highlight) 32%, rgba(255, 255, 255, 0.65));
    box-shadow:
      var(--today-pulse-base),
      0 0 0 1px color-mix(in srgb, var(--highlight) 18%, transparent),
      0 0 0 2px color-mix(in srgb, var(--highlight) 8%, transparent),
      0 4px 14px color-mix(in srgb, var(--highlight) 18%, transparent);
  }

  .day-cell.today .day-num,
  .day-cell.today.sun .day-num,
  .day-cell.today.sat .day-num,
  .day-cell--all-day.today .day-num,
  .day-cell--all-day-mixed.today .day-num {
    color: #fff;
    background: linear-gradient(135deg, var(--highlight) 0%, var(--highlight-deep) 100%);
    border-color: transparent;
    box-shadow:
      0 1px 6px color-mix(in srgb, var(--highlight-deep) 36%, transparent),
      0 0 10px color-mix(in srgb, var(--highlight) 24%, transparent);
  }
}

.edit-mode .highlight-item--editable {
  cursor: pointer;
}

.edit-mode .highlight-item--editable .hl-card {
  cursor: pointer;
}

.highlights-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin: 0;
  padding: 22px 14px;
  border: 1px dashed rgba(79, 110, 247, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

.highlights-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 110, 247, 0.14);
}

.highlights-empty-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.highlights-empty-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted);
}

.sidebar-foot {
  margin: 16px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-foot + .sidebar-foot {
  margin-top: 4px;
}

.sidebar-page-foot .sidebar-foot:first-child {
  margin-top: 0;
}

.sidebar-page-foot .sidebar-foot + .sidebar-foot {
  margin-top: 4px;
}

.sidebar-foot.site-foot-legal {
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}

.sidebar-foot.font-credit.hidden {
  display: none;
}

.font-credit {
  margin-top: 10px;
  padding: 0 2px;
}

.font-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.font-credit a:hover {
  color: var(--accent);
}

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.auth-role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf2f7;
  color: #4a5568;
}

.auth-role-badge.streamer {
  background: #e8f5e9;
  color: #2e7d32;
}

.auth-role-badge.developer {
  background: #e8eef9;
  color: #3d5a9b;
}

.auth-role-badge.manager {
  background: #fff3e0;
  color: #e65100;
}

.auth-user-streamer-dot--manager {
  background: #f57c00;
  box-shadow: 0 0 0 1px color-mix(in srgb, #f57c00 35%, transparent);
}

.auth-user-streamer-dot--developer {
  background: #4a60a9;
  box-shadow: 0 0 0 1px color-mix(in srgb, #4a60a9 35%, transparent);
}

body.modal-open {
  overflow: hidden;
}

html.modal-open,
html.display-timeline.modal-open,
html.display-timeline.modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.day-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  overscroll-behavior: contain;
}

.day-modal.hidden {
  display: none;
}

.day-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 28, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.modal-open .day-modal-backdrop,
body.slot-edit-open .day-modal-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.modal-open .day-cell.today,
body.modal-open .day-cell--all-day.today,
body.modal-open .day-cell--all-day-mixed.today {
  animation: none !important;
}

.day-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: hidden;
  background: linear-gradient(180deg, #f7f9fd 0%, #f3f6fb 100%);
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, #c8d4e6);
  box-shadow:
    0 20px 48px rgba(20, 28, 45, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

.day-modal-card--today {
  box-shadow:
    0 20px 48px rgba(20, 28, 45, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 0 0 2px color-mix(in srgb, var(--today-border) 30%, transparent);
}

.day-modal-card--today .day-modal-header {
  border-bottom-color: color-mix(in srgb, var(--today-border) 22%, transparent);
}

.day-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px 18px;
  background: linear-gradient(180deg, #f8fafd 0%, #f3f6fb 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, #c8d4e6);
  flex-shrink: 0;
  color: #1a2233;
}

.day-modal-header-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-modal-kicker {
  margin: 0;
}

.day-modal-kicker:empty {
  display: none;
}

.day-modal-chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.day-modal-today-badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 4px 9px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 85%, #1e3a5f);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, #d5dde8);
  animation: none;
}

.day-modal-bangon-wrap {
  flex-shrink: 0;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-modal-bangon-wrap.hidden {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.day-modal-bangon-wrap .day-modal-bangon-head {
  margin: 0;
}

.day-modal-bangon-wrap .day-modal-bangon {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.day-modal-schedule {
  min-height: 0;
}

/* ── 모달 부(part) 섹션 ── */
.day-modal-part {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 모달 일정 드래그&드롭 */
.day-detail-item--draggable {
  cursor: grab;
}
.day-detail-item--draggable:active {
  cursor: grabbing;
}
.day-detail-item--dragging {
  opacity: 0.45;
}
.day-modal-part--drop {
  outline: 2px dashed color-mix(in srgb, var(--accent) 70%, #9bb0d4);
  outline-offset: 3px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.day-detail-item--drop-before {
  box-shadow: 0 -3px 0 0 color-mix(in srgb, var(--accent) 75%, #9bb0d4);
}

.day-modal-part + .day-modal-part {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, #c8d4e6);
}

.day-modal-part-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.day-modal-part-head::after {
  content: "";
  flex: 1 1 auto;
  order: 2;
  height: 1px;
  background: color-mix(in srgb, var(--border) 85%, #c8d4e6);
}

.day-modal-part-label {
  flex-shrink: 0;
  order: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 78%, #1a2233);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.day-modal-bangon-head .day-modal-part-label {
  background: color-mix(in srgb, var(--accent) 72%, #2a3548);
}

.day-modal-part-remove {
  order: 1;
  margin-left: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #c0392b 30%, #e2c7c2);
  background: color-mix(in srgb, #c0392b 8%, #fff);
  color: #b23a2e;
  cursor: pointer;
  transition: background 0.15s;
}

.day-modal-part-remove:hover {
  background: color-mix(in srgb, #c0392b 16%, #fff);
}

.day-modal-bangon-inline {
  order: 3;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  max-width: min(52%, 11em);
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7faff 0%, #edf2fa 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #d5dde8);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 1px 2px rgba(26, 39, 63, 0.05);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--accent) 82%, #1a2233);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-modal-bangon-inline--empty {
  font-weight: 700;
  color: #7a8496;
  background: color-mix(in srgb, #fff 70%, #eef2f8);
  border-color: color-mix(in srgb, var(--border) 85%, #c8d4e6);
  box-shadow: none;
}

.day-modal-part-bangon {
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #fff 70%, #eef3fa);
  border: 1px solid color-mix(in srgb, var(--border) 80%, #c8d4e6);
}

.day-modal-part-bangon .bangon-picker-title {
  display: none;
}

.day-modal-part-actions {
  display: flex;
}

.day-modal-add--part,
.day-modal-add--second {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, #c8d2e2);
  background: color-mix(in srgb, var(--accent) 6%, #fff);
  color: color-mix(in srgb, var(--accent) 85%, #1a2233);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.day-modal-add--part:hover,
.day-modal-add--second:hover {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: var(--accent);
}

.day-modal-add-part-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
}

.day-modal-bangon {
  display: block;
}

.bangon-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bangon-picker-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.bangon-picker-presets .bangon-chip {
  width: 100%;
  padding: 7px 6px;
  font-size: 0.72rem;
  text-align: center;
}

.bangon-hour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.bangon-grid-btn {
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  background: #fff;
  color: #3d4657;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 7px 2px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.bangon-grid-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: #f7f9fd;
}

.bangon-grid-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: color-mix(in srgb, var(--accent) 88%, #1e2636);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.bangon-custom-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
  background: rgba(255, 255, 255, 0.72);
}

.bangon-custom-field--active {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}

.bangon-custom-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.bangon-custom-input {
  flex: 0 1 auto;
  width: auto;
  min-width: 108px;
  max-width: 132px;
  margin-left: auto;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e2636;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  background: #fff;
}

.bangon-custom-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.day-modal-bangon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.day-modal-bangon-row--presets {
  padding-top: 2px;
}

.bangon-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: #3d4657;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 8px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.bangon-chip--hour {
  flex: 0 0 auto;
  min-width: 50px;
  text-align: center;
}

.bangon-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: #f7f9fd;
}

.bangon-chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: color-mix(in srgb, var(--accent) 88%, #1e2636);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.bangon-chip--preset {
  background: #f8fafc;
}

.bangon-chip--preset.is-active {
  background: color-mix(in srgb, var(--accent) 14%, #f8fafc);
}

.day-modal-bangon-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 72%, #e8eef8);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, #d5dde8);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.day-modal-bangon-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--accent) 72%, #3d4657);
}

.day-modal-bangon-view .day-modal-bangon-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e2636;
  letter-spacing: -0.02em;
}

.day-modal-header h2 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.3;
  color: #1a2233;
  letter-spacing: -0.03em;
}

.day-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--border) 80%, #c8d4e6);
  background: color-mix(in srgb, #fff 70%, #eef2f8);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #5c667a;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.day-modal-close:hover {
  background: #e8edf5;
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  color: #2d3748;
}

.day-modal-close svg {
  display: block;
}

.day-modal-body {
  padding: 14px 20px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.day-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-all-day-card + .day-detail-list {
  margin-top: 8px;
}

.day-detail-item {
  --day-detail-duration-width: 44px;
  display: grid;
  grid-template-columns: var(--day-detail-duration-width) 1fr;
  align-items: stretch;
  min-height: calc(var(--item-hours, 1) * var(--day-modal-hour-unit, 76px));
  height: auto;
  background: color-mix(in srgb, #fff 42%, var(--item-accent, var(--surface)));
  border: 1px solid var(--item-border, color-mix(in srgb, var(--item-text, #333) 14%, transparent));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 28, 45, 0.04);
}

.day-detail-item > .day-detail-body {
  min-height: 0;
  align-self: stretch;
  height: 100%;
}

.day-detail-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--item-text, #1e3a5f);
  background-color: color-mix(in srgb, #fff 38%, var(--item-accent, #fff));
  background-image: none;
  border: none;
  border-right: 1px solid color-mix(in srgb, var(--item-text, #333) 12%, transparent);
  border-radius: 0;
  box-sizing: border-box;
}

.day-detail-duration.slot-duration--start {
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: nowrap;
}

.day-detail-duration.slot-duration--all-day {
  font-size: 0;
}

.day-detail-duration--all-day-label {
  font-size: 0.7rem;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.day-detail-duration--empty {
  padding: 0;
}

.day-detail-body {
  position: relative;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-sizing: border-box;
  background: color-mix(in srgb, #fff 55%, transparent);
}

.day-detail-main {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  flex: 1 1 auto;
  padding: 12px 14px 6px;
  box-sizing: border-box;
  min-height: 0;
  overflow: visible;
  pointer-events: none;
}

.day-detail-item--has-members .day-detail-main {
  justify-content: center;
  transform: none;
}

.day-detail-item--multiline .day-detail-main {
  justify-content: flex-start;
  padding-top: 14px;
}

.day-detail-item--has-members .day-detail-text {
  line-height: 1.28;
}

.day-detail-item--has-members .day-detail-members {
  line-height: 1.3;
}

.day-detail-text,
.day-detail-members {
  pointer-events: auto;
}

.day-detail-text {
  margin: 0;
  flex: 0 0 auto;
  width: 100%;
  font-family: var(--font-schedule);
  font-size: 1.06rem;
  font-weight: var(--font-schedule-weight, 500);
  line-height: 1.4;
  color: var(--item-text, #1e2636);
  text-align: left;
  overflow: visible;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding-top: 1px;
}

.day-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  width: 100%;
}

.day-detail-members {
  margin: 0;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: color-mix(in srgb, var(--item-text, #333) 72%, #000);
  min-width: 0;
  opacity: 0.86;
}

.day-detail-members .slot-members-mark {
  width: 12px;
  height: 12px;
  opacity: 0.65;
  flex-shrink: 0;
}

.day-detail-members .slot-members-label {
  display: none;
}

.day-detail-members .slot-members-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-detail-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 4px 14px 11px;
  width: auto;
  min-height: 0;
  overflow: visible;
  pointer-events: none;
}

.day-detail-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.day-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--item-text, #333) 78%, #000);
  background: color-mix(in srgb, #fff 55%, var(--item-accent, #eef2f8));
  border: 1px solid color-mix(in srgb, var(--item-text, #333) 12%, transparent);
}

.day-detail-chip--muted {
  opacity: 0.88;
  font-weight: 650;
  color: color-mix(in srgb, var(--item-text, #333) 68%, #5c667a);
}

.day-detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: color-mix(in srgb, var(--item-text, #333) 82%, #000);
}

.day-detail-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.88;
  flex-shrink: 0;
}

.day-detail-tag--muted {
  opacity: 0.72;
}

.day-detail-tag--muted::before {
  opacity: 0.45;
}

.day-detail-tag--all-day::before {
  border-radius: 2px;
  background: none;
  border: 1.5px solid currentColor;
  width: 7px;
  height: 7px;
  opacity: 0.75;
}

.day-detail-foot-aside {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  pointer-events: auto;
}

.day-detail-foot-aside .day-detail-actions {
  margin-left: 0;
}

.slot-edit-link-wrap {
  gap: 6px;
}

.slot-edit-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.slot-edit-link-type {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--border, #d8dee8) 90%, transparent);
  background: color-mix(in srgb, var(--surface-2, #eef1f8) 40%, #fff);
}

.slot-edit-link-type-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.slot-edit-link-type-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.slot-edit-link-type-option span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
  transition: background 0.12s ease, color 0.12s ease;
}

.slot-edit-link-type-option:has(input:checked) span {
  background: #fff;
  color: var(--accent, #2f4f7a);
  box-shadow: 0 1px 3px rgba(20, 28, 45, 0.08);
}

.slot-edit-link-type-option:has(input:focus-visible) span {
  outline: 2px solid color-mix(in srgb, var(--accent, #2f4f7a) 40%, transparent);
  outline-offset: 1px;
}

.slot-edit-link-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 6px;
}

.slot-edit-link-fields input {
  min-width: 0;
}

.slot-chip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 2px 8px;
  width: 100%;
  margin-top: 0;
  min-width: 0;
  text-align: center;
}

/* 멤버+링크 동시·소형칩: 아이콘만 가로 한 줄 (텍스트 숨김) */
.slot-chip--meta-icons .slot-chip-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
}

.slot-chip--meta-icons .slot-chip-meta .slot-members,
.slot-chip--meta-icons .slot-chip-meta .slot-broadcast,
.slot-chip--meta-icons .slot-chip-meta a.slot-broadcast {
  display: inline-flex !important;
  flex-direction: row !important;
  width: auto !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  min-width: 0 !important;
  gap: 0;
  margin: 0 !important;
  padding: 0;
}

.slot-chip--meta-icons .slot-members-text,
.slot-chip--meta-icons .slot-members-label,
.slot-chip--meta-icons .slot-broadcast-text,
.slot-chip--meta-icons .slot-link-label {
  display: none !important;
}

.slot-chip--meta-icons .slot-members-mark,
.slot-chip--meta-icons .slot-broadcast-mark,
.slot-chip--meta-icons .slot-broadcast .slot-link-icon,
.slot-chip--meta-icons .slot-link-icon {
  width: 12px;
  height: 12px;
  opacity: 0.88;
}

.slot-chip-meta .slot-members,
.slot-chip-meta .slot-broadcast {
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
  margin-top: 0;
}

.slot-broadcast {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  color: color-mix(in srgb, var(--chip-text, #333) 72%, #000);
  opacity: 0.92;
  text-decoration: none;
}

.slot-broadcast:hover,
.slot-broadcast:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.slot-broadcast-mark {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  background: currentColor;
  opacity: 0.78;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M10 9.5l5.5 2.5L10 14.5V9.5z' fill='black' stroke='none'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='13' rx='2'/%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M10 9.5l5.5 2.5L10 14.5V9.5z' fill='black' stroke='none'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.slot-broadcast .slot-link-icon,
.slot-broadcast-link-icon {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  opacity: 0.78;
}

.slot-broadcast-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.day-detail-meta-row .day-detail-members,
.day-detail-meta-row .day-detail-broadcast {
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
}

.day-detail-broadcast {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  color: color-mix(in srgb, var(--item-text, #333) 78%, #000);
  opacity: 0.8;
  text-decoration: none;
}

.day-detail-broadcast:hover,
.day-detail-broadcast:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.day-detail-broadcast .slot-broadcast-mark {
  width: 13px;
  height: 13px;
}

.magenda-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.magenda-event-meta .magenda-event-members {
  margin-top: 0;
}

.magenda-event-broadcast {
  font-size: 0.72rem;
}

.slot-link,
.day-detail-broadcast-link,
.slot-broadcast-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 48%, var(--item-accent, #fff));
  border: 1px solid color-mix(in srgb, var(--item-text, #333) 16%, transparent);
  color: color-mix(in srgb, var(--item-text, #333) 90%, #000);
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.day-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  min-width: 0;
  max-width: min(100%, 168px);
  padding: 7px 13px 7px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--item-text, #333) 9%, var(--item-accent, #fff));
  border: 1px solid color-mix(in srgb, var(--item-text, #333) 20%, transparent);
  color: var(--item-text, #1e2636);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.slot-link:hover,
.day-detail-broadcast-link:hover,
.slot-broadcast-link:hover {
  background: color-mix(in srgb, #fff 68%, var(--item-accent, #fff));
  border-color: color-mix(in srgb, var(--item-text, #333) 30%, transparent);
  color: var(--item-text, #1e2636);
}

.day-detail-link:hover {
  background: color-mix(in srgb, var(--item-text, #333) 15%, var(--item-accent, #fff));
  border-color: color-mix(in srgb, var(--item-text, #333) 32%, transparent);
  color: var(--item-text, #1e2636);
}

.day-detail-link:active {
  background: color-mix(in srgb, var(--item-text, #333) 19%, var(--item-accent, #fff));
}

.day-detail-link:focus-visible,
.slot-link:focus-visible,
.day-detail-broadcast-link:focus-visible,
.slot-broadcast-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--item-text, #333) 45%, transparent);
  outline-offset: 2px;
}

.slot-link-icon {
  flex: none;
  opacity: 0.72;
}

.slot-link-broadcast-icon {
  flex: none;
  display: inline-block;
  width: 11px;
  height: 11px;
  opacity: 0.82;
}

.day-detail-link .slot-link-icon {
  width: 13px;
  height: 13px;
  opacity: 0.88;
}

.day-detail-link .slot-link-broadcast-icon {
  width: 13px;
  height: 13px;
  opacity: 0.88;
}

.slot-link-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-all-day-card-foot {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 2px;
}

.day-detail-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.day-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
}

.day-modal-empty-icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.85;
}

.day-modal-empty-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #3d4657;
}

.day-modal-empty-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.day-detail-btn {
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--item-text, #333) 16%, transparent);
  background: color-mix(in srgb, #fff 75%, var(--item-accent, #fff));
  color: var(--item-text, #4a5568);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.day-detail-btn:hover {
  background: #f5f7fb;
  border-color: #c5ced9;
}

.day-detail-btn--danger {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.25);
  background: #fff5f4;
}

.day-detail-btn--danger:hover {
  background: #fdecea;
  border-color: rgba(192, 57, 43, 0.4);
}

.day-detail-btn--highlight {
  color: color-mix(in srgb, var(--highlight-deep) 82%, var(--item-text, #4a5568));
  border-color: color-mix(in srgb, var(--highlight) 32%, var(--border));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 82%, var(--highlight-soft) 18%) 0%,
      color-mix(in srgb, #fff 90%, var(--highlight-soft) 10%) 100%
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.day-detail-btn--highlight:hover {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 72%, var(--highlight-soft) 28%) 0%,
      color-mix(in srgb, #fff 84%, var(--highlight-soft) 16%) 100%
    );
  border-color: color-mix(in srgb, var(--highlight) 48%, var(--border));
}

.day-modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 22px;
  background: #fafbfc;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.day-modal-actions .btn {
  flex: 1;
  justify-content: center;
}

.day-modal-actions.hidden {
  display: none;
}

.btn-danger.btn-ghost {
  background: #fff5f4;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.btn-danger.btn-ghost:hover {
  background: #fdecea;
}

/* ─── 편집 모드 ─── */

.edit-hint {
  margin: 12px 0 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #1e3a5f;
  background: linear-gradient(135deg, #e8f0ff, #dbeafe);
  border-radius: 8px;
  border: 1px solid rgba(45, 74, 122, 0.12);
}

.edit-mode .day-cell--editable {
  cursor: default;
}

.edit-mode .day-cell--editable .slot-list {
  cursor: default;
}

.edit-mode .day-cell--editable .slot-chip--editable {
  cursor: grab;
}

.edit-mode .day-cell--editable:hover {
  transform: none;
}

.day-cell.drop-target {
  box-shadow:
    0 0 0 2px rgba(79, 110, 247, 0.45),
    0 4px 14px rgba(79, 110, 247, 0.15);
}

.slot-chip--editable {
  cursor: grab;
  position: relative;
}

.slot-chip--editable:active {
  cursor: grabbing;
}

.edit-mode .slot-chip--selected {
  outline: 2px solid var(--highlight, #4a60a9);
  outline-offset: -1px;
  z-index: 1;
}

.day-cell--all-day {
  background: var(--all-day-bg, var(--surface)) !important;
  border-color: color-mix(in srgb, var(--all-day-text, #333) 22%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 1px 3px rgba(26, 34, 51, 0.08);
  gap: 0;
}

.day-cell--all-day .day-head {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.day-cell--all-day .slot-list--all-day {
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 2px 6px;
  z-index: 0;
}

.day-cell--all-day-mixed {
  background: var(--all-day-bg, var(--surface)) !important;
  border-color: color-mix(in srgb, var(--all-day-text, #333) 22%, transparent);
  gap: 4px;
}

.day-cell--all-day-mixed .slot-list--all-day {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  padding: 2px 4px 0;
  z-index: 1;
}

.day-cell--all-day-mixed .slot-chip--all-day {
  min-height: 0 !important;
  height: auto !important;
}

.day-cell--all-day-mixed .slot-text--all-day {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  -webkit-line-clamp: 2;
}

.day-cell--all-day-mixed .slot-list:not(.slot-list--all-day) {
  position: relative;
  flex: 0 0 var(--day-slots-height, 148px);
  height: var(--day-slots-height, 148px);
  min-height: var(--day-slots-height, 148px);
  max-height: var(--day-slots-height, 148px);
}

.slot-duration--all-day {
  background-image: none !important;
}

.slot-duration-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: block;
  flex-shrink: 0;
}

.slot-chip--all-day {
  width: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  min-height: 0;
  height: auto;
  background: var(--chip-bg, #fff);
  color: var(--chip-text, #333);
  border: 1px solid var(--chip-border, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.slot-chip--all-day .slot-chip-body {
  flex: 1 1 auto;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 5px;
}

.slot-chip--all-day .slot-text {
  text-align: left;
  white-space: pre-line;
  display: block;
  overflow: hidden;
}

.day-cell--all-day.today,
.day-cell--all-day-mixed.today {
  z-index: 2;
}

.day-cell--all-day.today::before,
.day-cell--all-day.today::after,
.day-cell--all-day-mixed.today::before,
.day-cell--all-day-mixed.today::after {
  display: none;
}

.day-cell--all-day .day-num {
  background: rgba(255, 255, 255, 0.92);
  color: #1a2233;
  border-color: rgba(26, 34, 51, 0.12);
  box-shadow: 0 1px 2px rgba(26, 34, 51, 0.08);
}

.day-cell--all-day.sun .day-num {
  color: var(--sun);
  background: rgba(255, 255, 255, 0.92);
}

.day-cell--all-day.sat .day-num {
  color: var(--sat);
  background: rgba(255, 255, 255, 0.92);
}

.day-all-day-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--item-accent, var(--surface));
  border: 1px solid var(--item-border, color-mix(in srgb, var(--item-text, #333) 16%, transparent));
  box-shadow: 0 1px 3px rgba(20, 28, 45, 0.06);
}

.day-all-day-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.day-all-day-text {
  margin: 0;
  width: 100%;
  font-size: 0.95rem;
  font-weight: var(--font-schedule-weight, 500);
  line-height: 1.35;
  text-align: left;
  color: var(--item-text, #1e2636);
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.slot-chip.dragging {
  opacity: 0.45;
}

.slot-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 0.7rem;
  opacity: 0.35;
  line-height: 1;
  align-self: center;
  flex-shrink: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.slot-drag-handle:active {
  cursor: grabbing;
}

.slot-chip--editable .slot-chip-body,
.slot-chip--editable .slot-duration,
.slot-chip--editable .slot-text {
  user-select: none;
  -webkit-user-select: none;
}

.duration-legend {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.duration-legend strong {
  color: #1e3a5f;
  font-weight: 700;
}

.add-hint {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 12px 4px;
  border: 1px dashed rgba(26, 34, 51, 0.15);
  border-radius: 8px;
}

.slot-list--empty {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.ctx-menu {
  position: fixed;
  z-index: 300;
  min-width: 160px;
  max-width: min(240px, calc(100vw - 20px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(26, 34, 51, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ctx-menu--anchor-left .ctx-menu-color-row {
  flex-direction: row-reverse;
}

#cat-ctx-menu .ctx-menu-color-row {
  flex-wrap: wrap;
}

#cat-ctx-menu .ctx-menu-color-row input[type="color"] {
  margin-left: auto;
}

.ctx-menu--anchor-left#cat-ctx-menu .ctx-menu-color-row input[type="color"] {
  margin-left: 0;
  margin-right: auto;
}

.ctx-menu.hidden {
  display: none;
}

.ctx-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.ctx-menu-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
}

.ctx-menu-color-row:hover {
  background: #f0f3f8;
}

.ctx-menu-color-row input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  flex-shrink: 0;
}

.ctx-menu-color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.ctx-menu-color-row input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.ctx-menu button:hover {
  background: #f0f3f8;
}

.ctx-menu button.danger {
  color: #c0392b;
}

.ctx-menu button.hidden {
  display: none;
}

.visually-hidden {
  position: fixed;
  left: -9999px;
  width: 24px;
  height: 24px;
  opacity: 0;
}

.hidden {
  display: none !important;
}

.mobile-agenda {
  display: none;
}

.slot-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 16px;
  overscroll-behavior: contain;
}

.slot-edit-modal.hidden {
  display: none;
}

.sr-outcome-modal .sr-outcome-card {
  max-width: 420px;
}

.sr-outcome-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sr-outcome-card[data-tone="success"] .sr-outcome-title {
  color: #1b6b4d;
}

.sr-outcome-card[data-tone="warn"] .sr-outcome-title {
  color: #9a3412;
}

.sr-outcome-card[data-tone="muted"] .sr-outcome-title {
  color: #5c6578;
}

.sr-outcome-progress {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted, #7a8496);
  line-height: 1.4;
}

.sr-outcome-song {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text, #1f2937);
}

.sr-outcome-message {
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted, #5c6578);
}

body.sr-outcome-open {
  overflow: hidden;
}

.slot-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 28, 0.56);
}

.slot-edit-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow:
    0 20px 50px rgba(26, 34, 51, 0.2),
    0 0 0 1px color-mix(in srgb, var(--border) 55%, transparent);
}

.slot-edit-card h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 800;
}

.slot-edit-card:has(.slot-edit-body) {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 680px);
  overflow: hidden;
  padding: 0;
}

.slot-edit-header {
  flex-shrink: 0;
  padding: 18px 20px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.slot-edit-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.slot-edit-header h3::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent-deep) 100%);
}

.slot-edit-card:has(.slot-edit-body) h3 {
  flex-shrink: 0;
}

.slot-edit-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 20px 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.slot-edit-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.slot-edit-block:last-child {
  margin-bottom: 0;
}

.slot-edit-row {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.slot-edit-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slot-edit-row .slot-edit-block {
  margin-bottom: 0;
}

.slot-edit-field-label,
.slot-edit-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

.field-optional {
  font-size: 0.66rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

.slot-edit-card label.slot-edit-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  font-size: inherit;
  color: inherit;
}

.slot-edit-card label:not(.slot-edit-block):not(.slot-edit-link-type-option):not(.slot-edit-time-part) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.slot-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.slot-edit-control,
.slot-edit-card input:not([type="radio"]),
.slot-edit-card select,
.slot-edit-card textarea,
.slot-edit-card .bangon-hour-select,
.slot-edit-card .bangon-minute-select,
.slot-edit-card .slot-start-hour-select,
.slot-edit-card .slot-start-minute-select {
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text, #2a3140);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.slot-edit-control,
.slot-edit-card input:not([type="radio"]),
.slot-edit-card select,
.slot-edit-card textarea {
  width: 100%;
}

.slot-edit-control:focus,
.slot-edit-card input:not([type="radio"]):focus,
.slot-edit-card select:focus,
.slot-edit-card textarea:focus,
.slot-edit-card .slot-start-hour-select:focus,
.slot-edit-card .slot-start-minute-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

#slot-edit-text {
  min-height: 4.2em;
  resize: vertical;
  line-height: 1.45;
  field-sizing: content;
}

#slot-edit-hours {
  min-height: 38px;
  appearance: auto;
}

.slot-edit-hint {
  display: block;
  margin: 0;
  font-size: 0.66rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  line-height: 1.35;
}

.bangon-picker-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #3d4657;
  letter-spacing: -0.02em;
}

.bangon-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.bangon-quick-btn {
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  background: #fff;
  color: #3d4657;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.bangon-quick-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: #f7f9fd;
}

.bangon-quick-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: color-mix(in srgb, var(--accent) 88%, #1e2636);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.bangon-quick-btn--clear {
  color: #a94442;
}

.bangon-quick-btn--clear:hover {
  border-color: color-mix(in srgb, #c0392b 35%, var(--border));
  background: #fff7f7;
}

.bangon-quick-btn--clear.is-active {
  border-color: color-mix(in srgb, #c0392b 45%, var(--border));
  background: #fff0f0;
  color: #c0392b;
  box-shadow: 0 0 0 1px color-mix(in srgb, #c0392b 15%, transparent);
}

.bangon-picker .slot-start-picker-custom--solo {
  margin-top: 0;
}

.bangon-hour-select,
.bangon-minute-select {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  color: inherit;
}

.bangon-hour-select:focus,
.bangon-minute-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.bangon-approx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
  user-select: none;
}

.bangon-approx-toggle.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bangon-approx-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.bangon-approx-toggle input {
  margin: 0;
  accent-color: var(--accent);
}

.slot-start-picker,
.slot-start-picker-mount {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-start-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-start-picker--direct {
  padding: 0;
  background: transparent;
  border: none;
}

.slot-start-picker-custom--solo {
  display: flex;
  align-items: center;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.slot-start-picker-custom--solo .slot-start-picker-selects {
  width: 100%;
  margin-left: 0;
}

.slot-start-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.slot-start-picker-preview {
  font-size: 0.88rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 88%, #1e2636);
  letter-spacing: -0.02em;
}

.slot-start-picker-preview.is-empty {
  font-weight: 700;
  color: var(--muted);
}

.slot-start-clear-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.slot-start-clear-btn:hover {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
}

.slot-start-hour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.slot-start-grid-btn {
  font-size: 0.68rem;
}

.slot-start-picker-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

.slot-start-picker-custom-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.slot-start-picker-selects {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.slot-start-hour-select,
.slot-start-minute-select {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  min-width: 0;
}

.slot-start-hour-select {
  flex: 1 1 auto;
  max-width: 132px;
}

.slot-start-minute-select {
  flex: 0 0 auto;
  width: 72px;
}

.slot-start-hour-select:focus,
.slot-start-minute-select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.slot-start-colon {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
}

.bangon-picker-time-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.bangon-picker-time-row .slot-start-picker {
  flex: 1;
  min-width: 0;
}

.bangon-picker-time-row .bangon-approx-toggle {
  flex-shrink: 0;
  margin-bottom: 1px;
}

.slot-start-picker.slot-start-picker--modal {
  width: 100%;
}

.slot-start-picker .slot-edit-time-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.slot-start-picker .slot-edit-time-part {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  min-width: 0;
}

.slot-start-picker .slot-edit-time-part-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  line-height: 1;
}

.slot-start-picker .slot-start-hour-field {
  position: relative;
  width: 100%;
}

.slot-start-picker .slot-start-hour-trigger {
  width: 100%;
  min-height: 38px;
  text-align: left;
  cursor: pointer;
}

.slot-start-picker .slot-start-hour-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 28, 45, 0.14);
  padding: 4px;
}

.slot-start-picker .slot-start-hour-panel.slot-start-hour-panel--floating {
  position: fixed;
  z-index: 320;
  right: auto;
  max-height: min(320px, calc(100vh - 24px));
}

/* body로 포탈된 패널도 동일 스타일 */
body > .slot-start-hour-panel.slot-start-hour-panel--floating {
  z-index: 320;
  max-height: min(320px, calc(100vh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 28, 45, 0.14);
  padding: 4px;
}

body > .slot-start-hour-panel.slot-start-hour-panel--floating.hidden {
  display: none;
}

body > .slot-start-hour-panel .slot-start-hour-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body > .slot-start-hour-panel .slot-start-hour-option {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.25;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text);
}

body > .slot-start-hour-panel .slot-start-hour-option:hover {
  background: #f3f6fb;
}

body > .slot-start-hour-panel .slot-start-hour-option.is-active {
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: color-mix(in srgb, var(--accent) 90%, #1e2636);
  font-weight: 700;
}

.slot-start-picker .slot-start-hour-panel.hidden {
  display: none;
}

.slot-start-picker .slot-start-hour-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-start-picker .slot-start-hour-option,
.slot-start-picker .slot-start-minute-option {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.25;
  cursor: pointer;
  border-radius: 8px;
}

.slot-start-picker .slot-start-hour-option {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  color: var(--text);
}

.slot-start-picker .slot-start-hour-option:hover,
.slot-start-picker .slot-start-minute-option:hover:not(:disabled) {
  background: #f3f6fb;
}

.slot-start-picker .slot-start-hour-option.is-active,
.slot-start-picker .slot-start-minute-option.is-active {
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: color-mix(in srgb, var(--accent) 90%, #1e2636);
  font-weight: 700;
}

.slot-start-picker .slot-start-minute-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-start-picker .slot-start-minute-option {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}

.slot-start-picker .slot-start-minute-option:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--surface-2, #eef1f8) 40%, #fff);
}

#slot-edit-start-wrap.hidden {
  display: none;
}

.slot-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.slot-edit-card:has(.slot-edit-body) .slot-edit-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 20px 18px;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  background: #fff;
}

.btn-danger {
  background: #fee;
  color: #c0392b;
  border: 1px solid #f5c6c6;
}

.save-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e3a5f;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  z-index: 400;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.save-toast.hidden {
  display: none;
}

.save-toast.error {
  background: #c0392b;
}


.day-cell.day-cell--holiday .day-head-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: calc(100% - 4px);
}

.day-holiday-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun, #e2557b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sun, #e2557b) 25%, transparent);
}

.day-holiday-label {
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--sun, #e2557b);
  letter-spacing: -0.02em;
  white-space: nowrap;
  max-width: 4.8em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-cell.day-cell--holiday:not(.today) .day-num {
  color: var(--sun, #e2557b);
  background: var(--sun-bg, #fff0f4);
}

.holiday-badge,
.day-modal-holiday-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--sun, #e2557b);
  background: var(--sun-bg, #fff0f4);
  border: 1px solid color-mix(in srgb, var(--sun, #e2557b) 22%, transparent);
}

.calendar-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  color: var(--accent-deep, #243a6e);
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 255, 255, 0.72) 0%, transparent 62%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(74, 111, 165, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #f4f7fc 0%, var(--cal-bg, #eef3fa) 48%, #e7eef8 100%);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.calendar-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 58%, rgba(255, 255, 255, 0.45) 0 1.5px, transparent 2px),
    radial-gradient(circle at 30% 68%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px);
  opacity: 0.55;
  pointer-events: none;
}

/* 뷰포트 높이에 고정해, 달력이 커져도 UFO가 아래로 밀리지 않게 */
.calendar-loading__anchor {
  position: sticky;
  top: 0;
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: none;
}

.calendar-loading__stage {
  position: relative;
  width: min(168px, 42vw);
  height: min(148px, 36vw);
  display: grid;
  place-items: center;
}

.calendar-loading__ufo {
  position: relative;
  z-index: 2;
  display: block;
  width: min(112px, 28vw);
  height: auto;
  transform-origin: center 55%;
  filter: drop-shadow(0 10px 18px rgba(47, 79, 122, 0.22));
  animation: calendar-loading-ufo-bob 2.8s ease-in-out infinite;
  user-select: none;
}

.calendar-loading__beam {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 1;
  width: 46%;
  height: 52%;
  transform: translateX(-50%);
  transform-origin: top center;
  background: linear-gradient(
    180deg,
    rgba(255, 217, 131, 0.42) 0%,
    rgba(255, 217, 131, 0.16) 42%,
    rgba(255, 217, 131, 0) 100%
  );
  clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
  filter: blur(0.2px);
  animation: calendar-loading-beam 2.8s ease-in-out infinite;
}

.calendar-loading__shadow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 0;
  width: 42%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(47, 79, 122, 0.22) 0%, transparent 72%);
  animation: calendar-loading-shadow 2.8s ease-in-out infinite;
}

.calendar-loading__spark {
  position: absolute;
  z-index: 1;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 8px rgba(141, 186, 235, 0.8);
  animation: calendar-loading-spark 3.2s ease-in-out infinite;
}

.calendar-loading__spark--a {
  left: 14%;
  top: 28%;
  animation-delay: 0s;
}

.calendar-loading__spark--b {
  right: 16%;
  top: 22%;
  width: 4px;
  height: 4px;
  animation-delay: -1.1s;
}

.calendar-loading__spark--c {
  right: 28%;
  bottom: 30%;
  width: 3px;
  height: 3px;
  animation-delay: -2s;
}

.calendar-loading__label {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--accent-deep, #243a6e) 78%, #6b7a94);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.calendar-loading__dots::before {
  content: "";
  display: inline-block;
  width: 1.35em;
  text-align: left;
  animation: calendar-loading-dots 1.4s steps(4, end) infinite;
}

@keyframes calendar-loading-ufo-bob {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-9deg);
  }
  40% {
    transform: translate3d(4px, -14px, 0) rotate(-3deg);
  }
  70% {
    transform: translate3d(-3px, -8px, 0) rotate(-7deg);
  }
}

@keyframes calendar-loading-beam {
  0%, 100% {
    opacity: 0.55;
    transform: translateX(-50%) scaleY(0.92);
  }
  50% {
    opacity: 0.95;
    transform: translateX(-50%) scaleY(1.05);
  }
}

@keyframes calendar-loading-shadow {
  0%, 100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.85;
  }
  50% {
    transform: translateX(-50%) scaleX(0.72);
    opacity: 0.45;
  }
}

@keyframes calendar-loading-spark {
  0%, 100% {
    opacity: 0.25;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px) scale(1.15);
  }
}

@keyframes calendar-loading-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-loading__ufo,
  .calendar-loading__beam,
  .calendar-loading__shadow,
  .calendar-loading__spark,
  .calendar-loading__dots::before {
    animation: none;
  }

  .calendar-loading__dots::before {
    content: "...";
  }
}
html.cal-chips-pending .calendar-loading,
html.cal-chips-revealing .calendar-loading,
html.cal-chips-finalizing .calendar-loading {
  display: block;
}

html.cal-chips-pending .calendar-loading,
html.cal-chips-finalizing .calendar-loading {
  opacity: 1;
}

html.cal-chips-revealing .calendar-loading {
  opacity: 0;
  pointer-events: none;
}

/* 로딩·최종피팅 동안 wrap 높이 고정 — pending→finalizing 때 UFO 위치가 바뀌지 않게 */
html.cal-chips-pending.display-timeline .calendar-wrap,
html.cal-chips-finalizing.display-timeline .calendar-wrap {
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px);
  min-height: calc(100dvh - 20px);
  overflow: hidden;
}

/* display:none 금지 — 피팅 시 clientHeight/폭 측정이 깨짐 */
html.cal-chips-pending #calendar,
html.cal-chips-revealing #calendar,
html.cal-chips-finalizing #calendar {
  pointer-events: none;
}

html.cal-chips-pending #calendar,
html.cal-chips-finalizing #calendar {
  visibility: hidden;
  opacity: 0;
}

html.cal-chips-revealing #calendar {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.18s ease;
}

html:not(.cal-chips-pending):not(.cal-chips-revealing):not(.cal-chips-finalizing) .calendar-loading {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .calendar-loading,
  html.cal-chips-revealing #calendar {
    transition: none;
  }
}


@media (max-width: 900px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .layout {
    flex: none;
    min-height: auto;
  }

  .calendar-wrap {
    min-height: 480px;
  }

  .header--sidebar .header-month {
    width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  /* 사이드바 자식을 layout 그리드에 올려 순서 재배치 */
  .sidebar {
    display: contents;
    position: static;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .header--sidebar,
  .calendar-subscribe-panel,
  .content-memo-panel,
  .highlights-panel {
    order: 1;
  }

  .calendar-column {
    order: 2;
    min-height: 480px;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .calendar-column .calendar-wrap {
    min-height: 480px;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  /* 카테고리·디자인·푸터는 달력 아래 */
  .legend-panel,
  .layout-panel {
    order: 3;
  }

  .calendar-page-note {
    order: 4;
    width: 100%;
  }

  /* 중간 폭·모바일: 사이드바 라이브 패널 대신 원형 오버레이 */
  .calendar-live-panel {
    display: none !important;
  }

  a.calendar-live-orb:not(.hidden) {
    display: block !important;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 12px 10px 28px;
  }

  .header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .header-right {
    align-items: stretch;
  }

  .mode-control {
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
  }

  .calendar {
    grid-template-rows: repeat(var(--calendar-rows, 6), minmax(96px, 1fr));
  }

  .day-cell {
    min-height: 96px;
    padding: 6px 4px;
  }

  .slot-text {
    font-size: 0.62rem;
  }

  .day-modal-card {
    border-radius: 16px;
    max-height: 92vh;
  }

  .day-detail-item {
    grid-template-columns: 40px 1fr;
    min-height: calc(var(--item-hours, 1) * var(--day-modal-hour-unit, 72px));
    height: auto;
  }

  .day-detail-body {
    min-height: 0;
  }

  .day-detail-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .day-detail-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .day-modal-actions {
    flex-direction: column;
  }
}

.site-fan-notice {
  margin: 0;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted, #667085);
  line-height: 1.45;
}

.site-page-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

.site-page-foot--home {
  margin-top: 14px;
  padding: 0 8px 18px;
}

.site-page-foot--minimal {
  display: block;
  margin: 8px 0 0;
  padding: 0 4px 10px;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted, #667085);
}

.sidebar .site-page-foot--minimal {
  flex-shrink: 0;
  margin-top: 2px;
  padding-bottom: 4px;
}

.site-page-foot > * {
  margin: 0;
  width: 100%;
  text-align: center;
}

.site-page-foot > .font-credit {
  text-align: center;
}

.site-legal-footer {
  margin: 18px auto 24px;
  padding: 0 16px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted, #667085);
}

.site-foot-legal a {
  color: inherit;
  text-decoration: none;
}

.site-foot-legal a:hover {
  text-decoration: underline;
}

.site-legal-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.site-legal-footer a:hover {
  text-decoration: underline;
}

.site-legal-footer span[aria-hidden="true"] {
  margin: 0 6px;
  opacity: 0.55;
}

/* ── 일정 칩: 본문 시간 표시 (slot-chip-style-inline) ── */
.layout-section-label {
  margin: 12px 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.layout-chip-style-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px 12px;
  border: 1.5px solid color-mix(in srgb, var(--highlight) 35%, var(--border));
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.layout-preview-chip {
  width: 30px;
  height: 24px;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 2px;
  align-items: stretch;
}

.layout-option-preview--chip-inline .layout-preview-chip {
  position: relative;
  display: block;
}

.layout-option-preview--chip-inline .layout-preview-chip-time-text {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 3px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--accent-deep) 28%, #fff);
}

.layout-option-preview--chip-inline .layout-preview-chip-body {
  width: 100%;
  height: 100%;
}

.layout-preview-chip-side {
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent-deep) 18%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent-deep) 22%, transparent);
}

.layout-preview-chip-body {
  border-radius: 2px;
  background: color-mix(in srgb, var(--highlight) 24%, #fff);
  border: 1px solid color-mix(in srgb, var(--highlight) 18%, transparent);
}

/* 칩 색상 옵션 미리보기 */
.layout-option-preview--color-default,
.layout-option-preview--color-tinted,
.layout-option-preview--color-original {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.layout-preview-color-chip {
  width: 13px;
  height: 18px;
  border-radius: 3px;
}

.layout-option-preview--color-default .layout-preview-color-chip--a {
  background: #edf4fa;
  border: 1px solid color-mix(in srgb, #1a5276 16%, transparent);
}

.layout-option-preview--color-default .layout-preview-color-chip--b {
  background: #f2eef8;
  border: 1px solid color-mix(in srgb, #4a235a 16%, transparent);
}

.layout-option-preview--color-tinted .layout-preview-color-chip--a {
  background: #dceeff;
  border: 1px solid color-mix(in srgb, #1a5276 28%, transparent);
}

.layout-option-preview--color-tinted .layout-preview-color-chip--b {
  background: #eadcf5;
  border: 1px solid color-mix(in srgb, #4a235a 28%, transparent);
}

.layout-option-preview--color-original .layout-preview-color-chip--a {
  background: #59da2b;
  border: 1px solid color-mix(in srgb, #29481e 32%, transparent);
}

.layout-option-preview--color-original .layout-preview-color-chip--b {
  background: #d9d2e9;
  border: 1px solid color-mix(in srgb, #4a235a 28%, transparent);
}

/* inline: 좌상단 시간 텍스트 · 좁은 칩(≈1칸)일 때만 왼쪽 시간 칸 */
html.slot-chip-style-inline .slot-chip--inline-timed:not(.slot-chip--inline-compact) {
  position: relative;
}

html.slot-chip-style-inline .slot-chip--inline-timed:not(.slot-chip--inline-compact) > .slot-time-text {
  position: absolute;
  top: 4px;
  left: 7px;
  z-index: 2;
  display: block;
  max-width: calc(100% - 14px);
  margin: 0;
  padding: 0;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  color: color-mix(in srgb, var(--chip-text, #333) 72%, #000);
  opacity: 0.92;
}

.slot-time-text--all-day {
  letter-spacing: 0.01em;
}

html.slot-chip-style-inline .slot-chip--inline-compact > .slot-time-text {
  display: none !important;
}

html.slot-chip-style-inline .slot-chip--inline-timed:not(.slot-chip--inline-compact) > .slot-duration--inline-fallback {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact {
  grid-template-columns: auto 1fr !important;
}

html.slot-chip-style-inline .slot-chip--inline-timed.slot-chip--inline-compact > .slot-duration--inline-fallback {
  display: flex !important;
  visibility: visible !important;
  position: static !important;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 26px !important;
  width: auto !important;
  min-height: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-right: 1px dashed rgba(30, 58, 95, 0.18) !important;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
  color: #1e3a5f;
  background-color: rgba(255, 255, 255, 0.55);
}

html.slot-chip-style-inline .slot-chip--inline-timed.slot-chip--inline-compact > .slot-duration--inline-fallback.slot-duration--all-day {
  background-image: none !important;
}

/* 작아진 종일 칩(인라인 모드): 왼쪽 시간칸·종일 라벨 숨기고 제목만 중앙 */
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day {
  grid-template-columns: 1fr !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact
  > .slot-duration--inline-fallback,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact
  > .slot-duration--inline-fallback,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact
  > .slot-duration,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact
  > .slot-duration,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact
  > .slot-time-text,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact
  > .slot-time-text,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  > .slot-duration,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  > .slot-time-text {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact
  .slot-chip-body,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact
  .slot-chip-body,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  .slot-chip-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  grid-column: 1 !important;
  width: 100% !important;
  padding: 0 8px !important;
  text-align: center !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact
  .slot-text,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact
  .slot-text,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day
  .slot-text {
  text-align: center !important;
  width: 100% !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact .slot-chip-body {
  grid-column: auto !important;
  position: relative !important;
  display: block !important;
  min-height: 100%;
  height: 100%;
  padding: 0 5px !important;
  box-sizing: border-box;
  text-align: center;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--inline-timed.slot-chip--inline-compact:not(.slot-chip--has-members)
  .slot-chip-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact .slot-text {
  flex: 0 1 auto;
  text-align: center !important;
  width: 100%;
  min-height: 0;
  margin: 0;
  line-height: 1.3;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact .slot-members {
  flex: 0 0 auto;
  margin-top: 0;
  justify-content: center !important;
  text-align: center !important;
  font-size: 0.58rem;
  line-height: 1.1;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--has-members .slot-chip-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 2px 5px 3px !important;
  gap: 2px;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--has-members .slot-text {
  position: static !important;
  flex: 0 0 auto;
  width: 100%;
  min-height: max-content;
  margin: 0 !important;
  overflow: visible;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--has-members .slot-members {
  position: static !important;
  flex: 0 0 auto;
  width: 100%;
  margin: 0 !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable {
  grid-template-columns: auto 1fr auto !important;
}

/* 수정 모드에서도 작아진 종일 칩은 시간칸 없이 전체 너비 + 중앙 정렬
   (editable compact 기본값 auto 1fr auto 가 본문을 왼쪽 auto 칸에 넣는 문제 방지) */
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact.slot-chip--editable,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--editable {
  grid-template-columns: 1fr !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable
  > .slot-duration--inline-fallback,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable
  > .slot-duration,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable
  > .slot-time-text,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--editable
  > .slot-duration,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--editable
  > .slot-time-text {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable
  .slot-chip-body,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact.slot-chip--editable
  .slot-chip-body,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--editable
  .slot-chip-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 8px !important;
  text-align: center !important;
}

html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable
  .slot-text,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact.slot-chip--editable
  .slot-text,
html.display-timeline
  .slot-list:has(> .slot-chip:not(.slot-chip--all-day))
  > .slot-chip--all-day.slot-chip--editable
  .slot-text {
  text-align: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip {
  grid-template-columns: 1fr !important;
}

html.slot-chip-style-inline.display-timeline .slot-chip--editable {
  grid-template-columns: 1fr auto !important;
}

/* 일반 editable / compact editable 규칙보다 종일 compact가 마지막에 우선 */
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-compact.slot-chip--editable,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--all-day-compact.slot-chip--editable,
html.slot-chip-style-inline.display-timeline
  .slot-chip--all-day.slot-chip--inline-timed.slot-chip--inline-compact.slot-chip--editable {
  grid-template-columns: 1fr !important;
}

/* ── 생일 (7/28) — 일정표 슬롯·데이 셀 · 당일 테마 ── */
body.theme-birthday {
  --birthday-gold: #c9a24a;
  --birthday-gold-soft: #f7efd8;
  --birthday-rose: #d4788c;
  --bg-accent: linear-gradient(145deg, #eef2f9 0%, #f4ebe3 48%, #ebe6f6 100%);
  --today-bg: linear-gradient(165deg, #f7efd8 0%, #f4effc 48%, #f3e4ea 100%);
  --today-border: #c9a24a;
  --today-border-hover: #a88635;
  --today-glow: rgba(201, 162, 74, 0.28);
  --today-glow-strong: rgba(201, 162, 74, 0.38);
}

body.theme-birthday::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--birthday-gold, #c9a24a) 22%, transparent) 0 1.5px, transparent 2px),
    radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--birthday-rose, #d4788c) 26%, transparent) 0 1.5px, transparent 2px),
    radial-gradient(circle at 88% 42%, color-mix(in srgb, var(--brand, #4a60a9) 20%, transparent) 0 1.2px, transparent 2px),
    radial-gradient(circle at 22% 68%, color-mix(in srgb, var(--birthday-gold, #c9a24a) 18%, transparent) 0 1.2px, transparent 2px);
  background-size: 140px 140px, 180px 180px, 160px 160px, 200px 200px;
  opacity: 0.55;
  animation: birthday-sparkle-drift 18s linear infinite;
}

/* 직계 자식 스택 — fixed UI는 아래에서 다시 풀어 줌 */
body.theme-birthday > *:not(.birthday-overlay) {
  position: relative;
  z-index: 1;
}

/*
  캘린더: .page 에 z-index:1 이 있으면 안의 fixed 헤더(월 표시)가
  생일 오버레이·상단 베일 아래에 갇혀 뿌옇게 보임.
  (이 규칙은 위 * 선택자보다 특이도가 높아야 함 — :not() 연쇄로 올리지 말 것)
*/
body.calendar-page.theme-birthday > .page {
  z-index: auto;
}

body.theme-birthday > .mobile-top-veil,
body.calendar-page.theme-birthday > .mobile-top-veil {
  position: fixed;
  z-index: 48;
}

body.theme-birthday > .mobile-tab-bar,
body.calendar-page.theme-birthday > .mobile-tab-bar {
  position: fixed;
  z-index: 60;
}

body.calendar-page.theme-birthday .header--sidebar {
  z-index: 51;
}

/* 모달·우클릭 메뉴 — 생일 오버레이(z:25) / * {z:1} 규칙에 가리지 않게 */
body.theme-birthday > .day-modal,
body.calendar-page.theme-birthday > .day-modal {
  position: fixed;
  z-index: 200;
}

body.theme-birthday > .content-memo-modal,
body.calendar-page.theme-birthday > .content-memo-modal {
  position: fixed;
  z-index: 260;
}

body.theme-birthday > .slot-edit-modal,
body.calendar-page.theme-birthday > .slot-edit-modal {
  position: fixed;
  z-index: 250;
}

body.theme-birthday > .ctx-menu,
body.calendar-page.theme-birthday > .ctx-menu {
  position: fixed;
  z-index: 300;
}

body.theme-birthday > .save-toast,
body.calendar-page.theme-birthday > .save-toast {
  position: fixed;
  z-index: 310;
}

@keyframes birthday-sparkle-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 40px -30px, -50px 20px, 30px 40px, -20px -40px; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-birthday::before {
    animation: none;
  }
}

.day-cell.day-cell--birthday .day-head-date {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.day-birthday-mark {
  font-size: 0.78em;
  line-height: 1;
}

.magenda-birthday-mark {
  margin-left: 3px;
  font-size: 0.85em;
}

.day-cell.day-cell--anniversary .day-head-date {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.day-anniversary-mark {
  font-size: 0.78em;
  line-height: 1;
}

.magenda-anniversary-mark {
  margin-left: 3px;
  font-size: 0.85em;
}


/* 뱅온 퀵슬롯 설정 (캘린더 디자인) */
.bangon-quick-settings {
  margin-top: 14px;
}
.bangon-quick-settings.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.bangon-quick-settings-lead {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted, #5a6882);
}
.bangon-quick-settings-grid {
  display: grid;
  gap: 10px;
}
.bangon-quick-settings-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--border, #d5dceb);
  border-radius: 10px;
  background: #fff;
}
.bangon-quick-settings-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text, #1a2740);
}
.bangon-quick-settings-hint {
  font-size: 0.72rem;
  color: var(--muted, #5a6882);
}
.bangon-quick-settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}
.bangon-quick-settings-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #d0d7e6;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text, #1a2740);
  background: #f8fafc;
}
.bangon-quick-settings-input:focus {
  outline: 2px solid rgba(74, 96, 169, 0.28);
  border-color: #8a9bc8;
  background: #fff;
}

/* ── 캘린더 칸 안 스크롤바 완전 숨김 (최종 덮어쓰기) ── */
#calendar.calendar,
#calendar .day-cell,
#calendar .day-parts,
#calendar .day-part,
#calendar .slot-list,
#calendar .slot-list:not(.slot-list--all-day),
.calendar#calendar .day-cell .slot-list {
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#calendar *::-webkit-scrollbar,
#calendar.calendar *::-webkit-scrollbar,
#calendar .day-cell::-webkit-scrollbar,
#calendar .day-parts::-webkit-scrollbar,
#calendar .day-part::-webkit-scrollbar,
#calendar .slot-list::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
