/* ===== 燕三条イベントナビ ===== */
:root {
  --ink: #22262a;
  --ink-soft: #5c646b;
  --paper: #f7f5f0;
  --card: #ffffff;
  --accent: #d9480f;
  --accent-deep: #a63305;
  --line: #e3ded4;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(34, 38, 42, .08);
  --shadow-lg: 0 12px 40px rgba(34, 38, 42, .22);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: url("../images/hero.jpg") center 65% / cover no-repeat;
  color: #fff;
  padding: 88px 20px 72px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,30,45,.35) 0%, rgba(20,30,45,.55) 100%);
}
.hero-inner { position: relative; max-width: 860px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 4px 18px;
  font-size: .82rem;
  letter-spacing: .12em;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero-title span { color: #ffd43b; }
.hero-sub {
  margin-top: 14px;
  font-size: clamp(.9rem, 2.4vw, 1.05rem);
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.line-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 26px;
  background: #06c755;
  color: #fff;
  font-weight: 800;
  font-size: clamp(.9rem, 2.4vw, 1.05rem);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(6,199,85,.45);
  transition: transform .15s, box-shadow .15s;
}
.line-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(6,199,85,.55); }
.line-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #06c755;
  font-weight: 900;
  font-size: .7rem;
  letter-spacing: .02em;
  padding: 3px 7px;
  border-radius: 6px;
}

/* ---- 今日のイベント ---- */
.today {
  background: linear-gradient(180deg, #fff7ed 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 22px 20px 26px;
}
.today-inner { max-width: 1100px; margin: 0 auto; }
.today-heading {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 800;
  color: var(--accent-deep);
  margin-bottom: 14px;
}
.today-empty { color: var(--ink-soft); font-size: .92rem; }
.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.today-nearby-tag {
  display: inline-block;
  background: #0c8599; color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  margin-bottom: 6px;
}

/* ---- シーン別フィルタ ---- */
.scene-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 0 2px;
}
.scene-lead {
  font-size: .8rem; font-weight: 700; color: var(--ink-soft);
  margin-right: 2px;
}
.scene-chip {
  border: 1.5px solid var(--chip, #999);
  color: var(--chip, #555);
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: .82rem; font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.scene-chip:hover { background: color-mix(in srgb, var(--chip) 12%, #fff); }
.scene-chip.active { background: var(--chip, #555); color: #fff; }

/* ---- Toolbar ---- */
.toolbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px 12px;
}
.toolbar-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.view-switch {
  display: inline-flex; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.view-btn {
  border: none; background: transparent;
  padding: 6px 20px; border-radius: 999px;
  font-size: .9rem; font-weight: 700; color: var(--ink-soft);
  transition: all .15s;
}
.view-btn.active { background: var(--accent); color: #fff; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  font-size: .7rem; color: var(--ink-soft);
  transition: all .15s;
}
.month-nav button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
#month-label { font-size: 1.15rem; font-weight: 800; letter-spacing: .05em; min-width: 130px; text-align: center; }
.genre-filter {
  max-width: 1080px; margin: 10px auto 0;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.genre-chip {
  border: 1.5px solid var(--chip, #999);
  color: var(--chip, #555);
  background: #fff;
  border-radius: 999px;
  padding: 3px 14px;
  font-size: .82rem; font-weight: 700;
  transition: all .15s;
}
.genre-chip.active { background: var(--chip, #555); color: #fff; }

/* ---- List view ---- */
.view { display: none; }
.view.active { display: block; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 16px 48px; }
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  cursor: pointer;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eceae4; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-date {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #fff;
  border-radius: 10px; padding: 4px 12px;
  font-weight: 800; font-size: .92rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.card-ended {
  position: absolute; top: 10px; right: 10px;
  background: rgba(40,44,48,.85); color: #fff;
  border-radius: 8px; padding: 3px 10px;
  font-size: .78rem; font-weight: 700;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-genre {
  align-self: flex-start;
  font-size: .74rem; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 2px 10px;
}
.card-title { font-size: 1.02rem; font-weight: 800; line-height: 1.45; }
.card-meta { font-size: .84rem; color: var(--ink-soft); }
.card-meta span { display: block; }
.empty-msg { text-align: center; color: var(--ink-soft); padding: 60px 0; }
.longrun-heading {
  margin: 30px 0 14px; padding-left: 10px;
  border-left: 4px solid var(--accent);
  font-size: 1.05rem; font-weight: 800; color: var(--ink);
}

/* ---- 終了イベント(折りたたみ) ---- */
.event-card.is-ended .card-thumb img { filter: grayscale(.5) opacity(.65); }
.ended-block { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; }
.ended-block summary {
  cursor: pointer; list-style: none;
  padding: 12px 4px; font-weight: 800; color: var(--ink-soft);
  font-size: .95rem; display: flex; align-items: center; gap: 8px;
}
.ended-block summary::-webkit-details-marker { display: none; }
.ended-block summary::before {
  content: "▶"; font-size: .7rem; transition: transform .15s; color: var(--accent);
}
.ended-block[open] summary::before { transform: rotate(90deg); }
.ended-count {
  background: var(--line); color: var(--ink-soft);
  border-radius: 999px; padding: 1px 10px; font-size: .8rem;
}
.ended-grid { margin-top: 14px; }

/* ---- Calendar view ---- */
.calendar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { background: #37404a; }
.cal-head div {
  padding: 8px 4px; text-align: center;
  color: #fff; font-size: .8rem; font-weight: 700;
}
.cal-head div:first-child { color: #ff8787; }
.cal-head div:last-child { color: #74c0fc; }
.cal-cell {
  min-width: 0;
  min-height: 96px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 4px;
  font-size: .8rem;
  background: #fff;
}
.cal-cell:first-child { border-left: none; }
.cal-cell.other { background: #f3f1ea; color: #b9b4a7; }
.cal-cell.today { background: #fff8e1; }
.cal-daynum { font-weight: 700; padding: 2px 4px; display: inline-block; }
.cal-cell.sun .cal-daynum { color: #e03131; }
.cal-cell.sat .cal-daynum { color: #1971c2; }
.cal-cell.today .cal-daynum {
  background: var(--accent); color: #fff; border-radius: 50%;
  width: 24px; height: 24px; line-height: 24px; text-align: center; padding: 0;
}
.cal-event {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  border: none; text-align: left;
  color: #fff; border-radius: 5px;
  padding: 2px 6px; margin-top: 3px;
  font-size: .72rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .15s;
}
.cal-event:hover { opacity: .82; }
.calendar-hint { text-align: center; color: var(--ink-soft); font-size: .82rem; margin-top: 12px; }
.cal-cell.has-events { cursor: pointer; }
.cal-cell.selected { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---- 会期中バー ---- */
.ongoing-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.ongoing-label { font-size: .84rem; font-weight: 800; color: var(--ink-soft); }
.ongoing-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  border: 1.5px solid var(--chip); border-left: 6px solid var(--chip);
  background: #fff; color: var(--ink);
  border-radius: 8px; padding: 5px 12px;
  font-size: .84rem; font-weight: 700; text-align: left;
  transition: background .15s;
  max-width: 100%;
}
.ongoing-chip:hover { background: var(--paper); }
.ongoing-chip small { font-weight: 400; color: var(--ink-soft); font-size: .74rem; }

/* ---- 日別パネル ---- */
.day-panel {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 10px;
}
.day-panel-title { font-size: 1rem; font-weight: 800; margin-bottom: 8px; padding-left: 4px; }
.day-panel-row {
  display: flex; align-items: stretch; gap: 10px;
  width: 100%; text-align: left;
  background: none; border: none;
  border-top: 1px solid var(--line);
  padding: 10px 4px;
}
.day-panel-row:hover { background: var(--paper); }
.day-panel-bar { width: 5px; border-radius: 3px; flex-shrink: 0; }
.day-panel-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.day-panel-name { font-weight: 700; font-size: .95rem; line-height: 1.4; }
.day-panel-name small { color: var(--ink-soft); font-weight: 400; }
.day-panel-meta {
  font-size: .8rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- 隣接エリア ---- */
.nearby {
  background: #eef6f7;
  border-top: 3px solid #0c8599;
  padding: 48px 16px 56px;
}
.nearby-inner { max-width: 1080px; margin: 0 auto; }
.nearby h2 { font-size: 1.5rem; letter-spacing: .06em; text-align: center; }
.nearby-lead { text-align: center; color: var(--ink-soft); font-size: .88rem; margin-top: 6px; }
.nearby #nearby-grid { margin-top: 24px; }

/* ---- Deals ---- */
.deals {
  background: #fff7e6;
  border-top: 3px solid #e8a10c;
  padding: 48px 16px 56px;
}
.deals-inner { max-width: 1080px; margin: 0 auto; }
.deals h2 { font-size: 1.5rem; letter-spacing: .08em; text-align: center; }
.deals-lead { text-align: center; color: var(--ink-soft); font-size: .88rem; margin-top: 6px; }
.deals-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.deal-badge { background: #e8a10c; }

/* ---- Spots ---- */
.spots {
  background: #2e3338;
  color: #fff;
  padding: 56px 16px 64px;
  text-align: center;
}
.spots h2 { font-size: 1.6rem; letter-spacing: .12em; }
.spots-lead { color: #b8bfc6; margin-top: 6px; font-size: .9rem; }
.spots-grid {
  max-width: 1080px; margin: 28px auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.spots-grid figure {
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.spots-grid img { width: 100%; height: 240px; object-fit: cover; transition: transform .3s; }
.spots-grid figure:hover img { transform: scale(1.04); }
.spots-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 26px 12px 10px; font-size: .84rem; text-align: left;
}

/* ---- Footer ---- */
.site-footer {
  background: #22262a; color: #aeb6bd;
  text-align: center; padding: 40px 20px 48px;
  font-size: .86rem;
}
.footer-title { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.site-footer p + p { margin-top: 6px; }
.copyright { margin-top: 18px; font-size: .78rem; color: #6f777e; }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,24,28,.66); }
.modal-card {
  position: relative;
  max-width: 720px; width: calc(100% - 32px);
  max-height: calc(100vh - 60px);
  margin: 30px auto;
  background: #fff; border-radius: var(--radius);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: sticky; top: 10px;
  margin-left: calc(100% - 54px);
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: rgba(34,38,42,.75); color: #fff;
  font-size: 1.4rem; z-index: 2;
}
.modal-body { padding: 0 24px 28px; margin-top: -44px; }
.modal-flyer { border-radius: 10px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); }
.modal-genre {
  display: inline-block; color: #fff; font-size: .78rem; font-weight: 700;
  border-radius: 6px; padding: 2px 12px; margin-bottom: 8px;
}
.modal-title { font-size: 1.3rem; font-weight: 800; line-height: 1.5; margin-bottom: 12px; }
.modal-dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; font-size: .9rem; margin-bottom: 14px; }
.modal-dl dt { font-weight: 700; color: var(--accent-deep); }
.modal-desc { font-size: .92rem; border-top: 1px dashed var(--line); padding-top: 14px; }
.modal-permalink { margin-top: 16px; }
.modal-permalink a { color: var(--accent-deep); font-weight: 700; text-decoration: none; font-size: .9rem; }
.modal-permalink a:hover { text-decoration: underline; }
.modal-ended {
  display: inline-block; background: #495057; color: #fff;
  font-size: .78rem; font-weight: 700; border-radius: 6px;
  padding: 2px 12px; margin: 0 0 8px 8px;
}

@media (max-width: 640px) {
  .hero { padding: 64px 16px 52px; }
  .modal-dl { grid-template-columns: 76px 1fr; }
  /* カレンダー: ピル→色ドット表示。タップは日付セル全体で受けて日別パネルを開く */
  .cal-cell { min-height: 58px; padding: 3px 2px; }
  .cal-daynum { font-size: .78rem; padding: 1px 3px; }
  .cal-cell.today .cal-daynum { width: 20px; height: 20px; line-height: 20px; }
  .cal-event {
    display: inline-block;
    width: 9px; height: 9px;
    padding: 0; margin: 2px 1px 0;
    border-radius: 50%;
    font-size: 0; color: transparent;
    pointer-events: none; /* タップはセルに任せる */
    vertical-align: middle;
  }
}

/* ---- LINE誘導フロートバー(スマホのみ) ---- */
.line-float {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #06c755;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  padding: 13px 18px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(6,199,85,.45);
}
.line-float-badge {
  background: #fff; color: #06c755;
  font-size: .68rem; font-weight: 900;
  padding: 3px 7px; border-radius: 6px;
}
@media (max-width: 768px) {
  .line-float { display: flex; }
  body { padding-bottom: 68px; } /* バーに隠れないよう余白 */
}

.modal-line-cta { margin-top: 12px; }
.modal-line-cta a {
  display: block; text-align: center;
  background: #06c755; color: #fff;
  font-weight: 800; text-decoration: none;
  border-radius: 10px; padding: 12px 16px;
}

/* ---- スマホの情報密度を上げる(カードを横並びに) ---- */
@media (max-width: 640px) {
  /* ヒーローを圧縮 */
  .hero { padding: 38px 16px 30px; }
  .hero-badge { font-size: .72rem; padding: 3px 14px; margin-bottom: 12px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: .84rem; margin-top: 10px; }
  .line-cta { margin-top: 14px; padding: 10px 20px; font-size: .88rem; }

  /* イベントカード: サムネ左・情報右 */
  .event-grid, .today-grid { grid-template-columns: 1fr; gap: 10px; }
  .event-card { flex-direction: row; align-items: stretch; }
  .card-thumb { width: 108px; flex-shrink: 0; aspect-ratio: 1; }
  .card-date { font-size: .7rem; padding: 2px 7px; top: 6px; left: 6px; border-radius: 7px; }
  .card-ended { font-size: .64rem; padding: 2px 6px; top: 6px; right: 6px; }
  .card-body { padding: 9px 11px; gap: 3px; justify-content: center; }
  .card-genre { font-size: .65rem; padding: 1px 8px; }
  .card-title { font-size: .92rem; line-height: 1.35; }
  .card-meta { font-size: .75rem; line-height: 1.45; }
  .today-nearby-tag { font-size: .62rem; padding: 1px 7px; margin-bottom: 3px; }

  /* 余白を詰めて1画面の情報量を増やす */
  main { padding: 16px 12px 30px; }
  .today { padding: 14px 12px 16px; }
  .today-heading { margin-bottom: 10px; }
  .toolbar { padding: 8px 12px 10px; }
  .genre-filter { margin-top: 8px; gap: 6px; }
  .genre-chip { padding: 3px 11px; font-size: .78rem; }
  .scene-filter { padding: 8px 0 2px; gap: 6px; }
  .scene-chip { padding: 4px 11px; font-size: .78rem; }
  .longrun-heading { margin: 20px 0 10px; font-size: .98rem; }
  .nearby, .deals { padding: 20px 12px; }
  .spots { padding: 24px 12px; }
}

/* ---- スマホ: カードの見た目を整える ---- */
@media (max-width: 640px) {
  /* 日付はサムネ下部の帯に(フライヤーを隠さない) */
  .card-date {
    top: auto; bottom: 0; left: 0; right: 0;
    border-radius: 0;
    padding: 3px 4px;
    font-size: .68rem; line-height: 1.25;
    text-align: center;
    background: rgba(217, 72, 15, .93);
    box-shadow: none;
  }
  /* タイトルは2行まで、メタは各1行(詳細はタップで見せる) */
  .card-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-meta span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

/* ---- スマホ: カードが画面幅を超えないように ---- */
@media (max-width: 640px) {
  .event-grid, .today-grid { grid-template-columns: minmax(0, 1fr); }
  .card-body { min-width: 0; }   /* flex子要素の既定 min-width:auto を解除 */
}

/* ---- スマホ: フィルタチップを小さく(行数を減らす) ---- */
@media (max-width: 768px) {
  .toolbar { padding: 8px 12px 10px; }
  .genre-filter { gap: 5px; margin-top: 7px; }
  .genre-chip {
    padding: 2px 9px;
    font-size: .72rem;
    border-width: 1px;
  }
  .scene-filter { gap: 5px; padding: 7px 0 2px; }
  .scene-chip {
    padding: 3px 9px;
    font-size: .72rem;
    border-width: 1px;
  }
  .scene-lead { font-size: .7rem; }
  #month-label { font-size: 1rem; min-width: 0; }
  .month-nav button { width: 30px; height: 30px; }
  .view-btn { padding: 5px 16px; font-size: .84rem; }
}

.modal-reserve { margin: 14px 0 10px; }
.modal-reserve a {
  display: block; text-align: center;
  background: #0c8599; color: #fff;
  font-weight: 800; text-decoration: none;
  border-radius: 10px; padding: 13px 16px;
}
