/* Gift pages — the "old love letter" look. Self-contained: used by
   for/index.html on its own and by the in-app preview. */
.gp-root { --gp-wine:#1f1014; --gp-seal:#8e2436; --gp-paper:#f3ead9; --gp-ink:#4a2129; --gp-rose:#e4798f;
  font-family:'Fraunces',Georgia,serif; color:var(--gp-ink); min-height:100vh; position:relative; overflow-x:hidden; }
.gp-root, .gp-root * { box-sizing:border-box; }
.gp-hand { font-family:'Segoe Script','Bradley Hand','Brush Script MT',cursive; }

.gp-env-screen { min-height:100vh; background:var(--gp-wine); color:#fbeef0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:14px; padding:24px 16px; text-align:center;
  background-image:radial-gradient(rgba(255,255,255,.04) 1px,transparent 1px); background-size:5px 5px; }
.gp-kicker,.gp-tap { font-family:'Outfit',system-ui,sans-serif; font-size:12px; letter-spacing:.3em; color:var(--gp-rose); margin:0; }
.gp-tap { letter-spacing:.15em; opacity:.75; }
.gp-for { font-style:italic; font-weight:400; font-size:clamp(30px,9vw,44px); margin:6px 0 0; }
.gp-env { width:min(78vw,300px); aspect-ratio:3/2; background:#efe3cc; border:1px solid #d9c6a3; position:relative;
  box-shadow:0 18px 40px rgba(0,0,0,.5); cursor:pointer; padding:0; transition:transform .6s; }
.gp-env-flap { position:absolute; left:0; right:0; top:0; height:62%; transform-origin:top;
  background:linear-gradient(180deg,#e9dbbf,#dcc9a6); clip-path:polygon(0 0,100% 0,50% 100%);
  filter:drop-shadow(0 2px 2px rgba(80,50,20,.25)); transition:transform .7s cubic-bezier(.32,.72,0,1); }
.gp-seal { position:absolute; left:50%; top:58%; width:64px; height:64px; margin:-32px; border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#b23a4e,#6d1424); box-shadow:0 3px 8px rgba(0,0,0,.45),inset 0 0 0 5px rgba(0,0,0,.12);
  transition:transform .4s, opacity .4s; }
.gp-seal-broken { position:static; margin:0; clip-path:polygon(0 0,55% 0,40% 50%,60% 100%,0 100%); }
.gp-opening .gp-seal { transform:scale(1.25) rotate(-12deg); opacity:0; }
.gp-opening .gp-env-flap { transform:rotateX(180deg); }
.gp-opening .gp-env { transform:translateY(-12px); }
.gp-open [data-gp="envelope"] { display:none; }
.gp-root:not(.gp-open) [data-gp="page"] { display:none; }

.gp-paper { background:var(--gp-paper); min-height:100vh; padding:28px 16px 40px; max-width:560px; margin:0 auto;
  background-image:radial-gradient(rgba(120,80,40,.07) 1px,transparent 1px); background-size:5px 5px; animation:gp-rise .7s ease-out; }
@keyframes gp-rise { from { transform:translateY(40px); opacity:0 } to { transform:none; opacity:1 } }
.gp-preview { font:600 12px 'Outfit',sans-serif; text-align:center; background:var(--gp-rose); color:#fff; border-radius:999px; padding:6px 12px; margin:0 0 16px; }
.gp-letter h1 { font-style:italic; font-weight:400; font-size:32px; margin:0 0 14px; }
.gp-letter p { font-family:'Segoe Script','Bradley Hand','Brush Script MT',cursive; font-size:19px; line-height:1.75; margin:0; overflow-wrap:anywhere; }
.gp-letter .gp-sign { text-align:right; color:var(--gp-seal); margin-top:14px; }

.gp-scrap { display:grid; grid-template-columns:repeat(2,1fr); gap:22px 14px; margin:34px 0; }
.gp-pol { margin:0; background:#fbf8f1; padding:8px 8px 34px; box-shadow:0 4px 12px rgba(60,30,20,.22); position:relative; transform:rotate(var(--tilt)); }
.gp-pol img { width:100%; aspect-ratio:1; object-fit:cover; display:block; filter:sepia(.28) contrast(.95) saturate(.9); }
.gp-pol figcaption { position:absolute; left:6px; right:6px; bottom:8px; text-align:center; font-family:'Segoe Script','Bradley Hand',cursive; font-size:14px; overflow-wrap:anywhere; }
.gp-tape { position:absolute; top:-9px; left:50%; width:58px; height:18px; margin-left:-29px; background:rgba(216,199,164,.8); transform:rotate(-3deg); }

.gp-plan,.gp-gift { background:#fbf6ec; border-radius:18px; padding:20px 18px; margin:26px 0; box-shadow:0 2px 10px rgba(60,30,20,.1); }
.gp-label { font:600 11px 'Outfit',sans-serif; letter-spacing:.25em; text-transform:uppercase; color:var(--gp-rose); margin:0 0 6px; }
.gp-plan h2,.gp-gift h2 { font-weight:400; font-size:24px; margin:0 0 12px; }
.gp-plan ol { list-style:none; padding:0; margin:0 0 16px; }
.gp-plan li { display:flex; gap:14px; padding:10px 0; border-top:1px solid #eadcc6; }
.gp-time { font:600 15px 'Outfit',sans-serif; color:var(--gp-seal); min-width:48px; }
.gp-place { display:flex; flex-direction:column; font-size:17px; }
.gp-place small { font:13px 'Outfit',sans-serif; opacity:.7; }
.gp-gift img { width:100%; border-radius:12px; margin-bottom:12px; }
.gp-btn { display:block; width:100%; text-align:center; font:600 15px 'Outfit',sans-serif; background:#c14e63; color:#fff;
  border:0; border-radius:999px; padding:13px; cursor:pointer; text-decoration:none; }
.gp-aff { font:12px 'Outfit',sans-serif; opacity:.6; text-align:center; margin:8px 0 0; }
.gp-foot { text-align:center; font:13px 'Outfit',sans-serif; opacity:.65; margin-top:30px; }
.gp-foot a { color:inherit; }

@media (prefers-reduced-motion: reduce) { .gp-paper { animation:none } .gp-env,.gp-env-flap,.gp-seal { transition:none } }

/* the writing form, inside the app */
.gpm label { display:block; margin:12px 0 4px; font-weight:600; }
.gpm h2 { margin:24px 0 8px; font-size:18px; } .gpm h2 small { opacity:.6; font-weight:400; }
.gpm-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.gpm-photo { display:flex; flex-direction:column; gap:6px; }
.gpm-thumb { position:relative; } .gpm-thumb img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; display:block; }
.gpm-rm { position:absolute; top:6px; right:6px; width:30px; height:30px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(20,8,12,.72); color:#fff; font-size:14px; line-height:30px; text-align:center; padding:0; }
.gpm-rm:focus-visible { outline:2px solid var(--accent, #e4798f); outline-offset:2px; }
#gp-errs { margin:20px 0 10px; } #gp-errs p { color:var(--bad, #e77b69); margin:4px 0; }
.gpm-picks { display:flex; flex-direction:column; gap:8px; margin-top:10px; max-height:420px; overflow-y:auto; }
.gpm-pick, .gpm-chosen { display:flex; align-items:center; gap:12px; text-align:left; width:100%; padding:8px; border-radius:14px;
  background:var(--surface, #2b161d); border:1px solid var(--border, #4a2531); color:inherit; font:inherit; }
.gpm-pick { cursor:pointer; } .gpm-pick:hover { border-color:var(--accent, #e4798f); }
.gpm-pick img, .gpm-chosen img, .gpm-pick-ph { width:56px; height:56px; border-radius:10px; object-fit:cover; flex:none;
  display:flex; align-items:center; justify-content:center; font-size:24px; background:rgba(255,255,255,.05); }
.gpm-pick strong, .gpm-chosen strong { display:block; font-size:15px; }
.gpm-pick small, .gpm-chosen small { opacity:.65; font-size:13px; }
.gpm-stop { display:grid; grid-template-columns:118px 1fr; gap:6px; margin:6px 0; } .gpm-stop input[data-f="note"] { grid-column:2; }
