@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  --bg: #f2f8fb;
  --surface: #ffffff;
  --surface-2: #edf4f8;   /* 入力欄・見出し帯 */
  --border: #dde7ee;
  --border-strong: #c3d4df;
  --text: #24333d;
  --text-muted: #6a7d8a;
  --text-faint: #9aabb6;

  --accent: #0f9bb5;      /* 爽やかなティール */
  --accent-dark: #0b7f95;
  --accent-soft: #e2f4f8;

  --observe: #8268d4;     /* 保護者見学デー（バイオレット） */
  --observe-soft: rgba(130,104,212,.12);
  --holiday: #ef7a5e;     /* 臨時のお休み（コーラル） */
  --holiday-ink: #c0512f;
  --holiday-soft: rgba(239,122,94,.22);
  --regular-soft: rgba(36,51,61,.075);

  --sun: #e2695f;
  --sat: #3f8cc4;
  --error: #d64a4a;
  --success: #2fa37a;

  --radius: 10px; --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(36,51,61,.05), 0 6px 20px rgba(36,51,61,.06);
  --font-display: 'Bebas Neue', sans-serif; --font-body: 'Noto Sans JP', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-body);
  min-height: 100vh; line-height: 1.75; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── ヘッダー ───────────────────────────────── */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.site-header .logo { font-family: var(--font-display); font-size: 27px; letter-spacing: 3px; color: var(--accent); }
.site-header .tagline { font-size: 11px; color: var(--text-faint); letter-spacing: 2px; text-transform: uppercase; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }
.hbtn {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted);
  border-radius: 20px; padding: 5px 14px; font-size: 12px; cursor: pointer;
  font-family: var(--font-body); text-decoration: none; white-space: nowrap;
}
.hbtn:hover, .hbtn.accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.container { max-width: 720px; margin: 0 auto; padding: 26px 16px 80px; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.page-lead { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }

/* ── 凡例 ──────────────────────────────────── */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: 20px 0 6px; font-size: 12.5px; color: var(--text-muted);
}
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 15px; height: 15px; border-radius: 4px; display: inline-block; border: 1px solid var(--border-strong); }
.sw-all     { background: var(--holiday); border-color: var(--holiday); }
.sw-day     { background: linear-gradient(to bottom, var(--holiday) 0 50%, #fff 50%); }
.sw-night   { background: linear-gradient(to bottom, #fff 0 50%, var(--holiday) 50%); }
.sw-regular { background: #dde3e7; }
.sw-carry   { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sw-observe { background: var(--observe); border-color: var(--observe); }
.cal-boundary { font-size: 11.5px; color: var(--text-faint); margin-bottom: 4px; }
.cal-carry-note {
  font-size: 12.5px; color: var(--accent-dark); background: var(--accent-soft);
  border-radius: var(--radius); padding: 9px 12px; margin: 8px 0 2px; line-height: 1.7;
}
.cal-observe-note {
  font-size: 12.5px; color: #5b45a6; background: var(--observe-soft);
  border-radius: var(--radius); padding: 9px 12px; margin: 8px 0 2px; line-height: 1.7;
}

/* ── 月ブロック ────────────────────────────── */
.cal-month {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 16px 16px; margin-top: 18px;
  box-shadow: var(--shadow);
}
.cal-month-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.cm-year { font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; color: var(--text-faint); }
.cm-num  { font-family: var(--font-display); font-size: 42px; line-height: .9; color: var(--accent); letter-spacing: 1px; }
.cm-suffix { font-size: 13px; color: var(--accent); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.cal-wd {
  background: var(--surface-2); text-align: center; font-size: 11.5px; color: var(--text-muted);
  padding: 7px 0; letter-spacing: 1px; font-weight: 500;
}
.cal-wd.wd-sun { color: var(--sun); }
.cal-wd.wd-sat { color: var(--sat); }

.cal-cell {
  background: var(--surface); position: relative; min-height: 76px;
  padding: 4px 5px 3px; display: flex; flex-direction: column; gap: 1px;
  /* 臨時のお休み = コーラル／定休 = グレー。セルごとに切り替える */
  --hl: var(--holiday-soft); --hlc: var(--holiday-ink);
}
.cal-cell:not(.is-special) { --hl: var(--regular-soft); --hlc: var(--text-muted); }
.cal-cell.is-empty { background: #f7fafc; min-height: 76px; }

.cal-cell.type-all   { background-image: linear-gradient(var(--hl), var(--hl)); }
.cal-cell.type-day   { background-image: linear-gradient(to bottom, var(--hl) 0 50%, transparent 50%); }
.cal-cell.type-night { background-image: linear-gradient(to bottom, transparent 0 50%, var(--hl) 50%); }
.cal-cell.is-special.type-all { box-shadow: inset 0 0 0 1px rgba(239,122,94,.5); }

/* 別の月の回数として開催する日。お休み（コーラル）とは別の軸なのでティールで示す */
.cal-cell.has-carry { background-color: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }

/* 保護者見学デー。お休み・回数とは別の軸なのでバイオレットで示す */
.cal-cell.is-observe { box-shadow: inset 0 -3px 0 var(--observe); }
.cal-cell.is-observe:not(.has-carry) { background-color: var(--observe-soft); }
.cal-cell.has-carry.is-observe { box-shadow: inset 4px 0 0 var(--accent), inset 0 -3px 0 var(--observe); }
.cc-observe {
  align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: var(--observe); border-radius: 9px; padding: 1px 7px; line-height: 1.45;
}
.cc-carry {
  align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: var(--accent); border-radius: 9px; padding: 1px 7px; line-height: 1.45;
}

.cc-date { font-family: var(--font-display); font-size: 18px; line-height: 1.15; color: var(--text); letter-spacing: 1px; }
.cal-cell.wd-sun .cc-date { color: var(--sun); }
.cal-cell.wd-sat .cc-date { color: var(--sat); }
.cal-cell.is-today .cc-date {
  color: #fff; background: var(--accent); border-radius: 5px;
  padding: 0 6px; align-self: flex-start;
}
.cc-mark { font-size: 12px; font-weight: 700; color: var(--hlc); line-height: 1.3; }
.cc-mark-half { font-size: 11px; }
.cc-note {
  font-size: 10px; color: var(--text-muted); line-height: 1.35;
  margin-top: auto; word-break: break-word;
}

.cal-notes { list-style: none; margin: 14px 2px 0; display: flex; flex-direction: column; gap: 5px; }
.cal-notes li {
  font-size: 13px; color: var(--text); padding-left: 15px; position: relative;
}
.cal-notes li::before {
  content: ''; position: absolute; left: 3px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.cal-footer {
  margin-top: 24px; font-size: 12.5px; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 14px;
}
.cal-updated { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; letter-spacing: .5px; }

/* ページ下部のホームへ戻るボタン */
.home-link-bottom { display: flex; justify-content: center; margin-top: 30px; }
.home-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 26px; padding: 13px 30px; font-size: 14px; font-weight: 700;
  letter-spacing: .5px; box-shadow: var(--shadow);
}
.home-btn:hover { background: var(--accent-dark); }

.empty-state {
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 44px 20px; text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 24px;
}

@media (max-width: 420px) {
  .cal-month { padding: 15px 9px 13px; }
  .cal-cell { min-height: 66px; padding: 3px 3px 2px; }
  .cc-date { font-size: 16px; }
  .cc-mark { font-size: 11px; }
  .cc-note { font-size: 9px; }
  .cc-carry { font-size: 9px; padding: 0 4px; letter-spacing: 0; }
  .cc-observe { font-size: 9px; padding: 0 4px; letter-spacing: 0; }
  .cal-cell.has-carry { box-shadow: inset 3px 0 0 var(--accent); }
}

/* ── 印刷（掲示用） ────────────────────────── */
@media print {
  body { background: #fff; }
  .site-header, .header-actions, .no-print { display: none !important; }
  .container { max-width: none; padding: 0; }
  .cal-month { box-shadow: none; border-color: #bbb; page-break-inside: avoid; margin-top: 10px; }
  .cal-grid { background: #b9c6ce; border-color: #b9c6ce; }
  .cal-wd { background: #eef2f5; }
  .cal-cell { --hl: rgba(239,122,94,.35); }
  .cal-cell:not(.is-special) { --hl: rgba(0,0,0,.09); }
  .cal-cell.is-today .cc-date { background: none; color: var(--text); padding: 0; }
  .cal-cell.has-carry { background-color: #e8f5f8; }
  .cc-carry { background: none; color: var(--accent-dark); border: 1px solid var(--accent); }
  .cal-cell.is-observe:not(.has-carry) { background-color: #f1edfb; }
  .cc-observe { background: none; color: #5b45a6; border: 1px solid var(--observe); }
  .cal-observe-note { background: #f4f1fc; color: var(--text); }
  .cal-carry-note { background: #f0f7fa; color: var(--text); }
}
