/* 白ベースのカード一覧。上に「［業種］の［制作物］を見る」の一文、種類ごとに形を変える（LP＝FVの縦長・動画＝縦長・静止画＝正方形）
   色はBSMのロゴに合わせる（濃い青 #1162a8・水色 #2dbbec） */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #15202e;
  --muted: #5a6676;
  --line: #dfe5ec;
  --accent: #1162a8;
  --accent-dark: #0c4a80;
  --accent-ink: #ffffff;
  --sky: #2dbbec;
  --lp: #1162a8;
  --video: #d4642a;
  --image: #2dbbec;
  --dark: #0d1b2e;
  --chip-bg: rgba(255, 255, 255, 0.94);
  --shadow: 0 1px 2px rgba(13, 27, 46, 0.06), 0 8px 24px rgba(13, 27, 46, 0.07);
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.8;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.inner {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(clamp(20px, 4vw, 56px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(20px, 4vw, 56px), env(safe-area-inset-right, 0px));
}

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 14px; }
.brand { margin: 0; display: flex; align-items: center; gap: 12px; }
.brand-mark { display: block; height: 34px; width: auto; }
.brand-sub { font-size: 12px; color: var(--muted); }
.brand-note { margin: 0; font-size: 12px; color: var(--muted); }

/* 一文の絞り込み（作品より目立たせない。プルダウンは小さな枠に収める） */
/* 表紙＝中央に大きく。下の「● LP」の見出しとカードは左のまま（11/9本人指定） */
.finder { padding-block: 80px 64px; display: grid; gap: 0; justify-items: center; text-align: center; }
.finder-title { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: 0.08em; line-height: 1.3; }
.finder-lead { margin: 14px 0 32px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.finder-sentence { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.finder-join { white-space: nowrap; }
.finder-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231162a8' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 10px auto;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  padding: 12px 40px 12px 18px;
  cursor: pointer;
  /* 幅は固定（選んだ文字で箱の大きさが変わらないように）。一番長い「講座（ビジネス・副業）」が入る幅 */
  width: 260px;
  max-width: 100%;
  background-position: right 16px center;
}
.finder-select:hover { border-color: var(--accent); }
.finder-count { margin: 0; font-size: 12px; color: var(--muted); min-height: 1.6em; }

/* 種類ごとのまとまり */
#results { display: grid; gap: 48px; padding-bottom: 80px; }
.group { display: grid; gap: 18px; }
.group-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.group-count { font-size: 12px; font-weight: 500; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-lp { background: var(--lp); }
.dot-video { background: var(--video); }
.dot-image { background: var(--image); }

/* PCは3列（FVの文字が読める大きさに）。スマホは下の @media で2列 */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px 48px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* カード＝画像と文字までを1枚の白い板に */
.card {
  display: grid; gap: 20px; align-content: start; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 0 26px; box-shadow: var(--shadow);
  cursor: pointer;
}
/* ホバー＝カードは動かさず、FVだけ少し拡大（カードのどこに乗せても同じ動きにして、行き来でカクつかないように） */
.card .frame img { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }
.card:hover .frame img { transform: scale(1.04); }
/* 写真はカードの端まで（上の角はカードの角丸に合わせる） */
.card .frame { box-shadow: none; border: 0; border-radius: 13px 13px 0 0; border-bottom: 1px solid var(--line); }
.card .card-text { padding-inline: 24px; }
.card-hit {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.frame { display: block; position: relative; overflow: hidden; background: #eef2f6; max-width: 100%; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* LP＝FVをそのまま縦長で（スマホの枠は開いたときだけ） */
.frame-lp { aspect-ratio: 9 / 16; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* 動画CR＝縦長 */
.frame-video { aspect-ratio: 9 / 16; border-radius: 10px; box-shadow: var(--shadow); }
.play {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--video); }
.dur { position: absolute; right: 8px; bottom: 8px; font-family: var(--f-mono); font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.62); padding: 1px 7px; border-radius: 4px; }

/* 静止画CR＝正方形 */
.frame-square { aspect-ratio: 1 / 1; border-radius: 6px; box-shadow: var(--shadow); }

.thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; color: var(--muted); font-size: 13px; }

.chip-industry {
  position: absolute; left: 10px; top: 10px;
  background: var(--chip-bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.5; padding: 2px 10px;
  max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.card-text { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.card-kind { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.card-client { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.card-meta { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.card-meta .sep { margin-inline: 0.15em; color: #b3bdc9; }
/* 担当範囲＝全カードに出す（ビズム制作／構成・台本を担当）。四角で囲まず「- 」＋文字（半角のハイフンとスペース・細字） */
.card-scope { margin: 10px 0 0; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--accent); }
.empty { margin: 0; padding: 48px 0; color: var(--muted); }

/* 開いたとき（暗い背景で作品だけを見せる） */
.viewer {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
}
.viewer::backdrop { background: rgba(8, 18, 32, 0.86); }
.viewer-body {
  position: relative; background: var(--surface); border-radius: 12px; overflow: auto; max-height: calc(100dvh - 32px);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.viewer-media { background: var(--dark); display: grid; place-items: center; align-content: center; padding: 24px; min-height: 320px; }
.viewer-video, .viewer-img-video { width: auto; max-width: 100%; max-height: calc(100dvh - 96px); aspect-ratio: 9 / 16; border-radius: 8px; background: #000; }
/* 開いたLP＝スマホの枠の中で、縦長の全体スクショをスクロールして見る */
.viewer-phone {
  width: min(360px, 100%);
  height: min(720px, calc(100dvh - 96px));
  border: 8px solid #26354a;
  border-radius: 28px;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.viewer-phone img { width: 100%; display: block; }
.viewer-scroll-hint { margin: 10px 0 0; font-size: 12px; color: #c3d0de; text-align: center; }
.viewer-img-image { width: 100%; max-width: 640px; border-radius: 4px; }
.viewer-info { padding: 32px 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.viewer-client { margin: 0; font-size: 22px; line-height: 1.4; text-wrap: balance; }
.viewer-title { margin: 0; }
.viewer-dl { margin: 12px 0 0; display: grid; gap: 10px; }
.viewer-dl div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.viewer-dl dt { font-size: 13px; color: var(--muted); }
.viewer-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.viewer-link {
  justify-self: start; margin-top: 12px; display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; font-size: 14px;
}
.viewer-close {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.92); padding: 6px 14px; font-size: 13px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .inner { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px; color: var(--muted); }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .site-header .inner { padding-block: 10px; }
  .brand-mark { height: 28px; }
  .brand-note { display: none; }
  .finder { padding-block: 44px 36px; }
  .finder-title { font-size: 26px; }
  .finder-lead { margin: 10px 0 22px; font-size: 13px; }
  .finder-sentence { font-size: 14px; gap: 6px 8px; }
  /* スマホ＝［業種］の／［制作物］を見る の2行。箱の幅は2つとも同じ */
  .finder-sentence { display: grid; grid-template-columns: minmax(0, 1fr) 3.6em; width: 100%; text-align: left; }
  .finder-select { font-size: 14px; padding: 11px 34px 11px 14px; width: 100%; background-position: right 12px center; }
  #results { gap: 36px; }
  /* スマホ＝縦長のカードを2列（横長1列は文字が少なくてスカスカに見えたので戻した・11/9） */
  .grid, .grid-lp, .grid-video, .grid-image { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .card { padding: 0 0 16px; gap: 12px; border-radius: 12px; }
  .card .frame { border-radius: 11px 11px 0 0; }
  .card .card-text { padding-inline: 12px; }
  .card-meta { font-size: 12px; }
  .card-scope { margin-top: 6px; font-size: 11px; }
  .to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
  .viewer-phone { height: 64dvh; border-width: 6px; border-radius: 22px; }
  .card-client { font-size: 14px; }
  .viewer { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: 0; }
  .viewer-body { grid-template-columns: minmax(0, 1fr); border-radius: 0; max-height: 100dvh; min-height: 100dvh; }
  .viewer-media { padding: 56px 16px 16px; }
  .viewer-video, .viewer-img-video { max-height: 70dvh; }
  .viewer-info { padding: 20px 20px 40px; }
}

/* TOPに戻る（少し下に送ったら右下に出て、ついてくる） */
.to-top {
  position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 27, 46, 0.25);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); }
.to-top svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .card .frame img, .to-top { transition: none; }
  .card:hover .frame img { transform: none; }
}
