/* ============================================================
   offline-books.css — イベント頒布物一覧ページ
   硝子窓の向こう / 静的プロトタイプ
   ============================================================ */

/* ━━━ カスタムプロパティ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --ob-text:       #2e2c28;   /* 本文：純黒より少しやわらかい濃色 */
  --ob-sub:        #5a5550;
  --ob-muted:      #8a8480;
  --ob-rule:       rgba(242, 240, 223, 0.80);  /* Pair Color #F2F0DF 80%：区切り線 */
  --ob-card-bg:    rgba(242, 240, 223, 0.38);  /* Pair Color #F2F0DF 38%：既刊カード補助面（控えめ） */
  --ob-card-bd:    rgba(242, 240, 223, 0.90);  /* Pair Color #F2F0DF 90%：カード枠 */
  --ob-new-bg:     #F2F0DF;                    /* Pair Color そのまま：新刊ブロック（最も存在感ある ivory 面） */
  --ob-new-bd:     #637FBD;   /* 新刊枠：Theme Color＝コバルト（明確な主役） */
  --ob-adult:      #b84040;
  --ob-btn-dark:   #637FBD;   /* サンプル：Theme Color */
  --ob-btn-buy:    #b04040;   /* 通販：赤＝主アクション */
  --ob-btn-teal:   #4a62a8;   /* 本文公開：コバルト濃いめ */
  --ob-status-wip: #7888b8;   /* Theme Color 系の薄め */
  --ob-status-sold: #acacaa;
  --ob-status-open: #4a62a8;
}

/* ━━━ 参加イベントバー ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-event-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.92fr);
  gap: 0 24px;
  align-items: stretch;
  padding: 18px 20px;
  background: rgba(242, 240, 223, 0.50);   /* Pair Color #F2F0DF 50%：イベントバー補助面 */
  border: 1px solid #d8ddf0;              /* コバルト寄りの薄い枠 */
  border-radius: 2px;
  margin-bottom: 40px;
  font-size: 0.83rem;
}

.ob-event-bar__main-card,
.ob-event-bar__past-card {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.ob-event-bar__main-card {
  display: flex;
  flex-direction: column;
}

.ob-event-bar__past-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(99, 127, 189, 0.16);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(30, 50, 100, 0.04);
  overflow: hidden;
}

.ob-event-next-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
  padding: 18px 20px 16px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(99, 127, 189, 0.18);
  border-top: 3px solid #637FBD;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 8px 24px rgba(30, 50, 100, 0.05);
}

.ob-event-next-card__body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ob-event-bar-badge {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--ob-new-bg);
    background: #365CA7;
    border: 1px solid #365CA7;
    padding: 2px 8px;
    border-radius: 2px;
    white-space: nowrap;
}

.ob-event-bar-name {
  font-weight: 500;
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--ob-text);
}

.ob-event-next-card__details {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(99, 127, 189, 0.10);
  padding-top: 8px;
}

.ob-event-next-card__detail-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.84rem;
  line-height: 1.7;
}

.ob-event-next-card__detail-row + .ob-event-next-card__detail-row {
  border-top: 1px dashed rgba(99, 127, 189, 0.14);
}

.ob-event-next-card__detail-row dt {
  flex-shrink: 0;
  width: 4.8em;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ob-muted);
}

.ob-event-next-card__detail-row dd {
  margin: 0;
  color: var(--ob-text);
}

.ob-event-next-card__detail-row--notice dd {
  color: #365CA7;
  font-weight: 600;
}

.ob-event-subheading {
  margin: 2px 0 0;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ob-sub);
}

.ob-event-bar > .ob-event-subheading:not(.ob-event-subheading--past) {
  display: none;
}

.ob-event-bar__main-card > .cen-upcoming-list {
  margin-top: -1px;
}

.ob-event-bar__past-card > .ob-event-subheading--past {
  margin: 0;
  padding: 13px 16px 9px;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-bottom: 1px solid rgba(99, 127, 189, 0.12);
  border-radius: 0;
}

.ob-event-bar__past-card > .cen-past-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ob-event-bar .cen-upcoming-list,
.ob-event-bar .cen-past-list {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(99, 127, 189, 0.16);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 4px;
  line-height: 1.7;
}

.ob-event-bar .cen-upcoming-list {
  padding-top: 12px;
  border-top: 1px solid rgba(99, 127, 189, 0.08);
  border-radius: 0 0 4px 4px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px rgba(30, 50, 100, 0.05);
}

.ob-event-bar .cen-past-list {
  min-height: 100%;
  margin-top: 0;
  border: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

.ob-event-bar .cen-upcoming-item,
.ob-event-bar .cen-past-item {
  display: grid;
  grid-template-columns: 6.4em minmax(0, 1fr);
  gap: 2px 10px;
  align-items: start;
  padding: 7px 0;
}

.ob-event-bar .cen-upcoming-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
}

.ob-event-bar .cen-upcoming-item + .cen-upcoming-item,
.ob-event-bar .cen-past-item + .cen-past-item {
  border-top: 1px dotted rgba(99, 127, 189, 0.22);
}

.ob-event-bar .cen-upcoming-date,
.ob-event-bar .cen-past-date {
  min-width: 0;
  font-size: 0.73rem;
}

.ob-event-bar .cen-upcoming-name,
.ob-event-bar .cen-past-name {
  font-size: 0.80rem;
  line-height: 1.65;
}

.ob-event-bar .cen-upcoming-venue,
.ob-event-bar .cen-past-venue,
.ob-event-bar .cen-upcoming-space,
.ob-event-bar .cen-past-space {
  font-size: 0.73rem;
  line-height: 1.6;
}

.ob-event-bar .cen-upcoming-venue::before,
.ob-event-bar .cen-upcoming-space::before {
  content: "";
}

.ob-event-bar .cen-upcoming-name,
.ob-event-bar .cen-past-name,
.ob-event-bar .cen-upcoming-venue,
.ob-event-bar .cen-past-venue,
.ob-event-bar .cen-upcoming-space,
.ob-event-bar .cen-past-space {
  grid-column: 2;
}

.ob-event-bar .cen-upcoming-date {
  flex: 0 0 6.4em;
}

.ob-event-bar .cen-upcoming-name {
  flex: 1 1 calc(100% - 7.4em);
  min-width: 0;
}

.ob-event-bar .cen-upcoming-venue {
  grid-row: auto;
  grid-column: auto;
  flex: 0 1 auto;
  margin-left: calc(6.4em + 10px);
  white-space: nowrap;
}

.ob-event-bar .cen-upcoming-space {
  grid-row: auto;
  grid-column: auto;
  flex: 0 1 auto;
  white-space: nowrap;
}

.ob-event-bar .cen-past-item {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: nowrap;
  padding: 5px 0;
}

.ob-event-bar .cen-past-date {
  flex: 0 0 6.2em;
  color: #365CA7;
}

.ob-event-bar .cen-past-name,
.ob-event-bar .cen-past-venue {
  grid-column: auto;
  min-width: 0;
  line-height: 1.45;
}

.ob-event-bar .cen-past-name {
  color: var(--ob-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-event-bar .cen-past-venue {
  color: var(--ob-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-event-bar .cen-past-venue::before {
  content: " ／ ";
  color: rgba(90, 85, 80, 0.74);
}

.ob-event-bar .cen-upcoming-space::before {
  content: "スペース：";
  color: rgba(90, 85, 80, 0.82);
  margin-right: 0.2em;
}

@media (max-width: 760px) {
  .ob-event-bar {
    display: block;
    padding: 16px 16px 18px;
  }

  .ob-event-bar__main-card,
  .ob-event-bar__past-card {
    display: block;
    height: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .ob-event-bar__past-card {
    margin-top: 18px;
  }

  .ob-event-next-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 16px 17px;
  }

  .ob-event-bar-badge {
    justify-self: start;
  }

  .ob-event-next-card__detail-row {
    gap: 12px;
  }

  .ob-event-next-card__detail-row dt {
    width: 4.4em;
  }

  .ob-event-bar > .ob-event-subheading--past {
    padding: 12px 14px 9px;
  }

  .ob-event-bar .cen-upcoming-item,
  .ob-event-bar .cen-past-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .ob-event-bar .cen-upcoming-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ob-event-bar .cen-upcoming-name,
  .ob-event-bar .cen-past-name,
  .ob-event-bar .cen-upcoming-venue,
  .ob-event-bar .cen-past-venue,
  .ob-event-bar .cen-upcoming-space,
  .ob-event-bar .cen-past-space {
    grid-column: auto;
  }

  .ob-event-bar .cen-upcoming-date,
  .ob-event-bar .cen-upcoming-name,
  .ob-event-bar .cen-upcoming-venue,
  .ob-event-bar .cen-upcoming-space {
    flex: none;
    margin-left: 0;
    white-space: normal;
  }

  .ob-event-bar .cen-past-item {
    display: flex;
    align-items: baseline;
    gap: 0;
    flex-wrap: nowrap;
    padding: 5px 0;
  }

  .ob-event-bar__past-card > .cen-past-list {
    margin-top: -1px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(99, 127, 189, 0.16);
    border-top: 0;
    border-radius: 0 0 4px 4px;
  }

  .ob-event-bar .cen-past-date {
    flex: 0 0 6.2em;
  }

  .ob-event-bar .cen-past-name,
  .ob-event-bar .cen-past-venue {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ob-event-bar .cen-past-venue::before {
    content: " ／ ";
  }
}

/* ━━━ セクション共通 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-section {
  margin-bottom: 52px;
}

/* セクション見出し（新刊・既刊）
 * chapter-title と同トーンで統一
 * 左帯は Theme Color #637FBD 、背景面は Pair Color アイボリー薄敷き */
.ob-section-title {
  display: block;
  font-size: 0.90rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #1a2e4e;
  margin-bottom: 24px;
  padding: 5px 16px 8px 14px;
  border-left: 4px solid #637FBD;           /* Theme Color */
  border-bottom: 1px solid rgba(99, 127, 189, 0.15);
  background-color: rgba(242, 240, 223, 0.55);  /* Pair Color #F2F0DF 55% */
}

/* 延びる横罫は削除（border-bottom が代わりに区切りを担う） */
.ob-section-title::after {
  display: none;
}

/* ━━━ 共有パーツ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* タイトル行ラッパー（R18バッジとタイトルを横並びに） */
.ob-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.ob-title-row .ob-book-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

/* R18バッジ */
.ob-badge-r18 {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px 5px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--ob-adult);
  border-radius: 3px;
  line-height: 1.35;
  margin-top: 3px;
}

/* タイトル（新刊・既刊で font-size のみ上書き） */
.ob-book-title {
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* 原作 / カプ */
.ob-fandom {
  font-size: 0.84rem;
  color: var(--ob-muted);
  margin-bottom: 12px;
}

/* 区切り罫線 */
.ob-rule {
  border: none;
  border-top: 1px solid var(--ob-rule);
  margin: 0 0 14px;
}

/* 仕様行（判型 ｜ ページ数 ｜ 発行日）
   flex + wrap で意味単位を保ちつつ自然に折り返す */
.ob-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--ob-sub);
  margin-bottom: 4px;
  line-height: 1.6;
}

/* 各仕様値は改行しない */
.ob-spec-item {
  white-space: nowrap;
}

/* 区切り文字 */
.ob-sep {
  color: #b8b0a0;   /* アイボリー寄りのウォームグレー */
  margin: 0 5px;
  font-size: 0.75em;
}

/* 年齢区分 ｜ 価格行
   flex + wrap で年齢区分と価格がひとまとまりのまま折り返す */
.ob-specs-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--ob-sub);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* 「イベント価格：000円」はまとまりとして折り返さない */
.ob-price {
  white-space: nowrap;
}

/* 年齢区分バッジ */
.ob-rating {
  font-size: 0.77rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ob-rating--all {
  color: var(--ob-sub);
}

.ob-rating--adult {
  color: var(--ob-adult);
  font-weight: 700;
}

/* 説明文 */
.ob-desc {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.9;
  margin-bottom: 14px;
}

/* 注意事項リスト（△アイコン付き） */
.ob-caution {
  list-style: none;
  margin-bottom: 20px;
}

.ob-caution li {
  position: relative;
  padding-left: 1.3em;
  font-size: 0.79rem;
  color: #888;
  line-height: 1.75;
}

.ob-caution li::before {
  content: '△';
  position: absolute;
  left: 0;
  font-size: 0.72em;
  top: 0.2em;
  color: #bbb;
}

.ob-caution li + li {
  margin-top: 2px;
}

/* ━━━ ステータスバッジ（非リンク） ━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-status {
  display: block;
  text-align: center;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #fff;
  width: 100%;
}

.ob-status--wip  { background: var(--ob-status-wip); }
.ob-status--sold { background: var(--ob-status-sold); }
.ob-status--open { background: var(--ob-status-open); }

/* ━━━ ボタン ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ob-btn {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ob-btn:hover {
  opacity: 0.72;
  color: inherit;
}

.ob-btn--sample { background: var(--ob-btn-dark);  color: #fff; }
.ob-btn--buy    { background: var(--ob-btn-buy);   color: #fff; }
.ob-btn--read   { background: var(--ob-btn-teal);  color: #fff; }
.ob-btn--sold   {
  background: #b5b6bb;
  color: #fff;
  min-width: 108px;
  text-align: center;
  cursor: default;
  opacity: 1;
}

.ob-btn--sold:hover {
  opacity: 1;
  color: #fff;
}

/* ━━━ フッター（ボタン・ステータス置き場） ━━━━━━━━━━━━━━━━━━━ */
.ob-foot {
  margin-top: auto;
  padding-top: 4px;
}

/* ━━━ 新刊ブロック ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-new {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  background: var(--ob-new-bg);   /* Pair Color：アイボリー系 */
  border: 1px solid var(--ob-new-bd);
  border-top: 3px solid var(--ob-new-bd);   /* Theme Color：コバルト強調 */
  border-radius: 2px;
  padding: 28px 32px;
}

/* 左列: 表紙 */
.ob-new-cover {
  flex-shrink: 0;
  width: 280px;
  line-height: 0;
}

.ob-new-cover img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #c4cce0;
  box-shadow: 2px 4px 18px rgba(30, 50, 100, 0.10);
}

.ob-cover-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(208, 204, 196, 0.95) 0%, rgba(224, 220, 212, 0.9) 100%);
  color: rgba(90, 85, 80, 0.7);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px solid #c4cce0;
  box-shadow: 2px 4px 18px rgba(30, 50, 100, 0.10);
}

/* 右列: 情報 */
.ob-new-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ob-new-info .ob-book-title {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.ob-new-info .ob-fandom {
  font-size: 0.87rem;
  margin-bottom: 14px;
}

.ob-new-info .ob-specs,
.ob-new-info .ob-specs-sub {
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.ob-new-info .ob-specs-sub {
  margin-bottom: 18px;
}

.ob-new-info .ob-desc {
  font-size: 0.91rem;
}

/* 新刊のステータスは最大幅を制限して中央揃えにしない */
.ob-new-info .ob-status {
  max-width: 260px;
  text-align: center;
}

/* 新刊のボタンは少し大きめ */
.ob-new-info .ob-btn {
  padding: 9px 24px;
  font-size: 0.86rem;
}

/* ━━━ 既刊グリッド ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 760px;
}

/* ━━━ 既刊カード ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-card {
  display: flex;
  flex-direction: column;
  background: var(--ob-card-bg);   /* Pair Color 系アイボリー */
  border: 1px solid var(--ob-card-bd);
  border-radius: 1px;
  overflow: hidden;
}

/* 表紙エリア（3:4 固定比率でトリミング） */
.ob-card-cover {
  flex-shrink: 0;
  line-height: 0;
}

.ob-card-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-bottom: 1px solid var(--ob-card-bd);
}

.ob-card-cover .ob-cover-placeholder {
  border: none;
  border-bottom: 1px solid var(--ob-card-bd);
  box-shadow: none;
}

/* カード本文 */
.ob-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 16px 18px;
}

.ob-card-body .ob-book-title {
  font-size: 0.93rem;
  color: #1a2e4e;
  margin-bottom: 6px;
}

.ob-card-body .ob-fandom {
  font-size: 0.79rem;
  margin-bottom: 13px;
}

.ob-card-body .ob-specs {
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.ob-card-body .ob-specs-sub {
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.ob-card-body .ob-desc {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.85;
  margin-bottom: 14px;
  flex: 1;
  /* 長い説明文は最大3行でクランプし、カード間のばらつきを抑える */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ob-card-body .ob-foot {
  padding-top: 0;
}

/* カードのステータスバッジは少し小さく */
.ob-card-body .ob-status {
  font-size: 0.78rem;
  padding: 6px 12px;
  letter-spacing: 0.1em;
}

/* ━━━ 通販注記 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ob-online-note {
  margin-top: -24px;
  margin-bottom: 8px;
}

/* ━━━ レスポンシブ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* タブレット相当（サイドバーが引き出しになる幅以下） */
@media (max-width: 900px) {
  .ob-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* 新刊を縦積みに */
@media (max-width: 680px) {
  .ob-new {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .ob-new-cover {
    width: 140px;
  }

  .ob-new-info .ob-status {
    max-width: 100%;
  }

  .ob-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* 小型スマホ */
@media (max-width: 400px) {
  .ob-grid {
    grid-template-columns: 1fr;
  }

  .ob-card-body {
    padding: 12px 14px 14px;
  }

  .ob-btn {
    padding: 6px 13px;
    font-size: 0.74rem;
  }
}

/* ━━━ prefers-reduced-motion ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  .ob-btn {
    transition: none;
  }
}
