/* ======================================================
   Base reset & variables
   ====================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink:       #d88bab;
  --pink-dark:  #a85c7a;
  --bg:         #fffaf7;
  --card-bg:    #ffffff;
  --text:       #2a2328;
  --text-muted: #8a7c84;
  --border:     #f0dde5;
  --shadow:     0 16px 36px rgba(168, 92, 122, 0.10);
  --radius:     18px;
}

body {
  font-family: "Hiragino Sans", "Noto Sans JP", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
body.modal-open { overflow: hidden; }

/* ======================================================
   Header
   ====================================================== */
.site-header {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.88), transparent 30%),
    linear-gradient(135deg, #fff7f2 0%, #f8dce7 100%);
  padding: 1.7rem 1rem 1.4rem;
  text-align: center;
  border-bottom: 1px solid rgba(216,139,171,.22);
}
.site-title {
  font-size: clamp(1.2rem, 4vw, 1.9rem);
  font-weight: 800;
  color: #4a2d39;
  letter-spacing: 0.03em;
}
.site-desc {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: #8f6879;
}
.admin-link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(216,139,171,0.28);
  border-radius: 20px;
  color: var(--pink-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.admin-link:hover { background: #fff; color: #7e415b; }

/* ======================================================
   Main content
   ====================================================== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1rem 4rem;
}

.search-section { margin-bottom: 1.25rem; }

.search-bar {
  display: flex;
  gap: 0.5rem;
}
#search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#search-input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(200, 80, 160, 0.12);
}
#search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.1s;
}
#search-btn:hover  { background: var(--pink-dark); }
#search-btn:active { transform: scale(0.97); }

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.7rem;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 8px 24px rgba(168,92,122,.06);
}
.filter-panel select {
  min-width: 0;
  padding: 0.58rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
}
.clear-filters {
  border: none;
  background: #f7e6ed;
  color: var(--pink-dark);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* ── Messages ── */
.error-message {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius);
  color: #b91c1c;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.initial-state {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  color: var(--text-muted);
}
.initial-hint { font-size: 1rem; margin-bottom: 1rem; }
.search-examples {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  font-size: 0.9rem;
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  max-width: 100%;
}
.search-examples code {
  background: #f3e8f9;
  color: var(--pink-dark);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}
.db-meta { font-size: 0.85rem; color: #9ca3af; }

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.no-results-hint { margin-top: 0.5rem; font-size: 0.85rem; color: #9ca3af; }

/* ======================================================
   Results grid
   ====================================================== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.1rem;
}

/* ======================================================
   Card
   ====================================================== */
.card {
  background: var(--card-bg);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover,
.card:focus {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(200, 80, 160, 0.18);
  outline: none;
}

.card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.photo-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  z-index: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* アイテム数バッジ（カード右上） */
.card-item-count {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15em 0.45em;
  border-radius: 10px;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.card-type-chip {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  max-width: calc(100% - 0.9rem);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #4a2d39;
  box-shadow: 0 6px 18px rgba(42,35,40,0.14);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}

.ph-0 { background: linear-gradient(135deg, #f9a8d4, #ec4899); }
.ph-1 { background: linear-gradient(135deg, #c4b5fd, #7c3aed); }
.ph-2 { background: linear-gradient(135deg, #93c5fd, #2563eb); }
.ph-3 { background: linear-gradient(135deg, #6ee7b7, #059669); }
.ph-4 { background: linear-gradient(135deg, #fcd34d, #d97706); }

.card-body { padding: 0.78rem 0.9rem 0.9rem; }
.card-idol {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-group {
  font-size: 0.75rem;
  color: var(--pink);
  font-weight: 600;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-brand {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.card-date,
.card-airport {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ======================================================
   Full-screen Modal
   ====================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #13131f;
  overflow: hidden;
  animation: modal-fade-in 0.18s ease;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Close button — floats over everything */
.modal-close {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  z-index: 5000;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(42,35,40,0.08);
  border-radius: 50%;
  color: #2a2328;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(42,35,40,0.24);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover {
  background: #fff;
  box-shadow: 0 12px 34px rgba(42,35,40,0.30);
}
.modal-close:active { transform: scale(0.94); }

/* modal-content fills the overlay */
.modal-content {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Two-panel layout lives inside modal-body */
.modal-body {
  display: flex;
  width: 100%;
  height: 100dvh;
}

/* ── Left: photo panel ── */
.modal-photo-panel {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
}
.modal-photo-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.modal-photo-panel .photo-initial {
  font-size: 7rem;
  z-index: 0;
}

/* ── Right: info panel ── */
.modal-info-panel {
  flex: 1;
  height: 100dvh;
  overflow-y: auto;
  background: var(--card-bg);
  padding: 4.5rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero section */
.modal-hero { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; }
.modal-idol {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.modal-group {
  font-size: 1rem;
  color: var(--pink);
  font-weight: 700;
  margin-top: 0.25rem;
}
.modal-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.modal-sep { opacity: 0.4; }

/* ── Item cards ── */
.modal-items-section {}
.modal-items-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.modal-items-empty {
  font-size: 0.9rem;
  color: #9ca3af;
  font-style: italic;
}

.item-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
  transition: border-color 0.15s;
}
.item-card:last-child { margin-bottom: 0; }
.item-card:hover { border-color: var(--pink); }

.item-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.item-type-badge {
  background: #fff;
  color: var(--pink-dark);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(168, 92, 122, 0.08);
  padding: 0.18em 0.68em;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.item-brand-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}
.item-product-name {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* 型番 / カラー chips */
.item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.item-detail-chip {
  background: #f3e8f9;
  color: var(--pink-dark);
  padding: 0.1em 0.55em;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Price row */
.item-price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.price-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.price-est-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 0.1em 0.5em;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}
.price-unknown {
  font-size: 0.85rem;
  color: #9ca3af;
}
.item-official-link {
  margin-left: auto;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--pink);
  padding: 0.15em 0.6em;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.item-official-link:hover { background: var(--pink); color: #fff; }

/* Resale link buttons */
.item-resale-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.resale-btn {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.resale-btn:hover  { opacity: 0.85; }
.resale-btn:active { transform: scale(0.96); }

/* Modal actions (share) */
.modal-actions { padding-top: 0.5rem; }
.share-btn {
  padding: 0.55rem 1.4rem;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover  { background: var(--pink-dark); }
.share-btn:active { transform: scale(0.97); }
.share-btn--copied { background: #059669; }

/* ======================================================
   Modal — 写真クレジット（photo パネル下部オーバーレイ）
   ====================================================== */
.modal-photo-credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35rem 0.65rem;
  background: rgba(0,0,0,0.52);
  color: rgba(255,255,255,0.85);
  font-size: 0.68rem;
  text-align: right;
  z-index: 2;
  word-break: break-all;
}

/* ======================================================
   Modal — 出典・確度セクション（hero 内）
   ====================================================== */
.modal-provenance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* 出典プラットフォームバッジ */
.source-platform-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}
.source-instagram { background: linear-gradient(135deg, #E1306C, #833AB4); }
.source-twitter   { background: #1DA1F2; }
.source-weibo     { background: #E6162D; }
.source-dispatch  { background: #2d2d4e; }
.source-newsen    { background: #1a5a3a; }
.source-news      { background: #555; }

/* 出典リンク */
.source-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  border: 1px solid var(--pink);
  padding: 0.15em 0.6em;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.source-link:hover { background: var(--pink); color: #fff; }

/* 確度バッジ */
.confidence-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.confidence-estimated { background: #fef3c7; color: #92400e; }
.confidence-uncertain { background: #ffedd5; color: #9a3412; }

/* 備考テキスト */
.modal-notes {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
  border-left: 3px solid var(--border);
  padding: 0.4rem 0.65rem;
  border-radius: 0 6px 6px 0;
}

/* ======================================================
   Card — 「探す」ボタン
   ====================================================== */
.card-search-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.38rem 0;
  background: transparent;
  border: 1.5px solid var(--pink);
  border-radius: 20px;
  color: var(--pink);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.card-search-btn:hover {
  background: var(--pink);
  color: #fff;
}

/* ======================================================
   Search Popover
   ====================================================== */
.search-popover {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(26,26,46,0.18);
  overflow: hidden;
  animation: popover-in 0.15s ease;
}
@keyframes popover-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sp-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.sp-close-btn:hover { color: var(--text); }

.sp-item {
  padding: 0.6rem 0.85rem 0.55rem;
}
.sp-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0.85rem;
}

.sp-item-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.sp-type {
  background: #fff;
  color: var(--pink-dark);
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.sp-brand {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
}
.sp-product {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.sp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.sp-link {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.sp-link:hover { opacity: 0.82; }
.sp-official {
  background: #059669 !important;
}

.sp-detail-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--bg);
  border: none;
  border-top: 1px solid var(--border);
  color: var(--pink);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.sp-detail-btn:hover { background: #fef0f8; }

/* ======================================================
   Utility
   ====================================================== */
[hidden] { display: none !important; }

/* ======================================================
   Responsive — tablet
   ====================================================== */
@media (max-width: 900px) {
  .modal-photo-panel { flex: 0 0 38%; }
}

/* ======================================================
   Responsive — mobile (≤ 640px)
   モーダルは縦並びボトムシートスタイル
   ====================================================== */
@media (max-width: 640px) {
  .search-bar { flex-direction: column; }
  #search-btn { width: 100%; padding: 0.85rem; }
  .filter-panel {
    grid-template-columns: 1fr 1fr;
    padding: 0.6rem;
  }
  .clear-filters { grid-column: 1 / -1; padding: 0.65rem; }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* モーダル縦レイアウト */
  .modal-body {
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }
  .modal-photo-panel {
    flex: none;
    width: 100%;
    height: 40dvh;
  }
  .modal-photo-panel .photo-initial { font-size: 5rem; }
  .modal-info-panel {
    flex: 1;
    height: auto;
    max-height: 60dvh;
    padding: 1.5rem 1.25rem 2.5rem;
    overflow-y: auto;
  }
  .modal-close {
    top: max(0.7rem, env(safe-area-inset-top));
    right: max(0.7rem, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }
  .item-card { padding: 0.75rem; }
}

@media (max-width: 380px) {
  .results-grid { gap: 0.5rem; }
  .filter-panel { grid-template-columns: 1fr; }
}

/* ======================================================
   Visual polish — Korean soft editorial mood
   CSS-only. No behavior or data changes.
   ====================================================== */
:root {
  --pink: #d9a4b8;
  --pink-dark: #9d6678;
  --bg: #fffaf6;
  --card-bg: rgba(255, 255, 255, 0.92);
  --text: #2f292d;
  --text-muted: #94868d;
  --border: #f0e2e7;
  --shadow: 0 14px 38px rgba(130, 91, 106, 0.08);
  --radius: 24px;
}

body {
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 226, 235, 0.62), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(245, 235, 224, 0.9), transparent 24rem),
    linear-gradient(180deg, #fff8f3 0%, #fffdfb 44%, #fbf7f4 100%);
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.site-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 20%, rgba(255,255,255,0.95), transparent 16rem),
    linear-gradient(135deg, #fff9f4 0%, #f9dfe8 58%, #f7edf1 100%);
  padding: clamp(2rem, 5vw, 3.2rem) 1rem 2.1rem;
  border-bottom: 1px solid rgba(217, 164, 184, 0.18);
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.site-header::before {
  width: 12rem;
  height: 12rem;
  left: -4rem;
  top: -5rem;
  background: rgba(255,255,255,0.54);
}

.site-header::after {
  width: 9rem;
  height: 9rem;
  right: -2.5rem;
  bottom: -4rem;
  background: rgba(255, 255, 255, 0.42);
}

.header-inner {
  position: relative;
  z-index: 1;
}

.site-title {
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  font-weight: 650;
  letter-spacing: 0.055em;
  color: #4c3440;
}

.site-desc {
  margin-top: 0.45rem;
  color: #9b7484;
  font-size: 0.82rem;
  font-weight: 400;
}

.admin-link {
  margin-top: 0.95rem;
  padding: 0.48rem 1.15rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: 0 10px 24px rgba(142, 93, 112, 0.10);
  color: #916176;
  font-size: 0.76rem;
  font-weight: 500;
}

.main-content {
  max-width: 1180px;
  padding: clamp(1.4rem, 4vw, 2.4rem) 1rem 5rem;
}

.search-section {
  max-width: 900px;
  margin: 0 auto 1.65rem;
}

.search-bar {
  gap: 0.65rem;
  padding: 0.35rem;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(240, 226, 231, 0.88);
  border-radius: 999px;
  box-shadow: 0 18px 46px rgba(142, 93, 112, 0.08);
  backdrop-filter: blur(12px);
}

#search-input {
  min-height: 2.8rem;
  padding: 0.72rem 1.05rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #42353b;
  font-size: 0.92rem;
  font-weight: 400;
}

#search-input::placeholder {
  color: #b7a8ae;
}

#search-input:focus {
  box-shadow: none;
  border-color: transparent;
}

#search-btn {
  min-width: 5.8rem;
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  background: #d9a4b8;
  box-shadow: 0 10px 22px rgba(217, 164, 184, 0.26);
  font-size: 0.86rem;
  font-weight: 560;
}

#search-btn:hover {
  background: #c58da2;
}

.filter-panel {
  gap: 0.55rem;
  margin-top: 0.72rem;
  padding: 0.72rem;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(240, 226, 231, 0.92);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(142, 93, 112, 0.055);
  backdrop-filter: blur(12px);
}

.filter-panel select {
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border-color: #efe1e7;
  background: rgba(255,255,255,0.82);
  color: #70626a;
  font-size: 0.77rem;
  font-weight: 400;
}

.clear-filters {
  background: #f7edf1;
  color: #9d6678;
  font-size: 0.76rem;
  font-weight: 520;
}

.initial-state {
  padding: 3.2rem 1rem 2.4rem;
}

.initial-hint {
  color: #74666d;
  font-size: 0.92rem;
}

.search-examples {
  gap: 0.55rem;
  padding: 1.15rem 1.35rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 16px 36px rgba(142, 93, 112, 0.06);
  font-size: 0.82rem;
}

.search-examples code {
  background: #faedf2;
  color: #9d6678;
  border-radius: 999px;
  padding: 0.12em 0.5em;
}

.results-count {
  max-width: 1180px;
  margin: 0 auto 1.05rem;
  color: #9a8e93;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.results-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.45rem);
}

.card {
  border: 1px solid rgba(240, 226, 231, 0.8);
  border-radius: 28px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 16px 34px rgba(111, 78, 90, 0.075);
}

.card:hover,
.card:focus {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(111, 78, 90, 0.11);
}

.card-photo {
  aspect-ratio: 4 / 5.35;
  border-radius: 28px 28px 18px 18px;
}

.card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(47, 41, 45, 0.22));
  pointer-events: none;
}

.card-photo img {
  transition: transform 0.28s ease;
}

.card:hover .card-photo img {
  transform: scale(1.025);
}

.photo-initial {
  color: rgba(255,255,255,0.86);
  font-weight: 650;
}

.card-item-count {
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.24rem 0.58rem;
  background: rgba(255,255,255,0.82);
  color: #7e5969;
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(58, 41, 49, 0.10);
  font-size: 0.66rem;
}

.card-type-chip {
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.24rem 0.65rem;
  background: rgba(255,255,255,0.88);
  color: #765363;
  border: 1px solid rgba(255,255,255,0.68);
  box-shadow: 0 8px 20px rgba(58, 41, 49, 0.12);
  font-size: 0.66rem;
  font-weight: 650;
}

.card-body {
  padding: 0.95rem 1rem 1.05rem;
}

.card-idol {
  color: #3f3339;
  font-size: 0.91rem;
  font-weight: 620;
  letter-spacing: 0.015em;
}

.card-group {
  color: #b27a91;
  font-size: 0.72rem;
  font-weight: 500;
}

.card-brand,
.card-date,
.card-airport {
  color: #9a8e93;
  font-size: 0.68rem;
  font-weight: 400;
}

.card-search-btn {
  margin-top: 0.72rem;
  padding: 0.48rem 0;
  border: 1px solid #ead5dd;
  background: #fff8fa;
  color: #a06b7f;
  font-size: 0.72rem;
  font-weight: 560;
}

.card-search-btn:hover {
  background: #f6e6ed;
  color: #8f5d70;
}

.modal-overlay {
  background: rgba(47, 41, 45, 0.72);
  backdrop-filter: blur(10px);
}

.modal-content {
  background: #fffaf7;
}

.modal-photo-panel {
  flex-basis: 46%;
  background: #f5e8ed;
}

.modal-photo-panel img {
  object-position: center top;
}

.modal-info-panel {
  background:
    linear-gradient(180deg, rgba(255,250,247,0.98), #fff 38%),
    #fff;
  padding: clamp(3.8rem, 5vw, 5rem) clamp(1.4rem, 4vw, 3rem) 3rem;
  gap: 1.7rem;
}

.modal-hero {
  border-bottom: 1px solid #f0e2e7;
  padding-bottom: 1.5rem;
}

.modal-idol {
  color: #382d33;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.modal-group {
  color: #b57f96;
  font-size: 0.9rem;
  font-weight: 520;
}

.modal-meta,
.modal-notes,
.modal-items-empty {
  color: #92858b;
  font-size: 0.78rem;
}

.modal-items-title {
  color: #9a8e93;
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.11em;
}

.item-card {
  border: 1px solid #f0e2e7;
  border-radius: 22px;
  background: rgba(255,250,247,0.78);
  padding: 1rem 1.05rem;
  box-shadow: 0 12px 30px rgba(111, 78, 90, 0.055);
}

.item-card:hover {
  border-color: #e8cbd6;
}

.item-card-top {
  gap: 0.45rem;
}

.item-type-badge,
.sp-type {
  background: rgba(255,255,255,0.86);
  color: #9d6678;
  border: 1px solid #ead5dd;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 560;
}

.item-brand-name {
  color: #342b30;
  font-size: 0.92rem;
  font-weight: 650;
}

.item-product-name {
  color: #81747b;
  font-size: 0.82rem;
}

.item-detail-chip {
  background: #fff;
  color: #8f6375;
  border: 1px solid #f0e2e7;
  border-radius: 999px;
  font-size: 0.7rem;
}

.price-label,
.price-unknown {
  color: #9a8e93;
  font-size: 0.72rem;
}

.price-value {
  color: #44363d;
  font-size: 1rem;
  font-weight: 620;
}

.price-est-badge,
.confidence-badge {
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 560;
}

.item-official-link,
.source-link {
  border-color: #e4c5d0;
  color: #9d6678;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 560;
}

.item-official-link:hover,
.source-link:hover {
  background: #f5e1e9;
  color: #89586a;
}

.resale-btn,
.sp-link {
  opacity: 0.88;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 560;
}

.share-btn {
  background: #d9a4b8;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(217, 164, 184, 0.24);
  font-size: 0.82rem;
  font-weight: 560;
}

.modal-close {
  background: rgba(255,255,255,0.96);
  color: #3a3136;
  box-shadow: 0 12px 32px rgba(47, 41, 45, 0.18);
}

.search-popover {
  border-radius: 22px;
  border-color: #f0e2e7;
  box-shadow: 0 20px 46px rgba(111, 78, 90, 0.14);
}

.sp-header,
.sp-detail-btn {
  background: #fff8fa;
}

@media (max-width: 640px) {
  .site-header {
    padding: 1.85rem 1rem 1.55rem;
  }

  .main-content {
    padding: 1.1rem 0.82rem 4rem;
  }

  .search-bar {
    border-radius: 24px;
    padding: 0.55rem;
  }

  #search-input {
    min-height: 2.65rem;
    text-align: center;
    font-size: 0.86rem;
  }

  #search-btn {
    min-height: 2.55rem;
  }

  .filter-panel {
    border-radius: 22px;
    gap: 0.48rem;
  }

  .filter-panel select,
  .clear-filters {
    min-height: 2.45rem;
    font-size: 0.74rem;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
  }

  .card {
    border-radius: 24px;
  }

  .card-photo {
    aspect-ratio: 3 / 4.35;
    border-radius: 24px 24px 15px 15px;
  }

  .card-body {
    padding: 0.78rem 0.78rem 0.9rem;
  }

  .card-idol {
    font-size: 0.82rem;
  }

  .card-group,
  .card-brand {
    font-size: 0.66rem;
  }

  .card-date,
  .card-airport {
    font-size: 0.62rem;
  }

  .card-type-chip {
    max-width: calc(100% - 1.1rem);
    font-size: 0.6rem;
  }

  .modal-photo-panel {
    height: 46dvh;
  }

  .modal-info-panel {
    max-height: 54dvh;
    padding: 1.45rem 1rem 2.2rem;
    border-radius: 24px 24px 0 0;
  }

  .item-card {
    border-radius: 20px;
    padding: 0.88rem;
  }
}

/* ======================================================
   Final UX polish — item-first closet cards
   ====================================================== */
.site-header {
  padding-top: clamp(1.15rem, 3vw, 1.45rem);
  padding-bottom: clamp(0.95rem, 2.7vw, 1.2rem);
}

.site-kicker {
  margin-bottom: 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.17em;
}

.site-desc {
  margin-top: 0.24rem;
}

.admin-link {
  position: absolute;
  right: max(0.95rem, env(safe-area-inset-right));
  bottom: 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(124, 107, 115, 0.46);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.admin-link::before {
  content: "＋ ";
}

.admin-link:hover {
  background: transparent;
  color: rgba(124, 107, 115, 0.78);
}

.main-content {
  padding-top: clamp(0.9rem, 2.6vw, 1.28rem);
}

.search-section {
  margin-bottom: clamp(0.65rem, 2vw, 0.95rem);
  padding-top: 0.45rem;
  padding-bottom: 0.58rem;
}

.search-bar {
  max-width: 590px;
}

#search-input {
  min-height: 2.48rem;
  background: rgba(255,255,255,0.38);
  border-color: rgba(238, 228, 232, 0.64);
  font-size: 0.82rem;
}

.filter-toggle {
  width: 2.48rem;
  height: 2.48rem;
  background: rgba(255,255,255,0.42);
}

.results-count {
  margin-bottom: clamp(0.78rem, 1.8vw, 1rem);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.results-grid {
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: clamp(1.05rem, 2vw, 1.48rem);
}

.card-photo {
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(145deg, #f5ecef, #fff7f4);
}

.card-photo img {
  object-fit: cover;
  object-position: center 36%;
}

.card-item-count {
  top: 0.52rem;
  right: 0.52rem;
  padding: 0.28rem 0.56rem;
  border: 1px solid rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.72);
  color: rgba(54, 47, 52, 0.74);
  box-shadow: 0 6px 18px rgba(54, 47, 52, 0.08);
  font-size: 0.58rem;
  font-weight: 620;
  letter-spacing: 0.01em;
  backdrop-filter: blur(12px);
}

.card-type-chip {
  left: 0.54rem;
  bottom: 0.54rem;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.68);
  color: rgba(54, 47, 52, 0.76);
  box-shadow: 0 6px 18px rgba(54, 47, 52, 0.07);
  font-size: 0.6rem;
  font-weight: 610;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 0.68rem 0.05rem 0.15rem;
}

.card-item-summary {
  min-height: 2.45rem;
}

.card-brand {
  margin-top: 0;
  color: #2f292d;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card-product {
  display: -webkit-box;
  margin-top: 0.12rem;
  overflow: hidden;
  color: #6e6268;
  font-size: 0.72rem;
  font-weight: 440;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-idol {
  margin-top: 0.38rem;
  color: #6f5e66;
  font-size: 0.72rem;
  font-weight: 520;
}

.card-group {
  margin-top: 0.02rem;
  font-size: 0.6rem;
}

.card-meta {
  margin-top: 0.28rem;
}

.card-search-btn {
  margin-top: 0.55rem;
  min-width: 5.3rem;
  padding: 0.4rem 0.78rem;
  background: rgba(47, 41, 45, 0.92);
  font-size: 0.66rem;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 1.05rem;
    padding-bottom: 0.88rem;
  }

  .site-title {
    font-size: clamp(1.34rem, 7vw, 1.62rem);
  }

  .admin-link {
    right: 0.72rem;
    bottom: 0.42rem;
    font-size: 0.56rem;
  }

  .main-content {
    padding-top: 0.62rem;
  }

  .search-section {
    margin-bottom: 0.55rem;
    padding-top: 0.42rem;
    padding-bottom: 0.46rem;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.72rem;
  }

  .card-photo {
    aspect-ratio: 4 / 5.35;
    border-radius: 21px;
  }

  .card-photo img {
    object-position: center 34%;
  }

  .card-body {
    padding-top: 0.55rem;
  }

  .card-item-summary {
    min-height: 2.62rem;
  }

  .card-brand {
    font-size: 0.74rem;
  }

  .card-product {
    font-size: 0.66rem;
  }

  .card-idol {
    margin-top: 0.32rem;
    font-size: 0.66rem;
  }

  .card-group,
  .card-date,
  .card-airport {
    font-size: 0.55rem;
  }

  .card-item-count {
    top: 0.42rem;
    right: 0.42rem;
    padding: 0.23rem 0.45rem;
    font-size: 0.52rem;
  }

  .card-type-chip {
    left: 0.42rem;
    bottom: 0.42rem;
    padding: 0.23rem 0.46rem;
    font-size: 0.54rem;
  }
}

/* ======================================================
   Final final override — fan-first cards + commerce colors
   Keep this block last so older design layers cannot win.
   ====================================================== */
.card-body {
  padding: 0.68rem 0.05rem 0.15rem;
}

.card-idol {
  margin-top: 0;
  color: #111111;
  font-size: 0.94rem;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.card-group {
  margin-top: 0.03rem;
  color: #9a9095;
  font-size: 0.64rem;
  font-weight: 450;
}

.card-item-summary {
  min-height: 0;
  margin-top: 0.52rem;
}

.card-brand {
  margin-top: 0;
  color: #1b1b1b;
  font-size: 0.74rem;
  font-weight: 620;
}

.card-product {
  display: -webkit-box;
  margin-top: 0.12rem;
  overflow: hidden;
  color: #6f666b;
  font-size: 0.68rem;
  font-weight: 440;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-resale-links,
.sp-links {
  gap: 0.42rem;
}

.item-official-link,
.resale-btn,
.sp-link,
.sp-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.92rem;
  padding: 0.38rem 0.74rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff !important;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: filter 0.16s ease, transform 0.12s ease;
}

.item-official-link,
.sp-official {
  margin-left: 0;
  background: #2f292d !important;
  border-color: rgba(47, 41, 45, 0.12);
}

.resale-mercari,
.sp-link[data-outbound-platform="mercari"] {
  background: #d85b63 !important;
  border-color: rgba(216, 91, 99, 0.15);
}

.resale-ebay,
.sp-link[data-outbound-platform="ebay"] {
  background: #3c6fb6 !important;
  border-color: rgba(60, 111, 182, 0.15);
}

.resale-vinted,
.sp-link[data-outbound-platform="vinted"] {
  background: #2aa89c !important;
  border-color: rgba(42, 168, 156, 0.15);
}

.item-official-link:hover,
.resale-btn:hover,
.sp-link:hover,
.sp-official:hover {
  filter: brightness(0.96);
  color: #fff !important;
  opacity: 1;
}

.item-official-link:active,
.resale-btn:active,
.sp-link:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .card-idol {
    margin-top: 0;
    font-size: 0.8rem;
  }

  .card-group {
    font-size: 0.58rem;
  }

  .card-item-summary {
    min-height: 0;
    margin-top: 0.42rem;
  }

  .card-brand {
    font-size: 0.66rem;
  }

  .card-product {
    font-size: 0.62rem;
  }

  .item-official-link,
  .resale-btn,
  .sp-link,
  .sp-official {
    min-height: 1.84rem;
    padding: 0.34rem 0.64rem;
    font-size: 0.64rem;
  }
}

/* ======================================================
   Background hierarchy polish — calm content stage
   ====================================================== */
body {
  background: #faf6f2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: clamp(9rem, 24vw, 15rem);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 232, 238, 0.58), transparent 16rem),
    radial-gradient(circle at 82% 0%, rgba(248, 219, 229, 0.34), transparent 15rem),
    linear-gradient(180deg, #fffaf6 0%, #fff8f4 68%, rgba(250, 246, 242, 0) 100%);
}

.site-header {
  position: relative;
  background: rgba(255, 250, 246, 0.92);
  border-bottom: 1px solid rgba(226, 211, 202, 0.54);
  box-shadow: 0 10px 28px rgba(92, 73, 82, 0.035);
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  opacity: 0.22;
}

.main-content {
  position: relative;
  max-width: 1120px;
  background: #faf6f2;
}

.search-section {
  padding-top: 0.68rem;
  padding-bottom: 0.7rem;
  background: transparent;
  backdrop-filter: none;
}

.search-bar {
  background: transparent;
  box-shadow: none;
}

#search-input {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(228, 216, 209, 0.72);
}

.filter-toggle {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(228, 216, 209, 0.72);
}

#results-section {
  padding-top: 0.1rem;
}

.initial-state,
.no-results {
  background: transparent;
}

.results-grid {
  position: relative;
}

@media (max-width: 640px) {
  body::before {
    height: 8.2rem;
    background:
      radial-gradient(circle at 20% 0%, rgba(255, 232, 238, 0.48), transparent 10rem),
      linear-gradient(180deg, #fffaf6 0%, #fff8f4 68%, rgba(250, 246, 242, 0) 100%);
  }

  .site-header {
    border-bottom-color: rgba(226, 211, 202, 0.48);
    box-shadow: 0 8px 22px rgba(92, 73, 82, 0.03);
  }

  .search-section {
    margin-left: -0.65rem;
    margin-right: -0.65rem;
    padding: 0.5rem 0.8rem 0.55rem;
    background: rgba(250, 246, 242, 0.72);
    backdrop-filter: blur(8px);
  }
}

/* ======================================================
   Purchase path polish — quiet outbound links
   ====================================================== */
.site-title,
.card-brand,
.card-product,
.item-brand-name,
.item-product-name,
.sp-brand,
.sp-product,
.modal-idol {
  color: #111111;
}

.card-idol,
.modal-group,
.card-date,
.card-airport,
.price-label,
.modal-meta,
.modal-provenance,
.modal-notes {
  color: #8f858a;
}

.item-resale-links,
.sp-links {
  gap: 0.42rem;
}

.item-official-link,
.resale-btn,
.sp-link,
.sp-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.92rem;
  padding: 0.38rem 0.74rem;
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #161616 !important;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.item-official-link:hover,
.resale-btn:hover,
.sp-link:hover,
.sp-official:hover {
  border-color: rgba(17, 17, 17, 0.28);
  background: rgba(255, 255, 255, 0.94) !important;
  opacity: 1;
}

.item-official-link:active,
.resale-btn:active,
.sp-link:active {
  transform: scale(0.98);
}

.item-official-link {
  margin-left: 0.4rem;
}

.item-price-row {
  align-items: center;
  gap: 0.34rem;
}

@media (max-width: 640px) {
  .item-official-link,
  .resale-btn,
  .sp-link,
  .sp-official {
    min-height: 1.84rem;
    padding: 0.34rem 0.64rem;
    font-size: 0.64rem;
  }
}

/* ======================================================
   Fan-first cards and recognizable commerce links
   ====================================================== */
.card-idol {
  margin-top: 0;
  color: #111111;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-group {
  margin-top: 0.03rem;
  color: #9a9095;
  font-size: 0.64rem;
  font-weight: 450;
}

.card-item-summary {
  min-height: 0;
  margin-top: 0.52rem;
}

.card-brand {
  color: #1b1b1b;
  font-size: 0.74rem;
  font-weight: 620;
}

.card-product {
  color: #6f666b;
  font-size: 0.68rem;
}

.item-official-link,
.resale-btn,
.sp-link,
.sp-official {
  border: 1px solid transparent;
  color: #fff !important;
  box-shadow: none;
}

.item-official-link,
.sp-official {
  background: #2f292d !important;
  border-color: rgba(47, 41, 45, 0.1);
}

.resale-mercari {
  background: #d85b63 !important;
  border-color: rgba(216, 91, 99, 0.15);
}

.resale-ebay {
  background: #3c6fb6 !important;
  border-color: rgba(60, 111, 182, 0.15);
}

.resale-vinted {
  background: #2aa89c !important;
  border-color: rgba(42, 168, 156, 0.15);
}

.sp-link[data-outbound-platform="mercari"] {
  background: #d85b63 !important;
}

.sp-link[data-outbound-platform="ebay"] {
  background: #3c6fb6 !important;
}

.sp-link[data-outbound-platform="vinted"] {
  background: #2aa89c !important;
}

.item-official-link:hover,
.resale-btn:hover,
.sp-link:hover,
.sp-official:hover {
  filter: brightness(0.96);
  border-color: rgba(17, 17, 17, 0.08);
  color: #fff !important;
}

.item-official-link {
  margin-left: 0;
}

@media (max-width: 640px) {
  .card-idol {
    font-size: 0.78rem;
  }

  .card-group {
    font-size: 0.58rem;
  }

  .card-item-summary {
    min-height: 0;
    margin-top: 0.42rem;
  }

  .card-brand {
    font-size: 0.66rem;
  }

  .card-product {
    font-size: 0.62rem;
  }
}

/* ======================================================
   UX direction — content first, minimal fashion feed
   Inspired by Apple restraint, Instagram immediacy, 29CM editorial lists.
   ====================================================== */
.site-header {
  padding: clamp(1.25rem, 3.5vw, 2.1rem) 1rem 1.15rem;
  background: #fffaf6;
  border-bottom: 0;
}

.site-kicker {
  color: #b69aa6;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 0.38rem;
}

.site-title {
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.site-desc {
  color: #8f7f87;
  font-size: 0.8rem;
}

.admin-link {
  opacity: 0.46;
  box-shadow: none;
  background: transparent;
  border-color: transparent;
  font-size: 0.68rem;
}

.admin-link:hover {
  opacity: 0.9;
  background: rgba(255,255,255,0.7);
}

.main-content {
  padding-top: 0.75rem;
}

.search-section {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 980px;
  margin-bottom: 1rem;
  padding: 0.55rem 0 0.65rem;
  background: linear-gradient(180deg, rgba(255,250,246,0.96), rgba(255,250,246,0.82) 72%, transparent);
  backdrop-filter: blur(14px);
}

.search-bar {
  max-width: 620px;
  margin: 0 auto;
  padding: 0.28rem;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(90, 67, 76, 0.06);
}

#search-input {
  min-height: 2.5rem;
  font-size: 0.84rem;
}

#search-btn {
  min-width: auto;
  padding: 0.58rem 1.05rem;
  background: #2f292d;
  box-shadow: none;
  font-size: 0.78rem;
}

#search-btn:hover {
  background: #4a3d44;
}

.filter-panel {
  display: flex;
  max-width: 860px;
  margin: 0.55rem auto 0;
  padding: 0;
  gap: 0.45rem;
  overflow-x: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.filter-panel::-webkit-scrollbar {
  display: none;
}

.filter-panel select,
.clear-filters {
  flex: 0 0 auto;
  min-height: 2rem;
  max-width: 10.5rem;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  border: 1px solid #eee4e8;
  background: rgba(255,255,255,0.82);
  color: #887780;
  font-size: 0.7rem;
}

.clear-filters {
  color: #9d6678;
}

.initial-state {
  display: none;
}

.results-count {
  margin-bottom: 0.75rem;
  padding-left: 0.15rem;
  color: #a6969d;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.results-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1.15rem, 2.4vw, 1.8rem);
}

.card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.card:hover,
.card:focus {
  transform: none;
  box-shadow: none;
}

.card-photo {
  aspect-ratio: 3 / 4.25;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(70, 53, 61, 0.10);
  background: #f5ecef;
}

.card-photo::after {
  height: 28%;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent, rgba(47, 41, 45, 0.18));
}

.card-body {
  padding: 0.68rem 0.1rem 0.2rem;
}

.card-idol {
  font-size: 0.86rem;
  font-weight: 560;
  color: #2f292d;
}

.card-group {
  color: #a6969d;
  font-size: 0.67rem;
  font-weight: 400;
  margin-top: 0.05rem;
}

.card-brand {
  color: #5a4b52;
  font-size: 0.74rem;
  font-weight: 520;
  margin-top: 0.42rem;
}

.card-meta {
  margin-top: 0.25rem;
  gap: 0;
}

.card-date,
.card-airport {
  color: #b4a8ad;
  font-size: 0.6rem;
}

.card-search-btn {
  width: auto;
  min-width: 5.8rem;
  margin-top: 0.62rem;
  padding: 0.44rem 0.82rem;
  border: 0;
  background: #2f292d;
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 520;
}

.card-search-btn:hover {
  background: #4a3d44;
  color: #fff;
}

.card-item-count,
.card-type-chip {
  opacity: 0.88;
}

.modal-overlay {
  background: rgba(36, 31, 34, 0.58);
}

.modal-content {
  background: #fff;
}

.modal-photo-panel {
  flex-basis: 54%;
  background: #f2ecee;
}

.modal-info-panel {
  background: #fff;
  padding: clamp(4.2rem, 6vw, 5.6rem) clamp(1.5rem, 4vw, 3.4rem) 3rem;
  gap: 1.35rem;
}

.modal-hero {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.modal-idol {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.modal-group {
  color: #9d6678;
  font-size: 0.78rem;
}

.modal-meta,
.modal-provenance,
.modal-notes {
  opacity: 0.72;
}

.modal-items-title {
  margin-bottom: 0.8rem;
  color: #b0a3a9;
  font-size: 0.66rem;
}

.item-card {
  display: grid;
  gap: 0.42rem;
  border: 0;
  border-top: 1px solid #eee6e9;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 1rem 0;
  margin: 0;
}

.item-card:hover {
  border-color: #eee6e9;
}

.item-type-badge {
  order: -1;
  background: #f8eef2;
  border: 0;
}

.item-brand-name {
  font-size: 0.86rem;
}

.item-product-name {
  display: block;
  flex-basis: 100%;
  color: #2f292d;
  font-size: 0.92rem;
  line-height: 1.35;
}

.item-price-row {
  margin-bottom: 0.2rem;
}

.item-resale-links {
  margin-top: 0.2rem;
}

.resale-btn {
  padding: 0.36rem 0.78rem;
  background: #2f292d !important;
}

.item-official-link,
.source-link {
  background: #fff;
}

.modal-close {
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
}

@media (max-width: 640px) {
  .site-header {
    padding: 1.25rem 1rem 0.75rem;
  }

  .site-kicker {
    font-size: 0.56rem;
  }

  .site-title {
    font-size: 1.45rem;
  }

  .site-desc {
    font-size: 0.72rem;
  }

  .admin-link {
    margin-top: 0.45rem;
  }

  .main-content {
    padding: 0 0.65rem 4rem;
  }

  .search-section {
    margin-left: -0.65rem;
    margin-right: -0.65rem;
    padding: 0.55rem 0.65rem 0.62rem;
  }

  .search-bar {
    flex-direction: row;
    border-radius: 999px;
    padding: 0.25rem;
  }

  #search-input {
    text-align: left;
    min-height: 2.35rem;
    font-size: 0.76rem;
  }

  #search-btn {
    width: auto;
    min-height: 2.3rem;
    padding: 0.52rem 0.82rem;
  }

  .filter-panel {
    display: flex;
    padding: 0;
  }

  .filter-panel select,
  .clear-filters {
    min-height: 1.95rem;
    font-size: 0.66rem;
  }

  .results-count {
    margin-top: 0.2rem;
    margin-bottom: 0.6rem;
    font-size: 0.6rem;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.65rem;
  }

  .card-photo {
    aspect-ratio: 3 / 4.45;
    border-radius: 22px;
  }

  .card-body {
    padding: 0.56rem 0.05rem 0.2rem;
  }

  .card-idol {
    font-size: 0.76rem;
  }

  .card-brand {
    font-size: 0.66rem;
    margin-top: 0.34rem;
  }

  .card-search-btn {
    min-width: 4.7rem;
    padding: 0.38rem 0.62rem;
    font-size: 0.62rem;
  }

  .modal-photo-panel {
    height: 56dvh;
  }

  .modal-info-panel {
    max-height: 44dvh;
    border-radius: 26px 26px 0 0;
    padding: 1.3rem 1rem 2.4rem;
  }
}

/* ======================================================
   Refined search UX — hidden filters, content-first header
   ====================================================== */
.profile-btn {
  position: absolute;
  top: max(0.9rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 3;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(234, 213, 221, 0.72);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #5b4a52;
  box-shadow: 0 10px 22px rgba(70, 53, 61, 0.06);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.12s ease, background 0.16s ease, color 0.16s ease;
}

.profile-btn:hover {
  background: rgba(255,255,255,0.94);
}

.profile-btn:active {
  transform: scale(0.96);
}

.profile-btn--notice {
  width: auto;
  color: #9d6678;
  font-size: 0.68rem;
}

.search-section {
  position: relative;
  top: auto;
  z-index: 18;
  max-width: 860px;
  margin-bottom: 1.25rem;
  padding: 0.85rem 0 1rem;
  background: transparent;
  backdrop-filter: none;
}

.search-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  max-width: 640px;
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-bar::before {
  content: "⌕";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: #a999a1;
  font-size: 1.05rem;
  pointer-events: none;
}

#search-input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.68rem 1rem 0.68rem 2.55rem;
  border: 1px solid rgba(238, 228, 232, 0.82);
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
  box-shadow: none;
  color: #43373d;
  backdrop-filter: blur(10px);
}

#search-input:focus {
  background: rgba(255,255,255,0.72);
  border-color: rgba(217,164,184,0.58);
  box-shadow: 0 0 0 4px rgba(217,164,184,0.08);
}

#search-btn {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.filter-toggle {
  position: relative;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(238, 228, 232, 0.86);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  color: #6c5b63;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  backdrop-filter: blur(10px);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.filter-toggle:hover,
.filter-toggle--open {
  background: rgba(255,255,255,0.82);
  border-color: rgba(217,164,184,0.64);
}

.filter-toggle:active {
  transform: scale(0.96);
}

.filter-toggle--active {
  color: #9d6678;
  border-color: rgba(217,164,184,0.8);
}

.filter-toggle-icon {
  display: inline-block;
  transform: rotate(90deg);
  font-size: 1rem;
  line-height: 1;
}

.filter-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  min-width: 0.86rem;
  height: 0.86rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: #d9a4b8;
  color: #fff;
  font-size: 0.55rem;
  line-height: 0.86rem;
  font-weight: 700;
}

.filter-panel {
  position: absolute;
  top: calc(100% - 0.2rem);
  right: 0;
  display: grid;
  width: min(520px, calc(100vw - 2rem));
  grid-template-columns: 1fr 1fr;
  gap: 0.58rem;
  padding: 0.85rem;
  border: 1px solid rgba(238, 228, 232, 0.92);
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 50px rgba(70, 53, 61, 0.12);
  backdrop-filter: blur(18px);
  overflow: visible;
  animation: filter-panel-in 0.16s ease;
}

@keyframes filter-panel-in {
  from { opacity: 0; transform: translateY(-0.25rem) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.filter-panel-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.1rem 0.15rem;
  color: #8d7c84;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-close {
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: #f8eef2;
  color: #8f6375;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.filter-panel select,
.filter-panel .clear-filters {
  width: 100%;
  max-width: none;
  min-height: 2.35rem;
  border-radius: 999px;
  background: #fff;
  font-size: 0.72rem;
}

.filter-panel .clear-filters {
  grid-column: 1 / -1;
  border: 0;
  background: #2f292d;
  color: #fff;
}

@media (max-width: 640px) {
  .profile-btn {
    top: max(0.7rem, env(safe-area-inset-top));
    right: max(0.72rem, env(safe-area-inset-right));
    min-width: 2.2rem;
    height: 2.2rem;
    font-size: 0.94rem;
  }

  .profile-btn--notice {
    font-size: 0.62rem;
  }

  .search-section {
    margin-left: -0.65rem;
    margin-right: -0.65rem;
    padding: 0.62rem 0.8rem 0.8rem;
    background: linear-gradient(180deg, rgba(255,250,246,0.95), rgba(255,250,246,0.74) 78%, transparent);
    backdrop-filter: blur(12px);
  }

  .search-bar {
    grid-template-columns: 1fr auto;
    gap: 0.42rem;
  }

  #search-input {
    min-height: 2.55rem;
    padding-left: 2.35rem;
    font-size: 0.78rem;
    text-align: left;
  }

  .filter-toggle {
    width: 2.55rem;
    height: 2.55rem;
  }

  .filter-panel {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    top: auto;
    bottom: max(0.8rem, env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: 1fr;
    padding: 1rem;
    border-radius: 26px;
    box-shadow: 0 22px 70px rgba(70, 53, 61, 0.18);
    animation: filter-sheet-in 0.18s ease;
  }

  @keyframes filter-sheet-in {
    from { opacity: 0; transform: translateY(1rem) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
}

/* ======================================================
   Final override — item-first UX polish
   ====================================================== */
.site-header {
  padding-top: clamp(1.15rem, 3vw, 1.45rem);
  padding-bottom: clamp(0.95rem, 2.7vw, 1.2rem);
}

.site-kicker {
  margin-bottom: 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.17em;
}

.site-desc {
  margin-top: 0.24rem;
}

.admin-link {
  position: absolute;
  right: max(0.95rem, env(safe-area-inset-right));
  bottom: 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(124, 107, 115, 0.46);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.admin-link::before { content: "＋ "; }
.admin-link:hover {
  background: transparent;
  color: rgba(124, 107, 115, 0.78);
}

.main-content {
  padding-top: clamp(0.9rem, 2.6vw, 1.28rem);
}

.search-section {
  margin-bottom: clamp(0.65rem, 2vw, 0.95rem);
  padding-top: 0.45rem;
  padding-bottom: 0.58rem;
}

.search-bar { max-width: 590px; }

#search-input {
  min-height: 2.48rem;
  background: rgba(255,255,255,0.38);
  border-color: rgba(238, 228, 232, 0.64);
  font-size: 0.82rem;
}

.filter-toggle {
  width: 2.48rem;
  height: 2.48rem;
  background: rgba(255,255,255,0.42);
}

.results-count {
  margin-bottom: clamp(0.78rem, 1.8vw, 1rem);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.results-grid {
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: clamp(1.05rem, 2vw, 1.48rem);
}

.card-photo {
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(145deg, #f5ecef, #fff7f4);
}

.card-photo img {
  object-fit: cover;
  object-position: center 36%;
}

.card-item-count {
  top: 0.52rem;
  right: 0.52rem;
  padding: 0.28rem 0.56rem;
  border: 1px solid rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.72);
  color: rgba(54, 47, 52, 0.74);
  box-shadow: 0 6px 18px rgba(54, 47, 52, 0.08);
  font-size: 0.58rem;
  font-weight: 620;
  letter-spacing: 0.01em;
  backdrop-filter: blur(12px);
}

.card-type-chip {
  left: 0.54rem;
  bottom: 0.54rem;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.68);
  color: rgba(54, 47, 52, 0.76);
  box-shadow: 0 6px 18px rgba(54, 47, 52, 0.07);
  font-size: 0.6rem;
  font-weight: 610;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 0.68rem 0.05rem 0.15rem;
}

.card-item-summary {
  min-height: 2.45rem;
}

.card-brand {
  margin-top: 0;
  color: #2f292d;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card-product {
  display: -webkit-box;
  margin-top: 0.12rem;
  overflow: hidden;
  color: #6e6268;
  font-size: 0.72rem;
  font-weight: 440;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-idol {
  margin-top: 0.38rem;
  color: #6f5e66;
  font-size: 0.72rem;
  font-weight: 520;
}

.card-group {
  margin-top: 0.02rem;
  font-size: 0.6rem;
}

.card-meta {
  margin-top: 0.28rem;
}

.card-search-btn {
  margin-top: 0.55rem;
  min-width: 5.3rem;
  padding: 0.4rem 0.78rem;
  background: rgba(47, 41, 45, 0.92);
  font-size: 0.66rem;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 1.05rem;
    padding-bottom: 0.88rem;
  }

  .site-title {
    font-size: clamp(1.34rem, 7vw, 1.62rem);
  }

  .admin-link {
    right: 0.72rem;
    bottom: 0.42rem;
    font-size: 0.56rem;
  }

  .main-content {
    padding-top: 0.62rem;
  }

  .search-section {
    margin-bottom: 0.55rem;
    padding-top: 0.42rem;
    padding-bottom: 0.46rem;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.72rem;
  }

  .card-photo {
    aspect-ratio: 4 / 5.35;
    border-radius: 21px;
  }

  .card-photo img {
    object-position: center 34%;
  }

  .card-body {
    padding-top: 0.55rem;
  }

  .card-item-summary {
    min-height: 2.62rem;
  }

  .card-brand { font-size: 0.74rem; }
  .card-product { font-size: 0.66rem; }

  .card-idol {
    margin-top: 0.32rem;
    font-size: 0.66rem;
  }

  .card-group,
  .card-date,
  .card-airport {
    font-size: 0.55rem;
  }

  .card-item-count {
    top: 0.42rem;
    right: 0.42rem;
    padding: 0.23rem 0.45rem;
    font-size: 0.52rem;
  }

  .card-type-chip {
    left: 0.42rem;
    bottom: 0.42rem;
    padding: 0.23rem 0.46rem;
    font-size: 0.54rem;
  }
}
/* ======================================================
   Final final override — fan-first cards + commerce colors
   Keep this block last so older design layers cannot win.
   ====================================================== */
.card-body {
  padding: 0.68rem 0.05rem 0.15rem;
}

.card-idol {
  margin-top: 0;
  color: #111111;
  font-size: 0.94rem;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.card-group {
  margin-top: 0.03rem;
  color: #9a9095;
  font-size: 0.64rem;
  font-weight: 450;
}

.card-item-summary {
  min-height: 0;
  margin-top: 0.52rem;
}

.card-brand {
  margin-top: 0;
  color: #1b1b1b;
  font-size: 0.74rem;
  font-weight: 620;
}

.card-product {
  display: -webkit-box;
  margin-top: 0.12rem;
  overflow: hidden;
  color: #6f666b;
  font-size: 0.68rem;
  font-weight: 440;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-resale-links,
.sp-links {
  gap: 0.42rem;
}

.item-official-link,
.resale-btn,
.sp-link,
.sp-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.92rem;
  padding: 0.38rem 0.74rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff !important;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: filter 0.16s ease, transform 0.12s ease;
}

.item-official-link,
.sp-official {
  margin-left: 0;
  background: #2f292d !important;
  border-color: rgba(47, 41, 45, 0.12);
}

.resale-mercari,
.sp-link[data-outbound-platform="mercari"] {
  background: #d85b63 !important;
  border-color: rgba(216, 91, 99, 0.15);
}

.resale-ebay,
.sp-link[data-outbound-platform="ebay"] {
  background: #3c6fb6 !important;
  border-color: rgba(60, 111, 182, 0.15);
}

.resale-vinted,
.sp-link[data-outbound-platform="vinted"] {
  background: #2aa89c !important;
  border-color: rgba(42, 168, 156, 0.15);
}

.item-official-link:hover,
.resale-btn:hover,
.sp-link:hover,
.sp-official:hover {
  filter: brightness(0.96);
  color: #fff !important;
  opacity: 1;
}

.item-official-link:active,
.resale-btn:active,
.sp-link:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .card-idol {
    margin-top: 0;
    font-size: 0.8rem;
  }

  .card-group {
    font-size: 0.58rem;
  }

  .card-item-summary {
    min-height: 0;
    margin-top: 0.42rem;
  }

  .card-brand {
    font-size: 0.66rem;
  }

  .card-product {
    font-size: 0.62rem;
  }

  .item-official-link,
  .resale-btn,
  .sp-link,
  .sp-official {
    min-height: 1.84rem;
    padding: 0.34rem 0.64rem;
    font-size: 0.64rem;
  }
}
