/* ============================================================
   cocoise 公開面 共通コンポーネント（M2 / v4準拠）
   色・角丸・フォントは必ずテーマ契約の変数（docs/theme-contract.md）を参照。
   ページ固有のスタイルは各テンプレートの page_css ブロックに書く。
   ============================================================ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
}
a { color: var(--text-main); text-decoration: none; }
a:hover { color: var(--accent-1-light); }
img { max-width: 100%; display: block; }
/* width/height 属性を付けた画像（2026-10-27 SEO・img_size()）: 属性は読み込み前の縦横比の目安にだけ使い、
   表示の大きさは今までどおり CSS で決める。:where() で詳細度を0にして、クラスやstyleで幅・高さを決めている画像はそちらを優先する */
:where(img[width][height]) { width: auto; height: auto; }
/* 画面には出さず、読み上げ・検索エンジンには読ませる文字（画像だけの見出しの文字など。2026-10-27） */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
div::-webkit-scrollbar { display: none; }

/* ページラッパ（スマホファースト・中央寄せ） */
.pg {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-base);
  overflow: hidden;
}

/* ── 店舗バー（店舗ページ・キャストページの上部に固定。店名をタップで店舗TOPへ。partials/shop_bar.html） ── */
.shop-bar {
  position: sticky; top: 0; z-index: 41;
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px;
  background: var(--bg-base); border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 6px 14px -8px var(--overlay-dark);
}
.shop-bar-link {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 6px 0;
  color: var(--text-main); text-decoration: none;
}
.shop-bar-back {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-accent); color: var(--accent-1-light); background: var(--bg-card);
}
.shop-bar-logo { flex: none; height: 24px; max-width: 72px; object-fit: contain; object-position: left; }
.shop-bar-name { min-width: 0; font-size: 14px; font-weight: 900; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-bar-sub { flex: none; font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--accent-1-light); white-space: nowrap; }
.shop-bar-link:hover .shop-bar-back, .shop-bar-link:active .shop-bar-back { background: var(--accent-1); color: var(--text-on-light); border-color: var(--accent-1); }
.shop-bar-side {
  flex: none; font-size: 11px; font-weight: 700; color: var(--text-main); text-decoration: none;
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--bg-card);
}
.shop-bar-side:hover { border-color: var(--line-accent); color: var(--accent-1-light); }
/* 店舗ページ: 固定メニューの中に置く（固定は親が担う）。店名ブロックが画面から消えたときだけ出す */
.shop-menu-sticky .shop-bar { position: static; box-shadow: none; }
.shop-bar--auto { max-height: 0; min-height: 0; overflow: hidden; opacity: 0; border-bottom-width: 0;
  transition: max-height .25s ease, opacity .2s ease; }
.shop-bar--auto.is-on { max-height: 60px; opacity: 1; border-bottom-width: 1px; }
@media (prefers-reduced-motion: reduce) { .shop-bar--auto { transition: none; } }

/* ── ヘッダー ── */
.site-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 10px 12px 8px;
}
.site-logo { display: block; }
/* トップページだけロゴを h1 で包む（base.html の site_logo_h1）。見出しの既定の余白・文字サイズは消す */
.site-logo-h1 { margin: 0; font: inherit; }
/* object-fit: contain は箱より縦長のロゴを中央に置くため、左右に余白ができる。
   実際のロゴ(1135x567)だと168pxの箱の中で左右32pxずつ空き、絵の左端が44pxまで下がる。
   左寄せにしてヘッダーの余白(12px)と絵の左端を揃える。
   箱より横長のロゴに差し替わった場合は余白が出ないので、この指定は無害 */
.site-logo img {
  width: 168px; height: 52px;
  object-fit: contain; object-position: left center;
}
.site-logo-text {
  font-family: var(--font-display);
  font-weight: 900; font-size: 17px; line-height: 1.3;
  color: var(--accent-1); letter-spacing: .04em;
  text-shadow: 0 1px 2px var(--overlay-dark);
}
.header-actions { display: flex; align-items: flex-start; gap: 14px; padding-top: 4px; }
.header-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-main); background: none; border: none; cursor: pointer;
  font-family: var(--font-body); padding: 0;
}
.header-action:hover { color: var(--accent-1-light); }
.header-action-label { font-size: 8px; letter-spacing: .05em; }
.menu-bars { display: flex; flex-direction: column; gap: 4px; padding: 3px 0; }
.menu-bars span { width: 20px; height: 2px; background: var(--text-main); display: block; }

/* ── メニュードロワー（素のJS最小限で開閉） ── */
.menu-drawer {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: var(--overlay-dark);
}
.menu-drawer.open { display: block; }
.menu-drawer-panel {
  margin: 0 auto; max-width: 480px; background: var(--bg-card);
  border-bottom: 1px solid var(--line-accent);
  padding: 14px 16px 18px;
}
.menu-drawer-list { list-style: none; margin: 0; padding: 0; }
.menu-drawer a {
  display: block; padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px; letter-spacing: .05em;
}
/* 言語リンクの最後だけ線を消す（メニューは li ごとに a が1つなので、a:last-child では全部消えてしまう） */
.menu-drawer-lang a:last-child { border-bottom: none; }
.menu-close {
  display: block; margin-left: auto; background: none; border: none;
  color: var(--text-sub); font-size: 12px; cursor: pointer; padding: 4px;
  font-family: var(--font-body);
}

/* ── 信頼バー ── */
.trust-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: color-mix(in srgb, var(--trust-green) 10%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--trust-green) 35%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--trust-green) 35%, transparent);
  padding: 6px 12px;
}
.trust-bar-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; border: 1px solid var(--trust-green);
  border-radius: 50%; color: var(--trust-green); font-size: 8px; font-weight: 700;
}
.trust-bar-text { color: var(--trust-green); font-size: 10px; font-weight: 500; }

/* ── セクション見出し ── */
.section-title {
  text-align: center; font-size: 16px; font-weight: 700;
  letter-spacing: .1em; margin: 20px 0 12px; color: var(--text-main);
}

/* ── ネオン帯（SNS TIMELINE / PICKUP等の帯） ── */
.band {
  position: relative; background: var(--band-grad);
  padding: 9px 14px 11px; text-align: center; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.3) 42%, transparent 50%, rgba(255,255,255,.16) 60%, transparent 68%);
}
.band-title {
  margin: 0; /* トップページでは h2（2026-10-27） */
  font-size: 22px; font-weight: 900; font-style: italic;
  letter-spacing: .04em; color: #FFFFFF; text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.band-sub { margin: 0; font-size: 10px; color: #FFFFFF; } /* トップページでは p */

/* ── ボタン類 ── */
.btn-outline-accent {
  display: block; text-align: center;
  border: 1px solid var(--accent-1); color: var(--accent-1-light);
  font-size: 12px; letter-spacing: .2em; padding: 9px 0;
  background: transparent; border-radius: 0;
}
.btn-outline-accent:hover { box-shadow: 0 0 12px var(--glow-accent); color: var(--accent-1-light); }
.pill-btn {
  display: block; background: var(--surface-light); border-radius: 999px;
  text-align: center; padding: 11px 6px;
  font-size: 11px; font-weight: 700; color: var(--text-on-light);
}
.pill-btn:hover { box-shadow: 0 0 12px var(--glow-light); color: var(--text-on-light); }
.area-btn {
  flex: 1; text-align: center; border: 1px solid var(--accent-1);
  background: transparent; color: var(--text-main);
  font-size: 12px; font-weight: 500; padding: 8px 2px;
  border-radius: 5px; letter-spacing: .05em; white-space: nowrap;
}
.area-btn:hover { box-shadow: 0 0 10px var(--glow-accent); color: var(--text-main); }

/* ── 検索バー ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-light); border: 2px solid var(--accent-2);
  border-radius: 7px; padding: 6px 10px 6px 6px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-2) 35%, transparent);
}
.search-bar select {
  background: var(--accent-2); color: #FFFFFF; border: none; border-radius: 5px;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  padding: 7px 6px; outline: none;
}
.search-bar input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  color: var(--text-on-light); font-family: var(--font-body); font-size: 13px;
}
.search-bar button { background: none; border: none; padding: 0; cursor: pointer; display: flex; }
.search-note { font-size: 11px; color: var(--text-sub); padding: 6px 12px 0; }

/* ── 写真上の名前チップ ── */
.name-chip {
  position: absolute; right: 5px; bottom: 5px;
  background: var(--overlay-dark); font-size: 10px; padding: 2px 8px;
  border-radius: 3px; pointer-events: none; color: var(--text-main);
}
.name-chip small { color: var(--text-sub); font-weight: 400; font-size: 10px; }

/* ── 画像プレースホルダ（画像未設定スロット） ── */
.ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px dashed var(--line-soft);
  color: var(--text-sub); font-size: 10px; letter-spacing: .05em;
  width: 100%; height: 100%; text-align: center;
}
.ph--circle { border-radius: 50%; }

/* ── 審査バッジ（3層） ── */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--trust-green); color: var(--trust-green);
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 3px;
  letter-spacing: .03em; white-space: nowrap;
}
.trust-badge--declared {
  border-color: var(--line-strong); color: var(--text-sub);
  font-weight: 500;
}

/* ── フッター ── */
.site-footer { margin-top: 26px; }
.footer-pills {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px; padding: 0 10px 14px;
}
.footer-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 0;
  border-top: 1px solid var(--line-soft); padding: 12px 8px 4px;
  margin: 0; list-style: none; /* ul（2026-10-27） */
}
.footer-links a {
  display: block; font-size: 10px; color: var(--text-main); padding: 0 10px;
  border-right: 1px solid var(--line-strong);
}
.footer-links li:last-child a { border-right: none; }
.footer-links a:hover { color: var(--accent-1-light); }
.footer-copy {
  margin: 0; /* p（2026-10-27） */
  text-align: center; padding: 8px 16px 12px;
  font-size: 9px; color: var(--text-sub); letter-spacing: .08em;
}

/* ── スライダードット ── */
.slider-dots { display: flex; justify-content: center; gap: 9px; padding: 10px 0 4px; }
.slider-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.slider-dots .dot.active { background: var(--text-main); }

/* ── PR表記（有料掲載・特集） ── */
.pr-label {
  display: inline-block; font-size: 8px; color: var(--text-sub);
  border: 1px solid var(--line-strong); border-radius: 2px;
  padding: 0 4px; letter-spacing: .1em;
}

/* === リンク風ボタン（CSRF対策でPOSTフォーム化した導線用） === */
.link-button {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: inherit;
}

/* === Xへの導線カード（timeline_embed.html） ===
   タイムライン埋込は閲覧者のブラウザから429になるため、
   キャッシュが無いときはこのリンクカードにフォールバックする */
/* ── Xの投稿画像（2段の自動スクロール。2026-10-08。partials/sns_media_grid.html） ── */
.sns-marquee { padding: 10px 0 0; overflow: hidden; }
/* 帯（.sns-mq-track）は段の左端に絶対配置する。通常配置だとテーマ側の中央寄せ（flex/grid）を受けて
   375px の段に 800px の帯が中央に置かれ、末尾で右側が空く（2026-10-08 本番で発覚）。
   タイルの間隔は gap ではなく margin-right で付ける（末尾にも間隔が入り、translateX(-50%) の継ぎ目がぴったり合う） */
.sns-mq-row { position: relative; overflow: hidden; height: 180px; margin-bottom: 6px; }
.sns-mq-track { position: absolute; left: 0; top: 0; display: flex; width: max-content; margin: 0; padding: 0; }
.sns-mq-item {
  flex: none; display: block; height: 180px; margin-right: 6px; overflow: hidden;
  border-radius: var(--radius-btn); background: var(--bg-card);
}
.sns-mq-item img { display: block; height: 100%; width: auto; max-width: 340px; object-fit: cover; }
.sns-mq-item:hover { box-shadow: 0 0 10px var(--glow-accent); }
.sns-mq-track.is-animated { animation: sns-scroll var(--sns-dur, 40s) linear infinite; }
.sns-mq-row--rev .sns-mq-track.is-animated { animation-direction: reverse; }
.sns-marquee:hover .sns-mq-track.is-animated { animation-play-state: paused; }
@keyframes sns-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sns-mq-track.is-animated { animation: none; } }
@media (min-width: 1024px) { .sns-mq-row, .sns-mq-item { height: 240px; } .sns-mq-item img { max-width: 440px; } }

/* ── キャストの自由リンク（lit.link的なハブ） ── */
.cast-links { display: flex; flex-direction: column; gap: 8px; padding: 16px 10px 0; }
.cast-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; background: var(--bg-card);
  border: 1px solid var(--line-accent); border-radius: var(--radius-btn);
  color: var(--text-main); font-size: 13px; font-weight: 700;
}
.cast-link:hover { box-shadow: 0 0 12px var(--glow-accent); color: var(--text-main); }
.cast-link-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast-link-arrow { color: var(--accent-1); font-size: 17px; line-height: 1; }

/* ── キャストからのひとこと ── */
.hitokoto {
  margin: 14px 10px 0; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--line-accent);
  border-radius: var(--radius-card);
}
.hitokoto-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.hitokoto-label {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--accent-1-light);
}
.hitokoto-date { font-size: 10px; color: var(--text-sub); white-space: nowrap; }
.hitokoto-text {
  margin: 0; font-size: 13px; line-height: 1.9; color: var(--text-main);
  white-space: pre-wrap;
}

.x-link-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--line-accent);
  border-radius: var(--radius-card); padding: 12px 14px; color: var(--text-main);
}
.x-link-card:hover { box-shadow: 0 0 12px var(--glow-accent); color: var(--text-main); }
.x-link-icon {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-base); border: 1px solid var(--line-soft); color: var(--text-main);
}
.x-link-body { flex: 1; min-width: 0; }
.x-link-title { display: block; font-size: 12px; font-weight: 700; }
.x-link-sub { display: block; font-size: 10px; color: var(--text-sub); margin-top: 2px; }
.x-link-arrow { flex: 0 0 auto; color: var(--accent-1); font-size: 18px; }


/* ── 店舗カード画像（PC 2列時の高さは各ページの page_css で上書き） ── */
/* 16:9（PC用メイン画像 1920×1080 がそのまま収まる比率）。正方形しか無い店は --fit で全体表示 */
.store-card-img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; }
.store-card-img--fit { object-fit: contain; background: var(--bg-base); }
.store-card-ph { aspect-ratio: 16 / 9; }

/* ── 店舗カード（2026-08-27 オールワンモック準拠。shop_list / area_page 共通） ── */
.store-card {
  display: block; background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-card); overflow: hidden; color: var(--text-main);
}
.store-card-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; color: var(--text-main); }
.store-card-head:hover { color: var(--text-main); }
.store-card-logo {
  flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain;
  background: var(--surface-light); border-radius: 6px;
}
.store-card-head-txt { min-width: 0; }
.store-card-name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.store-card-name { font-weight: 900; font-size: 16px; }
.store-card-cat { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.store-card-badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; }
.store-card-badges:empty { display: none; }
.store-card-photo { display: block; position: relative; overflow: hidden; }
/* 正方形のスマホ用しか無い店: 16:9枠に収めた左右の空きに同じ画像をぼかして敷く（2026-10-08） */
.store-card-photo--fit::before {
  content: ""; position: absolute; inset: -24px;
  background: var(--fill) center / cover no-repeat; filter: blur(18px) brightness(.75);
}
.store-card-photo--fit .store-card-img { position: relative; background: transparent; }
.store-card-casts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; padding: 0 10px; }
.store-card-cast-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; border-radius: var(--radius-btn); }
.store-card-catch { padding: 8px 12px 0; font-size: 12px; font-weight: 500; color: var(--text-main); }
.store-card-info { padding: 8px 12px 0; }
.store-card-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.store-card-lbl {
  flex: 0 0 62px; text-align: center; font-size: 10px; color: var(--text-sub);
  border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 4px; margin-top: 1px;
}
.store-card-val { flex: 1; min-width: 0; font-size: 11px; line-height: 1.7; color: var(--text-main); }
.store-card-btns { display: flex; gap: 6px; padding: 10px 12px 12px; }
.store-card-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line-accent); border-radius: var(--radius-btn);
  background: transparent; color: var(--text-main); cursor: pointer;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  padding: 8px 2px; white-space: nowrap;
}
.store-card-btn:hover { box-shadow: 0 0 10px var(--glow-accent); color: var(--text-main); }
.store-card-btn--on { color: var(--accent-1-light); border-color: var(--accent-1-light); }
.store-card-btn-form { flex: 1; display: flex; margin: 0; }
.store-card-btn-form .store-card-btn { width: 100%; }

/* ── 翻訳ボタン（Google翻訳プロキシへのリンク。2026-09-07 段階1）── */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary svg { display: block; }
.lang-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 160px;
  background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-btn);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 6px 0;
}
.lang-menu-panel a { display: block; padding: 9px 14px; font-size: 13px; color: var(--text-main); white-space: nowrap; }
.lang-menu-panel a:hover { color: var(--accent-1-light); background: var(--overlay-dark); }
.lang-menu-note { padding: 6px 14px 4px; font-size: 10px; color: var(--text-sub); border-top: 1px solid var(--border-line); margin-top: 4px; }
.lang-menu--pc { display: none; }
.lang-links { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.lang-links svg { color: var(--text-sub); flex: none; }
.lang-links a { color: var(--text-sub); }
.lang-links a:hover { color: var(--accent-1-light); }
.menu-drawer-lang { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-line); }
.footer-lang { display: flex; justify-content: center; margin: 10px 0 6px; }
