/* Página de invitados, con la identidad del marco "Nuestra boda": papel crema, rojo y
   verde oscuro de las letras, dorado y salvia de las pinceladas. Siempre en claro, como
   el diseño impreso. */
:root {
  color-scheme: light;
  --bg: #f1e4cd;
  --paper: #fbf8f2;
  --ink: #2f3a1f;
  --muted: #6f6450;
  --accent: #b5321f;
  --accent-dark: #8d2414;
  --gold: #e3a83c;
  --sage: #c4c7a0;
  --line: #e2d5bd;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 48px;
}

/* ------------------------------------------------------------ encabezado */
header {
  text-align: center;
  margin-bottom: 22px;
}

.pieza {
  display: block;
  height: auto;
  margin: 0 auto;
}

.pieza.titulo {
  width: min(86%, 340px);
}

.pieza.nombres {
  width: min(78%, 300px);
  margin-top: 10px;
}

.lead {
  margin: 14px auto 0;
  max-width: 340px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  margin: 0;
  text-align: center;
}

/* ------------------------------------------------------------ vistas */
.view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.view[hidden] {
  display: none;
}

#v-notoken p,
#v-closed p {
  margin: 0;
  padding: 22px 18px;
  background: var(--paper);
  border-radius: var(--radius);
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  box-shadow: 0 6px 18px rgba(60, 40, 20, 0.12);
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label[for="name-input"] {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

input {
  font: inherit;
  font-size: 19px;
  text-align: center;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

input:focus {
  outline: none;
  border-color: var(--gold);
}

/* ------------------------------------------------------------ botones */
button,
label.big {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}

button:active,
label.big:active {
  transform: scale(0.98);
}

.big {
  font-size: 20px;
  padding: 22px 16px;
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 0 var(--accent-dark), 0 10px 22px rgba(141, 36, 20, 0.25);
}

.secondary {
  background: var(--sage);
  color: var(--ink);
  box-shadow: 0 5px 0 #a3a77f;
}

.link {
  background: none;
  color: var(--muted);
  padding: 0 4px;
  text-decoration: underline;
  font-size: 14px;
  box-shadow: none;
}

.hello {
  margin: 0 0 4px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.status {
  min-height: 1.5em;
  margin: 6px 0 0;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------ mis fotos: mini polaroids */
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
  margin-top: 6px;
}

.thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  padding: 5px 5px 16px;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(60, 40, 20, 0.18);
  transition: opacity 0.3s;
}

.thumbs img:nth-child(3n + 1) {
  transform: rotate(-2.5deg);
}

.thumbs img:nth-child(3n + 2) {
  transform: rotate(1.5deg);
}

.thumbs img:nth-child(3n) {
  transform: rotate(-0.8deg);
}

.thumbs img.pending {
  opacity: 0.45;
}
