/* HENNLEY · Amigo invisible. Estilos de la versión final. */

:root {
  color-scheme: dark;
}

:root[data-theme=light] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  min-height: 100dvh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:disabled {
  opacity: .4;
  cursor: default;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--accent);
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 1px;
}

.brand svg {
  height: 34px;
  width: 22px;
  fill: currentColor;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  font-weight: normal;
  margin-top: 5px;
}

.icon-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.home {
  max-width: 1056px;
  margin: auto;
  padding: 56px 32px 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

h1 {
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 66px);
  line-height: 1.04;
  letter-spacing: -2.3px;
  margin: 24px 0;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 400px;
}

.button {
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--white);
  padding: 16px 22px;
  min-height: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  transition: filter .2s, transform .2s;
}

.button:hover {
  filter: brightness(1.12);
}

.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 10px 0;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

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

.hero-art {
  height: 368px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 120px 120px 18px 18px;
  background: var(--surface);
  overflow: hidden;
}

.hero-art:before {
  content: '';
  position: absolute;
  width: 270px;
  height: 270px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.hero-art:after {
  content: '';
  position: absolute;
  width: 324px;
  height: 324px;
  border: 1px dashed var(--border);
  border-radius: 50%;
}

.envelope {
  position: relative;
  width: 235px;
  height: 165px;
  background: var(--cream);
  border-radius: 10px;
  box-shadow: 0 18px 35px var(--shadow);
  transform: rotate(-9deg);
  z-index: 1;
  color: var(--ink);
  overflow: hidden;
}

.envelope:before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 65%);
  background: #c9bfa9;
}

.envelope:after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 0 10%, 50% 65%, 100% 10%, 100% 100%);
  background: linear-gradient(30deg, #e2d9c5, #d8cfba);
}

.seal {
  position: absolute;
  top: 62px;
  left: 96px;
  z-index: 2;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--white);
  font-size: 24px;
  box-shadow: 0 3px 6px #0002;
}

.steps {
  max-width: 1056px;
  padding: 42px 32px 28px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.step small {
  color: var(--accent);
  font-size: 12px;
}

.step h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0 8px;
}

.step p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.saved-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  text-decoration: none;
  gap: 12px;
}

.saved-room small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.page {
  max-width: 600px;
  margin: 12px auto 50px;
  padding: 0 26px;
}

.page h1 {
  font-size: 36px;
  letter-spacing: -1.3px;
  margin: 18px 0 14px;
}

.page .lead {
  font-size: 14px;
  max-width: none;
}

.page.wide {
  max-width: 960px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

form {
  margin-top: 26px;
}

.field {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 8px;
}

input,
select,
textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  font-size: 16px;
  min-width: 0;
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.full {
  width: 100%;
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}

.panel h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 12px;
}

.panel p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.panel input,
.panel select,
.panel textarea {
  background: var(--bg);
}

.room-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: start;
}

.invite {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invite input {
  font-size: 13px;
  padding: 13px;
  flex: 1;
  min-width: 0;
}

.invite button {
  flex: none;
  padding: 13px 16px;
  min-height: 44px;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 9px;
  padding: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.info-row {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.info-row span {
  background: var(--surface);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

.join-form {
  margin-top: 18px;
}

.note-box {
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 24px 0;
}

.error {
  color: var(--white);
  background: #913f3430;
  border: 1px solid #b7683c88;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.error:empty {
  display: none;
}

.light .error {
  color: var(--text);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 8px;
}

.section-title small {
  color: var(--muted);
  font-size: 12px;
}

.loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}

footer {
  max-width: 1056px;
  margin: 24px auto 0;
  padding: 25px 32px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
}

#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 14px 20px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 9px;
  box-shadow: 0 6px 25px #0003;
  z-index: 10;
  font-size: 13px;
  text-align: center;
}

#notice:empty {
  display: none;
}

@media(max-width:720px) {
  .home {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 32px;
  }

  .home h1 {
    font-size: 52px;
    max-width: 360px;
  }

  .hero-art {
    height: 260px;
    border-radius: 80px 80px 12px 12px;
    max-width: 440px;
    width: 100%;
    margin: auto;
  }

  .hero-art:before {
    width: 210px;
    height: 210px;
  }

  .hero-art:after {
    width: 250px;
    height: 250px;
  }

  .hero-art .envelope {
    width: 190px;
    height: 135px;
  }

  .hero-art .seal {
    left: 74px;
    top: 50px;
  }

  .steps {
    padding: 20px 24px;
    gap: 16px;
  }

  .step h3 {
    font-size: 14px;
  }

  .step p {
    font-size: 12px;
  }

  .room-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page {
    padding: 0 24px;
  }

  .page h1 {
    font-size: 32px;
  }

  .page-heading {
    gap: 10px;
  }

  .panel {
    padding: 20px;
  }

  footer {
    padding: 24px;
    flex-wrap: wrap;
  }
}

@media(max-width:380px) {
  .home h1 {
    font-size: 44px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    padding: 14px 0;
  }

  .two {
    gap: 10px;
  }

  .invite {
    flex-wrap: wrap;
  }

  .invite input {
    width: 100%;
    flex-basis: 100%;
  }

  .page-heading {
    flex-wrap: wrap;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,
*:before,
*:after {
    animation: none !important;
    transition: none !important;
  }
}

:root[data-theme=light] .error {
  color: var(--text);
}

.button:not(.secondary),
.seal {
  background: var(--action);
}

.envelope:before {
  background: #ded0b0;
}

.envelope:after {
  background: linear-gradient(30deg, #fff3da, #eadbbc);
}

.error {
  color: var(--text);
  background: #a62f3d20;
  border-color: var(--action);
}

:root {
  --bg: #507273;
  --text: #f0e8d1;
  --muted: #e0e0ce;
  --surface: #446364;
  --border: #829996;
  --accent: #f0d4a5;
  --action: #b94f40;
  --cream: #e6ddc5;
  --ink: #253f3d;
  --white: #fff8ed;
  --shadow: #263f3d25;
  --layer1: #4b6c6e;
  --layer2: #466769;
  --layer3: #426163;
  --layer4: #3d5b5d;
  --layer5: #385557;
}

:root[data-theme=light] {
  --bg: #f2eddd;
  --text: #365859;
  --muted: #496360;
  --surface: #e3e3d4;
  --border: #9baea2;
  --accent: #77512b;
  --action: #b94f40;
  --shadow: #36585920;
  --layer1: #e8e8da;
  --layer2: #dfE3d6;
  --layer3: #d5ddd1;
  --layer4: #cdd7cb;
  --layer5: #c2d0c4;
}

body {
  overflow-x: clip;
}

.brand {
  color: var(--text);
}

.brand small {
  color: var(--muted);
}

.home-organic {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  padding: 28px 24px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.home-copy,
.home-invitation {
  position: relative;
  z-index: 2;
  width: 100%;
}

.home-organic h1 {
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -1.6px;
  margin: 8px auto 16px;
  max-width: 650px;
}

.home-organic h1 em {
  color: inherit;
}

.home-organic .lead {
  max-width: 650px;
  margin: 0 auto;
  font-size: clamp(18px, 2.4vw, 23px);
  font-weight: 600;
  line-height: 1.35;
}

.mobile-break {
  display: none;
}

.home-organic .hero-art {
  position: relative;
  height: 290px;
  width: min(100%, 680px);
  max-width: none;
  margin: 12px auto 2px;
  border-radius: 0;
  background: none;
  overflow: visible;
  isolation: isolate;
}

.home-organic .hero-art:before,
.home-organic .hero-art:after {
  content: none;
}

.floating-envelope {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  animation: envelope-float 8s ease-in-out infinite;
}

.home-organic .envelope {
  display: block;
  width: 240px;
  height: 168px;
  transform: rotate(-7deg);
  box-shadow: 0 15px 26px var(--shadow);
}

.seal {
  background: var(--action);
  color: #f3dcb1;
}

.seal svg {
  fill: currentColor;
  height: 23px;
  width: 14px;
}

.home-organic .seal {
  top: 64px;
  left: 98px;
}

.home-organic .invitation-line {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  margin: 8px 0 18px;
  color: var(--text);
}

.home-organic .actions {
  justify-content: center;
  margin: 0 auto;
  gap: 10px;
  max-width: 490px;
}

.home-organic .actions .button {
  flex: 1;
  padding: 16px 18px;
  font-size: 14px;
  min-height: 52px;
}

.home-organic .secondary {
  background: #b5bdb0;
  color: #253f3d;
  border: 0;
}

.home-organic #demo {
  font-size: 12px;
  margin-top: 8px;
  color: var(--muted);
}

.organic-backdrop {
  position: absolute;
  left: 50%;
  top: 49%;
  width: 1000px;
  height: 900px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.organic-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border: 1px solid #ffffff04;
  will-change: transform, border-radius;
  animation: organic-drift var(--period) ease-in-out var(--offset) infinite alternate;
  border-radius: 44% 56% 51% 49% / 49% 42% 58% 51%;
}

.layer-1 {
  width: 100%;
  height: 100%;
  background: var(--layer1);
  --period: 38s;
  --offset: -12s;
}

.layer-2 {
  width: 83%;
  height: 85%;
  background: var(--layer2);
  --period: 32s;
  --offset: -20s;
}

.layer-3 {
  width: 67%;
  height: 70%;
  background: var(--layer3);
  --period: 28s;
  --offset: -7s;
}

.layer-4 {
  width: 51%;
  height: 53%;
  background: var(--layer4);
  --period: 25s;
  --offset: -16s;
}

.layer-5 {
  width: 36%;
  height: 36%;
  background: var(--layer5);
  --period: 22s;
  --offset: -4s;
}

body[data-view=home] .steps {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 14px 24px 24px;
  gap: 36px;
  text-align: left;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-view=home] .step {
  border: 0;
  padding: 0;
}

body[data-view=home] .step small {
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -1px;
}

body[data-view=home] .step h3 {
  font-size: 16px;
  font-weight: 650;
  margin: 8px 0 6px;
}

body[data-view=home] .step p {
  font-size: 13px;
  line-height: 1.5;
}

.saved-room {
  text-align: left;
}

.page h1,
.page>.lead,
.page-heading .eyebrow {
  text-align: center;
}

.page-heading {
  align-items: center;
}

.page-heading>div {
  flex: 1;
}

.page-heading .eyebrow {
  justify-content: center;
}

.error {
  color: var(--text);
}

footer {
  position: relative;
  z-index: 1;
}

@media(max-width:720px) {
  .home-organic {
    padding-top: 16px;
  }

  .home-organic h1 {
    font-size: 44px;
    max-width: none;
    margin: 6px auto 14px;
  }

  .home-organic .lead {
    font-size: 20px;
    max-width: 420px;
  }

  .mobile-break {
    display: block;
  }

  .home-organic .hero-art {
    height: 270px;
    margin-top: 4px;
  }

  .home-organic .envelope {
    width: 215px;
    height: 150px;
  }

  .home-organic .seal {
    left: 87px;
    top: 57px;
    width: 41px;
    height: 41px;
  }

  .organic-backdrop {
    width: 660px;
    height: 700px;
    top: 46%;
  }

  .home-organic .invitation-line {
    font-size: 14px;
    margin-top: 0;
  }

  .home-organic .actions {
    max-width: 430px;
  }

  .home-organic .actions .button {
    padding: 14px 8px;
    font-size: 13px;
  }

  body[data-view=home] .steps {
    gap: 22px;
    padding-top: 10px;
  }

  body[data-view=home] .step h3 {
    font-size: 14px;
  }

  body[data-view=home] .step p {
    font-size: 12px;
  }

  footer {
    margin-top: 12px;
  }
}

@media(max-width:380px) {
  .home-organic h1 {
    font-size: 39px;
  }

  .home-organic .lead {
    font-size: 18px;
  }

  .home-organic .hero-art {
    height: 245px;
  }

  .home-organic .envelope {
    width: 195px;
    height: 137px;
  }

  .home-organic .seal {
    left: 77px;
    top: 51px;
  }

  body[data-view=home] .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
  }

  .home-organic .actions .button {
    font-size: 12px;
  }

  body[data-view=home] .step small {
    font-size: 28px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .organic-layer,
.floating-envelope {
    animation: none !important;
    will-change: auto;
  }
}

html {
  overflow-x: hidden;
}

.site-footer {
  border: 0;
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer .brand {
  color: var(--text);
  font-size: 14px;
  gap: 8.4px;
  letter-spacing: .7px;
  text-decoration: none;
}

.site-footer .brand svg {
  height: 23.8px;
  width: 15.4px;
  flex: none;
}

.site-footer .brand small {
  font-size: 7.7px;
  letter-spacing: 0;
  margin-top: 3.5px;
  font-weight: normal;
  color: var(--muted);
}

.site-footer .brand>span {
  line-height: 1.2;
}

.site-footer .icon-button {
  flex: none;
}

.home-organic {
  padding-top: 36px;
}

@media(max-width:720px) {
  .home-organic {
    padding-top: 32px;
  }

  .site-footer {
    padding-top: 34px;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#app {
  flex: 1;
  position: relative;
  z-index: 1;
}

.site-footer {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

.site-footer .brand {
  font-size: 15.4px;
  gap: 9.24px;
  letter-spacing: .77px;
}

.site-footer .brand svg {
  height: 26.18px;
  width: 16.94px;
}

.site-footer .brand small {
  font-size: 8.47px;
  margin-top: 3.85px;
}

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

.icon-button svg {
  display: block;
  width: 20px;
  height: 20px;
}

body[data-view=home] .step p,
.home-copy .lead {
  opacity: .7;
}

.home-organic {
  padding-bottom: 36px;
}

.home-organic h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.06;
  text-shadow: 0 1px 0 currentColor;
}

.home-copy .lead {
  margin-top: 20px;
}

.floating-envelope {
  animation: envelope-float 9s ease-in-out infinite;
}

@keyframes envelope-float {
  0%,
100% {
    transform: translate(0, 7px) rotate(-3deg);
  }

  35% {
    transform: translate(4px, -10px) rotate(3.5deg);
  }

  70% {
    transform: translate(-3px, -4px) rotate(.5deg);
  }
}

.screen-snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

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

.snow-flake {
  position: absolute;
  display: block;
  width: var(--size);
  height: var(--size);
  background: #fff9e6;
  border-radius: 50%;
  opacity: 0;
  animation: snow-appear var(--duration) ease-in-out var(--delay) infinite;
  will-change: transform, opacity;
}

@keyframes snow-appear {
  0%,
100% {
    transform: translate(-7px, -30px);
    opacity: 0;
  }

  18% {
    opacity: 0;
  }

  34% {
    opacity: var(--strength);
  }

  58% {
    opacity: var(--strength);
  }

  78% {
    transform: translate(10px, 40px);
    opacity: 0;
  }
}

@media(max-width:720px) {
  .home-organic {
    padding-bottom: 34px;
  }

  .home-organic h1 {
    font-size: 44px;
  }

  .site-footer {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

@media(max-width:380px) {
  .home-organic h1 {
    font-size: 39px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .snow-flake {
    animation: none;
    opacity: calc(var(--strength)*.5);
    will-change: auto;
  }
}

.organic-anchor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform-origin: center;
}

.hero-art .organic-backdrop {
  left: 50%;
  top: 50%;
  z-index: 0;
}

.home-organic .envelope {
  width: 264px;
  height: 184.8px;
}

.home-organic .seal {
  width: 48.4px;
  height: 48.4px;
  left: 107.8px;
  top: 70.4px;
}

.home-organic .seal svg {
  width: 15.4px;
  height: 25.3px;
}

@keyframes organic-drift {
  0% {
    border-radius: 38.3% 61.7% 51.95% 48.05% / 48.05% 34.4% 65.6% 51.95%;
    transform: rotate(-9.75deg) scale(.961);
  }

  50% {
    border-radius: 55.85% 44.15% 38.3% 61.7% / 40.25% 59.75% 40.25% 59.75%;
    transform: rotate(1.95deg) scale(1.039);
  }

  100% {
    border-radius: 46.1% 53.9% 63.65% 36.35% / 61.7% 38.3% 53.9% 46.1%;
    transform: rotate(11.7deg) scale(1);
  }
}

@media(max-width:720px) {
  .home-organic .envelope {
    width: 236.5px;
    height: 165px;
  }

  .home-organic .seal {
    left: 95.7px;
    top: 62.7px;
    width: 45.1px;
    height: 45.1px;
  }
}

@media(max-width:380px) {
  .home-organic .envelope {
    width: 214.5px;
    height: 150.7px;
  }

  .home-organic .seal {
    left: 84.7px;
    top: 56.1px;
    width: 45.1px;
    height: 45.1px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .organic-anchor {
    animation: none !important;
  }
}

:root {
  --title-size:clamp(40px,5.2vw,60px);
  --subtitle-size:clamp(18px,2.4vw,23px);
  --button-height:52px;
  --sand-rgb:240,232,209;
}

:root[data-theme=light] {
  --sand-rgb:119,81,43;
}

.home-organic h1,
.page h1 {
  font-family:Georgia,'Times New Roman',serif;
  font-size:var(--title-size);
  font-weight:900;
  color:var(--text);
  line-height:1.06;
  letter-spacing:-1.5px;
  text-shadow:0 1px 0 currentColor;
  text-align:center;
}

.home-organic .lead,
.page>.lead {
  font-size:var(--subtitle-size);
  font-weight:600;
  line-height:1.35;
  color:var(--text);
  opacity:.7;
  text-align:center;
  max-width:650px;
  margin-left:auto;
  margin-right:auto;
}

.button,
.home-organic .actions .button,
.invite .button {
  height:var(--button-height);
  min-height:var(--button-height);
  padding:12px 18px;
}

input,
select,
textarea {
  border:0;
  box-shadow:inset 0 0 0 0 transparent;
  outline:none;
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline:none;
  box-shadow:inset 0 0 0 2px var(--accent);
}

input::placeholder,
textarea::placeholder {
  color:rgba(var(--sand-rgb),.3);
  opacity:1;
}

input[type=date].date-empty::-webkit-datetime-edit {
  color:rgba(var(--sand-rgb),.3);
}

input[type=date] {
  min-height:48px;
}

input[type=date]::-webkit-calendar-picker-indicator {
  opacity:1;
  cursor:pointer;
}

.currency-field {
  position:relative;
}

.currency-field input {
  padding-right:48px;
}

.currency-field>span {
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text);
  pointer-events:none;
}

.currency-field input::-webkit-inner-spin-button {
  appearance:none;
}

.currency-field input {
  -moz-appearance:textfield;
}

.required-mark {
  color:var(--text);
}

.page {
  position:relative;
  isolation:isolate;
}

.page-backdrop {
  top:0;
  left:50%;
  z-index:-1;
  pointer-events:none;
}

body:has(#create-form) .site-footer,
body:has(#enter-form) .site-footer {
  display:none;
}

.page:has(#create-form),
.page:has(#enter-form) {
  width:100%;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  margin:0 auto;
  padding-top:16px;
  padding-bottom:max(24px,env(safe-area-inset-bottom));
}

.page:has(#create-form)>.ghost,
.page:has(#enter-form)>.ghost {
  align-self:flex-start;
}

#create-form,
#enter-form {
  display:flex;
  flex-direction:column;
  flex:1;
  margin-top:22px;
}

#create-form .two>div {
  display:flex;
  flex-direction:column;
}

#create-form .two .field {
  line-height:1.4;
}

#create-form .two .currency-field,
#create-form .two input[type=date] {
  margin-top:auto;
}

.form-bottom {
  margin-top:auto;
  padding-top:30px;
}

.form-bottom>.hint {
  margin:0 0 16px;
  text-align:center;
  font-size:12px;
  line-height:1.6;
}

.form-bottom .actions {
  margin:0;
}

#create-form>.error,
#enter-form>.error {
  margin-top:20px;
}

@media(max-width:720px) {
  :root {
    --title-size:44px;
    --subtitle-size:20px;
  }

  .page>.lead {
    font-size:var(--subtitle-size);
  }
}

@media(max-width:380px) {
  :root {
    --title-size:39px;
    --subtitle-size:18px;
  }
}

.page:has(#create-form)>h1,
.page:has(#enter-form)>h1 {
  margin-bottom:6px;
}

.page:has(#create-form)>.lead,
.page:has(#enter-form)>.lead {
  margin-top:4px;
  margin-bottom:8px;
}

#create-form,
#enter-form {
  margin-top:10px;
}

.field {
  margin-bottom:10px;
}

.page:has(#create-form) .page-backdrop,
.page:has(#enter-form) .page-backdrop {
  top:-5vh;
  width:1200px;
  height:1080px;
}

@media(max-width:720px) {
  .page:has(#create-form) .page-backdrop,
.page:has(#enter-form) .page-backdrop {
    width:792px;
    height:840px;
  }
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline:none;
  box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--text) 60%,transparent);
}

.home-organic h1,
.page>h1,
.page:has(#create-form)>h1,
.page:has(#enter-form)>h1 {
  margin-bottom:16px;
}

.home-organic .lead,
.page>.lead,
.page:has(#create-form)>.lead,
.page:has(#enter-form)>.lead {
  margin-top:20px;
}

.form-bottom>.closing-note {
  margin:14px 0 0;
  font-style:italic;
  text-align:center;
}

.home-organic .my-groups-button {
  display:flex;
  width:100%;
  max-width:490px;
  margin:12px auto 0;
  height:var(--button-height);
}

.my-groups-list {
  margin-top:24px;
}

.my-groups-list .saved-room {
  border:0;
  background:var(--surface);
  padding:18px;
  border-radius:9px;
  margin-bottom:12px;
}

.my-groups-empty {
  margin-top:24px;
}

@media(max-width:720px) {
  .home-organic .my-groups-button {
    max-width:430px;
  }
}

.home-organic .my-groups-button {
  background:color-mix(in srgb,var(--surface) 70%,transparent);
  color:var(--text);
  border:0;
  font-size:14px;
}

.home-organic .my-groups-button {
  background:color-mix(in srgb,var(--surface) 80%,#193536 20%);
  justify-content:space-between;
  text-align:left;
  font-size:14px;
  font-weight:600;
  padding:12px 18px;
}

.my-groups-button .groups-label {
  opacity:.7;
}

.my-groups-button .groups-arrow {
  opacity:.7;
  font-size:18px;
  flex:none;
}

@media(max-width:720px) {
  .home-organic .my-groups-button {
    font-size:13px;
  }
}

@media(max-width:380px) {
  .home-organic .my-groups-button {
    font-size:12px;
  }
}

body[data-view=home] .steps {
  width:100%;
  max-width:538px;
  margin-left:auto;
  margin-right:auto;
}

@media(max-width:720px) {
  body[data-view=home] .steps {
    max-width:478px;
  }
}

:root {
  --editable-tone:rgba(181,189,176,.7);
}

input,
select,
textarea,
.panel input,
.panel select,
.panel textarea,
.home-organic .my-groups-button {
  background-color:transparent;
  background-image:linear-gradient(var(--editable-tone),var(--editable-tone));
  background-blend-mode:multiply;
  color:var(--text);
}

@supports(backdrop-filter:brightness(1)) {
  input,
select,
textarea,
.panel input,
.panel select,
.panel textarea,
.home-organic .my-groups-button {
    background-image:none;
    background-color:rgba(0,0,0,.04);
    backdrop-filter:brightness(.79) saturate(.95);
    -webkit-backdrop-filter:brightness(.79) saturate(.95);
  }
}

.site-footer .brand {
  font-size:16.94px;
  gap:10.164px;
  letter-spacing:.847px;
}

.site-footer .brand svg {
  height:28.798px;
  width:18.634px;
}

.site-footer .brand small {
  font-size:9.317px;
  margin-top:4.235px;
}

body[data-role=organizer] .room-grid {
  display:block;
  max-width:600px;
  margin:0 auto;
}

body[data-role=organizer] .page-heading {
  justify-content:center;
}

body:has(.room-page) .site-footer {
  display:none;
}

.room-page {
  display:flex;
  flex-direction:column;
  min-height:100dvh;
  margin:0 auto;
  padding-top:16px;
  padding-bottom:max(24px,env(safe-area-inset-bottom));
  width:100%;
  max-width:650px;
}

.room-page>#back {
  align-self:flex-start;
}

.room-page .info-row:empty {
  display:none;
}

.room-page .room-grid {
  display:block;
  width:100%;
  margin:0;
  max-width:none;
}

.room-page .room-bottom {
  margin-top:auto;
  padding-top:24px;
}

.room-bottom .button {
  width:100%;
}

.room-page>.lead {
  margin-bottom:16px;
}

.share-panel {
  background:rgba(0,0,0,.04);
  backdrop-filter:brightness(.79) saturate(.95);
  -webkit-backdrop-filter:brightness(.79) saturate(.95);
}

.share-panel h2 {
  font-size:17px;
  line-height:1.4;
  margin-bottom:18px;
}

.share-row {
  display:flex;
  align-items:center;
  gap:10px;
}

.share-link {
  display:flex;
  align-items:center;
  position:relative;
  flex:1;
  min-width:0;
  height:var(--button-height);
  background:rgba(0,0,0,.14);
  border-radius:9px;
  padding:0 44px 0 12px;
}

.share-link-text {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  mask-image:linear-gradient(to right,#000 calc(100% - 24px),transparent);
  font-size:12px;
  width:100%;
}

.copy-icon {
  position:absolute;
  right:0;
  top:0;
  width:40px;
  height:100%;
  padding:10px;
  border:0;
  background:none;
  color:var(--text);
  display:grid;
  place-items:center;
  border-radius:9px;
}

.copy-icon svg {
  width:19px;
  height:19px;
}

.whatsapp-button {
  flex:none;
  font-size:13px;
  padding:12px 14px;
}

.room-page #join-form .actions:empty {
  display:none;
}

.room-bottom .room-closing-note {
  border:0;
  margin:14px 0 0;
  padding:0;
  text-align:center;
  font-style:italic;
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
}

.copy-icon {
  width:46px;
  padding:10px;
}

.copy-icon svg,
.whatsapp-button svg {
  display:block;
  width:24px;
  height:24px;
}

.share-link {
  padding-right:50px;
}

.whatsapp-button {
  width:var(--button-height);
  padding:0;
  display:grid;
  place-items:center;
  color:var(--white);
}

.room-page .page-heading h1 {
  margin-bottom:16px;
}

.room-page>.lead {
  margin-top:20px;
}

.home-organic h1,
.page>h1,
.page:has(#create-form)>h1,
.page:has(#enter-form)>h1,
.room-page .page-heading h1 {
  margin-bottom:0;
}

.home-organic .lead,
.page>.lead,
.page:has(#create-form)>.lead,
.page:has(#enter-form)>.lead,
.room-page>.lead {
  margin-top:16px;
}

.participant-cards {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 18px;
  padding:12px 5px 18px;
  margin-top:8px;
}

.participant-card {
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:62px;
  padding:13px 14px;
  background:var(--cream);
  color:var(--ink);
  border-radius:12px;
  transform:translateY(var(--card-offset)) rotate(var(--card-angle));
  box-shadow:0 3px 8px #1935360c;
}

.participant-card-name {
  flex:1;
  min-width:0;
  font-size:16px;
  font-weight:600;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.guest-cards .participant-card-name {
  text-align:center;
}

.participant-remove {
  display:grid;
  place-items:center;
  flex:0 0 26px;
  width:26px;
  height:26px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#96a89c;
  color:#263f3d;
  font-size:21px;
  line-height:1;
}

.participant-remove:hover {
  background:#b94f40;
  color:#fff8ed;
}

.participant-remove:focus-visible {
  outline:2px solid var(--ink);
  outline-offset:3px;
}

.participant-card:has(.participant-remove:focus-visible) {
  z-index:1;
}

@media(max-width:380px) {
  .participant-cards {
    gap:14px 14px;
  }

  .participant-card {
    padding:12px 10px;
  }

  .participant-card-name {
    font-size:14px;
  }
}

.participant-remove {
  background:transparent;
  color:#96a89c;
  font-size:36px;
  font-weight:400;
  line-height:1;
  border-radius:0;
}

.participant-remove:hover {
  background:transparent;
  color:#96a89c;
}

.participant-card {
  padding:16px 54px 16px 20px;
}

.participant-card-name {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  overflow-wrap:normal;
  mask-image:linear-gradient(to right,#000 calc(100% - 20px),transparent);
}

.guest-cards .participant-card {
  padding:16px 20px;
}

.participant-remove {
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  padding:0;
  display:grid;
  place-items:center;
}

.participant-remove svg {
  display:block;
  width:26px;
  height:26px;
}

.organizer-join .actions {
  margin-top:16px;
}

.organizer-join .button {
  width:100%;
}

@media(max-width:380px) {
  .participant-card {
    padding-left:16px;
    padding-right:48px;
  }

  .participant-remove {
    right:12px;
  }

  .guest-cards .participant-card {
    padding:16px;
  }
}

.organizer-joined {
  min-height:var(--button-height);
  padding:12px 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:14px;
  font-weight:600;
}

.organizer-join>#organizer-participate {
  margin-top:8px;
}

.guest-participation .actions {
  margin-top:18px;
}

.guest-participation .button {
  width:100%;
}

.guest-joined {
  text-align:center;
  padding:18px;
}

.guest-joined strong {
  font-size:14px;
  font-weight:600;
}

.guest-joined p {
  font-style:italic;
  font-weight:400;
  line-height:1.5;
  margin:8px 0 0;
}

.participant-card-name {
  color:#705c43;
}

.participant-remove,
.participant-remove:hover {
  color:#74867a;
}

.organizer-joined,
.guest-joined,
.organizer-join,
.guest-participation {
  background:rgba(0,0,0,.04);
  backdrop-filter:brightness(.79) saturate(.95);
  -webkit-backdrop-filter:brightness(.79) saturate(.95);
}

.room-exit {
  display:block;
  width:100%;
  min-height:44px;
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:13px;
  text-align:center;
  padding:12px;
  margin:0 0 14px;
  cursor:pointer;
  opacity:.75;
}

.room-exit:hover {
  opacity:1;
  text-decoration:underline;
}

.my-groups-list .saved-room {
  background:rgba(0,0,0,.04);
  backdrop-filter:brightness(.79) saturate(.95);
  -webkit-backdrop-filter:brightness(.79) saturate(.95);
}

.room-exit {
  height:var(--button-height);
  min-height:var(--button-height);
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.04);
  backdrop-filter:brightness(.79) saturate(.95);
  -webkit-backdrop-filter:brightness(.79) saturate(.95);
  border-radius:9px;
  color:#f09380;
  font-size:14px;
  font-weight:600;
  opacity:1;
  margin-bottom:14px;
}

.room-exit:hover {
  opacity:1;
  text-decoration:none;
  background:rgba(0,0,0,.09);
}

:root[data-theme=light] .room-exit {
  color:var(--action);
}

.final-page {
  isolation:isolate;
}

.final-stage {
  position:relative;
  isolation:isolate;
  height:320px;
  display:grid;
  place-items:center;
  margin-top:8px;
}

.final-stage .final-backdrop {
  top:50%;
  left:50%;
  width:1000px;
  height:900px;
  z-index:-1;
}

.final-floating {
  position:relative;
  width:min(100%,340px);
  animation:final-float 9s ease-in-out infinite;
  z-index:1;
}

.final-envelope {
  position:relative;
  display:block;
  width:100%;
  height:220px;
  border:0;
  padding:0;
  background:transparent;
  perspective:1100px;
  color:#705c43;
}

.envelope-turn {
  position:relative;
  display:block;
  width:100%;
  height:100%;
  transform-style:preserve-3d;
  transition:transform .8s cubic-bezier(.22,.7,.2,1);
}

.envelope-turn.is-open {
  transform:rotateY(180deg);
}

.envelope-front,
.envelope-back {
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  border-radius:12px;
}

.final-envelope .envelope {
  display:block;
  width:100%;
  height:100%;
  transform:rotate(-1deg);
  border-radius:12px;
  box-shadow:0 14px 26px var(--shadow);
}

.final-envelope .seal {
  left:50%;
  top:53%;
  transform:translate(-50%,-50%);
  width:52px;
  height:52px;
}

.final-envelope .seal svg {
  width:17px;
  height:28px;
}

.envelope-back {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  padding:26px;
  background:var(--cream);
  transform:rotateY(180deg);
  color:#705c43;
  box-shadow:0 14px 26px var(--shadow);
}

.envelope-back small {
  font-size:14px;
  line-height:1.4;
}

.envelope-back strong {
  font-size:32px;
  line-height:1.15;
  overflow-wrap:anywhere;
  max-width:100%;
}

.open-envelope-label {
  text-align:center;
  font-size:16px;
  font-weight:600;
  margin:0 0 20px;
}

.final-hide {
  width:100%;
  max-width:340px;
  margin:0 auto 20px;
  background:rgba(0,0,0,.04);
  backdrop-filter:brightness(.79) saturate(.95);
  -webkit-backdrop-filter:brightness(.79) saturate(.95);
  border:0;
}

.final-hide svg {
  width:21px;
  height:21px;
  flex:none;
}

.final-participants {
  position:relative;
  margin-top:12px;
  opacity:.85;
}

.final-page .room-exit {
  margin-bottom:0;
}

.final-no-result {
  margin-top:24px;
}

@keyframes final-float {
  0%,
100% {
    transform:translateY(5px) rotate(-.7deg);
  }

  50% {
    transform:translateY(-7px) rotate(.7deg);
  }
}

@media(max-width:720px) {
  .final-stage .final-backdrop {
    width:660px;
    height:700px;
  }

  .final-floating {
    width:min(100%,310px);
  }

  .final-envelope {
    height:205px;
  }

  .final-stage {
    height:290px;
  }
}

@media(max-width:380px) {
  .final-floating {
    width:min(100%,272px);
  }

  .final-envelope {
    height:180px;
  }

  .final-stage {
    height:265px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .final-floating {
    animation:none;
  }

  .envelope-turn {
    transition:none;
  }
}

.final-page>#back,
.final-page>.page-heading,
.final-page>.lead,
.final-page>.open-envelope-label,
.final-page>.final-hide,
.final-page>.final-participants,
.final-page>.room-bottom {
  position:relative;
  z-index:2;
}

.final-stage {
  z-index:0;
}

.final-floating {
  width:110%;
  max-width:374px;
}

.final-envelope {
  height:242px;
}

.final-envelope .seal {
  width:57.2px;
  height:57.2px;
}

.final-envelope .seal svg {
  width:18.7px;
  height:30.8px;
}

.final-floating.first-opening {
  animation:envelope-impatient 3.2s ease-in-out infinite;
}

.open-envelope-label {
  opacity:.7;
}

.final-hide {
  background:transparent;
  border:0;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  color:var(--text);
  font-size:16px;
  font-weight:600;
  opacity:.7;
}

.final-hide:hover {
  opacity:1;
  background:transparent;
}

@keyframes envelope-impatient {
  0%,
100% {
    transform:translateY(5px) rotate(-1deg);
  }

  22% {
    transform:translateY(-9px) rotate(1deg);
  }

  30% {
    transform:translate(-5px,-10px) rotate(-5deg);
  }

  36% {
    transform:translate(5px,-10px) rotate(5deg);
  }

  42% {
    transform:translate(-4px,-10px) rotate(-4deg);
  }

  48% {
    transform:translate(4px,-10px) rotate(4deg);
  }

  54% {
    transform:translate(-2px,-9px) rotate(-2deg);
  }

  64% {
    transform:translateY(-7px) rotate(1deg);
  }

  82% {
    transform:translateY(4px) rotate(-1deg);
  }
}

@media(max-width:720px) {
  .final-floating {
    width:110%;
    max-width:341px;
  }

  .final-envelope {
    height:225.5px;
  }
}

@media(max-width:380px) {
  .final-floating {
    width:110%;
    max-width:299.2px;
  }

  .final-envelope {
    height:198px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .final-floating.first-opening {
    animation:none;
  }
}

.envelope-control-slot {
  height:72px;
  min-height:72px;
  display:grid;
  place-items:start center;
}

.envelope-control-slot .open-envelope-label,
.envelope-control-slot .final-hide {
  display:flex;
  align-items:center;
  justify-content:center;
  height:52px;
  min-height:52px;
  width:100%;
  max-width:340px;
  margin:0;
  padding:12px 18px;
  gap:12px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--text);
  font-size:16px;
  font-weight:600;
  opacity:.7;
  cursor:pointer;
}

.envelope-control-slot button:hover {
  opacity:1;
}

.envelope-control-slot {
  position:relative;
  z-index:2;
}

.final-participants .participant-card,
.final-participants .guest-cards .participant-card {
  padding:16px 20px;
  justify-content:center;
  align-items:center;
}

.final-participants .participant-card-name {
  text-align:center;
}

.final-page>.share-panel {
  position:relative;
  z-index:2;
  margin-bottom:4px;
}
.hennley-confirm {
  width:calc(100% - 40px);
  max-width:430px;
  padding:26px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--bg);
  color:var(--text);
  box-shadow:0 24px 80px #0005;
}

.hennley-confirm::backdrop {
  background:#122c25aa;
  backdrop-filter:blur(5px);
}

.hennley-confirm h2 {
  margin:0 0 14px;
  font:700 26px/1.15 Georgia,serif;
  color:var(--text);
}

.hennley-confirm p {
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

.confirm-actions {
  display:flex;
  gap:10px;
  margin-top:24px;
}

.confirm-actions .button {
  flex:1;
  font-size:13px;
  padding:12px;
}

@media(max-width:380px) {
  .confirm-actions {
    flex-direction:column;
  }
}

/* Acceso para crear grupos */
.creation-access label{display:block;margin:18px 0 8px;font-size:13px;color:var(--muted)}.creation-access input{background:var(--surface);width:100%;min-height:48px}.creation-access .error{margin-top:12px}
