/* =====================================================================
   Sound of the Vibe — Creator Flow stylesheet (v6.2.0)
   Light app theme · brand pink→purple gradient · landscape-first capture
   ===================================================================== */

/* ---------- Root + screen container ---------- */

.vibe-root {
  --vibe-grad: linear-gradient(135deg, #FF2D6F, #A435F0);
  --vibe-violet: #6D28D9;
  --vibe-bg: #F4F2F8;
  --vibe-card: #fff;
  --vibe-preview-bg: #F8F4FE;
  --vibe-hair: #E7DFF4;
  --vibe-ink: #1a1726;
  --vibe-ink-2: #2a2740;
  --vibe-body: #5e5872;
  --vibe-muted: #7a748c;
  --vibe-muted-2: #8a849c;
  --vibe-muted-3: #9a93ad;
  --vibe-tag-bg: #EEF1F6;
  --vibe-tag-fg: #475569;
  --vibe-zoom-active: #FFC83A;
  --vibe-gps-dot: #34d27b;
  --vibe-shadow-card: 0 10px 30px rgba(30,20,60,.07);
  --vibe-shadow-card-sel: 0 14px 34px rgba(164,53,240,.22);
  --vibe-shadow-primary: 0 10px 26px rgba(164,53,240,.34);
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
  color: var(--vibe-ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.vibe-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--vibe-bg);
  overflow: hidden;
}

.vibe-screen[hidden] { display: none; }

.vibe-legacy-hooks { position: absolute; left: -9999px; top: -9999px; }

/* =====================================================================
   SCREEN: CAPTURE / RECORDING
   ===================================================================== */

.vibe-capture {
  background: #000;
  color: #fff;
}

.vibe-cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(60% 38% at 40% 44%, rgba(255,217,160,.92) 0%, rgba(255,168,118,.4) 50%, rgba(120,70,90,0) 80%),
              linear-gradient(150deg,#2a2440,#5a4666 26%,#9a6a6f 50%,#caa07f 68%,#7c5152 86%,#2c2032);
}

.vibe-cam-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, transparent 22%, transparent 60%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

/* GPS pill — right edge, vertically centered (lands top-center in landscape) */
.vibe-gps-wrap {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 26px;
  height: 160px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.vibe-gps-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: rgba(30, 22, 42, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transform: rotate(90deg);
  pointer-events: auto;
}

.vibe-gps-pill svg { color: #fff; flex-shrink: 0; }

.vibe-gps-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vibe-gps-dot);
  box-shadow: 0 0 6px var(--vibe-gps-dot);
  flex-shrink: 0;
}

/* Bottom controls (zoom dial + shutter row) */
.vibe-cap-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 22px calc(env(safe-area-inset-bottom, 0px) + 28px);
  z-index: 3;
}

.vibe-zoom-dial {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.vibe-zoom-dial span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
  transform: rotate(90deg);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vibe-zoom-dial span.is-active {
  color: var(--vibe-zoom-active);
  font-size: 12px;
  font-weight: 800;
}

.vibe-zoom-dial span.is-active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(20, 16, 30, 0.5);
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* Shutter row: flash (left) · record (center 80px) · flip (right) */
.vibe-shutter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vibe-side-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(30, 22, 42, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}

.vibe-side-btn:active { transform: scale(0.92); }
.vibe-side-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.vibe-side-btn.is-on {
  background: rgba(255, 200, 58, 0.95);
  color: #1a1726;
}

.vibe-shutter {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.vibe-shutter::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #fff;
}

.vibe-shutter-core {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--vibe-grad);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

.vibe-ring {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 80px;
}

.vibe-ring circle {
  fill: none;
  stroke: transparent;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transform: rotate(-90deg);
  transform-origin: 46px 46px;
}

/* Recording state: gradient core morphs to red square + ring sweeps over 6s */
.vibe-shutter.is-recording .vibe-shutter-core {
  inset: 22px;
  border-radius: 6px;
  background: #FF3B3B;
}

.vibe-shutter.is-recording .vibe-ring circle {
  stroke: #FF3B3B;
  animation: vibe-ring-sweep 6s linear forwards;
}

@keyframes vibe-ring-sweep {
  from { stroke-dashoffset: 264; }
  to   { stroke-dashoffset: 0; }
}

/* =====================================================================
   SCREEN: ANALYZING
   ===================================================================== */

.vibe-analyzing {
  background: linear-gradient(150deg, #1a1428, #3a2c46 30%, #5a3e58 60%, #3a2640 90%);
  color: #fff;
}

.vibe-analyzing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 26, 0.42);
  pointer-events: none;
}

/* Orb */
.vibe-orb {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 128px;
  z-index: 2;
}

.vibe-orb-ring {
  position: absolute;
  inset: -8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: vibe-orb-spin 1.6s linear infinite;
}

@keyframes vibe-orb-spin { to { transform: rotate(360deg); } }

.vibe-orb-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #FF6FA3, #A435F0 70%);
  box-shadow: 0 0 60px rgba(164, 53, 240, 0.55);
  animation: vibe-orb-pulse 2.4s ease-in-out infinite;
}

@keyframes vibe-orb-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

.vibe-orb-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.vibe-orb-bars i {
  width: 4px;
  background: #fff;
  border-radius: 2px;
  animation: vibe-bar 1s ease-in-out infinite;
}

.vibe-orb-bars i:nth-child(1) { height: 24px; animation-delay: 0.0s; }
.vibe-orb-bars i:nth-child(2) { height: 40px; animation-delay: 0.15s; }
.vibe-orb-bars i:nth-child(3) { height: 18px; animation-delay: 0.30s; }
.vibe-orb-bars i:nth-child(4) { height: 34px; animation-delay: 0.45s; }

@keyframes vibe-bar {
  0%, 100% { transform: scaleY(0.6); }
  50%      { transform: scaleY(1.2); }
}

.vibe-analyzing-title {
  position: absolute;
  top: 46%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  z-index: 2;
  padding: 0 28px;
}

.vibe-analyzing-sub {
  position: absolute;
  top: calc(46% + 38px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
  z-index: 2;
  padding: 0 28px;
}

.vibe-steps {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 62%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 2;
}

.vibe-step {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  font-weight: 600;
}

.vibe-step.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
}

.vibe-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vibe-gps-dot);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vibe-step-spinner {
  background: transparent;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: vibe-orb-spin 0.9s linear infinite;
}

/* =====================================================================
   SCREEN: RESULTS
   ===================================================================== */

.vibe-results-screen {
  background: var(--vibe-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.vibe-results-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}

.vibe-results-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
  background: rgba(244, 242, 248, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.vibe-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vibe-ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 20, 60, 0.06);
  padding: 0;
  flex-shrink: 0;
}

.vibe-circle-btn:active { transform: scale(0.92); }

.vibe-results-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--vibe-ink);
}

/* 16:9 loop clip — always landscape, regardless of recording metadata */
.vibe-clip {
  position: relative;
  margin: 0 16px 12px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #1a1428;
}

.vibe-clip-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #1a1428;
}

.vibe-clip-loop {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Now-playing card (horizontal) */
.vibe-nowplaying {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 16px 14px;
  background: var(--vibe-card);
  border-radius: 18px;
  padding: 11px 13px;
  box-shadow: 0 6px 18px rgba(30, 20, 60, 0.05);
}

.vibe-np-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--vibe-grad);
  flex-shrink: 0;
}

.vibe-np-main {
  flex: 1;
  min-width: 0;
}

.vibe-np-kicker {
  font-size: 9px;
  font-weight: 800;
  color: #A435F0;
  letter-spacing: 0.09em;
}

.vibe-np-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--vibe-ink);
  margin: 2px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vibe-np-sub { display: none; }
.vibe-np-sub[hidden] { display: none; }

.vibe-np-bar {
  height: 3px;
  background: var(--vibe-hair);
  border-radius: 2px;
  overflow: hidden;
}

.vibe-np-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--vibe-grad);
  transition: width 0.15s linear;
}

.vibe-np-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--vibe-body);
  flex-shrink: 0;
}

/* WHAT I SAW */
.vibe-scene {
  margin: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vibe-scene b {
  font-size: 10px;
  font-weight: 800;
  color: #A435F0;
  letter-spacing: 0.09em;
}

.vibe-scene span {
  font-size: 12.5px;
  font-style: italic;
  color: var(--vibe-body);
  line-height: 1.45;
}

/* Section label */
.vibe-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 16px 10px;
}

.vibe-section-label span {
  font-size: 13px;
  font-weight: 700;
  color: var(--vibe-ink);
}

.vibe-section-label em {
  font-size: 11px;
  font-style: italic;
  color: var(--vibe-muted-2);
}

/* Card list */
.vibe-cards {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Song card ---------- */

.vibe-card {
  position: relative;
  background: var(--vibe-card);
  border-radius: 26px;
  padding: 14px;
  box-shadow: var(--vibe-shadow-card);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.vibe-card:active { transform: scale(0.995); }

.vibe-card.is-voted {
  box-shadow: var(--vibe-shadow-card-sel);
}

.vibe-card.is-voted::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 28px;
  padding: 2px;
  background: var(--vibe-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.vibe-check {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--vibe-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(164, 53, 240, 0.4);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s, transform 0.18s;
  z-index: 3;
}

.vibe-card.is-voted .vibe-check {
  opacity: 1;
  transform: scale(1);
}

.vibe-card-inner { display: flex; flex-direction: column; gap: 10px; }

.vibe-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vibe-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.vibe-mood-chip {
  background: var(--vibe-grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: lowercase;
}

.vibe-family {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFEDD5;
  color: #C2410C;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.vibe-mood {
  font-size: 11px;
  font-style: italic;
  color: var(--vibe-muted);
  text-align: right;
  line-height: 1.4;
  max-width: 48%;
  padding-top: 4px;
}

.vibe-card-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vibe-album-art {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d8c5e8, #b89cd8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  object-fit: cover;
  overflow: hidden;
}

img.vibe-album-art { padding: 0; }

.vibe-track-info { min-width: 0; flex: 1; }

.vibe-track-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--vibe-violet);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vibe-track-artist {
  font-size: 13.5px;
  color: var(--vibe-muted);
  margin-top: 2px;
}

.vibe-genres-row { display: flex; gap: 6px; flex-wrap: wrap; }

.vibe-tag {
  background: var(--vibe-tag-bg);
  color: var(--vibe-tag-fg);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vibe-reasoning { display: flex; flex-direction: column; gap: 4px; }

.vibe-reasoning b {
  font-size: 10px;
  font-weight: 800;
  color: #A435F0;
  letter-spacing: 0.09em;
}

.vibe-reasoning p {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  color: var(--vibe-body);
  line-height: 1.45;
}

/* Preview panel */
.vibe-preview-panel {
  background: var(--vibe-preview-bg);
  border-radius: 16px;
  padding: 11px 12px;
}

.vibe-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--vibe-body);
}

.vibe-preview-head::before {
  content: '🎧';
  margin-right: 5px;
  font-size: 13px;
}

.vibe-mini-time {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--vibe-muted);
}

.vibe-mini-bar {
  height: 3px;
  background: rgba(164, 53, 240, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.vibe-mini-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--vibe-grad);
}

.vibe-card-actions { display: flex; gap: 7px; }

.vibe-preview-btn {
  flex: 1;
  background: var(--vibe-grad);
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.12s;
}

.vibe-preview-btn:active { transform: scale(0.97); }

.vibe-preview-btn.is-playing {
  background: #fff;
  color: var(--vibe-violet);
  border: 1.5px solid var(--vibe-violet);
}

.vibe-media-link {
  flex: 1;
  background: #fff;
  color: var(--vibe-ink);
  border: 1.5px solid var(--vibe-hair);
  border-radius: 13px;
  padding: 9px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.vibe-no-preview {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--vibe-muted-2);
  padding: 11px;
}

/* Card error variant */
.vibe-card-error { background: #fff5f5; }
.vibe-error-note {
  font-size: 12px;
  color: #b91c1c;
  padding: 8px 0;
  font-style: italic;
}
.vibe-error-note code {
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

/* Sticky confirm bar */
.vibe-confirm-bar {
  flex: 0 0 auto;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: rgba(244, 242, 248, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 0.5px solid var(--vibe-hair);
  z-index: 2;
}

.vibe-confirm-btn {
  width: 100%;
  background: var(--vibe-grad);
  color: #fff;
  border: none;
  border-radius: 17px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: var(--vibe-shadow-primary);
  transition: transform 0.12s, opacity 0.18s;
}

.vibe-confirm-btn:active { transform: scale(0.98); }

.vibe-confirm-btn:disabled {
  background: #d6d2e0;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}

/* =====================================================================
   SCREEN: CONFIRMED
   ===================================================================== */

.vibe-confirmed {
  min-height: 100vh;
  padding-bottom: 40px;
}

.vibe-confirmed-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 330px;
  background: radial-gradient(120% 90% at 50% 0%, #A435F0 0%, #FF2D6F 55%, #F4F2F8 100%);
  z-index: 0;
}

.vibe-confirmed-inner {
  position: relative;
  z-index: 1;
  padding: calc(env(safe-area-inset-top, 0px) + 36px) 16px 0;
  text-align: center;
}

.vibe-locked-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.vibe-confirmed-title {
  margin: 14px 0 26px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
}

.vibe-map-card {
  background: var(--vibe-card);
  border-radius: 28px;
  padding: 14px;
  text-align: left;
  box-shadow: 0 14px 40px rgba(30, 20, 60, 0.12);
}

.vibe-song-id {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.vibe-song-art {
  width: 62px;
  height: 62px;
  border-radius: 13px;
  background: linear-gradient(135deg, #d8c5e8, #b89cd8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  overflow: hidden;
}

img.vibe-song-art { width: 62px; height: 62px; object-fit: cover; }

.vibe-song-meta { flex: 1; min-width: 0; }

.vibe-song-mood {
  display: inline-block;
  background: var(--vibe-grad);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: lowercase;
}

.vibe-song-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--vibe-violet);
  margin-top: 5px;
}

.vibe-song-artist {
  font-size: 13px;
  color: var(--vibe-muted);
  margin-top: 1px;
}

/* Stylized map + album-cover pin (matches confirmed-drop reference) */
.vibe-map {
  position: relative;
  aspect-ratio: 16 / 13;
  border-radius: 18px;
  overflow: hidden;
  background: #e6e2ee;
  margin-bottom: 14px;
}

/* Road grid drawn with layered gradients */
.vibe-map-tiles {
  position: absolute;
  inset: 0;
  background:
    /* horizontal roads (white) */
    linear-gradient(#fff, #fff) 0 33% / 100% 10px no-repeat,
    linear-gradient(#fff, #fff) 0 66% / 100% 9px no-repeat,
    /* vertical roads (white) */
    linear-gradient(#fff, #fff) 33% 0 / 10px 100% no-repeat,
    linear-gradient(#fff, #fff) 66% 0 / 9px 100% no-repeat,
    /* green park block, top-right */
    linear-gradient(#d4ecc4, #d4ecc4) 70% 12% / 26% 30% no-repeat,
    /* blue water strip, bottom */
    linear-gradient(#c9e0f0, #c9e0f0) 0 86% / 100% 14% no-repeat,
    /* base land */
    linear-gradient(#e6e2ee, #e6e2ee);
}

.vibe-map-pin {
  position: absolute;
  /* sits left-of-center on a road junction, like the reference */
  top: 44%;
  left: 44%;
  transform: translate(-50%, -60%);
  width: 56px;
  height: 66px;
  z-index: 2;
}

.vibe-pin-pulse {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(164, 53, 240, 0.22);
  transform: translate(-50%, -50%);
  animation: vibe-pin-pulse 1.8s ease-out infinite;
}

@keyframes vibe-pin-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Teardrop body */
.vibe-pin-body {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  background: var(--vibe-grad);
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  border-bottom-left-radius: 50%;
  box-shadow: 0 8px 18px rgba(164, 53, 240, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  /* teardrop point at bottom */
  clip-path: none;
}

.vibe-pin-body::before {
  /* the downward point of the teardrop */
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 20px;
  height: 20px;
  background: var(--vibe-grad);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 6px 0;
  z-index: -1;
}

.vibe-pin-body::after {
  /* album-art head, clipped into a circle with a white ring */
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8c5e8, #b89cd8);
  border: 2.5px solid #fff;
  background-size: cover;
  background-position: center;
}

/* When JS provides album art, paint it into the pin head */
.vibe-pin-body.has-art::after {
  background-image: var(--pin-art);
}

.vibe-loc-place {
  font-size: 17px;
  font-weight: 700;
  color: var(--vibe-ink);
  margin-bottom: 8px;
}

.vibe-loc-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 13px;
}

.vibe-loc-row svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.vibe-loc-sub {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--vibe-muted-2);
  line-height: 1.4;
}

.vibe-public-badge {
  align-self: flex-start;
  background: #ECFCF3;
  color: #1F8A5B;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.vibe-public-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1FAE6A;
  display: inline-block;
}

.vibe-apple-btn {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  margin-bottom: 8px;
  cursor: pointer;
}

.vibe-share-btn {
  width: 100%;
  background: #fff;
  color: var(--vibe-ink);
  border: 1.5px solid var(--vibe-hair);
  border-radius: 13px;
  padding: 11px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.vibe-again-btn {
  margin: 18px auto 0;
  background: none;
  border: none;
  color: #A435F0;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* =====================================================================
   Small-screen tightening for narrow phones (<= 360px)
   ===================================================================== */
@media (max-width: 360px) {
  .vibe-album-art { width: 56px; height: 56px; border-radius: 12px; }
  .vibe-track-name { font-size: 15px; }
  .vibe-card { padding: 12px; }
  .vibe-confirmed-title { font-size: 22px; }
}

/* ===== FOLDABLE: WHY THIS / WHAT I SAW ===== */
.vibe-reasoning[data-fold], .vibe-scene[data-fold] { position: relative; }
.vibe-fold-toggle {
  box-sizing: border-box; width: calc(100% + 20px); margin: 0 -10px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; border-radius: 12px; background: transparent; border: 0;
  cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; transition: background .15s ease;
}
.vibe-fold-toggle:hover { background: #FAF7FE; }
.vibe-fold-toggle:active { background: #F1EBFB; }
.vibe-fold-toggle:focus-visible { outline: 2px solid #A435F0; outline-offset: 2px; }
.vibe-fold-cta { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #8a8598; }
.vibe-fold-cta .vibe-fold-chev { color: #A435F0; transition: transform .22s ease; }
.is-open > .vibe-fold-toggle .vibe-fold-cta .vibe-fold-chev { transform: rotate(180deg); }
.vibe-fold-body { position: relative; overflow: hidden; max-height: 2.9em; transition: max-height .22s ease; }
.is-open .vibe-fold-body { max-height: 360px; }
.vibe-fold-body p { margin: 0; }
.vibe-fold-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 1.4em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); pointer-events: none; transition: opacity .18s ease; }
.is-open .vibe-fold-fade { opacity: 0; }
.vibe-scene[data-fold] .vibe-fold-body { max-height: 0; }
.vibe-scene[data-fold].is-open .vibe-fold-body { max-height: 120px; }
.vibe-scene[data-fold] .vibe-fold-fade { display: none; }
.vibe-fold-toggle b { pointer-events: none; }

/* ===== STICKY HERO — video + player pinned; body scrolls beneath ===== */
.vibe-hero {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: var(--vibe-bg);
  box-shadow: 0 10px 16px -12px rgba(30, 20, 60, 0.22);
}
/* header now rides inside the pinned hero, so drop its own sticky */
.vibe-hero .vibe-results-head {
  position: static;
}
