/* 카드 타일 · 상세 다이얼로그 · 큰 사진 뷰어 */

/* legacy finder panel (다른 페이지 호환용) */
.ph-finder {
  margin-block: 36px 44px;
  padding: clamp(18px, 3.4vw, 38px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  scroll-margin-top: 80px;
  color: var(--ink);
}
.ph-finder-heading, .ph-finder-form, .ph-finder-pages { display: flex; align-items: end; gap: 12px; }
.ph-finder-heading { justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ph-finder-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); }
.ph-finder-heading a, .ph-finder-prices a { color: var(--gold-ink); text-underline-offset: 3px; font-size: 14px; }
.ph-catalog-home { display: inline-flex; color: var(--ink-2); font-size: 14px; font-weight: 600; }
body[data-catalog] .ph-finder { margin-top: 0; }
.ph-finder-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.ph-finder-form label, .ph-finder-filters label, .ph-finder-ownership label {
  display: grid; min-width: 0; gap: 6px;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
}
.ph-finder-query { flex: 1; min-width: 0; }
.ph-finder-form input, .ph-finder-form select, .ph-finder-form button, .ph-finder-pages button,
.ph-finder-filters select, .ph-finder-reset, .ph-finder-binder, .ph-finder-ownership input, .ph-finder-ownership button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.ph-finder-filters select { width: 100%; }
.ph-finder-reset, .ph-finder-binder, .ph-finder-ownership button {
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.ph-finder-reset:hover, .ph-finder-ownership button:hover { border-color: var(--ink); }
.ph-finder-reset:disabled { opacity: .45; cursor: default; }
.ph-finder-binder[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ph-finder-form input { width: 100%; }
.ph-finder-form button, .ph-finder-open {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.ph-finder-status { margin: 20px 0 8px; font-size: 14px; color: var(--muted); }
.ph-finder-pages { align-items: center; justify-content: center; margin-top: 18px; }
.ph-finder-pages[hidden], .ph-finder-status[hidden] { display: none; }
.ph-finder-pages button:disabled { opacity: .45; }

/* ---------- card grid ---------- */
.ph-finder-results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ph-finder-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: start;
  cursor: pointer;
}
.ph-finder-tile strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -.01em;
}
.ph-finder-tile strong, .ph-finder-facts { overflow-wrap: anywhere; }
.ph-finder-art {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 12px;
}
.ph-finder-art > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* 카드 타일: 실제 카드 비율 프레임 + 카드에 붙는 그림자 */
.ph-finder-tile .ph-finder-art {
  aspect-ratio: 63 / 88;
  margin-bottom: 10px;
  overflow: visible;
  background: none;
  border-radius: 0;
}
.ph-finder-tile .ph-finder-art > img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4.6% / 3.3%;
  box-shadow: 0 1px 2px rgb(22 20 27 / .14), 0 14px 28px -14px rgb(22 20 27 / .45);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}
.ph-finder-tile .ph-finder-art > span {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: 12px;
  background: var(--paper-2);
}
.ph-finder-game { color: var(--gold-ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.ph-finder-facts { color: var(--muted); font-size: 12px; line-height: 1.5; }
.ph-finder-tile:focus-visible { outline-offset: 6px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ph-finder-tile:hover .ph-finder-art > img {
    transform: translateY(-5px);
    box-shadow: 0 1px 2px rgb(22 20 27 / .14), 0 26px 40px -16px rgb(22 20 27 / .5);
  }
}

/* ---------- card detail dialog ---------- */
.ph-finder-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 120px -30px rgb(0 0 0 / .6);
}
.ph-finder-dialog::backdrop { background: rgb(18 17 22 / .64); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ph-finder-dialog > form { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 0; }
.ph-finder-dialog > form button {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease;
}
.ph-finder-dialog > form button:hover { background: var(--paper-2); }
#finder-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 40px;
  padding: 40px;
}
.ph-finder-detail-media { display: grid; align-items: start; gap: 10px; }
.ph-finder-detail-media .ph-finder-art {
  aspect-ratio: 63 / 88;
  margin-bottom: 6px;
  background: none;
  overflow: visible;
}
.ph-finder-detail-media .ph-finder-art > img { filter: drop-shadow(0 22px 28px rgb(22 20 27 / .3)); }
.ph-finder-detail-copy { min-width: 0; padding-top: 4px; }
.ph-finder-detail-copy h2 {
  margin: 8px 0 10px;
  padding-right: 44px;
  font: 700 clamp(22px, 2.6vw, 30px)/1.28 var(--sans);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.ph-finder-detail-copy p { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ph-finder-detail-copy .ph-finder-game { color: var(--gold-ink); font-size: 12px; letter-spacing: .06em; }
.ph-finder-ownership {
  display: flex; align-items: end; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 8px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.ph-finder-ownership input { width: 96px; padding: 0 12px; font-variant-numeric: tabular-nums; }
.ph-finder-ownership input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgb(180 138 74 / .18); }
.ph-finder-ownership button { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ph-finder-ownership button:hover { background: #000; }
.ph-finder-record-status { align-self: center; color: var(--muted); font-size: 13px; }
.ph-finder-prices { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ph-finder-prices h3 { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.ph-finder-prices p { font-size: 13px; color: var(--muted); }
.ph-finder-prices > a { display: inline-block; margin: 4px 12px 0 0; }
.ph-finder-quote { margin-block: 8px; padding: 12px 14px; border-radius: 12px; background: var(--paper); }
/* 외부 시세 검색 링크 */
.ph-price-search { margin: 12px 0 4px; }
.ph-finder-prices .ph-price-search-title { margin: 0 0 8px; }
.ph-price-search-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-finder-prices .ph-price-search-links a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.ph-finder-prices .ph-price-search-links a::after { content: '↗'; color: var(--muted); font-size: 12px; }
.ph-finder-prices .ph-price-search-links a:hover { border-color: var(--ink); }
.ph-finder-quote strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.ph-finder-open { display: inline-block; padding: 10px 16px; border-radius: 999px; }
.ph-new-cover { background: radial-gradient(ellipse at 70% 45%, #f3ece0, #d9cdb9); }
.ph-new-cover .catalog-art { object-fit: contain; object-position: center; }

/* ---------- full photo viewer ---------- */
.ph-photo-dialog {
  width: min(1080px, 96vw); max-width: 100%; height: min(92dvh, 1100px);
  margin: auto; padding: 0;
  border: 0; border-radius: 20px;
  background: var(--night); color: var(--night-text);
  overflow: hidden;
}
.ph-photo-dialog[open] { display: flex; flex-direction: column; }
.ph-photo-dialog::backdrop { background: rgb(10 9 13 / .9); }
.ph-photo-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  background: var(--night-2);
}
.ph-photo-toolbar strong { flex: 1 1 90px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ph-photo-toolbar button {
  min-width: 42px; min-height: 42px; padding: 0 14px;
  border: 1px solid rgb(255 255 255 / .16); border-radius: 999px;
  background: transparent; color: var(--night-text);
  font: inherit; font-weight: 600;
  cursor: pointer;
}
.ph-photo-toolbar button:hover { background: rgb(255 255 255 / .08); }
.ph-photo-toolbar button:disabled { opacity: .4; cursor: default; }
.ph-photo-toolbar :focus-visible { outline-color: var(--gold); }
#photo-scale { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; color: var(--night-muted); }
#photo-stage { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: grid; }
#photo-stage .ph-finder-art { margin: auto; width: var(--photo-width, 100%); height: var(--photo-height, 100%); border-radius: 0; background: transparent; color: var(--night-text); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .ph-finder-results { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .ph-finder-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-finder-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ph-finder-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
}
@media (max-width: 620px) {
  .ph-finder { margin-block: 24px 32px; }
  .ph-finder-form { flex-wrap: wrap; }
  .ph-finder-query { flex-basis: 100%; }
  .ph-finder-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-finder-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .ph-finder-dialog > form { top: 12px; right: 12px; }
  #finder-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 60px 20px 24px; }
  .ph-finder-detail-media { width: min(100%, 230px); margin-inline: auto; }
  .ph-finder-detail-copy h2 { padding-right: 0; font-size: 22px; }
}
/* ---------- metallic rarity badges ---------- */
.ph-rank {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper-2); color: var(--ink);
  font: 800 15px/1.1 var(--sans); letter-spacing: -.01em;
  box-shadow: inset 0 0 0 1px rgb(22 20 27 / .08);
  background-size: 220% 100%;
}
.ph-rank[data-tier="silver"] {
  background-image: linear-gradient(110deg, #9ea4ad 0%, #f4f6f9 28%, #c3c8cf 46%, #ffffff 58%, #a9afb8 80%, #e7eaee 100%);
  color: #23272e; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .6), 0 2px 6px -2px rgb(35 39 46 / .35);
}
.ph-rank[data-tier="gold"] {
  background-image: linear-gradient(110deg, #9a7431 0%, #f8e7b0 26%, #c99d48 46%, #fff4cf 58%, #a9802f 80%, #f1d690 100%);
  color: #3a2808; box-shadow: inset 0 0 0 1px rgb(255 246 214 / .7), 0 3px 10px -3px rgb(150 110 40 / .55);
}
.ph-rank[data-tier="rainbow"] {
  background-image:
    linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .75) 46%, transparent 62%),
    linear-gradient(100deg, #ff9ac8, #ffd58a 20%, #9dffc8 40%, #8fd6ff 60%, #c3a2ff 80%, #ff9ac8);
  background-size: 220% 100%, 100% 100%;
  color: #2a1640; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .7), 0 4px 14px -4px rgb(160 90 220 / .55);
}
.ph-grade h3.has-rank { gap: 10px; }
.ph-grade h3.has-rank::before { display: none; }
.ph-rank-count { color: var(--muted); font-size: 14px; font-weight: 600; }
.ph-rank-sm { align-self: flex-start; padding: 3px 8px; margin: -2px 0 2px; font-size: 11px; }

/* tiles of high-tier cards get a tinted glow */
.ph-finder-tile[data-tier="rainbow"] .ph-finder-art > img { box-shadow: 0 1px 2px rgb(22 20 27 / .14), 0 14px 28px -14px rgb(22 20 27 / .45), 0 10px 26px -12px rgb(170 110 255 / .55); }
.ph-finder-tile[data-tier="gold"] .ph-finder-art > img { box-shadow: 0 1px 2px rgb(22 20 27 / .14), 0 14px 28px -14px rgb(22 20 27 / .45), 0 10px 24px -14px rgb(200 150 60 / .6); }

/* card detail: tilt + holo following the pointer */
.ph-finder-detail-media .ph-finder-art { transition: transform 450ms var(--ease-out); touch-action: pan-y; }
.ph-finder-detail-media .ph-finder-art::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: 4.6% / 3.3%;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgb(255 255 255 / .6), transparent 42%),
    repeating-linear-gradient(115deg, #ff7ab6 0%, #ffd36e 7%, #7dffb2 14%, #6ecbff 21%, #b48cff 28%, #ff7ab6 35%);
  background-size: 100% 100%, 300% 300%;
  background-position: center, var(--mx, 50%) var(--my, 50%);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 300ms ease;
}
.ph-finder-detail-media.is-tilting .ph-finder-art {
  transition: transform 90ms linear;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.03);
}
.ph-finder-detail-media.is-tilting[data-tier="plain"] .ph-finder-art::after { opacity: .18; }
.ph-finder-detail-media.is-tilting[data-tier="silver"] .ph-finder-art::after { opacity: .3; }
.ph-finder-detail-media.is-tilting[data-tier="gold"] .ph-finder-art::after { opacity: .5; }
.ph-finder-detail-media.is-tilting[data-tier="rainbow"] .ph-finder-art::after { opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .ph-rank[data-tier] { animation: rank-gleam 3.6s ease-in-out infinite; }
  .ph-rank[data-tier="silver"] { animation-duration: 5s; }
  @keyframes rank-gleam { 0%, 100% { background-position: 100% 0, 0 0; } 50% { background-position: 0 0, 0 0; } }
}
@media (forced-colors: active) { .ph-finder-detail-media .ph-finder-art::after { display: none; } }
/* ---------- image skeletons ---------- */
.ph-finder-art.is-loading::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  border-radius: 4.6% / 3.3%;
  background: linear-gradient(100deg, var(--paper-2) 30%, #f8f5ef 50%, var(--paper-2) 70%);
  background-size: 300% 100%;
}
.ph-box-tile .ph-finder-art.is-loading::before { border-radius: 12px; }
.ph-finder-art > img { transition: opacity 360ms ease; }
.ph-finder-art.is-loading > img { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ph-finder-art.is-loading::before { animation: skeleton-shine 1.4s ease-in-out infinite; }
  @keyframes skeleton-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
}
.ph-card-share {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; margin: 8px 8px 4px 0; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 600 14px/1 var(--sans); cursor: pointer;
}
.ph-card-share::before {
  content: ''; width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7 8l5-5 5 5M5 13v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7 8l5-5 5 5M5 13v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (hover: hover) and (pointer: fine) { .ph-card-share:hover { border-color: var(--ink); } }
/* dark-aware skeleton highlight */
.ph-finder-art.is-loading::before { background: linear-gradient(100deg, var(--paper-2) 30%, var(--skeleton-hi) 50%, var(--paper-2) 70%); background-size: 300% 100%; }

/* ---------- wishlist button + tile heart ---------- */
.ph-card-wish {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; margin: 8px 8px 4px 0; padding: 0 16px;
  border: 1px solid color-mix(in srgb, #e5476b 45%, var(--line-strong)); border-radius: 999px;
  background: var(--surface); color: #d63a5e;
  font: 700 14px/1 var(--sans); cursor: pointer;
}
.ph-card-wish::before { content: '♡'; font-size: 16px; line-height: 1; }
.ph-card-wish[aria-pressed="true"] { border-color: #e5476b; background: #e5476b; color: #fff; }
.ph-card-wish[aria-pressed="true"]::before { content: '♥'; }
.ph-finder-tile.is-wished .ph-finder-art::after {
  content: '♥'; position: absolute; z-index: 2; top: 6px; right: 6px;
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: #e5476b; color: #fff; font-size: 13px;
  box-shadow: 0 4px 10px -4px rgb(229 71 107 / .9);
}
/* ---------- collected prices ---------- */
.ph-price-summary {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px;
  margin: 10px 0 12px; padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-soft, var(--gold-soft)) 70%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand, var(--gold)) 30%, transparent);
}
.ph-price-summary-label { color: var(--brand-ink, var(--gold-ink)); font: 800 12px/1 var(--sans); letter-spacing: .08em; }
.ph-price-summary strong { font: 800 24px/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ph-price-summary small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.ph-price-unavailable { color: var(--muted); font: 500 11px/1.4 var(--sans); }
.ph-price-summary.is-link a { font: 800 18px/1.2 var(--sans); color: var(--brand-ink, var(--gold-ink)); text-decoration: underline; text-underline-offset: 4px; }
.ph-market-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-price-summary .ph-market-links a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font: 700 13px/1 var(--sans); text-decoration: none; }
.ph-price-summary.is-link { grid-template-columns: 1fr; }
/* Price cards for saved quotes and SNKRDUNK listing and sale groups. */
.ph-cond-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 2px 0 6px; }
.ph-cond-price { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ph-cond-price span { color: var(--muted); font: 700 11px/1.2 var(--sans); letter-spacing: .02em; }
.ph-cond-price strong { color: var(--ink); font: 800 19px/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* two cells side by side while a label fits on one line, else one under the other */
.ph-cond-prices.is-compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 78px), 1fr)); gap: 5px; margin: 2px 0 4px; }
.ph-cond-prices.is-compact .ph-cond-price { min-width: 0; align-content: start; padding: 7px 6px; border-radius: 10px; }
.ph-cond-price span { white-space: nowrap; }
.ph-cond-prices.is-compact .ph-cond-price span { font-size: 10px; letter-spacing: -.03em; }
.ph-cond-prices.is-compact .ph-cond-price strong { font-size: 13px; letter-spacing: -.05em; white-space: nowrap; }
.ph-cond-sale { display: grid; gap: 2px; }
.ph-cond-sale.has-ask { padding-top: 5px; border-top: 1px solid var(--line-strong); }
.ph-cond-sale time { color: var(--muted); font: 500 10px/1.2 var(--sans); }
.ph-cond-note { color: var(--muted); font-size: 12px; }

/* Price trend from daily saved quote readings. */
.ph-trend { margin: 10px 0 4px; padding: 12px 14px 10px; border-radius: 14px; background: var(--paper-2, #f1ede6); --trend: #8a8378; }
.ph-trend.is-up { --trend: #d1495b; }
.ph-trend.is-down { --trend: #2f7fd1; }
.ph-trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted, #6f6a62); font-size: 12px; }
.ph-trend-change { color: var(--trend); font: 800 14px/1 var(--sans, inherit); }
.ph-trend svg { display: block; width: 100%; height: 64px; margin-top: 6px; overflow: visible; }
.ph-trend-line { fill: none; stroke: var(--trend); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ph-trend-area { fill: color-mix(in srgb, var(--trend) 14%, transparent); stroke: none; }
.ph-trend-dot { fill: var(--trend); stroke: var(--surface, #fff); stroke-width: 2; }
.ph-trend-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted, #6f6a62); font-size: 11px; }
:root[data-theme="dark"] .ph-trend { background: #24212a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-trend { background: #24212a; } }

/* one listing only: an asking price, not a market price */
.ph-cond-price.is-lone { box-shadow: inset 0 0 0 1px rgb(217 119 6 / .55); }
.ph-cond-price.is-lone span { color: #b45309; }
.ph-cond-price.is-lone strong { opacity: .78; }
.ph-lone-note { margin: 0; padding: 8px 11px; border-radius: 9px; background: rgb(217 119 6 / .12); color: #b45309; font: 600 12.5px/1.45 var(--sans); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.ph-cond-price.is-lone span, .ph-lone-note) { color: #fbbf60; } }
:root[data-theme="dark"] :is(.ph-cond-price.is-lone span, .ph-lone-note) { color: #fbbf60; }

.ph-live-prices { margin: 9px 0 14px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper-2); }
.ph-finder-detail-copy > [hidden], .ph-live-prices [hidden] { display: none !important; }
.ph-live-head { display: flex; align-items: center; justify-content: space-between; gap: 5px 8px; flex-wrap: wrap; }
.ph-live-head :is(h3, h4) { margin: 0; font-size: 14px; color: var(--ink); }
.ph-live-prices .ph-live-note { margin: 4px 0; color: var(--muted); font-size: 12px; }
.ph-live-cells { grid-template-columns: repeat(auto-fit, minmax(87px, 1fr)); gap: 5px; margin-top: 8px; }
.ph-live-cells .ph-cond-price { min-width: 0; padding: 8px; }
.ph-live-cells .ph-cond-price strong { font-size: clamp(15px, 3.5vw, 20px); }
.ph-live-cells small { color: var(--muted); font-size: 11px; }
.ph-live-chart { margin-top: 11px; }
.ph-live-controls { display: flex; gap: 3px; }
.ph-live-controls button { padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink-2); font: 650 12px var(--sans); cursor: pointer; }
.ph-live-controls button[aria-pressed="true"] { border-color: var(--brand, var(--gold)); color: var(--brand-ink, var(--gold-ink)); }
.ph-live-plot svg { display: block; width: 100%; height: 82px; margin-top: 4px; border-bottom: 1px solid var(--line-strong); }
.ph-live-plot polyline { fill: none; stroke: var(--brand, var(--gold)); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ph-live-scale { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; color: var(--muted); font-size: 11px; }
.ph-live-trades { margin-top: 9px; border-top: 1px solid var(--line-strong); }
.ph-live-trades summary { padding: 7px 0 2px; color: var(--ink); font-size: 13px; cursor: pointer; }
.ph-live-trades ol { margin: 3px 0 0; padding: 0; list-style: none; }
.ph-live-trades li { display: grid; grid-template-columns: 1fr 1.15fr auto; gap: 5px; padding: 4px 0; border-bottom: 1px solid var(--line-strong); font-size: 12px; }
@media (pointer: coarse) { .ph-live-controls button { min-height: 44px; } }
