/* 索引(公開)版の追加スタイル: 画像プレースホルダー & 取得元リンク */

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(160deg, #e7e3ef, #cdd4e6);
  color: #6b6b7a;
  font-family: "Cinzel", serif;
  letter-spacing: 0.15em;
  text-align: center;
}
.ph .ph-sub {
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0;
  font-size: 11px;
  opacity: 0.75;
}

/* カード内プレースホルダー（masonryでは可変高さのため aspect-ratio で高さを持たせる） */
.cards .card .ph {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  font-size: 13px;
}
/* プレースホルダーの高さに変化を付けて masonry らしく見せる */
.cards .card:nth-child(4n+1) .ph { aspect-ratio: 3 / 4; }
.cards .card:nth-child(4n+2) .ph { aspect-ratio: 4 / 5; }
.cards .card:nth-child(4n+3) .ph { aspect-ratio: 2 / 3; }
.cards .card:nth-child(4n)   .ph { aspect-ratio: 1 / 1; }

/* 記事詳細スライドショーのプレースホルダー */
.slideshow .item .ph {
  width: 100%;
  min-height: 220px;
  font-size: 20px;
}
.slideshow .item .ph .src-btn,
.source-cta {
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0;
  display: inline-block;
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #4a5aa8;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

/* 記事上部の取得元CTA */
.source-cta-wrap {
  margin: 10px 0 6px;
}
.source-cta {
  background: #222;
  font-size: 13px;
}
.source-note {
  font-size: 11px;
  color: #999;
  margin: 4px 0 12px;
}

/* ページャ（ウィンドウ型） */
.pager-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 12px 0 4px;
}
.pager-nav > * {
  margin: 0; /* 既存の margin-left を打ち消し gap で統一 */
}
.pager-nav .page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 34px;
  height: 32px;
  line-height: 1;
  border-radius: 8px;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.pager-nav .page.nav {
  font-weight: bold;
  font-size: 16px;
  color: #444;
}
.pager-nav .page.now {
  background-color: #0088fe;
  color: #fff;
  border-color: #0088fe;
}
.pager-nav .page.now:hover {
  background-color: #0088fe;
  color: #fff;
}
.pager-nav .disabled {
  color: #ccc;
  background-color: #fafafa;
  border: 1px solid #eee;
  cursor: default;
}
.pager-nav .pad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #aaa;
  width: 18px;
  min-width: 18px;
  height: 32px;
  line-height: 1;
  font-weight: bold;
  letter-spacing: 1px;
}
.pager-info {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

/* 検索 */
.search-box {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin: 8px 0 14px;
  box-sizing: border-box;
}

/* =========================================================
   Pinterest 風 masonry グリッド（機能そのまま・見た目のみ）
   .cards / .card / .title / .count を上書き
   ========================================================= */
.cards {
  column-count: 5;
  column-gap: 14px;
  width: 100%;
  background: none;
  border-radius: 0;
  padding: 10px 6px 24px;
  text-align: left;
}
@media (max-width: 1200px) { .cards { column-count: 4; } }
@media (max-width: 920px)  { .cards { column-count: 3; } }
@media (max-width: 620px)  { .cards { column-count: 2; column-gap: 10px; } }

.cards .card {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0 0 14px;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #ececf2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cards .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  border: none; /* 元CSSの青枠を打ち消す */
}
/* ホバー時の画像の暗転はやめて鮮明なまま */
.cards .card:hover img {
  opacity: 1;
}
.cards .card img {
  width: 100%;
  height: auto;          /* 画像本来の比率＝可変高さ */
  display: block;
  object-fit: cover;
  border: none;
}

/* 枚数バッジ（右上のピル） */
.cards .card .count {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: auto;
  left: auto;
  width: auto;
  height: auto;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.cards .card .count span {
  font-size: 9px;
  margin-left: 1px;
  opacity: 0.85;
}

/* タイトル: 下部グラデーションにオーバーレイ（ホバーで表示） */
.cards .card .title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto;
  height: auto;
  max-height: none;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  opacity: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ホバー時も白のまま（元CSSは青にして暗背景で読めなくなる） */
.cards .card:hover .title {
  color: #fff;
}

/* =========================================================
   Pinterest 風ヘッダー & 見出し周り（機能そのまま・見た目のみ）
   ========================================================= */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 6px 10px;
}
#navbar .container {
  display: flex;
  align-items: center;
  gap: 6px;
}
#navbar .menu {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
/* ロゴ（Pinterest レッド） */
#navbar .menu .app_name {
  margin: 0 2px;
}
#navbar .menu .app_name a {
  color: #e60023;
  font-size: 24px;
  font-weight: 800;
  padding: 0 6px;
}
#navbar .menu .app_name a:hover {
  color: #e60023;
}
/* アイコンは丸ボタン化 */
#navbar .menu > a {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #333;
  margin: 0;
  transition: background-color 0.12s, color 0.12s;
}
#navbar .menu > a:hover {
  background-color: #efefef;
  color: #111;
}
#navbar .menu > a .material-symbols-outlined {
  font-size: 24px;
}
/* 検索バー: ピル型 */
#navbar form {
  flex: 1;
  display: flex;
  min-width: 0;
}
#navbar input {
  width: 100%;
  max-width: none;
  height: 44px;
  margin: 0;
  padding: 0 18px;
  background: #efefef;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  color: #333;
  transition: background-color 0.12s, box-shadow 0.12s;
}
#navbar input:hover {
  border: none;
  background: #e6e6e6;
}
#navbar input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.14);
}
#navbar input::placeholder {
  color: #767676;
}

/* 見出し */
#main_frame .container h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 14px 0 6px;
}
.exp {
  color: #767676;
}

/* 「タグ一覧」ボタン: 丸ピルのセカンダリ */
a.back_btn {
  border-radius: 999px;
  background-color: #efefef;
  color: #333;
  box-shadow: none;
  border: none;
  font-weight: 700;
  padding: 10px 18px;
  margin: 8px 0 16px;
  transition: background-color 0.12s;
}
a.back_btn:hover {
  background-color: #e2e2e2;
  color: #111;
}

/* 件数バー: 枠を外して控えめに */
.search_range {
  background: none;
  border: none;
  padding: 2px 4px;
  color: #767676;
  font-size: 13px;
}

/* =========================================================
   アクセントカラー = レッド（元CSSの青 #0088fe を上書き）
   ========================================================= */
:root {
  --accent: #e60023;
  --accent-dark: #ad081b;
}

/* リンクのホバー */
a:hover { color: var(--accent); }
#navbar .menu a:hover { color: var(--accent); }
.f_link .item a:hover { color: var(--accent); }
.list_frame a:hover { color: var(--accent); }

/* 検索バー フォーカス */
#navbar input:focus {
  box-shadow: 0 0 0 3px rgba(230, 0, 35, 0.25);
}

/* ページャ: 現在ページ & ホバー */
.pager-nav .page.now,
.pager-nav .page.now:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pager-nav .page:not(.now):not(.disabled):hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* タグチップ ホバー */
.tags .tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* タグ一覧テーブルのリンク */
.list_frame td a { color: #333; }
.list_frame td a:hover { color: var(--accent); }

/* 取得元CTA / スライドショーの「取得元で見る」ボタン */
.source-cta,
.slideshow .item .ph .src-btn {
  background: var(--accent);
}
.source-cta:hover,
.slideshow .item .ph .src-btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* カードタイトルはホバーでも白を維持（アクセント赤の a:hover を打ち消す） */
.cards .card:hover .title { color: #fff; }

/* =========================================================
   フォント: Poppins(英字) + Zen Kaku Gothic New(日本語)
   ========================================================= */
body,
input,
button,
textarea,
select {
  font-family: "Poppins", "Zen Kaku Gothic New", "Noto Sans JP",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 見出しはやや詰めた太字で */
h1, h2, h3,
#main_frame .container h1,
#main_frame .container h2 {
  font-family: "Poppins", "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ロゴは Poppins のワードマーク */
#navbar .menu .app_name a {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* カードタイトル・本文系は日本語を綺麗に */
.cards .card .title,
.exp,
.search_range,
.tags,
.list_frame {
  font-family: "Poppins", "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
}

/* =========================================================
   ブランド名を大きく見せるフッター（GoCanopy 風）
   ========================================================= */
.site-footer {
  background: #171717;
  color: #cfcfcf;
  margin-top: 48px;
  padding: 48px 24px 20px;
  overflow: hidden;
  font-family: "Poppins", "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
}
.sf-inner,
.sf-bottom {
  max-width: 1180px;
  margin: 0 auto;
}
.sf-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  padding-bottom: 28px;
}
.sf-desc {
  max-width: 440px;
  margin: 0;
  color: #b6b6b6;
  line-height: 1.75;
  font-size: 14px;
}
.sf-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.sf-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sf-col-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 3px;
  font-size: 15px;
}
.sf-col a {
  color: #9a9a9a;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.12s;
}
.sf-col a:hover {
  color: var(--accent);
}
.sf-taglines {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.sf-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 10px;
  font-size: 12px;
  color: #7a7a7a;
}
.sf-bottom a {
  color: #7a7a7a;
  text-decoration: none;
}
.sf-bottom a:hover {
  color: var(--accent);
}
/* 巨大ワードマーク（下端を少しクリップ） */
.sf-wordmark {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(96px, 27vw, 400px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
  margin: 4px auto 0;
  user-select: none;
  pointer-events: none;
}

/* =========================================================
   Lucide アイコン
   ========================================================= */
.lucide {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
  fill: none;
  flex: none;
}
/* ナビの丸ボタン内アイコンサイズ */
#navbar .menu > a .lucide {
  width: 22px;
  height: 22px;
}

/* =========================================================
   保存（ブックマーク）機能
   ========================================================= */
.save-btn {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
}
.save-btn svg { width: 20px; height: 20px; display: block; }

/* カード上の保存ボタン（左上・枚数バッジは右上） */
.cards .card .card-save {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  backdrop-filter: blur(2px);
  transition: background 0.12s, transform 0.12s;
}
.cards .card .card-save:hover { background: rgba(0, 0, 0, 0.72); transform: scale(1.06); }
.cards .card .card-save.is-saved { background: var(--accent); }
.cards .card .card-save.is-saved svg { fill: currentColor; }

/* ピル型（記事詳細・タグページ） */
.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #efefef;
  color: #333;
  font-weight: 700;
  font-size: 13px;
  margin: 4px 0 12px;
  transition: background 0.12s, color 0.12s;
}
.save-pill:hover { background: #e2e2e2; }
.save-pill.is-saved { background: var(--accent); color: #fff; }
.save-pill.is-saved svg { fill: currentColor; }
.save-pill svg { width: 18px; height: 18px; }

/* タグ一覧行の保存ボタン */
.list_frame .row-save {
  vertical-align: middle;
  margin-left: 8px;
  color: #c4c4c4;
  width: 22px;
  height: 22px;
}
.list_frame .row-save:hover { color: var(--accent); }
.list_frame .row-save.is-saved { color: var(--accent); }
.list_frame .row-save.is-saved svg { fill: currentColor; }

/* ナビの保存アイコン + 件数バッジ */
#navbar .nav-saved { position: relative; }
#navbar .nav-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* 保存ページ */
#saved-root h2 { font-size: 18px; margin: 20px 0 8px; }

/* =========================================================
   右下の広告枠（閉じるボタン付き）
   ========================================================= */
.pinup-ad {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.pinup-ad.is-in { transform: none; opacity: 1; }
.pinup-ad[hidden] { display: none; }

.pinup-ad-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pinup-ad-close:hover { background: rgba(0, 0, 0, 0.78); }

.pinup-ad-label {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
}

.pinup-ad-body { display: block; text-decoration: none; color: inherit; }
.pinup-ad-body img { display: block; width: 100%; height: auto; }

/* 画像未提供時のプレースホルダー */
.pinup-ad-ph {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f2f2f4, #f2f2f4 10px, #ececef 10px, #ececef 20px);
  color: #9a9a9a;
  font-weight: 700;
  letter-spacing: 0.12em;
}

@media (max-width: 620px) {
  .pinup-ad { right: 10px; bottom: 10px; width: 220px; }
  .pinup-ad-ph { height: 180px; }
}

/* =========================================================
   画像読み込み中のスケルトン（シマー）
   ========================================================= */
@keyframes pinup-skel {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cards .card img.is-loading,
.slideshow .item img.is-loading {
  color: transparent;                 /* alt テキストを隠す */
  background-image: linear-gradient(100deg, #e9e9ec 30%, #f5f5f7 50%, #e9e9ec 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: pinup-skel 1.2s ease-in-out infinite;
}
/* カードサムネは寸法未知なので読み込み中は縦長比率でスケルトン枠を確保 */
.cards .card img.is-loading {
  aspect-ratio: 3 / 4;
  height: auto;
}
/* 読み込み完了時はふわっと表示 */
.cards .card img.is-loaded,
.slideshow .item img.is-loaded {
  animation: pinup-fade 0.3s ease;
}
@keyframes pinup-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================================
   インタースティシャル広告（中央・正方形）
   ========================================================= */
.pi {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pi.is-open { opacity: 1; }
.pi[hidden] { display: none; }

.pi-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); }

.pi-box {
  position: relative;
  width: min(82vw, 360px);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.pi.is-open .pi-box { transform: none; }

.pi-body { display: block; text-decoration: none; color: inherit; }
.pi-body img,
.pi-ph {
  width: 100%;
  aspect-ratio: 1 / 1;      /* 正方形 */
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.pi-body img { object-fit: cover; display: block; }

/* 画像未提供時の正方形プレースホルダー */
.pi-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f2f2f4, #f2f2f4 12px, #e9e9ec 12px, #e9e9ec 24px);
  color: #9a9a9a;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pi-label {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

/* 閉じるボタン: 枠の外・右上の少し押しづらい位置＆小さめ */
.pi-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: #555;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.pi-close:hover { background: #fff; color: #111; }

/* =========================================================
   インライン広告（主要要素とサブ要素の間・削除不可）
   ========================================================= */
.pinup-inline-ad {
  position: relative;
  margin: 28px auto;
  width: 100%;
  max-width: 680px;
  border: 1px solid #e4e4e4;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.pinup-inline-ad-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
}
.pinup-inline-ad-body { display: block; text-decoration: none; color: inherit; }
.pinup-inline-ad-body img { display: block; width: 100%; height: auto; }

/* 画像未提供時のプレースホルダー（横長バナー） */
.pinup-inline-ad-ph {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #f2f2f4, #f2f2f4 12px, #e9e9ec 12px, #e9e9ec 24px);
  color: #9a9a9a;
  font-weight: 700;
  letter-spacing: 0.12em;
}
@media (max-width: 620px) {
  .pinup-inline-ad-ph { height: 140px; }
}

/* 画面上部インライン広告（ヘッダー直下） */
.pinup-topad-wrap {
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}
.pinup-inline-ad--top {
  margin: 14px auto 0;
}
.pinup-inline-ad--top .pinup-inline-ad-ph {
  height: 120px;      /* 上部はやや低めのバナー */
}
@media (max-width: 620px) {
  .pinup-inline-ad--top .pinup-inline-ad-ph { height: 90px; }
}

/* ASP等の広告タグ差し込み枠（中央寄せ） */
.pinup-adslot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
}
.pinup-adslot img { max-width: 100%; height: auto; }
/* インタースティシャルはボックス内で正方形に馴染ませる */
.pi-slot {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

/* ロゴのパイナップルマーク */
#navbar .menu .app_name a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pinup-logo-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}

/* フッター巨大ワードマークに添える小さめパイナップル */
.sf-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.06em;
}
.sf-mark {
  width: clamp(64px, 17vw, 240px);
  height: auto;
  flex: none;
  margin-bottom: 0.04em;   /* 文字ベースラインとの微調整 */
}

/* =========================================================
   人気ランキング
   ========================================================= */
.cards .card.rank-card { }
.cards .card .rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
/* 上位3位は色付き */
.cards .card .rank-badge.rank-1 { background: #e6b400; color: #3a2c00; }
.cards .card .rank-badge.rank-2 { background: #b8bcc4; color: #23262b; }
.cards .card .rank-badge.rank-3 { background: #c68142; color: #2c1a08; }
.cards .card .rank-views {
  position: absolute;
  bottom: 6px;
  right: 8px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
}
/* ランキングカードでは保存ボタンが左上のランク番号と重なるので少し右へ */
.cards .card.rank-card .card-save { left: auto; right: 8px; top: 44px; }

/* 画像が壊れているカードは 3/4 のグレー枠を維持（潰れ防止） */
.cards .card img.is-error {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 120px;
  background: #e9e9ec;
  color: transparent;
}
