/* ツアーカテゴリページ用（2026-11-20）。トップの top.css の上に重ねる。すべて .wgt-cat の中だけに効く。
   生成：prototype/category-v1/build-category.py。置き場：uploads/wgt-b/top/category.css */

/* Diver のページ見出し（h1.page_title）は、カテゴリの見出し（.cat-hero h1）と重なるので、このページだけ隠す */
body:has(.wgt-cat) h1.page_title{display:none}
#page-main .content:has(.wgt-cat),#main .content:has(.wgt-cat){padding-top:0}

/* 固定ページの本文は WordPress の自動整形（wpautop）で、空の <p> や、ボタン・リンクを包む <p> が入る → 箱を作らせない */
.wgt-cat p:empty{display:none}
.wgt-cat p:has(>a:only-child),.wgt-cat p:has(>img:only-child),.wgt-cat .course-list>p{display:contents}

.wgt-top.wgt-cat{padding:12px;margin:0;border-radius:16px}
.wgt-cat .cat-crumb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:calc(12px + var(--fs-px));color:var(--muted);margin:0 0 10px}
.wgt-cat .cat-crumb a{color:var(--green-dark);text-decoration:underline;text-underline-offset:2px}
.wgt-cat .cat-crumb b{font-weight:700;color:var(--ink)}

/* 見出し：写真の上に、カテゴリの色のグラデーション */
.wgt-cat .cat-hero{position:relative;overflow:hidden;border-radius:16px;min-height:230px;aspect-ratio:2.2/1;display:flex;align-items:flex-end;background:var(--deep)}
.wgt-cat .cat-hero-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.wgt-cat .cat-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 45%,color-mix(in srgb,var(--deep) 88%,transparent) 100%)}
.wgt-cat .cat-hero-in{position:relative;z-index:1;padding:18px 20px 18px;color:#fff}
.wgt-cat .cat-kicker{display:flex;align-items:center;gap:8px;margin:0 0 4px;font-size:calc(12.5px + var(--fs-px));font-weight:700;letter-spacing:.06em;opacity:.95}
.wgt-cat .cat-kicker .tno{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--tone);color:#fff;font-size:calc(13px + var(--fs-px));font-weight:700;border:2px solid rgba(255,255,255,.85)}
.wgt-cat .cat-hero h1{margin:0;color:#fff;font-size:calc(30px + var(--fs-px));font-weight:900;line-height:1.25;text-shadow:0 2px 8px rgba(0,0,0,.35);border:0;padding:0;background:none}
.wgt-cat .cat-sub{margin:6px 0 0;font-size:calc(14.5px + var(--fs-px));font-weight:700;text-shadow:0 1px 4px rgba(0,0,0,.4);word-break:keep-all;overflow-wrap:anywhere;text-wrap:balance}

.wgt-cat .cat-lead{margin:14px 4px 12px;font-size:calc(15px + var(--fs-px));line-height:1.9;color:var(--ink)}

/* 3つの数字（ツアー数・所要時間・料金の目安） */
.wgt-cat .cat-facts{list-style:none;margin:0 0 6px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.wgt-cat .cat-facts li{background:var(--tint);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;margin:0}
.wgt-cat .cat-facts span{font-size:calc(12px + var(--fs-px));font-weight:700;color:var(--deep)}
.wgt-cat .cat-facts b{font-size:calc(22px + var(--fs-px));font-weight:900;color:var(--ink);line-height:1.3}
.wgt-cat .cat-facts b.sm{font-size:calc(15px + var(--fs-px))}
.wgt-cat .cat-facts .cat-cond{font-style:normal;font-size:calc(11px + var(--fs-px));color:var(--muted);font-weight:700}
.wgt-cat .tplan{display:inline-block;margin-right:6px;padding:0 8px;border-radius:999px;background:var(--tint,#eef3ea);color:var(--deep,#2e5e3a);font-weight:800}
.wgt-cat .cat-facts small{font-size:calc(13px + var(--fs-px));margin-left:2px}

.wgt-cat .cat-sec{margin-top:22px}
.wgt-cat .cat-h2{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:0;font-size:calc(20px + var(--fs-px));font-weight:800;color:var(--ink);background:none;border:0;line-height:1.35}
.wgt-cat .cat-h2::before{content:"";width:6px;height:1.15em;border-radius:3px;background:var(--green)}
.wgt-cat .cat-h2::after{display:none}
.wgt-cat .cat-h2 small{font-size:calc(14px + var(--fs-px));font-weight:700;color:var(--muted)}
.wgt-cat .cat-more{margin:-4px 0 10px}

/* 訪問先：線画つきの縦の箇条書き（白い枠1つに1行ずつ、行の間に細線）。2026-11-21 ユーザー指示で横並びの札から変更 */
.wgt-cat .tsites.cat-sites{display:block;margin:0;padding:4px 16px;background:#fff;border:1px solid var(--line,#e2e6dd);border-radius:14px}
.wgt-cat .cat-sites li{display:flex;align-items:center;gap:14px;margin:0;padding:8px 0;border-top:1px solid var(--line,#e2e6dd);font-size:calc(15px + var(--fs-px))}
.wgt-cat .cat-sites li:first-child{border-top:0}

/* 2026-11-21 冒頭の数字の箱を組み替え：半日ツアー・1日ツアーはカードのチップと同じ色（橙・濃い青）、空港送迎OKは条件なので白地＋枠。
   箱の数（3〜4）に合わせて横に並べる（--n）。スマホは2列 */
.wgt-cat .cat-facts{grid-template-columns:repeat(var(--n,3),minmax(0,1fr))}
.wgt-cat .cat-facts li.f-half{background:#fde3b8;box-shadow:inset 0 0 0 1px #f0b25a}
.wgt-cat .cat-facts li.f-half span,.wgt-cat .cat-facts li.f-half b{color:#8a4b00}
.wgt-cat .cat-facts li.f-full{background:#2f5d8a}
.wgt-cat .cat-facts li.f-full span,.wgt-cat .cat-facts li.f-full b{color:#fff}
.wgt-cat .cat-facts li.f-air{background:#fff;box-shadow:inset 0 0 0 1.5px var(--tone,#4c8a58)}
.wgt-cat .cat-facts li.f-air i{font-style:normal;margin-right:4px}
.wgt-cat .cat-facts b .sm{font-size:calc(15px + var(--fs-px))}

/* 2026-11-21 各ツアーの「👑2027年開催中」：写真の左上に小さく重ねる（ユーザー指示「ごちゃごちゃしてきたので画像の左上に小さく」）。
   色はピンクとグレー半透明を比べて、ユーザーがグレー半透明に決定（compare/badge-compare.png）。写真になじむよう半透明＋背景ぼかし */
.wgt-top.wgt-cat .tphoto{position:relative}
.wgt-top.wgt-cat .tnow{position:absolute;top:8px;left:8px;z-index:1;background:rgba(40,40,40,.55);color:#fff;font-weight:800;font-size:calc(11px + var(--fs-px));line-height:1.5;padding:1px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.35);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);letter-spacing:.02em;pointer-events:none}

/* 料金表：Diver の本文CSSが div に下余白 1.5em を付け、表の下が空き縦線が途中で切れていた → 打ち消す（2026-11-21） */
/* Diver 側は :where(.content) div:not([id]):not([class]):not([style]) で詳細度(0,3,1) → こちらを(0,4,1)に */
.wgt-top.wgt-cat .tprice > div:not([class]){margin:0}

/* ツアー一覧：カードは縦型（写真が上）を2列以上で */
.wgt-cat .tgroup{margin:0;padding:12px}
.wgt-top.wgt-cat .tcards{grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px}
.wgt-top.wgt-cat .tcard{grid-template-columns:1fr;gap:10px;padding:10px}
.wgt-top.wgt-cat .tphoto{min-height:0;aspect-ratio:16/10;align-self:auto}

/* 予約ブロック（トップと同じ section.reserve）。2026-11-21 追加。カテゴリページの枠の中に収める */
.wgt-cat .cat-reserve{margin-top:22px;border-radius:16px;overflow:hidden}
.wgt-cat .cat-reserve .reserve{margin:0}
/* 本文の幅がトップより狭く、PC で「予約フォームから申し込む」が2行に折れた → 左右の余白を詰めて1行に */
.wgt-cat .cat-reserve .reserve-btn{padding-left:14px;padding-right:14px;white-space:nowrap;font-size:calc(15px + var(--fs-px))}

/* カテゴリ行の 05 トンレサップ湖・06 合同ツアー：画像の白地が残り、色付きの行に白い箱が出ていた（.clean で乗算を外していたため）。
   乗算で白地を消す。ぼかしの縁（mask）は付けない（2026-11-21） */
.wgt-top.wgt-cat .course-ico img.clean{mix-blend-mode:multiply}
/* 2026-11-21 ユーザー指摘「カテゴリ行の画像が上に寄っている」：Diver の :where(.content) img が下余白 1.5em（15px）を付け、
   縦中央そろえで約7px上にずれていた → 打ち消す。カード内の訪問先アイコンも同じ */
.wgt-top.wgt-cat .course-ico img,.wgt-top.wgt-cat .tsite-slot img{margin:0}

/* ほかのカテゴリ：今いるカテゴリは枠で示す */
.wgt-cat .course-row.is-current{outline:2px solid var(--tone);outline-offset:-2px;pointer-events:none}
.wgt-cat .course-row.is-current .arrow{visibility:hidden}

@media (max-width:720px){
  .wgt-top.wgt-cat{padding:6px;border-radius:0}
  /* 2026-11-21：スマホでは写真の上に文字を重ねると人の顔・体が隠れ、明るい空では白文字が読めない → 写真を上、文字をその下の色帯に分ける */
  .wgt-cat .cat-hero{display:block;min-height:0;aspect-ratio:auto;border-radius:12px}
  .wgt-cat .cat-hero::after{display:none}
  .wgt-cat .cat-hero-bg{position:static;display:block;height:auto;aspect-ratio:16/10}
  .wgt-cat .cat-hero-in{padding:12px 14px 14px}
  .wgt-cat .cat-kicker{font-size:calc(11.5px + var(--fs-px));letter-spacing:0;white-space:nowrap}
  .wgt-cat .cat-hero h1{font-size:calc(24px + var(--fs-px));text-shadow:none}
  .wgt-cat .cat-sub{text-shadow:none}
  .wgt-cat .cat-sub{font-size:calc(13px + var(--fs-px))}
  .wgt-cat .cat-lead{font-size:calc(14.5px + var(--fs-px));margin:12px 2px 10px}
  .wgt-cat .cat-facts{gap:6px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .wgt-cat .cat-facts b .sm{font-size:calc(12.5px + var(--fs-px))}
  .wgt-cat .cat-facts li:last-child:nth-child(odd){grid-column:1/-1}  /* 箱が3つのときは料金を横いっぱいに */
  .wgt-top.wgt-cat .tnow{font-size:calc(10px + var(--fs-px));top:6px;left:6px;padding:0 7px}
  .wgt-cat .cat-facts li{padding:8px;word-break:keep-all;overflow-wrap:anywhere}
  .wgt-cat .cat-facts b{font-size:calc(18px + var(--fs-px))}
  .wgt-cat .cat-facts b.sm{font-size:calc(12.5px + var(--fs-px))}
  .wgt-cat .cat-facts span{font-size:calc(11px + var(--fs-px))}
  .wgt-cat .cat-h2{font-size:calc(18px + var(--fs-px))}
  .wgt-cat .tgroup{padding:8px 7px}
  .wgt-cat .tsites.cat-sites{padding:2px 12px}
  .wgt-cat .cat-sites li{gap:10px;padding:6px 0;font-size:calc(14px + var(--fs-px))}
  .wgt-cat .cat-sites .tsite-slot,.wgt-cat .cat-sites .tsite-img{width:64px;height:28px}
  .wgt-top.wgt-cat .tcards{grid-template-columns:1fr}
  .wgt-top.wgt-cat .tcard{padding:7px}
}
