.calPage {
  min-height: 100vh;
  background: var(--bg-body);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.calPage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 760px at 50% 0%, rgba(255, 255, 255, .55), transparent 55%),
    radial-gradient(900px 640px at 15% 30%, rgba(255, 255, 255, .26), transparent 62%),
    radial-gradient(900px 640px at 85% 25%, rgba(255, 255, 255, .22), transparent 62%);
  opacity: .95;
}

.calWrap {
  width: min(1680px, 98vw);
  margin: 0 auto;
  padding: 16px 0;
}

.calWindow {
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
  background: color-mix(in srgb, var(--bg-card) 78%, white);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.calTitlebar {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, var(--bg-card) 82%, white);
}

.calTitlebar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-primary);
}

.calAppIcon {
  width: 28px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .35)),
    color-mix(in srgb, var(--bg-card) 85%, white);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}

.calAppIcon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 10px;
  height: 4px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-accent) 55%, white);
}

.calTitle {
  font-weight: 900;
  letter-spacing: -0.2px;
}

.calTitlebar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.winBtn {
  width: 44px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background: color-mix(in srgb, var(--bg-card) 86%, white);
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 900;
  line-height: 1;
}

.winBtn--close {
  width: 46px;
  background: color-mix(in srgb, var(--color-accent) 30%, var(--bg-card));
}

.calBody {
  padding: 12px;
}

.calPaper {
  position: relative;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--color-border) 75%, transparent);
  background: color-mix(in srgb, var(--bg-card) 86%, white);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;

  padding: 14px 64px 14px 14px;
}

.monthTabs {
  position: absolute;
  right: 10px;
  top: 64px;
  bottom: 14px;
  width: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.tab {
  height: calc((100% - 22px) / 12);
  min-height: 28px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  background: color-mix(in srgb, var(--bg-card) 74%, white);
  cursor: pointer;
  font-weight: 900;
  opacity: .75;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.tab.isActive {
  opacity: 1;
  outline: 3px solid color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.page {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background: color-mix(in srgb, white 86%, var(--bg-card));
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  padding: 14px;
}

.spread {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  height: clamp(640px, 78vh, 880px);
}

.leftPane {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, white 90%, var(--bg-card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leftHead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 8px;
}

.leftMonth {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.leftMonthNum {
  font-size: 34px;
  font-weight: 1000;
  line-height: 1;
}

.leftMonthLabel {
  font-weight: 900;
  opacity: .7;
}

.leftYear {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  background: color-mix(in srgb, var(--bg-card) 72%, white);
  font-weight: 900;
  opacity: .8;
}

.leftCard {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 12px;
}

.leftCard__title {
  font-weight: 1000;
  opacity: .75;
  margin-bottom: 8px;
}

.leftMemo {
  width: 100%;
  height: 240px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--color-text-primary) 75%, black);
}

.leftCard--tools {
  position: relative;
  overflow: visible;
  z-index: 20;
  padding-bottom: 16px;
}

.leftCard--tools .leftCard__title {
  margin-bottom: 10px;
}

.toolbar {
  display: flex;
  gap: 8px;
}

.toolbar--left {
  overflow: visible;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, var(--bg-card) 84%, white);
  cursor: pointer;
  font-weight: 900;
  opacity: .75;
}

.chip.isActive {
  opacity: 1;
  outline: 3px solid color-mix(in srgb, var(--color-accent) 26%, transparent);
}

.rightPane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pageTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 6px 10px;
}

.monthBadge {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, var(--bg-card) 72%, white);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#monthNum {
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
}

.monthLabel {
  font-weight: 900;
  opacity: .75;
}

.topRight {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.yearTag {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, var(--bg-card) 72%, white);
  font-weight: 900;
  opacity: .8;
}

.sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;

  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  background: color-mix(in srgb, white 92%, var(--bg-card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 10px;
  overflow: hidden;
}

.dowRow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 35%, transparent);
}

.dow {
  text-align: center;
  padding: 10px 0;
  font-weight: 1000;
  font-size: 12px;
  letter-spacing: .6px;
  opacity: .65;
  border-right: 1px solid color-mix(in srgb, var(--color-border) 28%, transparent);
}

.dow:last-child {
  border-right: 0;
}

.dow.sun {
  color: color-mix(in srgb, var(--color-accent) 65%, black);
  opacity: .85;
}

.dow.sat {
  opacity: .8;
}

.grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 140px;
}

.cell {
  position: relative;
  border-right: 1px solid color-mix(in srgb, var(--color-border) 25%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 25%, transparent);
  padding: 10px 10px 8px;
  overflow: hidden;
  background: transparent;
}

.cell:nth-child(7n) {
  border-right: 0;
}

.dayNum {
  font-weight: 1000;
  font-size: 13px;
  opacity: .75;
  position: relative;
  z-index: 2;
}

.cell.isOtherMonth .dayNum {
  opacity: .25;
}

/* 날짜 동그라미 */
.cell.isToday .dayNum {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 55%, white);
  border: 1px solid color-mix(in srgb, var(--color-border) 40%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
  opacity: 1;
}

.note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.25;
  opacity: .75;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: calc(100% - 34px);
  overflow: hidden;
}

.noteEdit {
  position: absolute;
  inset: 30px 8px 8px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 38px);
  border: 0;
  outline: 0;
  resize: none;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.doodle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: auto;
}

.bottomBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 0;
}

.photoUiLayer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.photoUiBtn {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  font-size: 18px;
}

.photoUiBtn:active {
  transform: translateY(1px);
}

@media (max-width: 1180px) {
  .spread {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 980px) {
  .spread {
    grid-template-columns: 1fr;
    height: auto;
  }

  .leftPane {
    order: 2;
  }

  .rightPane {
    order: 1;
  }
}

.textEditor {
  position: absolute;
  z-index: 12;
  min-width: 140px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.textEditor textarea {
  width: 100%;
  min-height: 60px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.2;
  color: rgba(40, 30, 30, 0.88);
}