/* 가족 달력 화면 모양.
   벽에 거는 종이 달력처럼: 큰 날짜 숫자, 빨간 일요일, 파란 토요일.
   사람마다 색이 하나씩 있다 (엄마 초록, 언니 보라, 나 주황). */

:root {
  --paper: #fbfbf8;
  --ink: #1f2328;
  --ink-soft: #5b6270;
  --rule: #d9dce1;
  --sunday: #d2312d;
  --saturday: #2b5fb4;
  --today: #1f2328;

  --mom: #23865a;
  --sister: #7a4cc2;
  --me: #c06a00;
  --other: #6b7280;

  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.sheet {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* 맨 위: 큰 달 숫자 + 달 넘기기 버튼 */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.month-title {
  display: flex;
  flex-direction: column;
}

.year {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.month {
  margin: 0;
  font-size: 72px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.month-unit {
  font-size: 32px;
  font-weight: 700;
  margin-left: 4px;
  letter-spacing: 0;
}

.month-nav {
  display: flex;
  gap: 8px;
}

.nav-button {
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.nav-button:active {
  background: var(--ink);
  color: var(--paper);
}

.nav-button:focus-visible {
  outline: 3px solid var(--saturday);
  outline-offset: 2px;
}

.app-name {
  margin: 6px 0 16px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* 달력 칸 */
.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar th {
  padding: 6px 0;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}

.calendar td {
  height: 84px;
  padding: 4px 3px;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.sun,
.calendar td.sun .day-number {
  color: var(--sunday);
}

.sat,
.calendar td.sat .day-number {
  color: var(--saturday);
}

.calendar td.empty {
  background: transparent;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.calendar td.today .day-number {
  border-radius: 50%;
  background: var(--today);
  color: var(--paper);
}

/* 달력 칸 안의 일정: 사람 색 막대 */
.marks {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mark {
  overflow: hidden;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 사람마다 색 */
.who-엄마 { --who: var(--mom); }
.who-언니 { --who: var(--sister); }
.who-나 { --who: var(--me); }
.who-other { --who: var(--other); }

.mark {
  background: var(--who, var(--other));
}

/* 사람 색 안내 */
.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 28px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--who, var(--other));
}

/* 아래쪽: 이번 달 일정 목록 (큰 글씨) */
.month-list h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
}

.status {
  margin: 0;
  font-size: 18px;
  color: var(--ink-soft);
}

.status:empty {
  display: none;
}

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule-item {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.schedule-when {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.schedule-what {
  font-size: 20px;
}

.schedule-who {
  display: inline-block;
  margin-right: 8px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--who, var(--other));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.schedule-time {
  margin-left: 6px;
  color: var(--ink-soft);
  font-size: 18px;
}

/* 폰처럼 좁은 화면 */
@media (max-width: 480px) {
  .month {
    font-size: 60px;
  }

  .calendar td {
    height: 72px;
    padding: 3px 1px;
  }

  .day-number {
    width: 30px;
    height: 30px;
    font-size: 19px;
  }

  .mark {
    padding: 1px 2px;
    font-size: 11.5px;
  }

  .schedule-item {
    grid-template-columns: 1fr;
  }
}
