html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
    font-family: 'Noto Serif JP', serif;
    margin: 0;
    padding: 0;
    background-color: #f4f2f8;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

body::-webkit-scrollbar, html::-webkit-scrollbar {
    display: none;
}

.site-banner {
  background: linear-gradient(135deg, #dcd6f7, #e7e9f9, #f0f1f6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  color: #111;
  font-size: 1rem;
  height: 6%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;      
  justify-content: center; 
  align-items: center;
  text-align: center; 
}
.info-banner {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #f4f2f8;
  padding: 0.5em 1em;
  text-align: center;
  font-size: 0.95rem;
  width: 50%;
  margin: 0 auto; 
  text-align: center;
}
header {
    background-color: transparent;
    color: black;
    height: 23%;
    display: flex;
    flex-direction: column;  
    justify-content: center;
    align-items: center;   
    width:90%;
    margin: 0 auto;
    box-sizing: border-box;
    margin-top: 6%; 
}

.paw-nav {
    position: fixed;
    right: 60px; 
    bottom: 60px;  
    z-index: 1000;
    list-style: none; 
    margin: 0;
    padding: 0;
}

.paw-nav li {
    display: inline-block;
}

.paw-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #444;
    text-decoration: none;
    transition: transform 0.25s ease, color 0.25s ease;
}

.paw-nav a:hover {
    transform: scale(1.3) rotate(-10deg);
    color: #7d6bc5;
}


h1 {
  width: 100%;              
  text-align: center;     
  font-size: 2.0rem;
  font-weight: 600;      
  margin: 0 0 10px 0;     
  box-sizing: border-box;
}

h4 {
  width: 100%;              
  text-align: right;     
  font-size: 0.8rem;
  font-weight: 400;      
  margin: 0 0 10px 0;     
  box-sizing: border-box;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 70%;
  max-width: none;
  margin: 0 auto;
  box-sizing: border-box;
}

/* カレンダー全体 */
.calendar-container {
  width: 100%;
  max-width: 2000px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.calendar th,
.calendar td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  vertical-align: top;
  height: 120px;
  position: relative;
  box-sizing: border-box;
}
.calendar th {
  background-color: #f9f9f9;
  font-weight: lighter;
}
.date-number {
  position: absolute;
  top: 6px;
  left: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  user-select: none;
}
.calendar td.today {
  background-color: #ece4f3;
}

/* イベントカード */
.calendar td a.event {
  display: block;
  margin-top: 28px;
  padding: 6px 8px;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 8px;
  text-align: left;
  text-decoration: none;
  color: black;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  word-break: break-word;
  transition: background-color 0.3s, transform 0.2s;
}
.calendar td a.event + a.event {
  margin-top: 6px;
}
.calendar td a.event:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.event-card {
  display: block; /* デフォルトは表示 */
}

.cat-icon {
  display: none;  /* デフォルトは非表示 */
}

/* 曜日の行の高さを小さく */
.calendar th {
  background-color: #f9f9f9;
  font-weight: lighter;
  height: 30px;       /* 縦の高さを小さく調整 */
  line-height: 30px;  /* 文字の縦位置調整 */
  padding: 0;         /* 余白も減らす */
  text-align: center; /* 中央寄せ */
}

/* 日曜日（1列目）の文字を赤に */
.calendar th:nth-child(1) {
  color: red;
}

/* 土曜日（7列目）の文字を青に */
.calendar th:nth-child(7) {
  color: blue;
}

/* カレンダーヘッダー */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.month-label {
  font-size: 1.75rem;
  margin: 0;
  font-weight: normal;
  padding-left: 0.5rem;
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.styled-select {
  font-family: 'Playfair Display', serif;
  padding-left: 0.5em;
  padding-right: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.select-arrow {
  position: absolute;
  pointer-events: none; /* 矢印はクリックできない */
  right: 0.8em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.4rem;
  color: black;
  user-select: none;
}


.styled-select:hover {
  border-color: #888;
}

a.event.birthday {
  background-color: #ffe5e5 !important; /* パステル赤背景 */
  color: #000 !important;      
  display: block;
  padding: 3px;
  margin-top: 4px;
  border-radius: 5px;
  text-decoration: none;
}

footer {
  background: #f9f9f9; 
  color: #444;
  font-size: 0.8rem;
  font-family: 'Noto Serif JP', serif;
  font-weight: 300; 
  height: 5%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: none;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.08); /* 影で自然に区切る */
}

footer .footer-inner {
  opacity: 0.8;
}

a {
    color: inherit;  /* 親要素の色を継承 */
    text-decoration: none;  /* 下線を消す */
}

@media (max-width: 1024px) {
  .site-banner {
    position: fixed;    
    top: 0;
    left: 0;
    right: 0;
    height: auto;  
    white-space: normal;   
    padding: 0.8rem 1rem;  
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
    flex-wrap: wrap;    
  }

  header {
    flex-direction: column;
    align-items: center;
    margin-top: 70px;
  }

  .event {
    display: none; /* タブレットでも非表示維持（表示したいならここを削除） */
  }

  .calendar td {
    height: 60px; /* スマホより少し高め */
  }

  .month-label {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 500;
    padding-left: 0.8rem;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 900;
    display: none;
  }

  .event-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;            /* タブレットは少し広め */
    max-width: 500px;      /* 上限を広げる */
    height: 120px;         /* わずかに高さアップ */
    background: white;
    border-radius: 12px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 1000;
  }

  .event-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
  }

  .styled-select {
    font-size: 0.9rem;
    padding-left: 0.6em;
    padding-right: 1.2em;
    border-width: 1px;
    border-radius: 6px;
  }

  .select-arrow {
    font-size: 0.6rem;
    right: 1em;
  }

  .cat-icon {
    display: block;
    cursor: pointer;
    font-size: 1.2rem; /* 文字少し大きめ */
    text-align: left;
    margin-top: 18px;
  }

  .cat-icon + .cat-icon {
    margin-top: 0;
  }

  .paw-nav {
    right: 25px;
    bottom: 35px;
  }

  .paw-nav a {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .site-banner {
    font-size: 0.6rem;
    padding: 0.1rem 0.5rem;
    height: 50px;
    box-sizing: border-box;
  }

  header {
    flex-direction: column;
    align-items: center;
    margin-top: 70px; 
  }

  .event {
    display: none;
  }

  .calendar td {
    height: 50px;
  }

  .month-label {
    font-size: 1.2rem;
    margin: 0;
    font-weight: normal;
    padding-left: 0.5rem;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 900;
    display: none;
  }

.event-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 400px;
  height: 100px; /* 高さを固定 */
  background: white;
  border-radius: 12px;
  padding: 0 16px; /* 上下の余白は0 */
  display: flex;
  justify-content: center;
  align-items: center; /* ここで縦中央 */
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 1000;
}

.event-card a {
  display: flex;               /* 親に合わせてフレックス */
  align-items: center;         /* aの中身も縦中央 */
  justify-content: center;     /* 水平中央 */
  width: 100%;
  height: 100%;                /* 親の高さにフィットさせる */
  text-decoration: none;
}

.styled-select {
  font-size: 0.8rem;    /* 文字を小さく */
  padding-left: 0.5em;  /* 左余白を小さく */
  padding-right: 1.0em; /* 右余白を矢印分だけ確保 */
  border-width: 1px;    /* 枠の太さ */
  border-radius: 6px;   /* 角の丸み */
}

.select-arrow {
  font-size: 0.5rem;    /* 矢印も小さく */
  right: 0.8em;         /* 位置調整 */
}

.cat-icon {
  display: block;
  cursor: pointer;
  font-size: 1rem;
  text-align: left;
  margin-top: 15px
}
.cat-icon + .cat-icon {
  margin-top: 0;
}
  .paw-nav {
    right: 20px; 
    bottom: 30px;
  }

  .paw-nav a {
    font-size: 1.8rem; 
  }
}
