/* ==========================================================================
   AUTHENTIC PINTEREST DESKTOP HOMEPAGE STYLES
   Minimalist top header, dense staggered masonry feed, authentic hover scrims,
   2-column detail viewer modal, and responsive mobile adaptation.
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text-main: #111111;
  --color-text-sub: #5f5f5f;
  --color-text-muted: #767676;
  --color-border-subtle: #e9e9e9;
  --color-hover-gray: #f0f0f0;
  --color-active-gray: #e2e2e2;

  /* Pinterest Red */
  --color-pin-red: #e60023;
  --color-pin-red-hover: #ad081b;
  --color-pin-saved: #111111;

  /* Geometry */
  --radius-card: 16px;
  --radius-pill: 9999px;
  --radius-modal: 32px;
  --feed-gap: 16px;

  /* Fonts */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--color-text-main);
  outline-offset: 2px;
}

/* ==========================================================================
   1. MINIMAL PINTEREST DESKTOP HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 16px;
  gap: 12px;
}

/* Left: Logo + Home button */
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pin-red);
  transition: background-color 150ms ease;
}

.brand-icon-btn:hover {
  background-color: var(--color-hover-gray);
}

.home-nav-pill {
  background-color: #111111;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: opacity 150ms ease;
}

.home-nav-pill:hover {
  opacity: 0.9;
}

/* Center: Large Pinterest Search Bar */
.header-center {
  flex: 1;
  max-width: 100%;
}

.pinterest-search-box {
  display: flex;
  align-items: center;
  background-color: #e9e9e9;
  border-radius: var(--radius-pill);
  height: 48px;
  padding: 0 16px;
  gap: 10px;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.pinterest-search-box:focus-within {
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.25), inset 0 0 0 1px #0084ff;
}

.search-glyph {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.pinterest-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--color-text-main);
  outline: none;
}

.pinterest-search-input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Right: Utility icons & avatar */
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-utility-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, color 150ms ease;
}

.header-utility-btn:hover {
  background-color: var(--color-hover-gray);
  color: var(--color-text-main);
}

.header-utility-btn.muted {
  color: #b0b0b0;
}

.header-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: 4px;
  cursor: pointer;
  transition: transform 150ms ease;
}

.header-avatar-circle:hover {
  transform: scale(1.05);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   2. DENSE PINTEREST MASONRY FEED
   ========================================================================== */

.feed-main {
  max-width: 1800px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}

.pinterest-masonry-grid {
  display: flex;
  justify-content: center;
  gap: var(--feed-gap);
  width: 100%;
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: var(--feed-gap);
  flex: 1;
  min-width: 0;
}

/* Pin Card */
.pin-card {
  position: relative;
  border-radius: var(--radius-card);
  background-color: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
  transition: transform 180ms ease;
}

.pin-media-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: #f2f2f2;
}

.pin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.pin-card:hover .pin-img {
  transform: scale(1.02);
}

/* Authentic Desktop Hover Scrim */
.pin-hover-scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 160ms ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  z-index: 2;
  border-radius: var(--radius-card);
}

.pin-card:hover .pin-hover-scrim,
.pin-card:focus-within .pin-hover-scrim {
  opacity: 1;
}

.pin-hover-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pin-hover-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pin-hover-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Red Save Button */
.card-btn-save {
  background-color: var(--color-pin-red);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 150ms ease, transform 150ms ease;
}

.card-btn-save:hover {
  background-color: var(--color-pin-red-hover);
  transform: scale(1.02);
}

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

.card-btn-save.is-saved {
  background-color: var(--color-pin-saved);
}

/* Round Action Icons on Hover */
.pin-action-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms ease, background-color 150ms ease;
}

.pin-action-circle:hover {
  transform: scale(1.1);
  background-color: #ffffff;
}

/* Card Caption below image */
.pin-meta-area {
  padding: 6px 4px 4px;
}

.pin-caption-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   3. SONG PIN STYLES
   ========================================================================== */

.song-pin-media {
  position: relative;
  background-color: #1a1a1a;
}

.song-vinyl-edge {
  position: absolute;
  top: 10%;
  right: -26px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b2b2b 0%, #111111 60%, #050505 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  transition: right 300ms ease;
}

.pin-card:hover .song-vinyl-edge {
  right: -10px;
}

.song-vinyl-edge.spinning {
  right: -10px;
  opacity: 1;
  animation: spinRecord 3.6s linear infinite;
}

@keyframes spinRecord {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-pin-red);
  border: 4px solid #111111;
}

.pin-audio-badge,
.pin-letter-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  margin-right: auto;
}

.song-pin-play-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card-play-trigger {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 150ms ease, background-color 150ms ease;
}

.card-play-trigger:hover {
  transform: scale(1.1);
}

.card-play-trigger.is-playing {
  background-color: var(--color-pin-red);
  color: #ffffff;
}

.song-time-chip {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.song-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-title-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
}

.song-artist-name {
  font-size: 13px;
  color: var(--color-text-sub);
}

.song-quote {
  font-style: italic;
  font-weight: 500;
  color: #4a4a4a;
  margin-top: 2px;
}

/* ==========================================================================
   4. LETTER PIN STYLES (Stationery Note Card)
   ========================================================================== */

.letter-pin-media {
  background-color: #f7f7f7;
  position: relative;
  overflow: hidden;
}

.letter-stationery-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wax-seal-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #b8252a 0%, #871418 100%);
  color: #f7d28b;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.letter-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: #2b2520;
  line-height: 1.3;
}

.letter-card-rule {
  width: 36px;
  height: 1px;
  background-color: #d8d2c6;
  margin: 4px auto;
}

.letter-card-sub {
  font-family: var(--font-serif);
  font-size: 13px;
  color: #635b54;
  line-height: 1.45;
}

.letter-card-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-pin-red);
  margin-top: 6px;
}

.letter-hover-btn {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--color-pin-red);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   5. PINTEREST DETAIL MODAL (2-Column Desktop Viewer)
   ========================================================================== */

.pin-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 82px 28px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  overflow-y: auto;
}

.pin-modal-layer.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Floating Back Navigation Control */
.modal-floating-nav {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 28px;
  z-index: 1020;
  pointer-events: none;
}

.floating-back-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-text-main);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 150ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-main);
}

.floating-back-pill:hover {
  background-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

.floating-back-pill:active {
  transform: scale(0.94);
  background-color: #f2f2f2;
}

.modal-card-wrapper {
  position: relative;
  z-index: 1005;
  width: 100%;
  max-width: 860px;
  max-height: min(720px, calc(100dvh - 114px));
  margin: auto;
  display: flex;
  justify-content: center;
  transform: scale(0.97) translateY(10px);
  transition: transform 220ms ease;
}

.pin-modal-layer.is-active .modal-card-wrapper {
  transform: scale(1) translateY(0);
}

.pinterest-detail-card {
  width: 100%;
  background-color: #ffffff;
  border-radius: var(--radius-modal);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  display: flex;
  max-height: min(720px, calc(100dvh - 114px));
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.pinterest-detail-card::-webkit-scrollbar {
  width: 6px;
}

.pinterest-detail-card::-webkit-scrollbar-track {
  background: transparent;
}

.pinterest-detail-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
}

.detail-columns-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: stretch;
}

/* Left Column Media */
.modal-media-wrap {
  flex: 1.15;
  min-width: 0;
  background-color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.modal-main-img {
  max-width: 100%;
  max-height: min(720px, calc(100dvh - 90px));
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   Song Media & Dark Luxury Theme in Modal
   ========================================================================== */
.pinterest-detail-card.pin-type-song {
  background-color: #121212;
  color: #ffffff;
}

.pinterest-detail-card.pin-type-song .modal-info-side {
  background-color: #121212;
  color: #ffffff;
}

.song-modal-media {
  background: radial-gradient(circle at 50% 35%, #262626 0%, #121212 100%);
  flex-direction: column;
  padding: 32px 24px 28px;
  gap: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-song-cover-box {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-album-img {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 16px;
  position: relative;
  z-index: 2;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75);
}

.modal-vinyl-disc {
  position: absolute;
  top: 10px;
  right: -36px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, #2c2c2c 0%, #141414 55%, #050505 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: right 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-vinyl-disc.spinning {
  right: -50px;
  animation: spinRecord 3s linear infinite;
}

.vinyl-core {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #e60023 0%, #8b0012 65%, #111111 70%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.modal-audio-player-box {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.player-scrub-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-scrub-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4757, #e60023);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(230, 0, 35, 0.6);
  transition: width 100ms linear;
}

.player-time-display {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #a0a0a0;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}

.player-btns-row {
  display: flex;
  justify-content: center;
  padding: 2px 0;
}

.modal-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.modal-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.modal-play-btn.is-playing {
  background-color: var(--color-pin-red);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(230, 0, 35, 0.55);
}

/* Dark Mode Typography & Controls for Song Pins */
.pin-type-song .modal-caption-title {
  color: #ffffff;
}

.pin-type-song .modal-song-sub {
  color: #ff6b81;
  font-weight: 600;
}

.pin-type-song .modal-type-pill {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pin-type-song .modal-save-btn {
  background-color: #ffffff;
  color: #111111;
}

.pin-type-song .modal-save-btn:hover {
  background-color: #e6e6e6;
}

.pin-type-song .modal-save-btn.is-saved {
  background-color: var(--color-pin-red);
  color: #ffffff;
}

.pin-type-song .modal-dedication-card {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3.5px solid #ff4757;
  border-radius: 14px;
}

.pin-type-song .dedication-lead {
  color: #999999;
}

.pin-type-song .dedication-quote {
  color: #f2f2f7;
}

.pin-type-song .modal-icon-btn {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.pin-type-song .modal-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.pin-type-song::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Letter Media in Modal */
.letter-modal-media {
  background: transparent;
  padding: 0;
}

.stationery-envelope-card {
  position: relative;
  width: 280px;
  height: 380px;
  background: #f7f4ed;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid #e0dacf;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.wax-seal-large {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, #b8252a 0%, #871418 100%);
  color: #f7d28b;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.envelope-stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 50px;
  height: 60px;
  border: 2px dashed #b8252a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #b8252a;
}

.envelope-addressed {
  text-align: center;
  font-family: var(--font-serif);
  color: #3b352f;
  font-size: 15px;
}

/* Right Column Details */
.modal-info-side {
  flex: 0.95;
  width: 380px;
  max-width: 420px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  background-color: #ffffff;
  justify-content: flex-start;
}

.modal-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-left-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-hover-gray);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, transform 150ms ease;
}

.modal-icon-btn:hover {
  background-color: var(--color-active-gray);
  transform: scale(1.05);
}

.modal-type-pill {
  font-size: 13px;
  font-weight: 700;
  background-color: #f0f0f0;
  color: var(--color-text-main);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.modal-text-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-caption-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.modal-full-story {
  font-size: 15px;
  color: #3b3b3b;
  line-height: 1.6;
}

.modal-song-sub {
  font-size: 15px;
  color: var(--color-pin-red);
  font-weight: 600;
}

.modal-location-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  background-color: #f4f4f4;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
  margin-top: 4px;
}

.modal-dedication-card {
  background-color: #f9f9f9;
  border-left: 3px solid var(--color-pin-red);
  padding: 14px 18px;
  border-radius: 4px 12px 12px 4px;
  margin-top: 4px;
}

.dedication-lead {
  font-size: 11px;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.dedication-quote {
  font-size: 14px;
  font-style: italic;
  color: var(--color-text-main);
  line-height: 1.5;
}

/* Full Letter Sheet */
.letter-modal-side {
  width: 480px;
  max-width: 520px;
}

.full-letter-sheet {
  background-color: #faf8f5;
  border: 1px solid #eae5dc;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-serif);
  color: #2b2520;
}

.letter-salute {
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
}

.letter-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.letter-p {
  font-size: 15px;
  line-height: 1.6;
}

.letter-close {
  font-size: 15px;
  font-style: italic;
  margin-top: 6px;
}

.letter-sig {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-pin-red);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 900px) {
  .pin-modal-layer {
    padding: 76px 20px 24px;
  }

  .modal-floating-nav {
    top: 18px;
    padding: 0 20px;
  }

  .modal-card-wrapper {
    max-height: calc(100dvh - 98px);
  }

  .pinterest-detail-card {
    flex-direction: column;
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    border-radius: 24px;
  }

  .detail-columns-wrapper {
    flex-direction: column;
  }

  /* Full-bleed photo: NO white gaps, NO letterboxing, flush with top curve */
  .modal-media-wrap {
    width: 100%;
    max-height: none;
    display: block;
    background-color: transparent;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  .modal-main-img {
    width: 100%;
    height: auto;
    max-height: 56dvh;
    display: block;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    margin: 0;
    padding: 0;
  }

  /* Song Media in Responsive */
  .song-modal-media {
    border-radius: 24px 24px 0 0;
    padding: 28px 20px 22px;
    gap: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, #252525 0%, #121212 100%);
  }

  .modal-song-cover-box {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .modal-album-img {
    width: 180px;
    height: 180px;
    border-radius: 14px;
  }

  .modal-vinyl-disc {
    width: 165px;
    height: 165px;
    top: 8px;
    right: -32px;
  }

  .modal-vinyl-disc.spinning {
    right: -46px;
  }

  .vinyl-core {
    width: 52px;
    height: 52px;
  }

  .modal-audio-player-box {
    max-width: 290px;
    padding: 14px 18px;
    gap: 10px;
  }

  .modal-info-side {
    width: 100%;
    max-width: 100%;
    padding: 20px 20px 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --feed-gap: 10px;
  }

  .site-header {
    height: 68px;
    padding: 0 12px;
    gap: 8px;
  }

  .home-nav-pill {
    display: none;
  }

  .pinterest-search-box {
    height: 42px;
    padding: 0 12px;
  }

  .pinterest-search-input {
    font-size: 14px;
  }

  .feed-main {
    padding: 6px 8px 48px;
  }

  .song-vinyl-edge {
    display: none;
  }
}

@media (max-width: 600px) {
  .pin-modal-layer {
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }

  .modal-floating-nav {
    top: max(14px, env(safe-area-inset-top));
    padding: 0 16px;
  }

  /* Clean 42px circular back button on mobile */
  .floating-back-pill {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 50%;
  }

  .floating-back-pill span {
    display: none;
  }

  .modal-card-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    transform: translateY(20px);
  }

  .pin-modal-layer.is-active .modal-card-wrapper {
    transform: translateY(0);
  }

  .pinterest-detail-card {
    border-radius: 28px 28px 0 0;
    max-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - 62px);
    width: 100%;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Full-bleed photo on mobile: zero white gap or border */
  .modal-media-wrap {
    border-radius: 28px 28px 0 0;
    background-color: transparent;
  }

  .modal-main-img {
    border-radius: 28px 28px 0 0;
    max-height: 54dvh;
  }

  /* Mobile Song Media: perfectly scaled so vinyl record NEVER clips */
  .song-modal-media {
    border-radius: 28px 28px 0 0;
    padding: 26px 16px 20px;
    gap: 16px;
  }

  .modal-song-cover-box {
    width: 170px;
    height: 170px;
  }

  .modal-album-img {
    width: 170px;
    height: 170px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  }

  .modal-vinyl-disc {
    width: 155px;
    height: 155px;
    top: 7px;
    right: -28px;
  }

  .modal-vinyl-disc.spinning {
    right: -42px;
  }

  .vinyl-core {
    width: 48px;
    height: 48px;
  }

  .modal-audio-player-box {
    max-width: 275px;
    padding: 12px 16px;
    gap: 10px;
  }

  .modal-play-btn {
    width: 44px;
    height: 44px;
  }

  .pin-type-song .modal-info-side {
    padding: 18px 20px 36px;
  }
}

@media (max-height: 500px) {
  .pin-modal-layer {
    padding: 52px 12px 10px;
  }

  .modal-floating-nav {
    top: 8px;
    padding: 0 14px;
  }

  .floating-back-pill {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .modal-card-wrapper {
    max-height: calc(100dvh - 58px);
  }

  .pinterest-detail-card {
    max-height: calc(100dvh - 58px);
  }
}

/* ==========================================================================
   6. DOUBLE-TAP ("TAP TAP") HEART BURST ANIMATION
   ========================================================================== */

.heart-burst-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-burst-icon {
  width: 76px;
  height: 76px;
  color: #e60023;
  filter: drop-shadow(0 6px 20px rgba(230, 0, 35, 0.55));
  animation: heartPopAnim 650ms cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartPopAnim {
  0% {
    transform: scale(0) rotate(-12deg);
    opacity: 0;
  }
  35% {
    transform: scale(1.3) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  75% {
    transform: scale(1.08) translateY(-12px);
    opacity: 0.95;
  }
  100% {
    transform: scale(0.65) translateY(-32px);
    opacity: 0;
  }
}
