/* =========================================================
   可用日カレンダー 公開ページ
   クリーム地 × セージグリーン水彩 × ニコ角（会社ロゴと同じ書体）
   ========================================================= */

/* ニコ角 v2 / SIL Open Font License 1.1（商用利用可）
   使用文字だけにサブセット化した軽量版(約32KB)。ライセンス全文は nicokaku-OFL.txt
   ※ページの文言を変更した場合、未収録文字が出ないようサブセットを作り直すこと */
@font-face {
  font-family: "NicoKaku";
  src: url("nicokaku-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream:      #f3ede3;
  --cream-soft: #efe7d9;
  --card:       #ffffff;
  --ink:        #38362f;
  --muted:      #9a9384;
  --line:       #e7ddcb;

  --green:       #7d9068;
  --green-deep:  #55663f;
  --green-wash:  #e5ecdb;
  --green-wash2: #dbe6cb;

  /* ご相談＝黄（クリーム地に馴染む、くすんだ山吹） */
  --yellow:       #d3a548;
  --yellow-deep:  #8a6a20;
  --yellow-wash:  #f7eed7;
  --yellow-wash2: #f2e4c2;

  /* お休み＝赤（きつくならないテラコッタ寄り） */
  --red:       #c07d6c;
  --red-deep:  #8d5344;
  --red-wash:  #f6e5e0;
  --red-wash2: #f0d8d1;

  --sun: #c07d6c;
  --sat: #7f96ae;

  --cell-min: 92px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "NicoKaku", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 48px) 64px;
}

/* ── ヘッダー ───────────────────────────────────── */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  margin-bottom: 6px;
}
.cal-title {
  font-family: "NicoKaku", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 400;   /* ニコ角は400のみ。600にすると擬似ボールドで崩れる */
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  letter-spacing: .04em;
  margin: 0;
  color: var(--ink);
  min-width: 6.5em;
  text-align: center;
}
.nav-btn {
  appearance: none;
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green-deep);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.nav-btn:hover { background: var(--green-wash); transform: translateY(-1px); }
.nav-btn:active { transform: translateY(0); }

.brand {
  text-align: center;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-weight: 600;
  color: var(--green-deep);
  font-size: clamp(.85rem, 2.4vw, 1rem);
  letter-spacing: .12em;
  margin: 2px 0 0;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 26px;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-weight: 600;
  color: var(--muted);
  font-size: .95rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
/* 凡例はセル内のバッジと同じ見た目にそろえる */
.legend .dot {
  width: 26px; height: 14px; border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.legend.is-error::after {
  content: "（ただいま空き状況を取得できません）";
  color: #b06a5a;
  font-size: .8rem;
}

/* ── カレンダー本体 ─────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(5px, 1vw, 10px);
}
.dow {
  text-align: center;
  font-size: clamp(.8rem, 2.2vw, 1rem);
  letter-spacing: .18em;
  color: var(--muted);
  padding: 4px 0 10px;
}
.dow--sun { color: var(--sun); }
.dow--sat { color: var(--sat); }

.cell {
  position: relative;
  min-height: var(--cell-min);
  background: var(--card);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 2px 10px rgba(120, 110, 85, .06);
  transition: box-shadow .2s ease;
}
.cell .num {
  font-size: clamp(.8rem, 2vw, 1rem);
  color: var(--ink);
  opacity: .85;
}
.cell--other { background: transparent; box-shadow: none; }
.cell--other .num { opacity: .3; }
.cell--sun .num { color: var(--sun); }
.cell--sat .num { color: var(--sat); }

.cell--today { box-shadow: 0 0 0 2px var(--green) inset, 0 2px 10px rgba(120,110,85,.08); }

/* 状態のついたセル（対応可＝緑 / ご相談＝黄 / お休み＝赤） */
.cell--mark.is-green  { background: linear-gradient(160deg, var(--green-wash) 0%, var(--green-wash2) 100%); }
.cell--mark.is-yellow { background: linear-gradient(160deg, var(--yellow-wash) 0%, var(--yellow-wash2) 100%); }
.cell--mark.is-red    { background: linear-gradient(160deg, var(--red-wash) 0%, var(--red-wash2) 100%); }

.cell--mark.is-green  .num { color: var(--green-deep);  opacity: .9; }
.cell--mark.is-yellow .num { color: var(--yellow-deep); opacity: .9; }
.cell--mark.is-red    .num { color: var(--red-deep);    opacity: .9; }

.mark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}
/* 状態バッジ（対応可／ご相談／お休み） */
.mark .txt {
  font-family: "NicoKaku", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: clamp(.62rem, 1.7vw, .78rem);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.is-green  { background: var(--green); }
.is-yellow { background: var(--yellow); }
.is-red    { background: var(--red); }
/* 空白の日を表す凡例（マス目と同じ白） */
.legend .dot.is-blank {
  background: var(--card);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

/* ── フッター ───────────────────────────────────── */
.foot {
  text-align: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: .82rem;
  font-family: "NicoKaku", "Hiragino Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .06em;
}

/* ── スマホ ─────────────────────────────────────── */
@media (max-width: 560px) {
  :root { --cell-min: 62px; }
  .cell { border-radius: 9px; padding: 5px 6px; }
  /* バッジが唯一の目印なので、スマホでも隠さず小さくする */
  .mark .txt { font-size: .58rem; padding: 2px 6px; letter-spacing: 0; }
}
