/* =========================================================
   ベリッシマ クルーズ日記 Day0 記事用CSS
   Cocoon「カスタムCSS」欄に貼り付け
   すべて .cruise-diary 配下にスコープしています。
   全幅化やCocoon標準要素(タイトル・目次・シェア等)の非表示は行いません。
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&family=Noto+Sans+JP:wght@400;500;700&family=Cormorant+Garamond:ital,wght@1,500;1,600&display=swap');

/* ===== トークン定義(トップページと同一値) ===== */
.cruise-diary {
  --cd-ink:      #16384f;
  --cd-ink-soft: #4c6878;
  --cd-sea:      #bf9a4a;
  --cd-mist:     #eaf4f6;
  --cd-sand:     #fbf8f1;
  --cd-foam:     #ffffff;
  --cd-coral:    #e08a6d;
  --cd-line:     #dce8ec;

  --cd-font-display: "Zen Maru Gothic", sans-serif;
  --cd-font-body: "Noto Sans JP", sans-serif;
  --cd-font-en: "Cormorant Garamond", serif;

  --cd-radius: 14px;
  --cd-shadow: 0 6px 18px rgba(22, 56, 79, .08);
}

/* PC広幅時、左右の余白にCruiseMarginDecor(波・船イラスト/写真カード)を敷くための土台。
   .cd-decor-wrapは全幅、.cruise-diaryはその中で中央寄せの本文カラムのまま。 */
.cd-decor-wrap {
  position: relative;
}

/* PC表示時は本文カラム幅を画面幅の80%まで拡張(通常記事の.container-narrowより広く取る) */
@media (min-width: 900px) {
  .cd-decor-wrap .container-narrow {
    max-width: 80vw;
  }
}

/* ===== 記事内の基本文字設定(本文カラム内。全幅化はしない) ===== */
.cruise-diary {
  position: relative;
  z-index: 1;
  font-family: var(--cd-font-body);
  color: var(--cd-ink);
  line-height: 1.9;
  font-size: 16px;
}
.cruise-diary img,
.cruise-diary svg { max-width: 100%; }
.cruise-diary img {
  height: auto;
  display: block;
  border-radius: var(--cd-radius);
  margin: 20px 0;
}
.cruise-diary strong { color: var(--cd-ink); }

/* 画像+キャプション */
.cd-figure { margin: 20px 0; }
.cd-figure img { margin: 0; }
.cd-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--cd-ink-soft);
  text-align: center;
}

/* 資料写真のポラロイド風カード(本文の流れの中で少し傾けて置く) */
.cd-polaroids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 24px;
  margin: 28px 0 12px;
}
.cd-polaroid {
  position: relative;
  flex: 0 1 320px;
  margin: 0;
  padding: 10px 10px 14px;
  background: #fffdf8;
  border-radius: 4px;
  box-shadow: 0 14px 28px rgba(22, 56, 79, .18);
  transform: rotate(var(--cd-tilt, 0deg));
}
.cd-polaroid--left  { --cd-tilt: -2deg; }
.cd-polaroid--right { --cd-tilt: 1.6deg; }
.cd-polaroid--portrait { flex-basis: 300px; }
/* 書類など、切り抜かず元の縦横比で見せたい画像用 */
.cd-polaroid--natural { flex-basis: 440px; }
.cd-polaroid--wide { flex-basis: 560px; }
.cd-polaroid--portrait img { aspect-ratio: 3 / 4; }
.cd-polaroid::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 72px;
  height: 20px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(191, 154, 74, .35);
  border-radius: 2px;
}
.cd-polaroid img {
  display: block;
  margin: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
}
/* .cd-polaroid img より後ろに置いて4:3の切り抜きを確実に打ち消す */
.cd-polaroid--natural img { aspect-ratio: auto; object-fit: contain; }
.cd-polaroid figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--cd-ink-soft);
  text-align: center;
}
@media (max-width: 640px) {
  .cd-polaroid { flex-basis: 100%; max-width: 360px; }
}
/* PC幅では本文カラムが広いため、カードも一回り大きくする(SPは上記のまま) */
@media (min-width: 900px) {
  .cd-polaroid { flex-basis: 440px; }
  .cd-polaroid--portrait { flex-basis: 380px; }
  .cd-polaroid--natural { flex-basis: 560px; }
  .cd-polaroid--wide { flex-basis: 720px; }
  .cd-polaroid figcaption { font-size: 13.5px; }
}

/* 見出しはCocoon標準の装飾を基本的に活かしつつ、左ボーダーだけブランド色に寄せる */
.cruise-diary h2 {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  font-family: var(--cd-font-display);
  color: var(--cd-ink);
}

/* 月の切り替わり: 大きな余白と細い区切り線で「ここから別の月」と分かるようにする */
.cruise-diary h2[id^="toc-"] {
  position: relative;
  margin-top: 92px !important;
  margin-bottom: 20px !important;
}
.cruise-diary h2[id^="toc-"]::before {
  content: "";
  position: absolute;
  top: -46px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--cd-line);
}
/* 目次直後の最初の月は、区切り線なしで余白だけ少なめにする */
.cd-toc + h2[id^="toc-"] { margin-top: 56px !important; }
.cd-toc + h2[id^="toc-"]::before { display: none; }

/* ===== Dayバッジ + リード ===== */
.cd-lead {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--cd-line);
  border-bottom: 1px solid var(--cd-line);
  padding: 28px 4px;
  margin: 0 0 32px;
}
.cd-lead-badge {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--cd-ink);
  color: var(--cd-foam);
}
.cd-lead-daynum {
  font-family: var(--cd-font-en);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .02em;
}
.cd-lead-dayrange {
  font-family: var(--cd-font-display);
  font-size: 10.5px;
  font-weight: 700;
  color: #e3c887;
  margin-top: 3px;
  text-align: center;
  line-height: 1.3;
}
.cd-lead-text {
  flex: 1 1 260px;
  margin: 0;
  color: var(--cd-ink-soft);
  font-size: 15.5px;
}

/* ===== 情報ボックス(共通) ===== */
.cd-box {
  border-top: 1px solid var(--cd-line);
  border-bottom: 1px solid var(--cd-line);
  padding: 22px 4px;
  margin: 40px 0;
}
.cd-box-label {
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: none !important;
}
.cd-box p:last-child,
.cd-box ul:last-child { margin-bottom: 0; }
.cd-box ul {
  margin: 0;
  padding-left: 1.3em;
}
.cd-box li { margin-bottom: 6px; }
.cd-box li:last-child { margin-bottom: 0; }

/* 種類の違いはラベルの文字色だけで示す(背景・片側ラインは使わない) */
.cd-box--point .cd-box-label { color: var(--cd-ink); }
.cd-box--caution .cd-box-label { color: var(--cd-coral); }
.cd-box--memo .cd-box-label { color: var(--cd-sea); }

.cd-cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 14.5px;
}
.cd-cost-table th,
.cd-cost-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--cd-line);
  text-align: left;
}
.cd-cost-table th {
  color: var(--cd-ink-soft);
  font-weight: 600;
  font-size: 13px;
}
.cd-cost-table td:last-child,
.cd-cost-table th:last-child {
  text-align: right;
  white-space: nowrap;
}
.cd-cost-table tbody tr:last-child td {
  border-bottom: none;
  border-top: 2px solid var(--cd-ink);
}

/* ===== 目次 ===== */
.cd-toc {
  border-top: 1px solid var(--cd-line);
  border-bottom: 1px solid var(--cd-line);
  padding: 22px 4px;
  margin: 36px 0;
}
.cd-toc-label {
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--cd-ink);
  margin: 0 0 10px;
}
.cd-toc-list {
  list-style: none;
  counter-reset: cd-toc;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.cd-toc-list li { counter-increment: cd-toc; }
.cd-toc-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 8px;
  color: var(--cd-ink);
  text-decoration: none;
}
.cd-toc-list a::before {
  content: counter(cd-toc) ".";
  flex: 0 0 auto;
  font-family: var(--cd-font-en);
  font-weight: 600;
  color: var(--cd-sea);
}
.cd-toc-list a:hover,
.cd-toc-list a:focus-visible { background: var(--cd-sand); }
.cd-toc-date {
  flex: 0 0 auto;
  font-family: var(--cd-font-en);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--cd-ink-soft);
  white-space: nowrap;
}
.cd-toc-desc {
  font-size: 14.5px;
  line-height: 1.5;
}

/* ===== 準備タイムライン ===== */
.cd-timeline {
  list-style: none;
  position: relative;
  margin: 24px 0;
  padding-left: 26px;
}
.cd-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--cd-sea) 0 6px, transparent 6px 13px);
}
.cd-tl-item {
  position: relative;
  margin-bottom: 48px;
}
.cd-tl-item:last-child { margin-bottom: 0; }
.cd-tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cd-foam);
  border: 3px solid var(--cd-sea);
}
.cd-tl-date {
  display: inline-block;
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--cd-ink-soft);
  margin-bottom: 6px;
}
.cd-tl-date em {
  font-family: var(--cd-font-en);
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  color: var(--cd-sea);
  margin-right: 4px;
}
.cd-tl-title {
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 16.5px;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}
.cd-tl-body p:not(.cd-tl-title) {
  margin: 0 0 12px;
  color: var(--cd-ink);
}
.cd-tl-body p:last-child { margin-bottom: 0; }

/* ===== 夫婦の吹き出し ===== */
.cd-talk {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 560px;
  margin: 18px 0;
}
.cd-talk-icon {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cd-chara {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.cd-talk-name {
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--cd-ink-soft);
  background: var(--cd-mist);
  border-radius: 999px;
  padding: 1px 10px;
}
.cd-talk-balloon {
  position: relative;
  background: var(--cd-foam);
  border: 1.5px solid var(--cd-line);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 0 !important;
  font-size: 15px;
  color: var(--cd-ink);
  box-shadow: var(--cd-shadow);
}
.cd-talk--husband .cd-talk-balloon::before {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  background: var(--cd-foam);
  border-left: 1.5px solid var(--cd-line);
  border-bottom: 1.5px solid var(--cd-line);
  transform: rotate(45deg);
}
.cd-talk--wife {
  margin-left: auto;
  flex-direction: row-reverse;
}
.cd-talk--wife .cd-talk-balloon::before {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  background: var(--cd-foam);
  border-right: 1.5px solid var(--cd-line);
  border-top: 1.5px solid var(--cd-line);
  transform: rotate(45deg);
}

/* ===== お金の記録テーブル ===== */
.cd-money-wrap {
  overflow-x: auto;
  margin: 26px 0;
  border-radius: var(--cd-radius);
  box-shadow: var(--cd-shadow);
}
.cd-money {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: var(--cd-foam);
  font-size: 14.5px;
}
.cd-money-caption {
  text-align: left;
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--cd-ink-soft);
  padding: 12px 16px 0;
  caption-side: top;
}
.cd-money th,
.cd-money td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px dashed var(--cd-line);
}
.cd-money thead th {
  background: var(--cd-ink);
  color: var(--cd-foam);
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13px;
  border-bottom: none;
}
.cd-money td:nth-child(2) {
  font-family: var(--cd-font-en);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.cd-money tbody tr:last-child td { border-bottom: none; }
.cd-money-total td {
  font-family: var(--cd-font-display);
  font-weight: 700;
  background: var(--cd-sand);
  border-bottom: none;
}
.cd-money-total td:nth-child(2) {
  color: var(--cd-sea);
  font-size: 16px;
}

/* ===== 買ったものカード ===== */
.cd-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.cd-item {
  background: var(--cd-foam);
  border: 1.5px solid var(--cd-line);
  border-radius: var(--cd-radius);
  padding: 16px 18px;
}
.cd-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}
.cd-item-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--cd-foam);
  flex-shrink: 0;
}
.cd-item-rate--good { background: var(--cd-sea); }
.cd-item-rate--mid { background: var(--cd-ink-soft); }
.cd-item-rate--bad { background: var(--cd-coral); }
.cd-item-rate--pending { background: var(--cd-line); color: var(--cd-ink-soft); }
.cd-item-note {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--cd-ink-soft);
}
.cd-item-price {
  margin: 0;
  font-size: 12.5px;
  color: var(--cd-ink-soft);
  font-style: italic;
}

/* ===== 次回予告 ===== */
/* 暗い塗りのボックスをやめ、本文と同じ明るさの罫線ブロックにする(左に文章、右にリンク) */
.cd-next {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label btn" "title btn" "text btn";
  column-gap: 24px;
  align-items: center;
  border-top: 2px solid var(--cd-ink);
  border-bottom: 1px solid var(--cd-line);
  padding: 22px 4px 24px;
  margin: 48px 0 28px;
}
.cd-next-label {
  grid-area: label;
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--cd-sea);
  letter-spacing: .12em;
  margin: 0 0 4px;
}
.cd-next-title {
  grid-area: title;
  font-family: var(--cd-font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--cd-ink);
  margin: 0 0 6px;
}
.cd-next-text {
  grid-area: text;
  font-size: 14.5px;
  color: var(--cd-ink-soft);
  margin: 0;
}
.cd-btn {
  grid-area: btn;
  display: inline-block;
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border: 1.5px solid var(--cd-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--cd-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.cd-btn::after { content: " →"; }
.cd-btn:hover { background: var(--cd-ink); color: var(--cd-foam); }
.cd-btn.is-disabled {
  border-color: var(--cd-line);
  color: var(--cd-ink-soft);
  cursor: default;
}
.cd-btn.is-disabled::after { content: ""; }
.cd-btn.is-disabled:hover { background: transparent; color: var(--cd-ink-soft); }
@media (max-width: 640px) {
  .cd-next {
    grid-template-columns: 1fr;
    grid-template-areas: "label" "title" "text" "btn";
  }
  .cd-btn { justify-self: start; margin-top: 14px; }
}

/* ===== シリーズナビ ===== */
/* 全話を「Day番号 | 日付・行き先」の罫線リストにする。PCでは2列(上から下へ流す) */
.cd-series {
  margin: 28px 0 12px;
  padding: 0;
}
.cd-series-title {
  font-family: var(--cd-font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--cd-ink);
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cd-ink);
}
.cd-series-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .cd-series-list {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, auto);
    grid-auto-flow: column;
    column-gap: 48px;
  }
}
.cd-series-link {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  align-items: baseline;
  column-gap: 10px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--cd-line);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--cd-ink);
}
.cd-series-day {
  font-family: var(--cd-font-display);
  font-weight: 900;
  font-size: 14px;
  color: var(--cd-sea);
  white-space: nowrap;
}
.cd-series-link.is-current {
  background: var(--cd-mist);
  font-weight: 700;
}
.cd-series-link.is-current::after {
  content: "いま読んでいる記事";
  grid-column: 2;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--cd-ink-soft);
}
.cd-series-link.is-upcoming { color: var(--cd-ink-soft); }
a.cd-series-link { text-decoration: none; }
a.cd-series-link:hover { background: var(--cd-sand); }

/* ===== フォーカス可視化 ===== */
.cruise-diary a:focus-visible,
.cruise-diary .cd-btn:focus-visible {
  outline: 3px solid var(--cd-coral);
  outline-offset: 3px;
}

/* ===== スクロールリビール(JS有効時のみ) ===== */
.cd-js .cd-tl-item,
.cd-js .cd-talk,
.cd-js .cd-item,
.cd-js .cd-box {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.cd-js .cd-tl-item.is-inview,
.cd-js .cd-talk.is-inview,
.cd-js .cd-item.is-inview,
.cd-js .cd-box.is-inview {
  opacity: 1;
  transform: none;
}

/* ===== レスポンシブ ===== */
@media (max-width: 560px) {
  .cd-lead { flex-direction: column; text-align: center; }
  .cd-talk,
  .cd-talk--wife { max-width: 100%; margin-left: 0; }
  .cd-chara { width: 44px; height: 44px; }
  .cd-series-list { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 視差効果を減らす設定への対応 ===== */
@media (prefers-reduced-motion: reduce) {
  .cd-js .cd-tl-item,
  .cd-js .cd-talk,
  .cd-js .cd-item,
  .cd-js .cd-box {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .cd-btn { transition: none; }
}

/* ===== PC幅の文字サイズ ===== */
@media (min-width: 900px) {
  .cruise-diary { font-size: 18px; }
  .cd-figure figcaption { font-size: 14.5px; }
  .cd-polaroid figcaption { font-size: 15px; }
  .cd-lead-daynum { font-size: 22.5px; }
  .cd-lead-dayrange { font-size: 12px; }
  .cd-lead-text { font-size: 17.5px; }
  .cd-box-label { font-size: 14.5px; }
  .cd-cost-table { font-size: 16px; }
  .cd-cost-table th { font-size: 14.5px; }
  .cd-toc-label { font-size: 14.5px; }
  .cd-toc-date { font-size: 16px; }
  .cd-toc-desc { font-size: 16px; }
  .cd-tl-date { font-size: 15px; }
  .cd-tl-date em { font-size: 18px; }
  .cd-tl-title { font-size: 18.5px; }
  .cd-talk-name { font-size: 12.5px; }
  .cd-talk-balloon { font-size: 17px; }
  .cd-money { font-size: 16px; }
  .cd-money-caption { font-size: 15px; }
  .cd-money thead th { font-size: 14.5px; }
  .cd-money-total td:nth-child(2) { font-size: 18px; }
  .cd-item-name { font-size: 17px; }
  .cd-item-rate { font-size: 13.5px; }
  .cd-item-note { font-size: 15.5px; }
  .cd-item-price { font-size: 14px; }
  .cd-next-label { font-size: 14.5px; }
  .cd-next-title { font-size: 21.5px; }
  .cd-next-text { font-size: 16px; }
  .cd-btn { font-size: 15.5px; }
  .cd-series-title { font-size: 16.5px; }
  .cd-series-link { font-size: 16px; }
  .cd-series-day { font-size: 15.5px; }
}
/* ===== /PC幅の文字サイズ ===== */

/* 航海日記の単独写真は縦に長くなりすぎないよう高さを抑える */
.cd-figure img { width: 100%; height: auto; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; }
