/************************************
** イベントカレンダーと詳細ページ（2026-10-19。inc-events.php / events.js）
** PC（768px〜）はカレンダー表（List に切り替え可）、スマホはリスト
************************************/
.eec, .eec-dialog, .single-event .entry-content {
  --eec-navy: #1F3A5F;
  --eec-cta: #C8412A;
  --eec-text: #1A1D23;
  --eec-sub: #5B6270;
  --eec-line: #E6E1D6;
  --eec-soft: #F4F2EC;
  --eec-bg: #FFFFFF;
  --eec-today: #FDF1EE;
}
.eec { color: var(--eec-text); scroll-margin-top: 90px; }
/* カテゴリの色（控えめに。色だけでなく名前も出す） */
.eec-cat-festivals { --eec-c: #C8412A; }
.eec-cat-food { --eec-c: #A65A1C; }
.eec-cat-art-culture { --eec-c: #2C6E8F; }
.eec-cat-seasonal { --eec-c: #3F7D4E; }
.eec-cat-music { --eec-c: #6A4C93; }
.eec-cat-traditional { --eec-c: #8A6A1E; }
.eec-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 999px; background: var(--eec-c, #1F3A5F); vertical-align: 1px; flex: none; }
.eec-cat { display: inline-flex; align-items: center; white-space: nowrap; }
.eec .screen-reader-text, .eec-dialog .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* 絞り込み */
.eec-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; }
.eec-filter {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--eec-line); border-radius: 999px; background: var(--eec-bg); color: var(--eec-text);
  font: 600 14px/1 var(--et-font-body, system-ui, sans-serif); cursor: pointer;
}
.eec-filter:hover { border-color: var(--eec-navy); }
.eec-filter[aria-pressed="true"] { border-color: var(--eec-navy); background: var(--eec-navy); color: #FFFFFF; }
.eec-filter[aria-pressed="true"] .eec-dot { box-shadow: 0 0 0 2px #FFFFFF; }
.eec button:focus-visible, .eec a:focus-visible, .eec-dialog button:focus-visible, .eec-dialog a:focus-visible { outline: 2px solid var(--eec-navy); outline-offset: 2px; }

/* 月の切り替え・表示の切り替え */
.eec-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0 0 20px; }
.eec-nav { display: flex; gap: 8px; justify-self: start; }
.eec-nav button, .eec-views button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 1.5px solid var(--eec-navy); border-radius: 999px; background: var(--eec-bg); color: var(--eec-navy);
  font: 700 14px/1 var(--et-font-heading, system-ui, sans-serif); cursor: pointer;
}
.eec-nav button span[aria-hidden="true"]:not(.eec-nav-text) { font-size: 22px; line-height: 1; margin-top: -2px; }
.eec-nav button:hover:not(:disabled), .eec-views button:hover { background: var(--eec-navy); color: #FFFFFF; }
.eec-nav button:disabled { opacity: .35; cursor: default; }
.article .eec h3.eec-month-label, .eec h3.eec-month-label {
  margin: 0; padding: 0; border: 0; background: none; text-align: center;
  font: 700 24px/1.2 var(--et-font-heading, system-ui, sans-serif); color: var(--eec-text);
}
.article .eec h3.eec-month-label::before, .article .eec h3.eec-month-label::after { content: none; }
.eec-views { display: inline-flex; justify-self: end; }
.eec-views button { border-radius: 0; min-width: 0; }
.eec-views button:first-child { border-radius: 999px 0 0 999px; }
.eec-views button:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.eec-views button[aria-pressed="true"] { background: var(--eec-navy); color: #FFFFFF; }

/* 5日以上続くもの */
.eec-running { margin: 0 0 16px; padding: 16px 20px; border: 1px solid var(--eec-line); border-radius: 12px; background: var(--eec-bg); }
.eec .eec-running-title { margin: 0 0 10px !important; font: 700 13px/1 var(--et-font-heading, system-ui, sans-serif); letter-spacing: .1em; text-transform: uppercase; color: var(--eec-sub); }
.eec-running-list { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.eec-running-list li { display: flex; align-items: center; gap: 8px; margin: 0; }
.eec-running-dates { font-size: 13px; color: var(--eec-sub); white-space: nowrap; }

/* カレンダー表 */
.eec-grid { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--eec-bg); border: 1px solid var(--eec-line); border-radius: 12px; overflow: hidden; }
.eec-grid th { padding: 10px 6px; border: 0; border-bottom: 1px solid var(--eec-line); background: #F8F5EF; font: 700 13px/1 var(--et-font-heading, system-ui, sans-serif); color: var(--eec-sub); text-align: center; }
.eec-grid th abbr { text-decoration: none; }
.eec-grid td { height: 118px; padding: 6px; border: 0; border-right: 1px solid var(--eec-line); border-bottom: 1px solid var(--eec-line); vertical-align: top; background: var(--eec-bg); }
.eec-grid td:last-child { border-right: 0; }
.eec-grid tr:last-child td { border-bottom: 0; }
.eec-grid td.eec-out, .eec-grid td.eec-past { background: #FBFAF7; }
.eec-grid td.eec-past .eec-date { color: #8A8F98; }
.eec-grid td.eec-today { background: var(--eec-today); }
.eec-date {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; margin: 0 0 4px; padding: 0 4px;
  border: 0; border-radius: 999px; background: none; color: var(--eec-text);
  font: 700 15px/1 var(--et-font-heading, system-ui, sans-serif);
}
.eec-date-btn { cursor: pointer; }
.eec-date-btn:hover { background: var(--eec-soft); }
.eec-sun .eec-date { color: #B23A26; }
.eec-sat .eec-date { color: #2C5A8F; }
.eec-today .eec-date, .eec-today .eec-date-btn:hover { background: var(--eec-cta); color: #FFFFFF; }

.eec-chip {
  display: block; margin: 0 0 4px; padding: 4px 6px 4px 8px;
  border-left: 3px solid var(--eec-c, var(--eec-navy)); border-radius: 4px;
  background: var(--eec-soft); color: var(--eec-text);
  font-size: 13px; font-weight: 500; line-height: 1.3; text-decoration: none;
}
.eec-chip:hover { background: #ECE8DE; color: var(--eec-text); }
.eec-chip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eec-chip-long { display: inline-block; margin: 0; font-size: 14px; }
.eec-chip-long .eec-chip-title { -webkit-line-clamp: 1; }
.eec-cancelled .eec-chip-title { text-decoration: line-through; color: var(--eec-sub); }
.eec-chip-flag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #FBE3DE; color: #8F2A18; font-size: 11px; font-weight: 700; text-decoration: none; }
.eec-more, .eec-ongoing {
  display: block; width: 100%; margin: 2px 0 0; padding: 4px 6px; border: 0; border-radius: 4px; background: none; text-align: left;
  color: var(--eec-navy); font: 700 12.5px/1.2 var(--et-font-body, system-ui, sans-serif); cursor: pointer;
}
.eec-ongoing { color: var(--eec-sub); font-weight: 600; }
.eec-more:hover, .eec-ongoing:hover { background: var(--eec-soft); }

/* リスト */
.eec-list { margin: 0; padding: 0; list-style: none; }
.eec-item { display: flex; gap: 16px; margin: 0 0 12px; padding: 16px; border: 1px solid var(--eec-line); border-left: 4px solid var(--eec-c, var(--eec-navy)); border-radius: 10px; background: var(--eec-bg); }
.eec .eec-item-date { display: flex; flex-direction: column; align-items: center; flex: none; width: 56px; margin: 0 !important; text-align: center; font-family: var(--et-font-heading, system-ui, sans-serif); }
.eec-item-pre { font-size: 11px; font-weight: 700; color: var(--eec-sub); text-transform: uppercase; letter-spacing: .04em; min-height: 13px; }
.eec-item-mon { font-size: 13px; font-weight: 700; color: var(--eec-cta); text-transform: uppercase; letter-spacing: .06em; }
.eec-item-day { font-size: 26px; font-weight: 700; line-height: 1.1; }
.eec-item-body { min-width: 0; }
.eec .eec-item-title, .eec-dialog .eec-item-title { margin: 0 0 4px !important; font: 700 17px/1.35 var(--et-font-heading, system-ui, sans-serif); }
.eec .eec-item-meta, .eec-dialog .eec-item-meta { margin: 0 0 2px !important; font-size: 14px; color: var(--eec-sub); }
.eec-details, .eec-link-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--eec-navy); font: 700 15px/1.2 var(--et-font-body, system-ui, sans-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.eec .eec-empty { margin: 0 !important; padding: 32px 20px; border: 1px dashed var(--eec-line); border-radius: 12px; background: var(--eec-bg); text-align: center; color: var(--eec-sub); }
.eec .eec-note { margin: 16px 0 0 !important; font-size: 13.5px; color: var(--eec-sub); text-align: center; }
.eec-note a { color: var(--eec-navy); font-weight: 700; }

/* Upcoming Events */
.eec-upcoming { margin: 48px 0 0; }
.article .eec h3.eec-up-title, .eec h3.eec-up-title {
  margin: 0 0 16px; padding: 0; border: 0; background: none;
  font: 700 24px/1.2 var(--et-font-heading, system-ui, sans-serif); color: var(--eec-text);
}
.article .eec h3.eec-up-title::before, .article .eec h3.eec-up-title::after { content: none; }
.eec-up-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.eec-up-item { margin: 0; padding: 16px 16px 8px; border: 1px solid var(--eec-line); border-radius: 10px; background: var(--eec-bg); }
.eec-up-item[hidden] { display: none; }
.eec .eec-up-date { margin: 0 0 4px !important; font: 700 13px/1.3 var(--et-font-heading, system-ui, sans-serif); color: var(--eec-cta); }
.eec-now, .eec-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #E3F1E6; color: #24603A; font-size: 11.5px; font-weight: 700; }
.eec-badge-red { background: #FBE3DE; color: #8F2A18; }
.eec .eec-up-name { margin: 0 0 4px !important; font: 700 16.5px/1.35 var(--et-font-heading, system-ui, sans-serif); }
.eec .eec-up-meta { margin: 0 !important; font-size: 14px; color: var(--eec-sub); }
.eec .eec-up-empty { margin: 0 !important; color: var(--eec-sub); }
.eec .eec-up-more-wrap { margin: 16px 0 0 !important; text-align: center; }
.eec-up-more { min-height: 44px; padding: 0 22px; border: 1.5px solid var(--eec-navy); border-radius: 999px; background: var(--eec-bg); color: var(--eec-navy); font: 700 14px/1 var(--et-font-heading, system-ui, sans-serif); cursor: pointer; }

/* 詳しい内容（ポップアップ） */
.eec-dialog { position: fixed; inset: 0; width: min(560px, calc(100vw - 32px)); height: fit-content; max-height: calc(100vh - 32px); margin: auto; overflow: auto; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .2); color: var(--eec-text); background: #FFFFFF; }
.eec-dialog::backdrop { background: rgba(20, 26, 36, .45); }
.eec-d-inner { position: relative; padding: 24px 24px 20px; }
.eec-d-close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 28px; line-height: 1; color: var(--eec-sub); cursor: pointer; }
.eec-d-img { display: block; width: calc(100% + 48px); max-width: none; height: auto; max-height: 260px; margin: -24px -24px 16px; object-fit: cover; }
.eec-dialog .eec-d-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--eec-sub); }
.eec-dialog h3.eec-d-title { margin: 0 0 12px; padding: 0 40px 0 0; border: 0; background: none; font: 700 22px/1.3 var(--et-font-heading, system-ui, sans-serif); color: var(--eec-text); }
.eec-dialog h3.eec-d-title::before, .eec-dialog h3.eec-d-title::after { content: none; }
.eec-dialog h3.eec-d-title:focus { outline: none; }
.eec-dialog .eec-d-sub { margin: -6px 0 12px; color: var(--eec-sub); font-size: 14px; }
.eec-dialog .eec-d-summary { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; }
.eec-dialog .eec-d-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 8px; }
.eec-dialog .eec-d-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--eec-navy); font-weight: 700; }
.eec-d-back { margin: -8px 0 4px; }
.eec-day-list { margin: 0; padding: 0; list-style: none; }
.eec-day-list li { margin: 0 0 10px; padding: 12px 14px 4px; border: 1px solid var(--eec-line); border-left: 4px solid var(--eec-c, var(--eec-navy)); border-radius: 10px; }

/* 詳細（ポップアップと詳細ページで共通） */
.eec-facts { display: grid; gap: 0; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--eec-line); }
.eec-facts > div { display: grid; grid-template-columns: 132px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--eec-line); }
.eec-facts dt { margin: 0; font-weight: 700; font-size: 14px; color: var(--eec-sub); }
.eec-facts dd { margin: 0; font-size: 15px; }
.eec-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px !important; }
.eec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 999px; font: 700 15px/1.2 var(--et-font-heading, system-ui, sans-serif); text-decoration: none !important; }
.eec-btn-navy { background: var(--eec-navy); color: #FFFFFF !important; }
.eec-btn-navy:hover { background: #162B47; }
.eec-btn-red { background: var(--eec-cta); color: #FFFFFF !important; }
.eec-btn-red:hover { background: #A8361F; }
.eec-btn-line { border: 1.5px solid var(--eec-navy); background: #FFFFFF; color: var(--eec-navy) !important; }
.eec-btn-line:hover { background: var(--eec-soft); }
.eec-plan { margin: 16px 0 12px; padding: 16px; border-radius: 12px; background: #F8F5EF; }
.eec-plan .eec-plan-title { margin: 0 0 10px !important; font: 700 15px/1.3 var(--et-font-heading, system-ui, sans-serif); }
.eec-plan-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.eec-plan .eec-plan-name { margin: 0 0 6px !important; font-size: 13px; font-weight: 700; color: var(--eec-sub); text-transform: uppercase; letter-spacing: .06em; }
.eec-plan .eec-btn { width: 100%; }
.eec-plan .eec-plan-note { margin: 10px 0 0 !important; font-size: 12.5px; color: var(--eec-sub); }
.eec-verified { margin: 8px 0 0 !important; font-size: 13px; color: var(--eec-sub); }

/* 詳細ページ */
.eec-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; color: var(--eec-sub); }
.eec-crumbs li { margin: 0; }
.eec-crumbs li + li::before { content: "›"; margin-right: 8px; }
.eec-notice { padding: 12px 16px; border-radius: 10px; background: var(--eec-soft); font-weight: 600; }
.eec-notice-red { background: #FBE3DE; color: #8F2A18; }
.eec-notice-green { background: #E3F1E6; color: #24603A; }
.eec-photo img { width: 100%; height: auto; border-radius: 12px; }
.eec-photo figcaption { font-size: 13px; color: var(--eec-sub); }
.eec-related ul { padding-left: 0; list-style: none; }
.eec-related li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--eec-line); }
.eec-related li span { color: var(--eec-sub); font-size: 14px; }

/* 見出しは中央（月の切り替えと揃える） */
.et-hv3-events .et-hv3-head { text-align: center; }

/* スマホ：リストだけ */
@media (max-width: 767px) {
  .eec-views, .eec-nav-text { display: none; }
  .eec-bar { grid-template-columns: auto 1fr; }
  .eec-nav { order: 2; justify-self: end; }
  .article .eec h3.eec-month-label, .eec h3.eec-month-label { order: 1; text-align: left; font-size: 20px; }
  .eec-nav button { padding: 0 12px; }
  .eec-filters { justify-content: flex-start; }
  .eec-filter { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
  .eec-item { padding: 14px 14px 6px; gap: 12px; }
  .eec .eec-item-date { width: 48px; }
  .eec-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .eec-dialog { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
  .eec-up-list { grid-template-columns: 1fr; }
}

/* 詳細ページ：Cocoon の投稿日・著者・関連記事・前後の記事は出さない（関連イベントは本文の下に出している） */
.single-event .date-tags, .single-event .author-info, .single-event .related-entries, .single-event .pager-post-navi { display: none !important; }

/* 2026-10-21 スマホで「This Month in Tokyo」を短くする（ユーザーの希望）
 *  ・月のリストと同じイベントが並ぶ Upcoming Events は、リストが出ているときは出さない（JS が動かないときの一覧としては残す）
 *  ・カテゴリの絞り込みは折り返さず、横にスクロールする1行にする
 *  ・カードを詰めて、「View Details」の行をなくしてカード全体をリンクにする（読み上げ用の文字は残す） */
@media (max-width: 767px) {
  .eec:has(.eec-stage .eec-list) .eec-upcoming { display: none; }
  .eec-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .eec-filters::-webkit-scrollbar { display: none; }
  .eec-filter { flex: none; }
  .eec-item { position: relative; margin: 0 0 8px; padding: 10px 12px; gap: 10px; align-items: center; }
  .eec .eec-item-date { width: 42px; }
  .eec-item-day { font-size: 22px; }
  .eec .eec-item-title { font-size: 16px; margin: 0 0 2px !important; }
  .eec .eec-item-meta { font-size: 13px; margin: 0 !important; }
  .eec-stage .eec-list { margin: 0; padding: 0; }
  .eec-stage .eec-details { display: block; height: 0; min-height: 0; margin: 0; padding: 0; font-size: 0; line-height: 0; }
  .eec-stage .eec-details > span[aria-hidden] { display: none; }
  .eec-stage .eec-details::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
  .eec-stage .eec-details:focus-visible::after { outline: 3px solid var(--eec-navy); outline-offset: 2px; }
}

/* 2026-11-08 月の前後の空いたマスは線と背景を消して目立たなくする */
.eec-grid td.eec-out { background: transparent; border-right-color: transparent; border-bottom-color: transparent; }
/* 2026-11-08 Upcoming Events のカードの写真（写真があるイベントだけ） */
.eec-up-item.eec-up-has-img { padding-top: 0; overflow: hidden; }
.eec-up-img { display: block; width: calc(100% + 32px); max-width: none; margin: 0 -16px 12px; aspect-ratio: 3 / 2; object-fit: cover; }
/* 2026-11-08 写真のないイベントの代わりの枠（藍＋青海波。design.md の「写真がない間は藍＋青海波」と同じ） */
.eec-up-ph { display: grid; place-items: center; background-color: #1F3A5F; background-image: var(--et-seigaiha-dark); background-size: 40px 20px; }
.eec-up-ph span { padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; color: #FFFFFF; font: 700 12px/1.3 var(--et-font-heading, system-ui, sans-serif); letter-spacing: .1em; text-transform: uppercase; }

/* 2026-11-10 写真の読み込み前は淡い青海波（トップのカードとそろえる） */
.eec-up-img { background: #EEF2F7 var(--et-seigaiha-light) repeat; }
