/* ====================================================================
   出席カレンダー・記録モーダル・ランキング（共有）

   2026-09-01 に切り出した。それまで、この45個のルールは
     templates/parent/dashboard.html   （保護者のマイページ）
     templates/admin/admin/member_list.html（管理の会員一覧）
   の <style> に**同じ内容で二重に**書かれていた。実測すると、
   両方に出てくるセレクタ81個のうち
     - 50個は完全な複製
     - 31個は既に中身がズレていた
       （例: 「今日」の枠線が保護者 #4CA86F / 管理 #00897B、
             管理側だけ cursor: pointer が付く）
   ズレている分は意図がある（管理のカレンダーは押せる、配色が別）ので触らず、
   **完全に同じ45個だけ**をここへ移した。

   ## 読み込み順が肝

   base.html で、各画面の <style>（{% block head %} の中）より **前** に読む。
   後ろにすると、各画面に残したズレ分の上書きが効かなくなり、
   保護者と管理のどちらかの見た目が変わる。
   検査13がこの順序を見張る。

   ## ここを直すと両方の画面が変わる
   それがこのファイルの目的。片方だけ変えたいなら、その画面の <style> に
   上書きを書く（このファイルを分岐させない）。
   ==================================================================== */


  .calendar-btn:hover {
    background: #EEEEEE;
  }


  .calendar-day.present {
    background: #C8E6C9;
    color: #2E7D32;
    font-weight: bold;
  }


  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }


  .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }


  .calendar-header h3 {
    font-size: 16px;
    font-weight: bold;
    color: #212121;
  }


  .calendar-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #E0E0E0;
  }


  .calendar-modal-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    max-width: 360px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
  }


  .calendar-modal-overlay.active {
    display: flex;
  }


  .calendar-month {
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
  }


  .calendar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }


  .calendar-nav button {
    background: #F5F5F5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    color: #616161;
  }


  .calendar-nav button:hover {
    background: #E0E0E0;
  }


  .calendar-weekday {
    text-align: center;
    font-size: 11px;
    color: #9E9E9E;
    padding: 8px 0;
  }


  .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }


  .legend-dot.present { background: #C8E6C9; }


  .legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #757575;
  }


  .ranking-icons {
    font-size: 12px;
    line-height: 1;
    display: block;
  }


  .ranking-label span {
    display: block;
    white-space: nowrap;
  }


  .ranking-tooltip .record-month-best-value {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
  }


  .ranking-tooltip-content {
    display: none;
    position: fixed;
    background: rgba(33, 33, 33, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }


  .ranking-tooltip-content.show {
    display: block;
  }


  .ranking-tooltip-item {
    margin-bottom: 4px;
    color: #FFF8DC;
  }


  .ranking-tooltip-item:last-child {
    margin-bottom: 0;
  }


  .record-card-arrow {
    color: #C0C0C0;
    font-size: 14px;
  }


  .record-card-arrow i {
    display: block;
  }


  .record-card-count {
    font-size: 11px;
    color: #9E9E9E;
  }


  .record-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
  }


  .record-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.35;
  }


  .record-chart-container canvas {
    max-height: 200px;
  }


  .record-event-card:active {
    transform: scale(0.97);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }


  .record-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }


  .record-modal-overlay.active {
    display: flex;
  }


  .record-month-header.no-toggle:hover {
    background: #FAFAFA;
  }


  .record-month-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }


  .record-no-chart {
    text-align: center;
    color: #9E9E9E;
    padding: 20px;
    font-size: 13px;
  }


  .record-no-data {
    text-align: center;
    color: #9E9E9E;
    padding: 20px;
    font-size: 13px;
  }



  /* カレンダーモーダル */
  .calendar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }


  /* ランキングツールチップ */
  .ranking-tooltip {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }


  /* レッスン日クリック可能 */
  .calendar-day.lesson-day {
    cursor: pointer;
  }


  /* 休講日 */
  .calendar-day.cancelled-day {
    color: #BDBDBD;
    text-decoration: line-through;
  }


  /* 種目カード一覧 */
  #record-card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }



  /* 記録モーダル */
  .record-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }


  /* 詳細画面のランキングラベル */
  .ranking-label {
    font-size: 11px;
    color: #757575;
    margin-top: 2px;
    line-height: 1.4;
  }


    from { opacity: 0; }


    to { opacity: 1; }
