:root{
  --ink:#1e2230;
  --muted: rgba(30,34,48,.60);

  --sky:#67BFFF;
  --rose:#FF6FA6;
  --paper:#ffffff;
  --table:#fbf7ef; /* cálido */
}

/* RESET */
*{box-sizing:border-box}
html,body{height:100%}

/* =========================================================
   FONDO (elige 1 de las 3 opciones al final)
   ========================================================= */
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--ink);

  background:
    /* motitas de papel */
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px),

    /* leve halo celeste, muy difuso */
    radial-gradient(
      5000px 900px at 50% 40%,
      rgba(103,191,255,.10),
      transparent 70%
    ),

    /* base de papel */
    linear-gradient(
      180deg,
      #ffffff,
      #f2f8ff
    );

  background-size: 50px 50px, cover, cover;
  overflow-x:hidden;
}


/* ===== capas de decoraciones ===== */
.doodles{
  position: fixed;
  inset:0;
  z-index:-4;
  pointer-events:none;
}

/* corazones tipo confeti */
.doodles::before{
  content:"";
  position:absolute; inset:0;
  opacity:.55;
  background:
    radial-gradient(circle at 16% 24%, rgba(255,111,166,.20) 0 6px, transparent 7px),
    radial-gradient(circle at 22% 33%, rgba(255,111,166,.10) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 18%, rgba(255,111,166,.16) 0 6px, transparent 7px),
    radial-gradient(circle at 76% 26%, rgba(255,111,166,.08) 0 4px, transparent 5px),
    radial-gradient(circle at 40% 78%, rgba(255,111,166,.12) 0 5px, transparent 6px),
    radial-gradient(circle at 55% 84%, rgba(255,111,166,.08) 0 4px, transparent 5px),
    radial-gradient(circle at 86% 44%, rgba(255,111,166,.10) 0 5px, transparent 6px),
    radial-gradient(circle at 12% 72%, rgba(255,111,166,.08) 0 4px, transparent 5px);
}

/* estrellitas / brillitos */
.doodles::after{
  content:"";
  position:absolute; inset:0;
  opacity:.28;
  background:
    radial-gradient(circle at 28% 16%, rgba(103,191,255,.18) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 18%, rgba(103,191,255,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 14%, rgba(255,215,163,.22) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 16%, rgba(255,215,163,.14) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 70%, rgba(103,191,255,.14) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 72%, rgba(103,191,255,.10) 0 1px, transparent 2px);
}

/* mini stickers en esquinas (scrapbook) */
.stickers{
  position: fixed;
  inset:0;
  z-index:-3;
  pointer-events:none;
}
.stickers .s{
  position:absolute;
  width: 140px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(30,34,48,.10);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 18px rgba(18,24,40,.06);
  transform: rotate(-8deg);
  opacity:.9;
}
.stickers .s1{ left: 10%; top: 8%; }
.stickers .s2{ right: 12%; bottom: 10%; transform: rotate(10deg); }
.stickers .s::before{
  content:"";
  position:absolute; inset: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,111,166,.12), rgba(103,191,255,.10));
}

/* =========================================================
   LAYOUT
   ========================================================= */
.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px;
  position:relative;
}
.topbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:10px;
}

/* ===== BOTONES ===== */
.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(30,34,48,.14);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  cursor:pointer;
  box-shadow:none;
  transition: transform .08s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn:active{transform: translateY(1px)}
.btn.ghost{background: rgba(255,255,255,.82)}

.btn.primary{
  background: rgba(255,111,166,.16);
  color:#b0144f;
  border: 2px solid rgba(176,20,79,.35);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  border-radius: 8px;
  padding: 10px 14px;
  transform: rotate(1.2deg);
}

/* =========================================================
   HOJA
   ========================================================= */
.card{max-width:900px;margin:0 auto;background:transparent}
.paper{
  position: relative;
  background: var(--paper);
  border-radius: 10px;
  border: 1px solid rgba(30,34,48,.12);
  overflow: hidden;
  z-index: 0;
  padding: 18px 18px 18px 78px;
}

.paper > *{
  position: relative;
  z-index: 2;
}

/* líneas */
.paper::after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(to right, rgba(255,111,166,.55) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(103,191,255,.42) 0px,
      rgba(103,191,255,.42) 1px,
      transparent 1px,
      transparent 30px
    );
  background-position: 62px 0, 0 34px;
  pointer-events:none;
}

/* agujeros */
.holes{
  position:absolute;
  left:22px;
  top:34px;
  width:34px;
  display:flex;
  flex-direction:column;
  gap:22px;
}
.hole{
  width:18px;height:18px;
  border-radius:999px;
  background:#f4f6fb;
  border:1px solid rgba(30,34,48,.16);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.07);
}

/* rasgado */
.tear{
  position:absolute;
  left:-10px; right:-10px;
  top:-14px; height:42px;
  background:#fff;
  clip-path: polygon(
    0% 70%, 4% 56%, 8% 72%, 12% 54%, 16% 75%, 20% 58%,
    24% 76%, 28% 56%, 32% 74%, 36% 55%, 40% 75%, 44% 58%,
    48% 76%, 52% 56%, 56% 75%, 60% 55%, 64% 76%, 68% 58%,
    72% 76%, 76% 56%, 80% 74%, 84% 55%, 88% 75%, 92% 58%,
    96% 72%, 100% 60%, 100% 0%, 0% 0%
  );
}

/* cinta hoja */
.tape{
  position:absolute;
  right:34px;
  top:-10px;
  width:140px;
  height:30px;
  border-radius:10px;
  background: rgba(255,215,163,.65);
  border:1px solid rgba(30,34,48,.10);
  transform: rotate(3deg);
}

/* texto */
.sheetSmall{
  font-size:12px;
  font-weight:800;
  color: rgba(30,34,48,.55);
  letter-spacing:.08em;
  text-transform: uppercase;
}
.sheetTitle{margin:8px 0 6px;font-size:38px}
.sheetQuote{
  color: rgba(30,34,48,.58);
  font-style: italic;
  margin-bottom: 12px;
}
.letter{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  line-height:1.9;
  font-size:16px;
}
.em{
  color:#0f5ea8;
  font-weight:900;
  text-decoration: underline;
}

/* ===== FORM “ESCRITO” ===== */
.codeBlock{
  margin-top: 14px;
  display:flex;
  align-items:flex-end;
  gap:18px;
  flex-wrap:wrap;
}
.writeLine{transform: rotate(-.8deg)}
.handLine{
  width: 340px;
  max-width: 90vw;
  border:none;
  background: transparent;
  outline:none;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: 30px;
  letter-spacing:.18em;
  padding: 6px 6px 2px;
  color: rgba(30,34,48,.86);
}
.underlines{
  display:grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.underlines span{
  height: 2px;
  background: rgba(30,34,48,.28);
  border-radius: 999px;
}

/* mensajes */
.msg{margin-top:10px;color: rgba(30,34,48,.65);font-size:13px}
.hintBox{
  margin-top:16px;
  display:none;
  padding:14px;
  border-radius:12px;
  border:1px dashed rgba(30,34,48,.22);
  background: rgba(103,191,255,.12);
}
.divider{height:1px;background: rgba(30,34,48,.14);margin:14px 0}

/* =========================================================
   POLAROIDS REALES (SIN CINTA)
   ========================================================= */
.polaroid{
  position: fixed;
  width: 180px;
  height: 230px;
  background: #fff;
  border: 1px solid rgba(30,34,48,.12);
  border-radius: 18px;
  padding: 14px 14px 26px;
  box-shadow: 0 12px 22px rgba(18,24,40,.10);
  z-index: -2;
  pointer-events:none;
  overflow:hidden;

  clip-path: polygon(
    3% 2%, 97% 1%, 99% 8%, 98% 94%,
    94% 99%, 6% 98%, 1% 92%, 2% 10%
  );
}
.polaroid .photo{
  width:100%;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
}
.polaroid .cap{
  margin-top: 8px;
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: 13px;
  color: rgba(30,34,48,.55);
  transform: rotate(-.5deg);
}

/* posiciones */
.pol1{ left: 30px; top: 120px; transform: rotate(-8deg); }
.pol2{ right: 36px; bottom: 90px; transform: rotate(9deg); }

/* responsive */
@media (max-width: 740px){
  .polaroid, .stickers{ display:none; }
}

.hearts{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.8;

  /* mismo SVG repetido a mano (sin pattern) */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 92C60 92 25 70 25 45c0-10 8-18 18-18 8 0 14 4 17 10 3-6 9-10 17-10 10 0 18 8 18 18 0 25-34 47-34 47z' fill='%23ff3c5a' fill-opacity='0.45'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 92C60 92 25 70 25 45c0-10 8-18 18-18 8 0 14 4 17 10 3-6 9-10 17-10 10 0 18 8 18 18 0 25-34 47-34 47z' fill='%23ff3c5a' fill-opacity='0.35'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 92C60 92 25 70 25 45c0-10 8-18 18-18 8 0 14 4 17 10 3-6 9-10 17-10 10 0 18 8 18 18 0 25-34 47-34 47z' fill='%23ff3c5a' fill-opacity='0.40'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 92C60 92 25 70 25 45c0-10 8-18 18-18 8 0 14 4 17 10 3-6 9-10 17-10 10 0 18 8 18 18 0 25-34 47-34 47z' fill='%23ff3c5a' fill-opacity='0.30'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 92C60 92 25 70 25 45c0-10 8-18 18-18 8 0 14 4 17 10 3-6 9-10 17-10 10 0 18 8 18 18 0 25-34 47-34 47z' fill='%23ff3c5a' fill-opacity='0.28'/%3E%3C/svg%3E");

  /* mismo tamaño para todos */
  background-size: 140px 140px, 120px 120px, 110px 110px, 95px 95px, 85px 85px;

  /* posiciones repartidas por la pantalla */
  background-position:
    8% 20%,
    86% 14%,
    22% 78%,
    72% 74%,
    48% 10%;

  background-repeat: no-repeat;
}
