@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --pink: #ef9acb;
  --purple: #9671d1;
  --ink: #503a6b;
  --muted: #8b789c;
  --gold: #e8bd75;
  --border: #e9d9f0;
  --glass: rgba(255,255,255,.78);
  --shadow: 0 16px 45px rgba(116,82,152,.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #ffebf5, #f9f1ff 42%, #e9f3ff 77%, #fff5df);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ae75d3;
  outline-offset: 3px;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

/* FONDO */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 25%,#ffd2ea99,transparent 35%),
    radial-gradient(circle at 83% 30%,#b2c5ff80,transparent 36%),
    radial-gradient(circle at 50% 85%,#ffe2b880,transparent 40%);
}

/* NAVEGACIÓN */
.topbar {
  min-height: 84px;
  padding: 17px clamp(20px,5vw,80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff80;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #ffffffb0;
  position: relative;
  z-index: 5;
}

.brand {
  font-weight: 800;
  letter-spacing: 3px;
  color: #aa70be;
  white-space: nowrap;
}

.brand strong { color: #62477f; }

.topbar nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-button, .nav-link {
  border: 1px solid #e4d2ee;
  border-radius: 30px;
  padding: 11px 17px;
  background: #ffffffc9;
  color: #73588d;
  font-size: .85rem;
  transition: .25s;
}

.nav-button:hover, .nav-link:hover {
  background: #f3dafa;
  transform: translateY(-2px);
}

/* PORTADA */
.hero {
  min-height: calc(100vh - 84px);
  padding: 85px 20px 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.eyebrow {
  font-size: .72rem;
  letter-spacing: 3px;
  font-weight: 800;
  line-height: 1.6;
  color: #a679b8;
  text-transform: uppercase;
}

.star-symbol {
  margin: 20px auto;
  font-size: clamp(6rem,12vw,10rem);
  line-height: 1;
  color: #e6b875;
  text-shadow: 0 0 40px #f6c991a6;
  animation: starPulse 4s ease-in-out infinite;
}

@keyframes starPulse {
  0%,100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(15deg); }
}

.hero h1 {
  max-width: 1100px;
  margin: 18px auto;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3rem,7vw,6.3rem);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -2px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg,#a36cc8,#ed8eb9,#d2a06a);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 700px;
  margin: 10px auto 30px;
  color: var(--muted);
  line-height: 1.85;
  font-size: 1.1rem;
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 14px 26px;
  border: none;
  border-radius: 30px;
  color: #563963;
  background: linear-gradient(115deg,#edb0e1,#f5d5a1);
  font-weight: 800;
  box-shadow: 0 12px 28px #cf8fb65c;
  transition: transform .25s, box-shadow .25s;
}

.primary-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px #c88faf80;
}

.primary-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.scroll-hint {
  margin-top: 45px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: #a48ab3;
}

/* GIRASOLES */
.floating-sunflower {
  position: absolute;
  font-size: clamp(2.3rem, 4vw, 4rem);
  opacity: .82;
  filter: drop-shadow(0 10px 15px rgba(230, 183, 90, .25));
  animation: sunflowerFloat 6s ease-in-out infinite;
  pointer-events: none;
}

.sunflower-1 { left: 7%; top: 18%; animation-delay: 0s; }
.sunflower-2 { right: 10%; top: 25%; animation-delay: 1.5s; }
.sunflower-3 { left: 16%; bottom: 16%; animation-delay: 3s; }

@keyframes sunflowerFloat {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

/* SECCIONES */
.galaxy, .vault, .private-space {
  padding: 90px clamp(18px,5vw,80px);
}

.section-heading {
  max-width: 900px;
  margin: 0 auto 50px;
  text-align: center;
}

.section-heading h2 {
  margin: 12px 0 18px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem,5vw,4.4rem);
  font-weight: 500;
  line-height: 1.2;
}

.section-heading p {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ESPACIO PERSONAL */
.private-space {
  background: linear-gradient(140deg, rgba(255,244,238,.6), rgba(255,249,223,.45), rgba(245,235,255,.55));
}

.private-shell {
  max-width: 1350px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr);
  gap: 28px;
  align-items: start;
}

.private-left,
.private-right {
  min-width: 0;
}

.private-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.private-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid #ecd8c6;
  color: #936d61;
  font-size: .83rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.private-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.2fr) 250px;
  gap: 20px;
  align-items: center;
  padding: 30px;
  border: 1px solid #ead7ef;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,247,225,.78), rgba(250,241,255,.85));
  box-shadow: 0 25px 55px rgba(180, 146, 202, .18);
  margin-bottom: 24px;
}

.private-hero-copy h3 {
  margin: 10px 0 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  color: #5a416e;
}

.private-hero-copy p {
  margin: 0;
  color: #8b7797;
  line-height: 1.8;
}

.private-quote {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid #f2d7c6;
  color: #8b5f67;
  font-weight: 700;
  line-height: 1.7;
}

.sunflower-garden {
  position: relative;
  min-height: 230px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sunflower-main {
  font-size: 6rem;
  animation: bloom 5.5s ease-in-out infinite;
  filter: drop-shadow(0 16px 20px rgba(237,186,96,.25));
}

.sunflower-small {
  position: absolute;
  font-size: 2.2rem;
  animation: sway 4s ease-in-out infinite;
}

.sunflower-small.s1 { top: 18px; left: 24px; animation-delay: 0s; }
.sunflower-small.s2 { top: 48px; right: 18px; animation-delay: 1s; }
.sunflower-small.s3 { bottom: 28px; left: 42px; animation-delay: 2s; }
.sunflower-small.s4 { bottom: 18px; right: 46px; animation-delay: 1.6s; }

@keyframes bloom {
  0%,100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(2deg); }
}

@keyframes sway {
  0%,100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

.private-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
}

.private-card {
  padding: 24px;
  border: 1px solid #e7d8ef;
  border-radius: 26px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  transition: transform .28s, box-shadow .28s;
}

.private-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 40px rgba(177,144,201,.22);
}

.private-card-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  margin-bottom: 14px;
  background: linear-gradient(130deg, #fff2cf, #ffe8f4, #e6ebff);
  font-size: 1.6rem;
  box-shadow: 0 10px 22px rgba(207,177,103,.18);
}

.private-card h3 {
  margin: 0 0 10px;
  color: #5c426f;
  font-size: 1.08rem;
}

.private-card p {
  margin: 0;
  color: #8b7899;
  line-height: 1.8;
  font-size: .95rem;
}

.private-right {
  display: grid;
  gap: 20px;
}

.private-panel {
  padding: 24px;
  border: 1px solid #ead9ef;
  border-radius: 26px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
}

.private-panel h3 {
  margin: 10px 0 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: #5b416e;
}

.glow-panel {
  background:
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,248,213,.7), rgba(255,255,255,.82));
}

.heart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.heart-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #866f97;
  line-height: 1.6;
}

.heart-list span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg,#fff1c9,#ffe6f1);
  box-shadow: inset 0 0 0 1px #f0dcb1;
}

.quote-panel blockquote {
  margin: 12px 0 0;
  padding: 0;
  color: #9a6b6e;
  line-height: 1.9;
  font-weight: 700;
  font-size: 1rem;
}

.goal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed #ecdceb;
}

.goal-item:last-child {
  border-bottom: none;
}

.goal-item span {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#fff1cd,#ffe5f3,#e8ecff);
  font-size: 1.1rem;
}

.goal-item strong {
  display: block;
  color: #5c446e;
}

.goal-item small {
  display: block;
  margin-top: 3px;
  color: #927fa0;
  line-height: 1.6;
}

/* PROGRESO */
.journey-meter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  max-width: 660px;
  margin: 0 auto 45px;
  padding: 19px 25px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  color: #81669a;
}

.journey-meter strong { color: #a36ac1; }

.meter-track {
  width: 100%;
  height: 9px;
  border-radius: 30px;
  overflow: hidden;
  background: #eadcf2;
}

#meterFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#d79ce7,#f3ca81);
  transition: width .5s;
}

/* PLANETAS HISTORIA */
.planet-grid {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(195px,1fr));
  gap: 24px;
}

.planet-grid > * {
  --planet-light: #ffe4f5;
  --planet-main: #eea2d5;
  --planet-dark: #8562b9;
  --planet-glow: #d492d5;
  --ring-color: #ffe8fa;

  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 280px;
  padding: 27px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
  border: 1px solid #ead9f1;
  border-radius: 28px;
  color: #594273;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .35s, box-shadow .35s;
}

.planet-grid > *:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 50px #ad92c968;
}

.planet-grid > *:nth-child(1) {
  --planet-light: #fff8d1;
  --planet-main: #f1c77d;
  --planet-dark: #b17c74;
  --planet-glow: #f6ca7e;
  --ring-color: #fff1ca;
}
.planet-grid > *:nth-child(2) {
  --planet-light: #ffe5f4;
  --planet-main: #ff9acb;
  --planet-dark: #a75eaf;
  --planet-glow: #f6a0ce;
  --ring-color: #ffe8ff;
}
.planet-grid > *:nth-child(3) {
  --planet-light: #ddffff;
  --planet-main: #77d7e9;
  --planet-dark: #3e77c3;
  --planet-glow: #87e2ef;
  --ring-color: #d6fcff;
}
.planet-grid > *:nth-child(4) {
  --planet-light: #e8e0ff;
  --planet-main: #aaa0f8;
  --planet-dark: #6548b1;
  --planet-glow: #b4a6ff;
  --ring-color: #e7d9ff;
}
.planet-grid > *:nth-child(5) {
  --planet-light: #fff0e0;
  --planet-main: #f8aab6;
  --planet-dark: #ca729f;
  --planet-glow: #ffbdba;
  --ring-color: #ffe3db;
}
.planet-grid > *:nth-child(6) {
  --planet-light: #fff8dd;
  --planet-main: #f5cf79;
  --planet-dark: #db9677;
  --planet-glow: #ffd689;
  --ring-color: #fff6c8;
}
.planet-grid > *:nth-child(7) {
  --planet-light: #f0fbff;
  --planet-main: #a2beff;
  --planet-dark: #716bd3;
  --planet-glow: #b2cbff;
  --ring-color: #e6faff;
}

.planet-grid > *::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--planet-glow) 0%, transparent 72%);
  filter: blur(13px);
  opacity: .48;
  pointer-events: none;
  z-index: -1;
}

.planet-grid > *:hover::before { opacity: .8; }

.planet-grid > * :is(.planet,.planet-orb,.planet-visual,.planet-sphere) {
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 26% 18%, #ffffffd9 0%, transparent 24%),
    radial-gradient(circle at 34% 27%, var(--planet-light) 1%, var(--planet-main) 48%, var(--planet-dark) 95%);
  box-shadow:
    inset -17px -16px 25px #29204a36,
    inset 6px 7px 20px #ffffff99,
    0 12px 27px var(--planet-glow);
  animation: planetFloat 5s ease-in-out infinite;
  overflow: visible;
}

.planet-grid > * :is(.planet,.planet-orb,.planet-visual,.planet-sphere)::before {
  content: '';
  position: absolute;
  top: 36%;
  left: -20%;
  width: 140%;
  height: 33%;
  box-sizing: border-box;
  border: 5px solid var(--ring-color);
  border-left-color: #ffffffcf;
  border-bottom-color: #ffffffa9;
  border-radius: 50%;
  transform: rotate(-24deg);
  box-shadow: 0 0 12px var(--ring-color), inset 0 0 7px #ffffffa6;
  pointer-events: none;
}

.planet-grid > * :is(.planet,.planet-orb,.planet-visual,.planet-sphere)::after {
  content: '';
  position: absolute;
  inset: 17%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 27%,#ffffff40 0 13%,transparent 18%),
    radial-gradient(ellipse at 70% 65%,#ffffff29 0 16%,transparent 22%),
    linear-gradient(160deg,transparent 38%,#ffffff17 40% 47%,transparent 49%);
  pointer-events: none;
}

@keyframes planetFloat {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.planet-grid > *:nth-child(2) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -.9s; }
.planet-grid > *:nth-child(3) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -1.8s; }
.planet-grid > *:nth-child(4) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -2.7s; }
.planet-grid > *:nth-child(5) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -3.6s; }
.planet-grid > *:nth-child(6) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -1.4s; }
.planet-grid > *:nth-child(7) :is(.planet,.planet-orb,.planet-visual,.planet-sphere) { animation-delay: -2.3s; }

.planet-grid strong,
.planet-grid b {
  font-size: 1rem;
  color: #503966;
}

.planet-grid small {
  font-size: .8rem;
  color: #9381a2;
}

.journey-actions {
  text-align: center;
  margin-top: 34px;
}

.subtle-button {
  padding: 12px 21px;
  border: 1px solid #dfcbe9;
  border-radius: 28px;
  background: #ffffffd9;
  color: #82649a;
  font-weight: 700;
}

.subtle-button:hover { background: #f3e5fb; }

.coming-soon {
  max-width: 700px;
  margin: 30px auto;
  text-align: center;
  color: #9985a7;
  line-height: 1.7;
}

/* PLANETAS PERSONALES */
.vault {
  background: linear-gradient(130deg,#ffeaf4a3,#e9e8ffa3,#fff6df99);
}

.vault-warning {
  max-width: 900px;
  margin: -12px auto 40px;
  padding: 17px 23px;
  border: 1px solid #eed8b8;
  border-radius: 16px;
  background: #fff8eddb;
  color: #977852;
  line-height: 1.7;
  font-size: .85rem;
}

.archive-planets {
  max-width: 1250px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 26px;
}

.archive-world {
  min-height: 300px;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e7d5ee;
  border-radius: 30px;
  background: #ffffffcf;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}

.archive-world:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 50px #b99dd15c;
}

.archive-world strong { font-size: 1.1rem; }
.archive-world small { color: #9684a2; }

.world-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: white;
  font-size: 2.6rem;
  animation: planetFloat 5s ease-in-out infinite;
  box-shadow: inset -16px -17px 25px #46326348, 0 13px 32px #c9abdf78;
}

.world-circle::after {
  content: '';
  position: absolute;
  inset: 35px -20px;
  border: 4px solid #ffffffc9;
  border-radius: 50%;
  transform: rotate(-23deg);
  pointer-events: none;
}

.world-pink {
  background: radial-gradient(circle at 30% 20%,#fff4fa,#f1a1d1 48%,#925cb0);
}

.world-blue {
  background: radial-gradient(circle at 30% 20%,#f3ffff,#9bd8f4 48%,#5f83c6);
}

.world-gold {
  background: radial-gradient(circle at 30% 20%,#fff9e4,#f2cd8d 48%,#bf8e76);
}

.world-action {
  padding: 11px 18px;
  border-radius: 26px;
  background: #f4e0f9;
  color: #9564ad;
  font-size: .8rem;
  font-weight: 800;
}

.vault-status {
  text-align: center;
  min-height: 24px;
  margin: 25px auto 0;
  color: #9365ad;
  font-weight: 700;
}

/* MODALES */
dialog {
  border: 1px solid #e9d8f1;
  border-radius: 27px;
  color: var(--ink);
  background: linear-gradient(140deg,#fffbff,#f5eefe,#edf5ff);
  box-shadow: 0 35px 100px #4a345d70;
}

dialog:not([open]) { display: none; }

dialog::backdrop {
  background: #26153b9c;
  backdrop-filter: blur(7px);
}

.archive-dialog, #planetDialog {
  width: min(630px,94vw);
  max-width: 94vw;
  max-height: 90dvh;
  padding: 32px;
  overflow-y: auto;
}

.archive-dialog h2, #planetDialog h2 {
  margin: 12px 0 24px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem,4vw,2.7rem);
  font-weight: 500;
}

.dialog-close, .world-close {
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  color: #73568a;
  background: #efdef5;
  font-size: 1.1rem;
  cursor: pointer;
}

.dialog-close { float: right; }

.dialog-close:hover,
.world-close:hover {
  background: #e4c8ee;
}

/* MODAL GALERÍA */
.world-dialog {
  width: min(1200px,96vw);
  max-width: 96vw;
  height: min(820px,92dvh);
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
}

.world-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 25px 30px;
  background: #ffffffc9;
  border-bottom: 1px solid #e7d7ee;
}

.world-heading {
  display: flex;
  align-items: center;
  gap: 17px;
}

.world-small-orb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  background: radial-gradient(circle at 30% 20%,#fff5fd,#daa0e8,#9667bb);
}

.world-heading h2 {
  margin: 4px 0;
  font: 500 clamp(1.4rem,3vw,2.1rem) 'Playfair Display', Georgia, serif;
}

.world-heading p {
  margin: 0;
  color: #9681a0;
  font-size: .86rem;
}

.world-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.world-add-button {
  padding: 13px 21px;
  border: none;
  border-radius: 27px;
  background: linear-gradient(110deg,#a675c5,#e999c6);
  color: white;
  font-weight: 800;
}

.world-add-button:hover { filter: brightness(1.07); }

.world-modal-content {
  height: calc(100% - 130px);
  padding: 26px 30px;
  overflow-y: auto;
}

.world-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 25px;
  color: #917b9f;
  font-size: .88rem;
}

.world-toolbar input {
  width: min(100%,310px);
  padding: 12px 15px;
  border: 1px solid #ddc9e9;
  border-radius: 14px;
  background: white;
  color: var(--ink);
}

/* TARJETAS GALERÍA */
.memory-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
  gap: 19px;
}

.memory-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #eadbf1;
  border-radius: 19px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 7px 24px #b99bd532;
  transition: transform .25s, box-shadow .25s;
}

.memory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px #af91cc66;
}

.memory-thumb {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: cover;
  background: #f1e5f9;
}

.file-thumb {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #a379bf;
  background: linear-gradient(135deg,#ffeaf7,#e1ecff);
}

.memory-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 13px;
}

.memory-info strong {
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.memory-info small {
  color: #9f8bac;
  font-size: .7rem;
}

.empty-memories {
  grid-column: 1 / -1;
  padding: 60px 20px;
  border: 2px dashed #dec8e8;
  border-radius: 22px;
  background: #ffffff99;
  text-align: center;
  color: #9781a8;
}

/* FORMULARIOS */
.vault-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.vault-panel label {
  color: #795f91;
  font-size: .86rem;
  font-weight: 700;
}

.vault-panel input,
.vault-panel textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #decae9;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  outline-color: #b787d0;
}

.vault-panel textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.65;
}

.vault-panel small {
  font-size: .74rem;
  color: #a18eae;
}

.vault-panel .primary-button {
  margin-top: 8px;
  width: 100%;
}

/* DETALLE RECUERDOS */
.memory-dialog {
  width: min(660px,94vw);
  max-height: 90dvh;
  overflow-y: auto;
}

.memory-preview { margin: 12px 0 23px; }

.memory-preview img {
  display: block;
  width: 100%;
  max-height: 55dvh;
  object-fit: contain;
  border-radius: 18px;
  background: #f3e8f9;
}

.large-file-icon {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 20px;
  background: #f1e4f8;
  color: #a679bb;
  font-size: 3.4rem;
}

#memoryDescription {
  white-space: pre-wrap;
  line-height: 1.8;
  color: #79668c;
}

.entry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.entry-actions a,
.entry-actions button {
  padding: 11px 17px;
  border: 1px solid #dfcbe9;
  border-radius: 25px;
  background: white;
  color: #7b598f;
  font-weight: 700;
}

/* MODAL HISTORIA */
#planetDialog { text-align: center; }

.dialog-planet {
  width: 130px;
  height: 130px;
  margin: 15px auto 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%,#ffffff,#f4b8df,#9470bd);
  box-shadow: 0 13px 35px #b796d57a;
}

#dialogText {
  line-height: 1.8;
  color: #806c90;
}

.scene-memory {
  padding: 22px;
  margin: 20px auto;
  border-radius: 17px;
  background: #f4e8fa;
  color: #806c92;
  line-height: 1.75;
}

.dialog-footnote {
  color: #9d88ad;
  font-size: .83rem;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 25px;
}

/* PIE */
footer {
  padding: 40px 20px;
  text-align: center;
  background: #ffffff87;
  border-top: 1px solid #e7d8ed;
  color: #9681a8;
  font-size: .84rem;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .private-shell {
    grid-template-columns: 1fr;
  }

  .private-right {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .private-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .archive-planets {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .planet-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .private-card-grid {
    grid-template-columns: 1fr;
  }

  .private-right {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand { font-size: .8rem; }

  .nav-button, .nav-link {
    padding: 9px 11px;
    font-size: .75rem;
  }

  .hero {
    min-height: 77vh;
    padding: 65px 17px 45px;
  }

  .hero h1 {
    font-size: clamp(2.35rem,10vw,3.6rem);
    letter-spacing: -1px;
  }

  .hero p { font-size: .95rem; }

  .galaxy, .vault, .private-space {
    padding: 65px 17px;
  }

  .floating-sunflower {
    font-size: 2rem;
  }

  .planet-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
  }

  .planet-grid > * {
    min-height: 218px;
    padding: 16px 8px;
  }

  .planet-grid > * :is(.planet,.planet-orb,.planet-visual,.planet-sphere) {
    width: 95px;
    height: 95px;
  }

  .archive-planets {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .archive-world { min-height: 260px; }

  .world-circle { width: 112px; height: 112px; }

  .world-dialog {
    width: 98vw;
    max-width: 98vw;
    height: 95dvh;
    max-height: 95dvh;
  }

  .world-modal-header {
    padding: 17px;
    align-items: flex-start;
  }

  .world-heading { gap: 10px; }

  .world-small-orb {
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
  }

  .world-heading h2 { font-size: 1.4rem; }
  .world-heading p { font-size: .76rem; }

  .world-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .world-add-button {
    padding: 11px 15px;
    font-size: .8rem;
  }

  .world-modal-content {
    height: calc(100% - 180px);
    padding: 17px;
  }

  .world-toolbar input { width: 100%; }

  .memory-gallery {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
  }

  .memory-thumb { height: 130px; }

  .archive-dialog, #planetDialog { padding: 23px; }

  .private-hero-card {
    padding: 22px;
  }

  .sunflower-main {
    font-size: 4.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}