/* Pinterest-style Character Lookbook Feed & Bundled Carousel Pins */

:root {
  --pin-bg: #ffffff;
  --pin-surface: #f4f4f5;
  --pin-surface-hover: #eaeaea;
  --pin-card-bg: #ffffff;
  --pin-text: #111111;
  --pin-muted: #5f5f5f;
  --pin-border: rgba(0, 0, 0, 0.08);
  --pin-accent: #e60023;
  --pin-accent-soft: rgba(230, 0, 35, 0.1);
  --pin-glass: rgba(255, 255, 255, 0.94);
  --pin-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

:root:not([data-theme="light"]) {
  --pin-bg: #0e0e11;
  --pin-surface: #1b1b1f;
  --pin-surface-hover: #26262c;
  --pin-card-bg: #16161a;
  --pin-text: #f5f5f7;
  --pin-muted: #a1a1aa;
  --pin-border: rgba(255, 255, 255, 0.1);
  --pin-accent: #ff4d4f;
  --pin-accent-soft: rgba(255, 77, 79, 0.16);
  --pin-glass: rgba(22, 22, 26, 0.92);
  --pin-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html:has(#wtvDeck),
body:has(#wtvDeck) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--pin-bg) !important;
  color: var(--pin-text) !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body:has(#wtvDeck) > footer {
  width: 100%;
  margin-top: 32px;
  padding: 28px 16px calc(92px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--pin-border);
  background: var(--pin-bg);
}

/* Clean Pinterest Header Override */
body:has(#wtvDeck) .header-container,
body:has(#wtvDeck) .header-container.tumblr-style {
  height: 64px !important;
  min-height: 64px !important;
  padding: 0 24px !important;
  background: var(--pin-glass) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--pin-border) !important;
  box-shadow: none !important;
  color: var(--pin-text) !important;
}

@media (max-width: 640px) {
  body:has(#wtvDeck) .header-container,
  body:has(#wtvDeck) .header-container.tumblr-style {
    padding: 0 12px !important;
  }
}

body:has(#wtvDeck) .header-container .wtv-logo .w,
body:has(#wtvDeck) .header-container .wtv-hamburger-btn,
body:has(#wtvDeck) .header-container .theme-toggle svg {
  color: var(--pin-text) !important;
}

body:has(#wtvDeck) .header-container .theme-toggle svg {
  fill: currentColor;
}

body:has(#wtvDeck) .header-container .wtv-logo .tv {
  color: var(--pin-accent) !important;
}

body:has(#wtvDeck) .header-container .search-container {
  background: var(--pin-bg) !important;
}

body:has(#wtvDeck) .wtv-shop-only {
  height: 40px;
  border-color: var(--pin-border);
  color: var(--pin-text);
  background: var(--pin-surface);
}

body:has(#wtvDeck) .header-container .wtv-shop-only-icon,
body:has(#wtvDeck) .wtv-shop-only-icon {
  color: var(--pin-text);
}

.wtv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wtv-pin-shell {
  width: 100%;
  min-height: calc(100vh - 64px);
  padding-top: 64px;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  background: var(--pin-bg);
  color: var(--pin-text);
  box-sizing: border-box;
}

/* Sticky Aesthetic Tags Bar (Pinterest Top Tabs) */
.wtv-pin-tabs-wrap {
  position: sticky;
  top: 64px;
  z-index: 90;
  width: 100%;
  background: var(--pin-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--pin-border);
}

.wtv-pin-tabs-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1600px;
  margin: 0 auto;
  padding-right: 12px;
}

.wtv-pin-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px 10px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 22px), transparent 100%);
}

.wtv-pref-shops-bar-btn,
button.wtv-pref-shops-bar-btn {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 50% !important;
  border: 1px solid var(--pin-border) !important;
  background: var(--pin-surface) !important;
  color: var(--pin-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.wtv-pref-shops-bar-btn:hover,
button.wtv-pref-shops-bar-btn:hover {
  background: var(--pin-surface-hover) !important;
}

.wtv-pref-shops-bar-btn.has-prefs,
button.wtv-pref-shops-bar-btn.has-prefs {
  border-color: #0d7a45 !important;
  color: #0d7a45 !important;
}

:root:not([data-theme="light"]) .wtv-pref-shops-bar-btn.has-prefs,
:root:not([data-theme="light"]) button.wtv-pref-shops-bar-btn.has-prefs {
  border-color: #22c55e !important;
  color: #4ade80 !important;
}

.wtv-pin-tabs::-webkit-scrollbar {
  display: none;
}

.wtv-pin-tab,
button.wtv-pin-tab {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--pin-border) !important;
  border-radius: 999px !important;
  background: var(--pin-surface) !important;
  padding: 7px 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2 !important;
  color: var(--pin-text) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.wtv-pin-tab:hover,
button.wtv-pin-tab:hover {
  background: var(--pin-surface-hover) !important;
}

.wtv-pin-tab.is-active,
button.wtv-pin-tab.is-active {
  background: var(--pin-text) !important;
  color: var(--pin-bg) !important;
  border-color: var(--pin-text) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Masonry Waterfall */
.wtv-pin-main {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
}

.wtv-pin-masonry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 0;
  box-sizing: border-box;
  width: 100%;
}

.wtv-pin-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 640px) {
  .wtv-pin-masonry {
    gap: 14px;
    padding: 14px 16px 0;
  }
  .wtv-pin-col {
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .wtv-pin-masonry {
    gap: 16px;
    padding: 16px 24px 0;
  }
  .wtv-pin-col {
    gap: 22px;
  }
}

@media (min-width: 1320px) {
  .wtv-pin-masonry {
    gap: 18px;
    padding: 18px 32px 0;
  }
}

/* Pin Card (Single Outfit) */
.wtv-pin-card {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  cursor: pointer;
}

.wtv-pin-media {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--pin-surface);
  border: 1px solid var(--pin-border);
  box-sizing: border-box;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.24s ease, border-color 0.24s ease;
}

@media (hover: hover) {
  .wtv-pin-card:hover .wtv-pin-media {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
    border-color: rgba(128, 128, 128, 0.26);
  }
}

.wtv-pin-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--pin-surface);
  transition: transform 0.28s ease;
}

@media (hover: hover) {
  .wtv-pin-media:hover > img {
    transform: scale(1.02);
  }
}

/* Below-Media Metadata (Title + Dots + Linked Series as Creator) */
.wtv-pin-meta {
  padding: 6px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wtv-pin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.wtv-pin-title {
  color: var(--pin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.wtv-pin-title:hover {
  text-decoration: underline;
}

.wtv-pin-more,
button.wtv-pin-more {
  flex: 0 0 auto;
  width: 28px;
  height: 24px;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--pin-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
  line-height: 1 !important;
}

.wtv-pin-more:hover,
button.wtv-pin-more:hover {
  background: var(--pin-surface) !important;
}

.wtv-pin-more svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.wtv-pin-series {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  text-decoration: none;
  color: var(--pin-muted);
  padding: 2px 0;
  align-self: flex-start;
}

.wtv-pin-series:hover .wtv-pin-series-name {
  color: var(--pin-text);
  text-decoration: underline;
}

.wtv-pin-series-img,
.wtv-pin-series-fallback {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: 0 0 20px;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pin-surface-hover);
  color: var(--pin-text);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--pin-border);
}

.wtv-pin-series-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading & Empty States */
.wtv-pin-empty {
  width: 100%;
  padding: 56px 20px;
  text-align: center;
  color: var(--pin-muted);
  font-size: 15px;
  font-weight: 600;
}

.wtv-pin-loader {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 12px;
}

.wtv-pin-loader[hidden] {
  display: none !important;
}

.wtv-pin-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pin-muted);
  animation: wtvPinBounce 0.9s infinite ease-in-out;
}

.wtv-pin-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.wtv-pin-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes wtvPinBounce {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.15); }
}

.wtv-pin-sentinel {
  width: 100%;
  height: 4px;
}

.wtv-pin-skeleton {
  width: 100%;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--pin-surface) 25%, var(--pin-surface-hover) 50%, var(--pin-surface) 75%);
  background-size: 200% 100%;
  animation: wtvPinShimmer 1.2s infinite;
}

@keyframes wtvPinShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Floating Pinterest Bottom Navigation Pill */
.wtv-pin-dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--pin-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--pin-border);
  box-shadow: var(--pin-shadow);
}

.wtv-dock-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pin-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.wtv-dock-btn:hover {
  background: var(--pin-surface);
  color: var(--pin-text);
}

.wtv-dock-btn.is-active {
  color: var(--pin-text);
  background: var(--pin-surface);
}

.wtv-dock-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtv-dock-btn.is-active[data-dock="home"] svg,
.wtv-dock-btn.is-active[data-dock="mixer"] svg {
  fill: currentColor;
}

/* Pinterest Close-Up Detail Modal & Single Page */
.wtv-pin-modal[hidden],
.wtv-pin-sheet[hidden] {
  display: none !important;
}

.wtv-pin-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtv-pin-modal--detail {
  z-index: 10065;
}

.wtv-pin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wtv-pin-modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: var(--pin-bg);
  color: var(--pin-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 860px) {
  .wtv-pin-modal-sheet {
    width: min(1140px, 94vw);
    height: min(90vh, 880px);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--pin-border);
  }
}

.wtv-pin-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pin-border);
  flex-shrink: 0;
}

.wtv-pin-modal-topbar-title {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wtv-pin-modal-back,
.wtv-pin-modal-close,
button.wtv-pin-modal-back,
button.wtv-pin-modal-close {
  width: 38px;
  height: 38px;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid var(--pin-border) !important;
  border-radius: 50% !important;
  background: var(--pin-surface) !important;
  color: var(--pin-text) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1 !important;
  transition: background 0.16s ease, transform 0.16s ease;
}

.wtv-pin-modal-back:hover,
.wtv-pin-modal-close:hover,
button.wtv-pin-modal-back:hover,
button.wtv-pin-modal-close:hover {
  background: var(--pin-surface-hover) !important;
  transform: scale(1.05);
}

.wtv-pin-modal-back:active,
.wtv-pin-modal-close:active,
button.wtv-pin-modal-back:active,
button.wtv-pin-modal-close:active {
  transform: scale(0.94);
}

.wtv-pin-modal-back svg,
.wtv-pin-modal-close svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.wtv-pin-modal-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 48px;
}

@media (min-width: 860px) {
  .wtv-pin-modal-scroll {
    padding: 24px 28px 48px;
  }
}

/* Detail Card Layout (Shared by Modal & Standalone Single Pages) */
.wtv-pin-detail-shell {
  padding-left: 12px;
  padding-right: 12px;
}

.wtv-pin-detail-topbar {
  max-width: 1120px;
  margin: 12px auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wtv-pin-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--pin-surface);
  color: var(--pin-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.wtv-pin-back-link:hover {
  background: var(--pin-surface-hover);
}

.wtv-pin-back-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtv-detail-card {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--pin-card-bg);
  border-radius: 22px;
  border: 1px solid var(--pin-border);
  overflow: hidden;
  padding: 10px 10px 14px;
}

.wtv-detail-carousel {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #111113;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtv-detail-slide {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111113;
}

.wtv-detail-slide img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.wtv-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 0 2px;
}

@media (min-width: 860px) {
  .wtv-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: start;
    padding: 20px;
    border-radius: 26px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  }
  .wtv-detail-slide img {
    max-height: 76vh;
  }
  .wtv-detail-body {
    padding: 2px 2px 4px;
    gap: 14px;
  }
}

/* Pinterest-style compact action bar directly beneath the image (top-right on desktop) */
.wtv-detail-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wtv-detail-action-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wtv-detail-icon-btn,
button.wtv-detail-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px !important;
  min-height: 0 !important;
  min-width: 38px !important;
  padding: 0 12px !important;
  margin: 0;
  border-radius: 999px !important;
  border: 1px solid var(--pin-border) !important;
  background: var(--pin-surface) !important;
  color: var(--pin-text) !important;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1 !important;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease;
}

.wtv-detail-more-btn,
button.wtv-detail-more-btn {
  width: 38px !important;
  padding: 0 !important;
}

.wtv-detail-icon-btn:hover,
button.wtv-detail-icon-btn:hover {
  background: var(--pin-surface-hover) !important;
}

.wtv-detail-icon-btn:active,
button.wtv-detail-icon-btn:active {
  transform: scale(0.95);
}

.wtv-detail-icon-btn svg {
  width: 17px;
  height: 17px;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtv-detail-more-btn svg {
  fill: currentColor;
  stroke: none;
}

.wtv-detail-save-cta,
button.wtv-detail-save-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px !important;
  min-height: 0 !important;
  min-width: 82px !important;
  padding: 0 18px !important;
  margin: 0;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--pin-accent, #e60023) !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1 !important;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.12s ease, background 0.16s ease;
}

.wtv-detail-save-cta:hover,
button.wtv-detail-save-cta:hover {
  filter: brightness(0.92);
}

.wtv-detail-save-cta:active,
button.wtv-detail-save-cta:active {
  transform: scale(0.96);
}

.wtv-detail-save-cta.is-saved,
button.wtv-detail-save-cta.is-saved {
  background: #0d7a45 !important;
  color: #ffffff !important;
}

/* Compact Creator / Character attribution row */
.wtv-detail-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wtv-detail-creator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.wtv-detail-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.wtv-detail-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  color: var(--pin-text);
}

.wtv-detail-avatar-link img,
.wtv-detail-series-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pin-surface);
  border: 1px solid var(--pin-border);
  font-size: 13px;
  font-weight: 700;
}

.wtv-detail-identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wtv-detail-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtv-detail-title a {
  color: inherit;
  text-decoration: none;
}

.wtv-detail-title a:hover {
  text-decoration: underline;
}

.wtv-detail-subtitle {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  color: var(--pin-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtv-detail-series-text {
  color: var(--pin-muted);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtv-detail-series-text:hover {
  color: var(--pin-text);
  text-decoration: underline;
}

.wtv-detail-dot {
  opacity: 0.6;
  flex-shrink: 0;
}

.wtv-detail-ep-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pin-surface);
  color: var(--pin-text);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.wtv-detail-scene-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--pin-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtv-detail-char-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pin-surface);
  border: 1px solid var(--pin-border);
  color: var(--pin-text);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.wtv-detail-char-btn:hover {
  background: var(--pin-surface-hover);
}

/* Collapsible description + single-line swatches & tags */
.wtv-detail-story {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.wtv-detail-story[hidden],
.wtv-detail-desc-wrap[hidden],
.wtv-detail-meta-strip[hidden],
.wtv-detail-finds[hidden] {
  display: none !important;
}

.wtv-detail-desc-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.wtv-detail-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--pin-muted);
}

.wtv-detail-desc.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wtv-detail-desc-toggle,
button.wtv-detail-desc-toggle {
  padding: 2px 0 !important;
  margin: 0;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--pin-text) !important;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3 !important;
  cursor: pointer;
}

.wtv-detail-desc-toggle:hover,
button.wtv-detail-desc-toggle:hover {
  text-decoration: underline;
}

.wtv-detail-meta-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 1px 0;
}

.wtv-detail-meta-strip::-webkit-scrollbar {
  display: none;
}

.wtv-detail-swatches {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wtv-detail-swatches span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--pin-border);
}

.wtv-detail-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wtv-detail-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pin-surface);
  color: var(--pin-text);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.wtv-detail-tag:hover {
  background: var(--pin-surface-hover);
}

/* Compact Horizontal Shop Finds Strip (visible without extra Lupe tap) */
.wtv-detail-finds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--pin-border);
  border-bottom: 1px solid var(--pin-border);
}

.wtv-detail-products-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wtv-detail-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.wtv-detail-products-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pin-muted);
}

.wtv-detail-products-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pin-surface);
  color: var(--pin-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.wtv-pref-shops-inline-btn,
button.wtv-pref-shops-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0;
  border-radius: 999px !important;
  border: 1px solid var(--pin-border) !important;
  background: var(--pin-surface) !important;
  color: var(--pin-muted) !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2 !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.wtv-pref-shops-inline-btn:hover,
button.wtv-pref-shops-inline-btn:hover {
  background: var(--pin-surface-hover) !important;
  color: var(--pin-text) !important;
}

.wtv-pref-shops-inline-btn.has-prefs,
button.wtv-pref-shops-inline-btn.has-prefs {
  border-color: rgba(13, 122, 69, 0.45) !important;
  background: rgba(13, 122, 69, 0.1) !important;
  color: #0d7a45 !important;
  font-weight: 700;
}

:root:not([data-theme="light"]) .wtv-pref-shops-inline-btn.has-prefs,
:root:not([data-theme="light"]) button.wtv-pref-shops-inline-btn.has-prefs {
  border-color: rgba(34, 197, 94, 0.45) !important;
  background: rgba(34, 197, 94, 0.14) !important;
  color: #4ade80 !important;
}

.wtv-detail-products-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.wtv-detail-products-row::-webkit-scrollbar {
  height: 4px;
}

.wtv-detail-products-row::-webkit-scrollbar-thumb {
  background: var(--pin-border);
  border-radius: 999px;
}

.wtv-detail-product-card {
  flex: 0 0 236px;
  width: 236px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 14px;
  background: var(--pin-surface);
  border: 1px solid var(--pin-border);
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.18s ease;
}

@media (min-width: 640px) {
  .wtv-detail-product-card {
    flex: 0 0 248px;
    width: 248px;
  }
}

.wtv-detail-product-card:hover {
  border-color: var(--pin-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.wtv-detail-product-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--pin-border);
  text-decoration: none;
}

:root:not([data-theme="light"]) .wtv-detail-product-thumb {
  background: #1f1f24;
}

:root:not([data-theme="light"]) .wtv-detail-product-thumb:has(.wtv-detail-product-img:not([hidden])) {
  background: #ffffff;
}

.wtv-detail-product-empty[hidden] {
  display: none !important;
}

.wtv-detail-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
  box-sizing: border-box;
}

.wtv-detail-product-img.is-placeholder {
  padding: 10px;
  opacity: 0.92;
}

.wtv-detail-product-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pin-muted);
  opacity: 0.8;
}

.wtv-detail-product-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.wtv-detail-product-brand {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pin-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtv-detail-product-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pin-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.wtv-detail-product-name:hover {
  text-decoration: underline;
}

.wtv-detail-product-shops {
  margin-top: 2px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.wtv-detail-shop-btn {
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
  box-sizing: border-box;
  padding: 4px 8px !important;
  font-size: 10.5px !important;
  gap: 4px !important;
}

.wtv-detail-shop-btn .wtv-shop-icon svg {
  width: 11px;
  height: 11px;
}

.wtv-detail-shop-btn .wtv-shop-badge {
  font-size: 8.5px;
  padding: 1.5px 4px;
}

.wtv-detail-product-spotted-pill {
  margin-top: 2px;
  align-self: flex-start;
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--pin-card-bg);
  border: 1px solid var(--pin-border);
  font-size: 10px;
  font-weight: 700;
  color: var(--pin-muted);
}

.wtv-detail-spotted {
  margin: 0;
  font-size: 12.5px;
  color: var(--pin-muted);
}

.wtv-detail-spotted span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 4px;
}

/* More like this / More from character section */
.wtv-pin-more-section {
  max-width: 1400px;
  margin: 18px auto 0;
}

.wtv-pin-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0 12px;
}

.wtv-pin-more-header .wtv-pin-more-heading {
  margin: 0;
  padding: 0;
}

.wtv-pin-more-heading {
  margin: 0 0 12px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.wtv-pin-more-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pin-surface);
  color: var(--pin-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.wtv-pin-more-all:hover {
  background: var(--pin-surface-hover);
}

.wtv-pin-disclosure {
  margin: 24px 0 8px;
  text-align: center;
  font-size: 11px;
  color: var(--pin-muted);
}

/* Quick Action Sheet for "..." button */
.wtv-pin-sheet {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .wtv-pin-sheet {
    align-items: center;
  }
}

.wtv-pin-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.wtv-pin-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--pin-bg);
  color: var(--pin-text);
  border-radius: 22px 22px 0 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .wtv-pin-sheet-panel {
    border-radius: 22px;
    padding: 18px 18px 20px;
  }
}

.wtv-pin-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--pin-border);
  margin: 0 auto 12px;
}

@media (min-width: 640px) {
  .wtv-pin-sheet-handle {
    display: none;
  }
}

.wtv-pin-sheet-head {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0 4px;
}

.wtv-pin-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wtv-pin-sheet-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--pin-surface);
  color: var(--pin-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.wtv-pin-sheet-item:hover {
  background: var(--pin-surface-hover);
}

.wtv-pin-sheet-item--danger {
  color: #d92d20;
  background: rgba(217, 45, 32, 0.08);
}

.wtv-pin-sheet-item--danger:hover {
  background: rgba(217, 45, 32, 0.14);
}

.wtv-pin-sheet-item--danger.is-confirming {
  background: #d92d20;
  color: #ffffff;
}

.wtv-pin-sheet-item--danger:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wtv-pin-sheet-cancel {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--pin-border);
  border-radius: 999px;
  background: transparent;
  color: var(--pin-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Pin Card Bookmark Save Button & Episode Badge */
.wtv-pin-save-btn,
button.wtv-pin-save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 32px;
  height: 32px;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(16, 16, 18, 0.62) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

@media (hover: hover) {
  .wtv-pin-save-btn,
  button.wtv-pin-save-btn {
    opacity: 0;
  }
  .wtv-pin-card:hover .wtv-pin-save-btn,
  .wtv-pin-save-btn.is-saved,
  button.wtv-pin-save-btn.is-saved {
    opacity: 1;
  }
}

.wtv-pin-save-btn:hover,
button.wtv-pin-save-btn:hover {
  transform: scale(1.06);
  background: rgba(16, 16, 18, 0.85) !important;
}

.wtv-pin-save-btn.is-saved,
button.wtv-pin-save-btn.is-saved {
  background: #0d7a45 !important;
  border-color: #0d7a45 !important;
}

.wtv-pin-save-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wtv-pin-save-btn.is-saved svg {
  fill: currentColor;
}

.wtv-pin-se-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 16, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.wtv-pin-shop-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 16, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.wtv-pin-shop-badge svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Detail Product Pills (Exact / Budget Alt / Price Tier) */
.wtv-detail-product-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 0;
  overflow: hidden;
}

.wtv-detail-pill {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.wtv-detail-pill.is-exact {
  background: rgba(13, 122, 69, 0.14);
  color: #0d7a45;
}

:root:not([data-theme="light"]) .wtv-detail-pill.is-exact {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.wtv-detail-pill.is-budget {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

:root:not([data-theme="light"]) .wtv-detail-pill.is-budget {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
}

.wtv-detail-pill.is-price {
  background: var(--pin-card-bg);
  border: 1px solid var(--pin-border);
  color: var(--pin-muted);
}

.wtv-detail-link-btn.is-saved {
  border-color: #0d7a45;
  background: rgba(13, 122, 69, 0.12);
  color: #0d7a45;
}

:root:not([data-theme="light"]) .wtv-detail-link-btn.is-saved {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.wtv-dock-btn {
  position: relative;
}

.wtv-dock-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0d7a45;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.wtv-dock-btn.is-active[data-dock="saved"] svg {
  fill: currentColor;
}

.wtv-pin-tax-shell {
  padding-top: 0 !important;
  min-height: 40vh;
}

/* Featured Tab & Split-Card (Outfit Still 65% + Product Images 35%) */
.wtv-pin-tab-featured:not(.is-active),
button.wtv-pin-tab-featured:not(.is-active) {
  border-color: rgba(13, 122, 69, 0.38) !important;
}

:root:not([data-theme="light"]) .wtv-pin-tab-featured:not(.is-active),
:root:not([data-theme="light"]) button.wtv-pin-tab-featured:not(.is-active) {
  border-color: rgba(34, 197, 94, 0.38) !important;
}

.wtv-pin-media-split {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: var(--pin-card-bg);
  border: 1px solid var(--pin-border);
  box-sizing: border-box;
  overflow: hidden;
  cursor: zoom-in;
}

.wtv-pin-split-still {
  position: relative;
  flex: 0 0 65%;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--pin-surface);
}

.wtv-pin-split-still > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

@media (hover: hover) {
  .wtv-pin-card-featured:hover .wtv-pin-split-still > img {
    transform: scale(1.02);
  }
}

.wtv-pin-split-products {
  flex: 1 1 35%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wtv-pin-prod-tile {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pin-surface);
  border: 1px solid var(--pin-border);
  text-decoration: none;
  color: var(--pin-text);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.wtv-pin-prod-tile:hover {
  border-color: #0d7a45;
  transform: translateY(-1px);
}

:root:not([data-theme="light"]) .wtv-pin-prod-tile:hover {
  border-color: #22c55e;
}

.wtv-pin-prod-thumb {
  flex: 1 1 auto;
  min-height: 70px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
}

.wtv-pin-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wtv-pin-prod-shop {
  flex: 0 0 auto;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: var(--pin-surface);
  color: var(--pin-text);
  border-top: 1px solid var(--pin-border);
}
