/* =============================================
   calendar.css
   ============================================= */

   :root {
    --main:      #8451ab;
    --main-dark: #5e3880;
    --border:    #d7d7d7;
    --sun:       #c0392b;
    --sat:       #1a5fa8;
    --today-bg:  #e67e22;
  }
  
  body {
    margin: 0;
    background: #fafafa;
    font-family: 'Meiryo', sans-serif;
  }
  
  /* ===== カレンダーブロック ===== */
  .cal-block {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
  }
  
  /* ===== 月選択エリア ===== */
  .month-selector-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--main-dark), var(--main));
    border-radius: 10px;
    padding: 14px 24px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(132, 81, 171, .25);
  }
  
  .selector-label {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: .03em;
    white-space: nowrap;
  }
  
  .month-select {
    padding: 7px 14px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: var(--main-dark);
    font-weight: bold;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
  }
  
  /* ===== カレンダー枠 ===== */
  .cal-table {
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: 4px;
  }
  
  /* ===== 曜日ヘッダー ===== */
  .dow-row,
  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
  }
  
  .dow {
    background: var(--main);
    color: rgba(255, 255, 255, .9);
    text-align: center;
    padding: 10px 4px;
    font-weight: bold;
    font-size: 13px;
    border-right: 1px solid rgba(255, 255, 255, .2);
  }
  .dow:last-child { border-right: none; }
  .dow.sun { color: #ff8a80; }
  .dow.sat { color: #82b1ff; }
  
  /* ===== 日付セル ===== */
  .cell {
    min-height: 110px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6px;
    background: #fff;
  }
  .cell:nth-child(7n) { border-right: none; }
  .empty { background: #f3f3f3; }
  
  /* 日付番号 */
  .day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
  }
  .cell.sun-cell  .day-num { color: var(--sun); }
  .cell.sat-cell  .day-num { color: var(--sat); }
  .cell.holi-cell .day-num { color: var(--sun); }
  .cell.today .day-num {
    background: var(--today-bg);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, .35);
  }
  
  /* ===== バッジ（中央揃え） ===== */
  .badge {
    display: block;
    width: 100%;
    margin-bottom: 4px;
    border: none;
    border-radius: 20px;
    padding: 4px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;   /* 中央揃え */
    cursor: pointer;
    transition: filter .15s, transform .1s;
  }
  .badge:hover  { filter: brightness(1.15); transform: translateY(-1px); }
  .badge:active { transform: none; }
  
  /* カテゴリ色（写真の設定に合わせて更新） */
  .c-rikuji   { background: #2e7d32; }  /* 陸見学 */
  .c-kaiji    { background: #6aa5e9; }  /* 海見学 */
  .c-kuji     { background: #78909c; }  /* 空見学（灰色） */
  .c-jonan    { background: #00695c; }  /* 城南 */
  .c-johoku   { background: #0c35eb; }  /* 城北 */
  .c-santama  { background: #ece914; }  /* 三多摩 */
  .c-joto     { background: #c62828; }  /* 城東 */
  .c-honbu    { background: #6a1b9a; }  /* 本部 */
  
  /* ===== オーバーレイ ===== */
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 16px;
  }
  .overlay.on { display: flex; }
  
  /* ===== ポップアップ ===== */
  .popup {
    width: 100%;
    max-width: 580px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    border-top: 4px solid var(--main);
    animation: fadeUp .2s ease;
  }
  
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  .popup-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
  }
  
  .popup-date {
    font-size: 1rem;
    font-weight: bold;
    color: var(--main-dark);
  }
  
  .btn-close {
    border: none;
    background: var(--main);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
  }
  .btn-close:hover { background: var(--main-dark); }
  
  /* ポップアップ画像（縦幅フル） */
  .popup-img-wrap { background: #111; }
  .popup-img-wrap.hidden { display: none; }
  .popup-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  /* ===== イベント詳細本文 ===== */
  .popup-body { padding: 16px 20px 20px; }
  
  /* カテゴリラベル */
  .ev-cat-label {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
  }
  
  /* タイトル */
  .ev-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--main-dark);
    margin-bottom: 14px;
    line-height: 1.5;
  }
  
  /* 詳細テーブル */
  .ev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
  }
  .ev-table th {
    width: 90px;
    padding: 8px 10px;
    background: #f5f0fb;
    color: var(--main-dark);
    font-weight: bold;
    text-align: left;
    border: 1px solid #e0d6ee;
    white-space: nowrap;
  }
  .ev-table td {
    padding: 8px 10px;
    border: 1px solid #e0d6ee;
    color: #333;
    line-height: 1.5;
    white-space: pre-line;
  }
  
  /* リンク行 */
  .ev-link-row {
    display: flex;
    justify-content: flex-end;
  }
  
  .ev-link-btn {
    display: inline-block;
    padding: 8px 18px;
    background: var(--main);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background .15s;
  }
  .ev-link-btn:hover { background: var(--main-dark); }
  .ev-link-btn.hidden { display: none; }
  
  /* ===== レスポンシブ ===== */
  @media (max-width: 640px) {
    .month-selector-area { flex-direction: column; gap: 8px; padding: 12px 16px; }
    .cell    { min-height: 80px; padding: 4px; }
    .badge   { font-size: 10px; padding: 3px 6px; }
    .day-num { width: 20px; height: 20px; font-size: 11px; }
    .ev-table th { width: 70px; }
  }
  
  /* =============================================
     説明会セクション
     ============================================= */
  :root {
    --sk-accent:       #5a3e8f;
    --sk-accent2:      #7b5fbf;
    --sk-bg:           #f7f5fb;
    --sk-card-bg:      #ffffff;
    --sk-radius:       12px;
    --sk-shadow:       0 2px 12px rgba(90,62,143,.13);
    --sk-shadow-hover: 0 6px 24px rgba(90,62,143,.22);
  }
  
  .sk-section {
    margin: 32px auto 0;
    max-width: 1100px;
    padding: 0 20px 48px;
    font-family: 'Meiryo', 'Hiragino Kaku Gothic ProN', sans-serif;
  }
  
  /* ヘッダー */
  .sk-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .sk-header-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sk-accent));
  }
  .sk-header-line:last-child {
    background: linear-gradient(90deg, var(--sk-accent), transparent);
  }
  .sk-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sk-accent);
    white-space: nowrap;
    margin: 0;
    letter-spacing: .05em;
  }
  
  /* グリッド：PC=4列 / タブレット=3列 / スマホ=2列 */
  .sk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  @media (max-width: 768px) {
    .sk-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  }
  @media (max-width: 480px) {
    .sk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  }
  
  /* カード */
  .sk-card {
    background: var(--sk-card-bg);
    border-radius: var(--sk-radius);
    box-shadow: var(--sk-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
    border: 1.5px solid transparent;
  }
  .sk-card:hover,
  .sk-card:focus {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--sk-shadow-hover);
    border-color: var(--sk-accent2);
    outline: none;
  }
  .sk-card:active { transform: scale(.98); }
  
  .sk-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top;
    display: block;
    background: #e8e4f0;
  }
  .sk-card-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    padding: 12px;
    line-height: 1.5;
  }
  .sk-card-label {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--sk-accent);
    background: var(--sk-bg);
    text-align: center;
    letter-spacing: .03em;
  }
  
  /* オーバーレイ */
  .sk-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,10,40,.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
  }
  .sk-overlay.active { display: block; }
  
  /* ポップアップ */
  .sk-popup {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%) scale(.96);
    width: min(92vw, 480px);
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(20,10,40,.35);
    z-index: 1001;
    opacity: 0;
  }
  .sk-popup.active {
    display: block;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: skPopIn .22s cubic-bezier(.34,1.56,.64,1) forwards;
  }
  @keyframes skPopIn {
    from { transform: translate(-50%,-44%) scale(.93); opacity: 0; }
    to   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  }
  
  .sk-popup-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: none;
    background: rgba(90,62,143,.12);
    color: var(--sk-accent);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background .15s;
  }
  .sk-popup-close:hover { background: rgba(90,62,143,.25); }
  
  .sk-popup-img-wrap {
    width: 100%; 
    background: #e8e4f0;
  }
  .sk-popup-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
  
  .sk-popup-body { padding: 20px 20px 24px; }
  
  .sk-popup-category {
    font-size: 11px; font-weight: 700;
    color: var(--sk-accent2);
    letter-spacing: .08em;
    margin: 0 0 6px;
  }
  .sk-popup-title {
    font-size: 18px; font-weight: 800;
    color: #1a0a35;
    margin: 0 0 16px; line-height: 1.45;
  }
  .sk-popup-dl {
    margin: 0 0 20px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .sk-popup-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px; font-size: 13px; line-height: 1.6;
  }
  .sk-popup-row dt { font-weight: 700; color: var(--sk-accent); padding-top: 1px; }
  .sk-popup-row dd { margin: 0; color: #333; white-space: pre-line; }
  
  .sk-popup-link {
    display: block; text-align: center;
    background: var(--sk-accent);
    color: #fff; font-size: 14px; font-weight: 700;
    padding: 12px 20px; border-radius: 999px;
    text-decoration: none; letter-spacing: .05em;
    transition: background .15s, transform .1s;
  }
  .sk-popup-link:hover { background: var(--sk-accent2); transform: scale(1.02); }
  .sk-popup-link.sk-hidden { display: none; }
  