/* Tema de la fiesta: cómic punk de la invitación de Raquel. */
@font-face {
  font-family: "Marker";
  src: url("/assets/fonts/marker.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #141014;
  --paper: #fffdf4;
  --pink: #e8235a;
  --pink-soft: #ff4fa3;
  --yellow: #ffe34d;
  --sky: #3ec7ff;
  --green: #2f9e44;
  --muted: #5b5160;
  --radius: 14px;
  --shadow: 4px 4px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(232, 35, 90, 0.12) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 140px;
}

.hero { text-align: center; margin: 8px 0 18px; }
.wrap.legal { padding-bottom: 40px; }
.wrap.legal h1 { font-size: 36px; }

.kicker {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  transform: rotate(-2deg);
  font-family: "Marker", system-ui, sans-serif;
  font-size: 15px;
}

h1 {
  margin: 4px 0 6px;
  font-family: "Marker", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1.05;
  color: var(--pink);
  text-shadow: 3px 3px 0 var(--ink);
}

.lead { margin: 0; font-size: 18px; }

.card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 16px 0;
}

.notice { text-align: center; font-size: 18px; }
.notice p { margin: 0; }

.consent {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff;
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--muted);
}
.consent a { color: var(--pink); font-weight: 600; }

.field { display: block; margin: 0 0 16px; font-size: 15px; }
.field small { color: var(--muted); }
.field input, .note-edit textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font: inherit;
  font-size: 17px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .note-edit textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; }

.mine-head h2 { margin: 18px 0 2px; font-family: "Marker", system-ui, sans-serif; font-weight: 400; font-size: 26px; }
.mine-head p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }

.item .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.item .note-text { margin: 6px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.item .note-text small { color: var(--muted); }
.mini {
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
}
.mini.ghost { background: #fff; }
.mini.danger { background: #fff; color: var(--pink); border-color: var(--pink); }
.note-edit { grid-column: 1 / -1; }
.note-edit textarea { min-height: 76px; resize: vertical; }
.note-edit .count { font-size: 13px; color: var(--muted); text-align: right; margin: 4px 0 0; }
.item.gone { opacity: 0.55; }

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

.item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px;
}
.item img, .item .ph {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1ece2;
}
.item .state { font-size: 15px; margin: 0 0 6px; }
.item.ok .state { color: var(--green); font-weight: 600; }
.item.fail .state { color: var(--pink); font-weight: 600; }

.bar {
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sky);
  transition: width 0.25s ease;
}
.item.ok .bar > i { background: var(--green); }
.item.fail .bar > i { background: var(--pink); }

.thanks { text-align: center; background: var(--yellow); }
.thanks .big {
  margin: 0;
  font-family: "Marker", system-ui, sans-serif;
  font-size: 30px;
}
.thanks p { margin: 4px 0 0; }

/* Botón abajo: se alcanza con el pulgar. */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 70%, rgba(255, 253, 244, 0));
  text-align: center;
}

.btn {
  display: block;
  width: 100%;
  max-width: 528px;
  margin: 0 auto;
  padding: 18px 20px;
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: "Marker", system-ui, sans-serif;
  font-size: 26px;
  line-height: 1.1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }

#file {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
#file:focus-visible + .quota { outline: none; }

.quota { margin: 8px 0 0; font-size: 14px; color: var(--muted); min-height: 1em; }

.foot {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 0 16px 120px;
}
.foot a { color: inherit; }

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