@charset "utf-8";

/* ===================================================
   calendar.css  —  業務カレンダー スタイルシート
   =================================================== */

/* ---------- リセット & ベース ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #F7F5F0;
  --surface:      #FFFFFF;
  --border:       #9e9e9f;
  --border-hover: #C8C2B8;
  --text-primary: #111;
  --text-secondary:#111;
  --text-hint:    #B8B2AA;

  /* フラグカラー */
  --closed-bg:    #f9e7df;
  --closed-text:  #C5724A;
  --closed-dot:   #C5724A;
    
  --tomobiki-bg:  #e6ebd8;
  --tomobiki-text:#648a1a;
  --tomobiki-dot: #648a1a;

  /* 曜日カラー */
  --sun:          #111;
  --sat:          #111;

  /* 今日 */
  --today-ring:   #111;

  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;

/*  --font-base:    'Noto Sans JP', sans-serif;*/
/*  --font-mono:    'DM Mono', monospace;*/

  --shadow-card:  0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

/*body {
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}*/

/* ---------- ラッパー ---------- */
.cal-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- ヘッダー ---------- */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.cal-month {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1;
}

.cal-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.nav-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 16px;
  transition: background .15s, border-color .15s, transform .1s;
}

.nav-btn:hover  { background: var(--bg); border-color: var(--border-hover); }
.nav-btn:active { transform: scale(.95); }

.nav-today {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 500;
  width: auto;
  padding: 0 14px;
  letter-spacing: .3px;
}

/* ---------- 凡例 ---------- */
.legend {
  display: flex;
  gap: 20px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.closed   { background: var(--closed-dot); }
.legend-dot.tomobiki { background: var(--tomobiki-dot); }

/* ---------- 曜日ヘッダー ---------- */
.dow-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.dow-cell {
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
  letter-spacing: .5px;
}

.dow-cell.sun { color: var(--sun); }
.dow-cell.sat { color: var(--sat); }

/* ---------- カレンダーグリッド ---------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* ---------- 日セル ---------- */
.day-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 88px;
  padding: 9px 9px 7px;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}

.day-cell:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.day-cell.other-month {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.day-cell.today {
  /*border-color: var(--today-ring);*/
  border-width: 1.5px;
  background-color: var(--toh-color-beige-light);
}

/* 日付数字 */
.day-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

.day-cell.other-month .day-num,
.day-cell.other-month.sun .day-num, 
.day-cell.other-month.sat .day-num { color: var(--text-hint); }
.day-cell.sun .day-num          { color: var(--sun); }
.day-cell.sat .day-num          { color: var(--sat); }

.day-num.today-circle {
  background: var(--text-primary);
  color: #fff !important;
  border-radius: 50%;
  font-size: 1rem;
}

/* ---------- フラグ ---------- */
.flags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 7px;
}

.flag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.5;
  width: fit-content;
}

.flag.closed   { background: var(--closed-bg);   color: var(--closed-text); }
.flag.tomobiki { background: var(--tomobiki-bg); color: var(--tomobiki-text); }

/* 祝日ラベル */
.flag.holiday {
  background: #fff;
  color: var(--text-hint);
  font-size: .75rem;
  padding: 0;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 768px) {
  .cal-month { font-size: 22px; }
  .day-cell  { min-height: 64px; padding: 6px 5px 4px; }
  .day-num   { font-size: 12px; }
  .flag      { font-size: 9px; padding: 1px 2px; }
  .flag.holiday { display: none; }
  .legend    { gap: 14px; }
}