/* ---------------------------------------------------------------
   配色はテブラプレのチラシ（冒険企画局）から採取。
   クリーム地に濃紺、見出しは水色。パネルは薄い青灰、差し色は黄色とピンク。
   --------------------------------------------------------------- */
:root {
  /* ロゴ画像の地色を実測した値。ずれると画像の縁に境目が出る */
  --cream: #fffde5;
  --cream-deep: #f7f2d2;
  --navy: #1a3a80;
  --navy-deep: #122a60;
  --cyan: #45c3ea;
  --cyan-deep: #1490bb;
  --cyan-pale: #e2f4fc;
  --blue-text: #1f4fa6;
  --panel: #c6d3e5;
  --panel-head: #8f97ab;
  --yellow: #ffe84a;
  --yellow-pale: #fff7c4;
  --pink: #f4a3c3;
  --pink-pale: #fde5ee;
  --white: #fff;
  --ink: #24303f;
  --muted: #6b7789;
  --radius: 14px;
  --shadow: 0 3px 0 rgba(26, 58, 128, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro",
               "Yu Gothic Medium", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: var(--blue-text); }

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

rt { font-size: .3em; letter-spacing: .1em; }
.brand-name rt { -webkit-text-stroke: 0; color: var(--white); font-weight: 400; }

/* ---------- デモ告知 ---------- */
.demo-banner {
  background: var(--yellow);
  color: var(--navy-deep);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
  padding: .45rem 1rem;
}

/* ---------- ヘッダー ---------- */
.logo-band {
  background: var(--cream);
  padding: .75rem 0 .4rem;
}

.site-title { margin: 0; }

.logo { display: block; width: 100%; height: auto; }
/* display:block が [hidden] に勝ってしまい、読み込み失敗時にalt文字が残るため打ち消す */
.logo[hidden] { display: none; }

.logo-caption { display: none; }

.logo-fallback {
  display: block;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.2rem 1rem 1.4rem;
  text-align: center;
}
.logo-fallback[hidden] { display: none; }

.header-lead {
  display: block;
  margin: 0 0 .3rem;
  color: var(--cyan);
  font-size: clamp(1rem, 3.2vw, 1.5rem);
  font-weight: 700;
}

.brand-name {
  display: block;
  color: var(--cyan);
  font-size: clamp(2.8rem, 11vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  -webkit-text-stroke: 6px var(--white);
  paint-order: stroke fill;
}

/* ---------- ナビゲーション ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  border-bottom: 4px solid var(--cyan);
}
.nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem 1.4rem;
  padding: .5rem 0;
}
.site-nav a {
  color: var(--white);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  padding: .15rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.site-nav .nav-ext { color: #c7d6f2; }
.site-nav .nav-ext::after { content: " ↗"; font-size: .8em; }

/* ---------- セクション ---------- */
.band { padding: 2.75rem 0 3rem; }
.band-alt { background: var(--cream-deep); }

.section-title {
  margin: 0 0 .6rem;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--cyan);
}

.section-lead { margin: 0 0 1.5rem; font-size: .92rem; }

.heading {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.8rem 0 .6rem;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 900;
}
.heading:first-child { margin-top: 0; }
.heading-icon { font-size: 1.2em; }

/* ---------- テブラプレとは？ ---------- */
.intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
  align-items: flex-start;
}
.intro-figures {
  flex: 0 1 22rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* 画像が1枚も残らなければ枠ごと消す。コメントや改行があるため :empty は使えない */
.intro-figures:not(:has(img)) { display: none; }
.intro-figures img {
  width: 100%;
  height: auto;
  border: 2px solid var(--panel);
  border-radius: 10px;
}
.intro-text { flex: 1 1 24rem; }
.intro-text p { margin: 0 0 .8rem; }

.lead-strong {
  color: var(--blue-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.voice {
  margin: 0 0 .9rem;
  padding: .7rem 1rem;
  background: var(--cyan-pale);
  border-left: 5px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  font-size: .92rem;
  color: var(--navy);
}

/* ---------- 案内カード ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.guide-card {
  background: var(--white);
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  padding: 0 1.2rem 1.1rem;
}
.guide-card p { margin: .7rem 0 0; font-size: .88rem; }
.guide-card .note { color: var(--muted); font-size: .78rem; }

.guide-head {
  margin: 0 -1.2rem 0;
  padding: .45rem 1.2rem;
  background: var(--panel-head);
  color: var(--white);
  border-radius: 11px 11px 0 0;
  font-size: 1rem;
  font-weight: 900;
}

.spec-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .2rem .9rem;
  margin: .8rem 0 0;
  font-size: .88rem;
}
.spec-list dt { color: var(--navy); font-weight: 700; }
.spec-list dd { margin: 0; }

.steps { margin: .8rem 0 0; padding-left: 1.3rem; font-size: .88rem; }
.steps li { margin-bottom: .5rem; }

/* ---------- 開催日程 ---------- */
.hero-schedule {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.25rem;
}
.schedule-title { display: flex; gap: .4rem; margin: 0 0 .6rem; }
.schedule-title span {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--yellow);
  border-radius: 5px;
  color: var(--navy);
  font-size: .95rem;
  font-weight: 900;
}
.schedule-days {
  margin: 0 0 .4rem;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}
.schedule-slots {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.75rem;
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.slot-no { margin-right: .3rem; }
.schedule-note { margin: .7rem 0 0; color: #4d5c73; font-size: .72rem; line-height: 1.7; }

/* ---------- 絞り込み ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .9rem 1.25rem;
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 2px solid var(--panel);
  border-radius: var(--radius);
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  background: var(--white);
  border: 2px solid var(--panel);
  border-radius: 999px;
  padding: .3rem 1rem;
  color: var(--navy);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { border-color: var(--cyan); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }

.field { display: flex; flex-direction: column; gap: .25rem; }
.field-search { flex: 1 1 14rem; }
.field label { font-size: .72rem; color: var(--navy); font-weight: 700; letter-spacing: .06em; }

.toolbar input[type="search"],
.toolbar select {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--panel);
  border-radius: 8px;
  padding: .45rem .65rem;
  font: inherit;
  font-size: .92rem;
  min-width: 11rem;
}
.toolbar input[type="search"] { width: 100%; }
.toolbar input:focus-visible,
.toolbar select:focus-visible,
.chip:focus-visible,
.event-card:focus-visible,
.system-link:focus-visible,
.ticket-btn:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.field-toggle { padding-bottom: .4rem; }
.checkbox {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.checkbox input { accent-color: var(--cyan-deep); width: 1.05rem; height: 1.05rem; }

.result-count { margin: 0 0 .45rem auto; color: var(--muted); font-size: .85rem; }

.status { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.status.error { color: #c0392b; font-weight: 700; }

/* ---------- 日付見出し ---------- */
.day-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 2rem 0 .8rem;
}
.day-heading:first-child { margin-top: 0; }
.day-date {
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  padding: .1rem 1rem;
  font-size: 1.02rem;
  font-weight: 900;
}
.day-weekday {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--panel);
  color: var(--navy);
  font-size: .82rem;
  font-weight: 900;
}
.day-weekday.sat { background: var(--cyan); color: var(--white); }
.day-weekday.sun { background: var(--pink); color: var(--white); }

/* ---------- イベントカード（ギャラリー） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--white);
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 .9rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.event-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 5px 0 rgba(26, 58, 128, .16);
  transform: translateY(-2px);
}

.card-figure { position: relative; background: var(--cream-deep); }
.cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.card-figure .badge { position: absolute; left: .5rem; bottom: .5rem; }

.card-body { padding: .7rem .9rem 0; display: flex; flex-direction: column; flex: 1; }

.card-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .6rem;
  margin: 0 0 .25rem;
  font-variant-numeric: tabular-nums;
}
.when-date { color: var(--navy); font-size: 1.02rem; font-weight: 900; }
.when-time { color: var(--cyan-deep); font-size: .9rem; font-weight: 700; }

.card-title {
  margin: 0;
  color: var(--navy);
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.5;
}

.card-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .5rem;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8rem;
}
.card-sub .sys { color: var(--blue-text); font-weight: 700; }
.tag {
  background: var(--cream-deep);
  border: 1px solid var(--panel);
  border-radius: 5px;
  padding: 0 .4rem;
  font-size: .72rem;
  color: var(--blue-text);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .2rem .7rem;
  margin-top: auto;
  padding-top: .6rem;
}
.seats { font-size: .82rem; color: var(--navy); font-weight: 700; white-space: nowrap; }
.seats strong { font-size: 1.2rem; color: var(--cyan-deep); font-variant-numeric: tabular-nums; }
.seats.none { color: var(--muted); }
.gm { font-size: .76rem; color: var(--muted); }

.badge {
  font-size: .74rem;
  font-weight: 700;
  padding: .05rem .6rem;
  border-radius: 999px;
  border: 2px solid;
  white-space: nowrap;
}
.badge.open    { color: var(--cyan-deep); border-color: #a5e0f2; background: var(--cyan-pale); }
.badge.decided { color: var(--navy);      border-color: #b4c4e4; background: #e6ecf9; }
.badge.full    { color: #c2447a;          border-color: var(--pink); background: var(--pink-pale); }
.badge.today   { color: #a06a00;          border-color: #f5cf6a; background: var(--yellow-pale); }
.badge.request { color: #8a6a00;          border-color: var(--yellow); background: var(--yellow-pale); }
.badge.closed  { color: var(--muted);     border-color: var(--panel); background: var(--cream-deep); }

/* ---------- 遊べるTRPG ---------- */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.system-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.system-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--cream-deep);
}

.system-body { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.system-name { margin: 0; color: var(--navy); font-size: 1rem; font-weight: 900; line-height: 1.5; }
.system-desc {
  margin: .6rem 0 0;
  font-size: .82rem;
  line-height: 1.75;
  color: #3a4759;
  /* 紹介文は長さがまちまちなので、カードの高さを揃えるため4行で打ち切る */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  white-space: pre-line;
}

.system-foot { margin: .8rem 0 0; padding-top: .6rem; border-top: 1px dashed var(--panel); }
.system-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan-deep);
  font: inherit;
  font-size: .85rem;
  font-weight: 900;
  cursor: pointer;
}
.system-link:hover { text-decoration: underline; }
.system-none { color: var(--muted); font-size: .8rem; }

/* ---------- チケット情報 ---------- */
.band-cta { background: var(--cyan-pale); padding: 2.5rem 0 2.75rem; }
.cta-inner { text-align: center; }
.cta-title { margin: 0 0 .5rem; color: var(--navy); font-size: 1.4rem; font-weight: 900; }
.cta-inner p { margin: 0 0 1.2rem; font-size: .95rem; }
.cta-btn {
  display: inline-block;
  padding: .85rem 2.25rem;
  background: var(--cyan);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--cyan-deep);
}
.cta-btn:hover { background: #5ccdf0; }

/* ---------- 詳細ダイアログ ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18, 42, 96, .55); }

.modal-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 1.75rem;
}
.modal-close {
  position: absolute;
  top: .5rem;
  right: .6rem;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: .2rem .5rem;
}
.modal-close:hover { color: var(--cyan-deep); }

.modal-head { display: flex; gap: 1.25rem; margin-bottom: 1.1rem; }
.modal-cover {
  width: 180px;
  flex: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--panel);
}
.modal-title { margin: .35rem 0 .5rem; color: var(--navy); font-size: 1.15rem; line-height: 1.55; }

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem .9rem;
  font-size: .88rem;
  background: var(--cream-deep);
  border-radius: 10px;
  padding: .9rem 1.1rem;
}
.spec dt { color: var(--navy); font-weight: 700; }
.spec dd { margin: 0; }

.description {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 2px dashed var(--panel);
  white-space: pre-wrap;
  font-size: .9rem;
}

.ticket-btn {
  display: block;
  margin-top: 1.4rem;
  padding: .85rem 1rem;
  background: var(--cyan);
  color: var(--white);
  font-size: 1.02rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--cyan-deep);
}
.ticket-btn:hover { background: #5ccdf0; }
.ticket-btn.disabled {
  background: var(--panel);
  color: #5b6879;
  box-shadow: none;
  pointer-events: none;
}

/* ---------- フッター ---------- */
.site-footer {
  border-top: 4px solid var(--cyan);
  background: var(--navy);
  color: var(--white);
  padding: 1.75rem 0 2rem;
}
.footer-links { margin: 0 0 .6rem; font-size: .88rem; }
.footer-links a { color: var(--cyan); font-weight: 700; }
.footer-meta { margin: 0; color: #b9c6e2; font-size: .76rem; }

/* ---------- 書影が無い場合の代替 ---------- */
/* 各 cover 系クラスの display:block より後に置いて打ち消す（同じ詳細度のため順序で決まる） */
.cover-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  font-size: 2.4rem;
  background: var(--cream-deep);
  color: #b9b28c;
}

/* ---------- 狭い画面 ---------- */
@media (max-width: 860px) {
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .brand-name { -webkit-text-stroke-width: 4px; }

  .logo-caption {
    display: block;
    margin: .4rem 0 .1rem;
    color: var(--cyan-deep);
    font-size: .95rem;
    font-weight: 900;
    text-align: center;
  }

  .nav-inner { gap: .1rem 1rem; overflow-x: auto; flex-wrap: nowrap; }
  .card-grid { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .result-count { margin-left: 0; }
  .modal-head { flex-direction: column; }
  .modal-cover { width: 100%; }
  .modal-panel { padding: 1.5rem 1.1rem; }
}
