/* ============================================================
   START LIMA — CONOCE TU ÁREA
   Design System: Vintage × Tech
   ============================================================ */

/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --white:        #ffffff;
  --eggblue:      #05c3de;
  --resblue:      #003087;
  --midblue:      #001e62;
  --stratos:      #00002c;
  --supernova:    #f2ca00;

  /* Derived */
  --gold-dark:    #c8960c;
  --gold-mid:     #d4a017;
  --gold-light:   #f0c040;
  --wax-deep:     #7a5a00;
  --wax-mid:      #a07800;
  --wax-bright:   #c8960c;

  /* Backgrounds */
  --bg:           #080816;
  --glass-bg:     rgba(10, 10, 28, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Paper */
  --paper-bg:     #f4edd8;
  --paper-lines:  rgba(140,120,80,0.06);
  --paper-ink:    #1c1005;
  --paper-ink-2:  #3a2e1a;

  /* Typography */
  --f-serif:   'Cormorant Garamond', Georgia, serif;
  --f-sans:    'Outfit', system-ui, sans-serif;
  --f-hand:    'Caveat', cursive;

  /* Envelope */
  --env-gold:   #f2ca00;
  --env-gold-d: #d4a800;
  --env-shadow: rgba(0,0,0,0.6);
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow-x: hidden;
  background: linear-gradient(145deg, #02040f 0%, #000018 100%);
  color: var(--white);
  font-family: var(--f-sans);
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── AMBIENT BACKGROUND (Apple style 3 blur circles) ────── */
.bg-particles {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 75% 15%, rgba(5,195,222,0.12) 0%, transparent 55%),
    radial-gradient(circle at 15% 85%, rgba(0,48,135,0.16) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

.ambient-glow {
  position: fixed; border-radius: 50%;
  filter: blur(140px); pointer-events: none; z-index: 0;
  animation: orb-drift 22s ease-in-out infinite alternate;
}
.glow-top-right  { width: 650px; height: 550px; background: #05c3de; top: -150px; right: -150px; opacity: 0.12; }
.glow-bottom-left{ width: 550px; height: 450px; background: #003087; bottom: -150px; left: -150px; opacity: 0.18; animation-delay: -7s; }

@keyframes orb-drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(50px, 40px) scale(1.15); }
}

/* ─── SCREENS ────────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 10;
  opacity: 0; pointer-events: none;
  will-change: opacity;
}

.screen.active {
  opacity: 1; pointer-events: all;
}

/* ============================================================
   SCREEN 1: SPLASH / SEARCH
   ============================================================ */
.screen--search { background: var(--bg); }

.splash-wrap {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: clamp(12px, 2vh, 22px);
  padding: 24px;
  max-width: 560px; width: 100%;
}

.splash-logo img {
  height: clamp(50px, 7vh, 80px);
  filter: drop-shadow(0 0 16px rgba(5,195,222,0.25));
}

.splash-title {
  font-family: var(--f-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.splash-title__accent {
  background: linear-gradient(90deg, var(--supernova) 0%, #ffd633 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-sub {
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  color: rgba(255,255,255,0.5);
  max-width: 420px;
}

/* Search Field */
.search-wrap { position: relative; width: 100%; max-width: 520px; }

.search-field {
  display: flex; align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 7px 7px 7px 20px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
  flex-wrap: nowrap;
  overflow: hidden;
}

.search-field:focus-within {
  border-color: rgba(5,195,222,0.5);
  box-shadow: 0 0 0 3px rgba(5,195,222,0.08), 0 8px 32px rgba(0,0,0,0.4);
}

.search-field__icon {
  color: var(--eggblue); font-size: 0.9rem; opacity: 0.8;
  flex-shrink: 0;
}

#search-input {
  flex: 1 1 0;
  min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--white); font-family: var(--f-sans); font-size: 1rem;
}
#search-input::placeholder { color: rgba(255,255,255,0.28); }

.btn-discover {
  background: var(--supernova);
  color: #000;
  font-weight: 700; font-size: 0.85rem;
  padding: 11px 20px;
  border-radius: 40px;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-discover:hover {
  background: #ffd633;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(242,202,0,0.35);
}

/* On very narrow screens, stack vertically inside a rounded card */
@media (max-width: 440px) {
  .search-field {
    flex-direction: column;
    border-radius: 20px;
    padding: 14px 16px;
    align-items: stretch;
    gap: 12px;
  }
  .search-field__icon { display: none; }
  #search-input { text-align: center; min-width: unset; }
  .btn-discover { width: 100%; text-align: center; border-radius: 12px; padding: 13px; }
}

/* Suggestions */
.suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: rgba(10,10,28,0.96);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  list-style: none;
  max-height: 220px; overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.suggestions.open { display: block; }

.suggestions li {
  padding: 13px 20px;
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 0.2s, padding-left 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.suggestions li:last-child { border-bottom: none; }
.suggestions li:hover { background: rgba(5,195,222,0.12); color: var(--eggblue); padding-left: 26px; }

.search-error {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #ff6b6b;
  min-height: 1.2em;
  text-align: center;
}

/* ============================================================
   SCREEN 2: ENVELOPE
   ============================================================ */
.screen--envelope {
  background: var(--bg);
  gap: 0;
}

.env-header {
  position: absolute; top: clamp(16px, 3vh, 28px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  flex-direction: column;
}
.env-logo { height: clamp(28px, 4vh, 40px); opacity: 0.8; }
.env-header__label {
  font-size: 0.65rem; letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

/* ── Envelope scene ── */
.env-scene {
  perspective: 1400px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Outer container ── */
.envelope-3d {
  position: relative;
  width: clamp(300px, 52vw, 560px);
  height: clamp(195px, 35vw, 380px);
  transform-style: preserve-3d;
  overflow: visible;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.65)) drop-shadow(0 8px 20px rgba(0,0,0,0.4));
}

/* ── MAIN BODY — flat cream-yellow rectangle ── */
.env-body-main {
  position: absolute; inset: 0;
  border-radius: 5px;
  overflow: hidden;
  background:
    linear-gradient(160deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0)    30%,
      rgba(0,0,0,0.04)       70%,
      rgba(0,0,0,0.1)        100%
    ),
    linear-gradient(135deg, #f9dc50 0%, #f2ca00 45%, #e8bc00 75%, #d4a800 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25),
    inset 0 0 0 2px rgba(180,130,0,0.1);
  z-index: 1;
}

/* ── Inner fold lines (SVG absolute inside body) ── */
.env-folds-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ── TOP FLAP — triangle that opens upward ── */
.env-flap-top {
  position: absolute;
  inset: 0;
  clip-path: polygon(0% 0%, 100% 0%, 50% 52%);
  background:
    linear-gradient(175deg,
      #fde84e 0%,
      #f5d000 35%,
      #e8bc00 65%,
      #d8aa00 100%
    );
  transform-origin: top center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  z-index: 3;
  filter: drop-shadow(0 3px 6px rgba(120,80,0,0.25));
}

/* ── TWINE / STRING SVG overlay ── */
.env-twine-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

/* ── WAX SEAL ── */
.wax-seal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  isolation: isolate;
  width: clamp(72px, 13vw, 96px);
  height: clamp(72px, 13vw, 96px);
  border-radius: 50%;
  padding: 0;
  outline: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), filter 0.25s;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.1);
  filter: brightness(1.12);
}

.wax-seal__outer {
  width: 100%; height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255,230,100,0.35) 0%, transparent 50%),
    radial-gradient(circle at 60% 65%, rgba(0,0,0,0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, #d4a010 0%, #a07808 45%, #6e5200 100%);
  box-shadow:
    0 6px 20px rgba(0,0,0,0.5),
    0 2px 6px rgba(0,0,0,0.3),
    inset 0 2px 5px rgba(255,220,80,0.35),
    inset 0 -3px 8px rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.wax-seal__inner {
  width: 80%; height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #c8960c 0%, #8a6400 45%, #5a3e00 100%);
  border: 1.5px solid rgba(255,200,40,0.15);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}

.wax-seal__texture {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 28% 28%, rgba(255,255,255,0.14) 0%, transparent 38%),
    radial-gradient(circle at 72% 72%, rgba(0,0,0,0.22) 0%, transparent 38%);
  pointer-events: none;
}

/* Bigger glyph since there's no circle outline anymore */
.wax-seal__logo { width: 62%; height: auto; }
.wax-seal__wordmark {
  display: none;
}

.wax-crack {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; pointer-events: none;
  border-radius: 50%;
}

/* ── Hint below envelope ── */
.env-hint {
  position: absolute;
  bottom: clamp(20px, 4vh, 40px);
  left: 50%; transform: translateX(-50%);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  animation: hint-pulse 3s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.7; }
}

/* ============================================================
   SCREEN 3: DASHBOARD (fully fluid — no fixed-px overflow traps)
   ============================================================ */
.screen--dashboard {
  min-height: 100vh;
  height: auto;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(24px, 4vh, 56px) clamp(18px, 4vw, 48px);
  box-sizing: border-box;
}

/* Main grid — fluid two-column above 1180px, stacked below.
   min-width:0 on every track prevents the classic grid/flex
   "min-content blowout" that was pushing the letter off-screen. */
.dash-main {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  box-sizing: border-box;
  gap: clamp(22px, 3vw, 40px);
  align-items: stretch;
  position: relative;
}
.dash-main > * { min-width: 0; }

@media (max-width: 1180px) {
  .dash-main {
    grid-template-columns: 1fr;
    max-width: 640px;
  }
}

/* ── Glass card base ── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 45px rgba(0,0,0,0.35);
}
.glass-card:hover {
  border-color: rgba(242, 202, 0, 0.25);
}

/* ============================================================
   LEFT COLUMN — STANDALONE VINTAGE LETTER
   ============================================================ */
.dash-letter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  gap: clamp(18px, 2.4vh, 28px);
  position: relative;
  box-sizing: border-box;
}

/* The letter paper sliding significantly out of envelope */
.paper-card {
  position: absolute;
  width: 88%;
  height: 125%; /* Expanded paper height so that the entire text is fully accommodated */
  top: -32%;    /* Positioned higher to ensure 98% of the paper is outside the front folds */
  z-index: 2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  background-color: #f6eedb;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 26px,
      rgba(139, 101, 8, 0.04) 26px,
      rgba(139, 101, 8, 0.04) 27px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Screen 2 Letter Reveal — detaches from the envelope and centers
   itself on screen (position:fixed) so it's always fully visible,
   regardless of window height. GSAP owns xPercent/yPercent/scale
   on this element (see script.js), so no transform is set here. */
#env-letter-peek {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(440px, 88vw);
  /* .paper-card (the shared base class) sets height:125% for the OLD
     "peek slides up inside the envelope" layout, sized against that
     small absolute-positioned slot. This element is fixed to the
     viewport now, so an inherited 125% silently became 125% of the
     WHOLE SCREEN height — a card 1.25x taller than the window itself,
     poking out top and bottom no matter the viewport size. That was
     the actual bug behind every "goes past the edge" report. */
  height: auto;
  z-index: 60;
  border-radius: 14px;
  /* No overflow/max-height here — the mini wax seal is deliberately
     positioned half outside the card's top edge (see .paper-card__seal),
     and clipping this element would cut it in half. The scroll safety
     net for very tall content on short screens lives on .paper-card__body
     instead, below. */
  overflow: visible;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  background-color: #f7f1e3;
  padding: clamp(34px, 4.5vh, 46px) clamp(26px, 3.4vw, 38px) clamp(28px, 3.4vh, 34px);
  box-sizing: border-box;
  border: 1px solid rgba(139, 101, 8, 0.2);
}

#env-letter-peek .paper-card__body {
  padding: 0;
  gap: clamp(8px, 1.4vh, 13px);
  max-height: min(72vh, 620px);
  overflow-y: auto;
}

/* Standalone paper card override for Screen 3 (Dashboard left) */
.dash-letter .paper-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: auto;
  aspect-ratio: unset;
  top: 0;
  left: 0;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.5),
    0 8px 20px rgba(0,0,0,0.35);
  border-radius: 14px;
  overflow: visible; /* Prevents golden seal at top from being clipped! */
  flex-shrink: 1;
  min-height: 0;
  padding: clamp(34px, 4.5vh, 46px) clamp(26px, 3.4vw, 38px) clamp(28px, 3.4vh, 34px);
  box-sizing: border-box;
}

/* Subtle vintage border highlight */
.paper-card::after {
  content: '';
  position: absolute; inset: 0;
  border: 1px solid rgba(139, 101, 8, 0.15);
  border-radius: 14px;
  pointer-events: none;
}

/* Golden seal at top center */
.paper-card__seal {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
}

.wax-seal-mini {
  width: 58px; height: 58px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.wax-seal-mini .wax-seal__outer {
  background: radial-gradient(circle at 40% 35%, #ffd54f 0%, #c8960c 60%, #8a6400 100%);
}
.wax-seal-mini .wax-seal__inner {
  background: radial-gradient(circle at 45% 45%, #ffd54f 0%, #b88a08 70%, #5a3e00 100%);
  border: 1px dashed rgba(255,255,255,0.25);
}

.paper-card__body {
  padding: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 15px);
  justify-content: flex-start;
  box-sizing: border-box;
}

.paper-salutation {
  font-family: var(--f-serif);
  font-size: clamp(1.5rem, 2.6vh, 1.9rem);
  font-weight: 700;
  color: #1a1005; /* Dark rich ink */
  line-height: 1.15;
  text-align: center;
  /* Kept to one line — a long name shrinks to fit (see fitTextToContainer
     in script.js) instead of wrapping awkwardly under the seal.
     No overflow:hidden here: fitTextToContainer already guarantees the
     text fits the width, so it wasn't clipping anything horizontally —
     but html2canvas (used by the "download card" button) measures line
     height slightly differently from the browser, and that overflow was
     enough to shave the tops off letters/accents in the exported PNG
     while the live page looked fine. */
  white-space: nowrap;
  max-width: 100%;
}

.paper-subtitle {
  font-family: var(--f-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #966018;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 2px;
}

.paper-text {
  font-family: var(--f-serif);
  font-size: clamp(0.88rem, 1.5vh, 0.98rem);
  color: #2c1e0b; /* Dark sepia ink */
  line-height: 1.55;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
}
.paper-text.text-center-hint { text-align: center; margin-bottom: -6px; color: #5a4220; font-style: italic; }
.paper-text.italic-end { font-style: italic; font-size: 0.94em; text-align: center; margin-top: 6px; color: #5a4220; }

/* Bracketed area display — thin double gold rule, no filled badge */
.paper-area-display {
  font-family: var(--f-serif);
  font-size: clamp(1.4rem, 2.4vh, 1.75rem);
  font-weight: 700;
  color: #1a1005;
  text-align: center;
  margin: 6px 0;
  letter-spacing: 3px;
  padding: 10px 0;
  border-top: 1px solid rgba(139, 101, 8, 0.35);
  border-bottom: 1px solid rgba(139, 101, 8, 0.35);
  position: relative;
  /* Long area names ("PEOPLE & COMMUNITY") shrink to fit one line
     instead of wrapping and breaking the double-rule frame — see
     fitTextToContainer in script.js. No overflow:hidden — see the
     note on .paper-salutation above; it clipped letter tops in the
     html2canvas-exported download without affecting the live page. */
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}
.paper-area-display span { color: #7a4f00; }

.paper-signature {
  margin-top: clamp(6px, 1vh, 12px);
  text-align: center;
}
.paper-signature__text {
  font-family: var(--f-hand);
  font-size: clamp(1.5rem, 2.6vh, 1.9rem);
  font-weight: 700;
  color: #854f00; /* Deep rich gold ink */
}

/* Trigger button style */
.btn-share-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffe066 0%, var(--supernova) 60%, #e0b400 100%);
  color: #1a1400;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.4px;
  padding: 15px 32px;
  border-radius: 40px;
  box-shadow: 0 10px 28px rgba(242, 202, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
}
.btn-share-trigger:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(242, 202, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-share-trigger:active { transform: translateY(0); }

/* ============================================================
   RIGHT COLUMN — BENTO GRID MEMBER CARDS
   ============================================================ */
.dash-cards.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "photo"
    "quote"
    "founder"
    "music"
    "animal";
  gap: clamp(12px, 1.6vw, 16px);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Switches to the two-column bento once there's real room. Note: this can't
   be a container query on .bento-grid itself — engines refuse to let a
   container's own query restyle its own grid-template-columns/areas (that
   would be self-referential sizing), so it silently no-ops. 620px is
   calibrated to match .dash-main's own 640px stacked max-width minus its
   horizontal screen padding, so the two breakpoints never disagree — which
   is what caused the original overlap/overflow bug. */
@media (min-width: 620px) {
  .dash-cards.bento-grid {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    grid-template-areas:
      "photo quote"
      "photo founder"
      "photo music"
      "animal animal";
  }
}

.bento-area-photo { grid-area: photo; }
.bento-area-quote { grid-area: quote; }
.bento-area-founder { grid-area: founder; }
.bento-area-music { grid-area: music; }
.bento-area-animal { grid-area: animal; }

/* ── Profile photo card — the hero ── */
.dash-card--profile {
  background: #0a0a16;
  border: none;
  padding: 0;
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  border-radius: 24px;
  /* A hard spread ring here would bleed a few px past the card's true
     edge and throw off the visual top-alignment with the quote card
     next to it — use a soft blur glow instead, which fades gradually
     rather than reading as a second edge. */
  box-shadow:
    0 0 0 1px rgba(242,202,0,0.55),
    0 0 26px rgba(242,202,0,0.16),
    0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 10;
  box-sizing: border-box;
}

@media (min-width: 620px) {
  .dash-card--profile { aspect-ratio: unset; }
}

.profile-photo-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-card--profile:hover .profile-photo {
  transform: scale(1.035);
}

/* Gradient scrim + engraved name, anchored to the bottom of the photo */
.profile-name-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30% 22px 20px;
  background: linear-gradient(to top,
    rgba(2,2,10,0.92) 0%,
    rgba(2,2,10,0.75) 32%,
    rgba(2,2,10,0.28) 70%,
    transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.profile-firstname-script {
  font-family: 'Pinyon Script', var(--f-hand), cursive;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  color: var(--supernova);
  text-shadow: 0 2px 18px rgba(242,202,0,0.35), 0 1px 2px rgba(0,0,0,0.6);
}

.profile-lastname-block {
  font-family: var(--f-sans);
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  font-weight: 600;
  letter-spacing: 3.5px;
  color: rgba(255,255,255,0.88);
}

.profile-name-separator {
  margin: 6px 0 2px;
  opacity: 0.85;
}

/* ── Shared glass info card ── */
.info-card {
  position: relative;
  min-height: 0;
  padding: clamp(18px, 2.2vw, 26px);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  border-radius: 20px;
}

.info-card:hover {
  transform: translateY(-2px);
}

/* Signature hairline — a quiet, consistent accent tying every
   bento card together without competing with its content. */
.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 16%; right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242,202,0,0.6), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.info-title {
  letter-spacing: 2px;
  font-size: 0.72rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  display: block;
}

.info-content {
  line-height: 1.6;
  font-size: 0.95rem;
  color: #ffffff;
}

/* ── Founder card: a true two-column composition — centered text
   column, real photo column — no circle, edges feathered into the
   card so the photo reads as part of the surface, not a pasted-on
   thumbnail. ── */
.founder-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: clamp(16px, 2.6vw, 28px);
}

.founder-info-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  min-width: 0;
}

.founder-photo-wrap {
  position: relative;
  width: clamp(92px, 12vw, 134px);
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
}

.founder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(0.94) contrast(1.03);
  -webkit-mask-image: radial-gradient(ellipse 82% 88% at 50% 42%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 82% 88% at 50% 42%, #000 62%, transparent 100%);
}

/* ── Animal card: same two-column idea — centered text column,
   PNG cutout column, no boxed background so it blends into the
   card instead of sitting in a little frame. ── */
.animal-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: clamp(16px, 2.6vw, 28px);
}

.animal-info-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 0;
}

.animal-graphic-wrap {
  position: relative;
  width: clamp(118px, 14vw, 178px);
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5)) saturate(1.02);
  -webkit-mask-image: radial-gradient(ellipse 92% 92% at 50% 50%, #000 68%, transparent 100%);
          mask-image: radial-gradient(ellipse 92% 92% at 50% 50%, #000 68%, transparent 100%);
}

.card-content-wrap {
  flex: 1;
  min-width: 0;
}

.card-content-wrap.flex-row-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.flex-column-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.flex-avatar-right {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
}
.flex-avatar-right.justify-center {
  justify-content: center;
}

.card-quote {
  font-family: var(--f-serif);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-style: italic;
  line-height: 1.42;
  color: rgba(255,255,255,0.94);
  overflow-wrap: break-word;
  position: relative;
  z-index: 1;
}

/* Big watermark quotation mark centered behind the text — makes the
   quote card read as a centered editorial pull-quote. */
.bento-area-quote::after {
  content: '\201C';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-serif);
  font-size: 4.6rem;
  line-height: 1;
  color: rgba(242, 202, 0, 0.16);
  pointer-events: none;
  z-index: 0;
}
.bento-area-quote .card-content-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Founder text styles */
.founder-title-text {
  font-family: var(--f-serif);
  font-size: clamp(0.96rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.founder-sub-text {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.animal-label-wrap {
  margin-bottom: 2px;
}
.animal-title-text {
  font-family: var(--f-serif);
  font-size: clamp(0.96rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

/* Song visualizer & controls */
.card-song-title {
  font-family: var(--f-serif);
  font-size: clamp(0.96rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-player {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.mini-player__btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--supernova);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.mini-player__btn:hover { transform: scale(1.1); }
.mini-player__bar { flex: 1; display: flex; align-items: center; min-width: 0; }
.mini-player__range {
  width: 100%; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}
.mini-player__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--supernova);
  box-shadow: 0 0 0 3px rgba(242,202,0,0.2);
}
.mini-player__range::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%; border: none;
  background: var(--supernova);
}

.mini-player__time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  font-family: var(--f-sans);
  white-space: nowrap;
  margin-left: 6px;
  flex-shrink: 0;
}

.viz-canvas-mini {
  width: 48px; height: 34px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  flex-shrink: 0;
}

/* ============================================================
   SHARING MODAL OVERLAY STYLES
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 4, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.35s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 90%;
  max-width: 460px;
  padding: 32px 24px;
  position: relative;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-color: rgba(242, 202, 0, 0.15);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.modal-close-btn:hover {
  color: var(--supernova);
}

.modal-title {
  font-family: var(--f-serif);
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}

.modal-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  line-height: 1.4;
  padding: 0 10px;
}

.modal-share-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.modal-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, transform 0.2s;
}
.modal-share-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
}

.modal-share-btn.share-wa:hover   { background: rgba(37, 211, 102, 0.18); border-color: #25d366; }
.modal-share-btn.share-li:hover   { background: rgba(0, 119, 181, 0.18); border-color: #0077b5; }
.modal-share-btn.share-fb:hover   { background: rgba(24, 119, 242, 0.18); border-color: #1877f2; }
.modal-share-btn.share-copy:hover { background: rgba(5, 195, 222, 0.18); border-color: var(--eggblue); }
.modal-share-btn.share-download {
  grid-column: span 2;
  background: var(--supernova);
  color: #000;
  font-weight: 700;
  border-color: transparent;
  margin-top: 6px;
}
.modal-share-btn.share-download:hover {
  background: #ffd633;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   (dash-main / bento-grid responsiveness now lives with each
   component above — .dash-main's own breakpoint and the
   .bento-grid container query — so it can't drift out of sync)
   ============================================================ */
@media (max-width: 500px) {
  .search-field {
    flex-wrap: wrap; border-radius: 16px; padding: 14px;
    gap: 10px; justify-content: center;
  }
  .search-field__icon { display: none; }
  #search-input { width: 100%; text-align: center; }
  .btn-discover { width: 100%; justify-content: center; }

  .envelope-3d { width: 90vw; height: calc(90vw * 0.67); }
}
