:root {
  --bg: #fff7f9;
  --card: #ffffff;
  --rosa: #e48aa7;
  --rosa-fuerte: #b8446e;
  --rosa-suave: #fde8ee;
  --borde: #f3d5de;
  --menta: #cfe8df;
  --menta-fuerte: #3e7d68;
  --texto: #5f4650;
  --texto-suave: #8a6f7a;
  --radio: 20px;
  --salida: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--rosa); color: #fff; }
body {
  margin: 0;
  font-family: ui-rounded, "Nunito", "Segoe UI", system-ui, sans-serif;
  color: var(--texto);
  background:
    radial-gradient(520px 320px at 100% 0, var(--rosa-suave), transparent 70%),
    radial-gradient(420px 280px at 0 120px, #eaf6f1, transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
  line-height: 1.5;
}
main { max-width: 720px; margin: 0 auto; padding: 36px 18px 48px; }

/* encabezado */
.top { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.logo {
  flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  background: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--rosa), 0 10px 24px rgba(184, 68, 110, .22);
  display: grid; place-items: center; font-size: 48px;
  animation: salto .9s var(--salida) .15s both;
  transform-origin: 50% 100%;
}
.logo:hover { animation: salto .9s var(--salida) both; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
h1 {
  margin: 0; font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.02; color: var(--rosa-fuerte); text-wrap: balance;
  animation: sube .7s var(--salida) .1s both;
}
.sub {
  margin: 8px 0 0; color: var(--texto-suave); font-size: 1.02rem; text-wrap: balance;
  animation: sube .7s var(--salida) .22s both;
}

/* notas */
.nota {
  background: var(--rosa-suave); border-radius: var(--radio);
  padding: 18px 20px; margin-bottom: 30px; font-size: .95rem; max-width: 65ch;
  animation: sube .7s var(--salida) .32s both;
}
.nota h2 { margin: 0 0 2px; font-size: 1rem; font-weight: 800; color: var(--rosa-fuerte); }
.nota h2:not(:first-child) { margin-top: 14px; }
.nota p { margin: 0; }
.nota p:empty, .nota p:empty + h2 { display: none; }

.estado { text-align: center; color: var(--texto-suave); margin: 20px 0; }
.estado:empty { display: none; }

/* lista */
.lista { display: flex; flex-direction: column; gap: 12px; }
.item {
  background: var(--card); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 16px 18px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 10px rgba(184, 68, 110, .06);
  transition: transform .35s var(--salida), box-shadow .35s var(--salida), border-color .25s;
}
.item:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(184, 68, 110, .14); border-color: var(--rosa); }
.lista.entra .item { animation: sube .6s var(--salida) both; }
.lista.entra .item:nth-child(1) { animation-delay: .45s; }
.lista.entra .item:nth-child(2) { animation-delay: .52s; }
.lista.entra .item:nth-child(3) { animation-delay: .59s; }
.lista.entra .item:nth-child(4) { animation-delay: .66s; }
.lista.entra .item:nth-child(5) { animation-delay: .73s; }
.lista.entra .item:nth-child(6) { animation-delay: .8s; }
.lista.entra .item:nth-child(n+7) { animation-delay: .87s; }
.item .info { flex: 1; min-width: 0; }
.item h3 { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.item .acl { margin: 3px 0 0; font-size: .9rem; color: var(--texto-suave); }
.item .ver {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  font-size: .9rem; font-weight: 700; text-decoration: none;
  color: var(--rosa-fuerte); background: var(--rosa-suave); border: 1.5px solid transparent;
  transition: transform .2s var(--salida), background-color .2s, border-color .2s;
}
.item .ver::after {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11l6-6M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11l6-6M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s var(--salida);
}
.item .ver:hover { background: #fbd7e2; border-color: var(--rosa); }
.item .ver:hover::after { transform: translate(2px, -2px); }
.item .ver:active { transform: scale(.95); }
.item .acciones { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item.otro { background: transparent; box-shadow: none; }
.item.otro:hover { transform: none; box-shadow: none; border-color: var(--borde); }
.item.otro h3 { color: var(--texto-suave); text-decoration: line-through; text-decoration-color: var(--borde); text-decoration-thickness: 2px; }
.item.mio { border-color: var(--menta); background: #f1faf6; }
.item.mio:hover { border-color: var(--menta-fuerte); }
.item.pop { animation: pop .6s var(--salida); }

.tag { font-size: .85rem; font-weight: 600; color: var(--texto-suave); }
.tag.mio { color: var(--menta-fuerte); display: inline-flex; align-items: center; gap: 6px; }
.tag.mio::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* botones */
button {
  font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; border-radius: 999px;
  padding: 8px 18px; min-height: 44px; background: #fff; color: var(--texto);
  border: 1.5px solid var(--borde);
  transition: transform .2s var(--salida), background-color .2s, box-shadow .2s;
}
button:hover:not(:disabled) { background: var(--rosa-suave); }
button:active:not(:disabled) { transform: scale(.95); }
button.principal {
  background: var(--rosa-fuerte); border-color: var(--rosa-fuerte); color: #fff;
  box-shadow: 0 3px 8px rgba(184, 68, 110, .22);
}
button.principal:hover:not(:disabled) { background: #a23760; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(184, 68, 110, .35); }
button.principal:active:not(:disabled) { transform: scale(.95); }
button.link { border: 0; background: none; padding: 4px 6px; min-height: 44px; color: var(--texto-suave); font-weight: 600; text-decoration: underline; box-shadow: none; }
button.link:hover:not(:disabled) { background: none; color: var(--rosa-fuerte); }
button:disabled { opacity: .7; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--menta-fuerte); outline-offset: 3px; }

.confirma { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: .9rem; font-weight: 600; animation: sube .35s var(--salida) both; }
.confirma .fila { display: flex; gap: 8px; }

/* loaders */
.spin::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: giro .7s linear infinite;
}
.sk .barra { height: 12px; border-radius: 6px; background: var(--rosa-suave); animation: pulso 1.2s ease-in-out infinite; }
.sk .b1 { width: 55%; height: 16px; }
.sk .b2 { width: 30%; margin-top: 8px; }
.sk .b3 { width: 96px; height: 44px; border-radius: 999px; }

@keyframes giro { to { transform: rotate(360deg); } }
@keyframes pulso { 50% { opacity: .45; } }
@keyframes sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.96); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes salto {
  0% { transform: translateY(0) scale(1, 1); }
  25% { transform: translateY(2px) scale(1.06, .92); }
  55% { transform: translateY(-16px) scale(.96, 1.06); }
  80% { transform: translateY(0) scale(1.04, .96); }
  100% { transform: translateY(0) scale(1, 1); }
}

footer { text-align: center; margin-top: 40px; color: var(--texto-suave); font-size: .85rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--texto); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .95rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(95, 70, 80, .3);
  max-width: calc(100% - 32px); text-align: center;
  animation: toast .5s var(--salida) both;
}
.toast[hidden] { display: none; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 520px) {
  .top { gap: 14px; }
  .logo { width: 72px; height: 72px; font-size: 36px; }
  .item { padding: 14px 16px; gap: 12px; }
  button { padding: 8px 16px; }
}
@media (max-width: 360px) {
  .item { align-items: flex-start; flex-direction: column; }
  .item .acciones, .confirma { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .spin::after { animation: giro 3s linear infinite !important; animation-duration: 3s !important; }
}
