:root {
  --brand-blue: #005781;
  --short-green: #2e7d32;
  --closed-gray: #a0a0a0;

  /* 追加：ヘッダー用（証明書ページ互換） */
  --brand: #005781;
  --brand2: #0b6ea1;
}
* {
  box-sizing: border-box;
}

body {
  font-family: "Rounded M+", "YuGothic", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
}

.page{
  padding: 16px; /* さっきbodyでやってたやつをここに移す */
}


h1 {
  font-size: 24px;
  margin: 0 0 8px;
  text-align: center;
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:linear-gradient(90deg, var(--brand), var(--brand2));
  color:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.02em;
}

.brand-mark{
  width:34px; height:34px;
  display:grid; place-items:center;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.25);
  border-radius:12px;
}

.brand-title{ font-size:16px; }

.header-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
}

.btn-ghost{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.28);
  color:#fff;
}

.btn-arrow{
  display:inline-block;
  font-size:18px;
  line-height:1;
}


.notice-line {
  text-align: center;
  font-size: 13px;
  color: #555;
  margin: 4px 0 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.notice-icon {
  color: #d32f2f;   /* 少し目立つ赤 */
  font-weight: 700;
  font-size: 14px;
}


.last-updated {
  max-width: 960px;
  margin: 0 auto 6px;
  padding-right: 4px;
  text-align: right;
  font-size: 15px;
  color: #555;
}

.calendar-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  padding: 16px 16px 20px;
}

.calendar-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.calendar-month {
  border-radius: 10px;
  border: 1px solid #ddd;
  overflow: hidden;
  background: #fafafa;
}

.month-header {
  background: var(--brand-blue);
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid #ddd;
  font-size: 15px;
}

.weekday {
  text-align: center;
  padding: 6px 4px;
  background: #f1f1f1;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.weekday:nth-child(7n+1) { /* 日曜日 */
  color: #d32f2f;
}

.weekday:nth-child(7n) {   /* 土曜日 */
  color: #1976d2;
}


.day-cell {
  height: 85px;                 /* 高さ固定 */
  border-bottom: 1px solid #eee;
  border-right: 1px solid #eee;
  padding: 4px 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;        /* 中身まとめて縦方向中央寄せ */
  align-items: stretch;         /* 子要素は横いっぱい */
  text-align: center;           /* 文字は中央寄せ */
  font-size: 14px;
  background: #fff;
}

.day-cell.empty {
  background: #f7f7f7;
}

/* 変則時間（既定以外） */
.day-cell.status-custom {
  background: rgba(255, 193, 7, 0.15);
  border: 2px dashed #fbfafc;
}

.calendar-grid .day-cell.status-custom .day-number {
  background-color: #07b9ff !important;
  color: #222 !important;
}
.calendar-grid .day-cell.status-custom .day-label {
  color: #07b9ff !important;
  font-weight: 800;
}


/* 日付（上段：横いっぱいのバー） */
.day-number {
  width: 100%;
  height: 32px;                 /* ★ 帯の高さを固定すると中央揃えが安定する */
  
  display: flex;
  align-items: center;          /* ★ 縦方向の中央 */
  justify-content: center;      /* ★ 横方向の中央 */

  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}


/* 時間（下段：横いっぱい） */
.day-label {
  width: 100%;          /* ★ ここもマスいっぱい */
  padding: 1px 0 1px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  background: #ffffff;
}

/* ===== 通常・短縮・休館のスタイル ===== */

/* （通常）
   日付：ブランド青背景＋白太文字
   時間：白背景＋青文字
*/
.status-normal .day-number {
  background-color: var(--brand-blue);
  color: #ffffff;
}
.status-normal .day-label {
  background-color: #ffffff;
  color: var(--brand-blue);
}

/* （短縮）
   日付：濃い緑背景＋白太文字
   時間：白背景＋緑文字
*/
.status-short .day-number {
  background-color: var(--short-green);
  color: #ffffff;
}
.status-short .day-label {
  background-color: #ffffff;
  color: var(--short-green);
}


/* ===== CLOSED（全体グレーのまま、日付＋CLOSED の2段構成） ===== */
/* ===== CLOSED（背景グレーのまま2段構成／仕切り線なし） ===== */

.status-closed {
  background-color: var(--closed-gray);  /* 背景全体グレー */
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

/* 上段：日付（背景はそのままグレー） */
.status-closed .day-number {
  background: transparent;  /* グレーのまま */
  color: #333;
  font-weight: 700;
  font-size: 20px;
  padding: 8px 0 4px;  /* 上段っぽく見せる余白 */
}

/* 下段：CLOSED（背景も同じグレー） */
.status-closed .day-label {
  display: block !important;  /* 休館だけ非表示にしない */
  background: transparent;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 0 8px; /* 下段ぽく見える余白 */
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#calendar-memo {
  margin-top: 24px;
  padding: 12px 16px;
  background: #f7f7f7;
  border-radius: 12px;
}

.memo-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.memo-list {
  margin: 0;
  padding-left: 1.2em;
}

.memo-list li {
  line-height: 1.6;
}


/* 今日の日付を目立たせる（黄色の枠） */
.day-cell.today {
  outline: 4px solid #ffd500;           /* 太く濃い黄色 */
  box-shadow:
    0 0 10px rgba(255, 215, 0, 0.55),   /* やさしい発光 */
    inset 0 0 0 3px #ffffff;            /* 内側の白フチ */
  border-radius: 8px;
  position: relative;
  z-index: 3;
}


/* すでに過ぎた日付（終わった日） */
.past-day {
  opacity: 0.45;          /* 色を薄くする */
}

.day-memo {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  margin-top: 12px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f0f4f8;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}

.legend-color.normal {
  background: var(--brand-blue);
}
.legend-color.short {
  background: var(--short-green);
}
.legend-color.closed {
  background: var(--closed-gray);
}

.link-buttons {
  max-width: 960px;
  margin: 16px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.08s ease;
  cursor: pointer;
  min-width: 210px;
  text-align: center;
}

.link-button span {
  margin-left: 4px;
  font-size: 12px;
}

.link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  opacity: 0.95;
}

.link-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  opacity: 0.9;
}

@media (max-width: 599px) {
  body {
    padding: 10px;
  }
  .calendar-wrapper {
    padding: 12px;
  }
  .day-cell {
    min-height: 52px;
  }
  .month-header {
    font-size: 15px;
  }
}
