:root {
  --night: #0c2a30; --night-2: #12383f; --paper: #f5f0e6; --ink: #14181b;
  --pink: #ff3d7f; --sun: #ffc83d; --mute: #9db5b8;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--paper);
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-optical-sizing: auto;
  display: flex; flex-direction: column;
}
.bar { display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(18px, 5vw, 48px); }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand em { font-style: normal; font-weight: 400; color: var(--sun); margin-left: 4px; }
.who { color: var(--mute); font-size: 14px; }
main { width: min(640px, 92vw); margin: 0 auto; padding: 8px 0 64px; }
h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 10px; }
.lead { color: var(--mute); font-size: 17px; line-height: 1.5; max-width: 52ch; margin: 0 0 28px; }

.frame {
  position: relative; display: grid; place-items: center; min-height: 280px; cursor: pointer;
  background: var(--night-2); border-radius: 6px; overflow: hidden; transition: background .2s;
}
.frame input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.frame:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.frame.over { background: #1a4a52; }
.c { position: absolute; width: 34px; height: 34px; border: 0 solid var(--sun); pointer-events: none; transition: .2s; }
.tl { top: 14px; left: 14px; border-width: 3px 0 0 3px; } .tr { top: 14px; right: 14px; border-width: 3px 3px 0 0; }
.bl { bottom: 14px; left: 14px; border-width: 0 0 3px 3px; } .br { bottom: 14px; right: 14px; border-width: 0 3px 3px 0; }
.frame.over .c { width: 46px; height: 46px; border-color: var(--pink); }
.hint { display: grid; gap: 6px; text-align: center; padding: 24px; pointer-events: none; }
.hint strong { font-size: 22px; font-weight: 600; }
.hint span { color: var(--mute); font-size: 14px; }
#preview { display: none; width: 100%; height: 100%; max-height: 380px; object-fit: contain; padding: 18px; }
.frame.has #preview { display: block; } .frame.has .hint { display: none; }

button, .btn {
  display: inline-block; margin-top: 18px; padding: 14px 26px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--pink); color: #fff; font: 600 16px "Bricolage Grotesque", system-ui, sans-serif; text-decoration: none;
}
button:disabled { background: #2b4a50; color: var(--mute); cursor: default; }
#msg { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: var(--mute); }
#msg.err { color: #ff8a8a; }

.print {
  margin: 28px 0 0; padding: 14px 14px 18px; background: var(--paper); color: var(--ink);
  border-radius: 3px; box-shadow: 0 18px 40px rgba(0,0,0,.35); transform: rotate(-1.2deg);
}
.print[hidden] { display: none; }
.print img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #e3ddd0; }
.print.develop img { animation: develop 1.4s ease-out; }
@keyframes develop { from { filter: blur(14px) grayscale(1) brightness(1.6); } to { filter: none; } }
.print figcaption { display: flex; gap: 10px; margin-top: 14px; }
.print input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cfc7b6; border-radius: 3px; background: #fff; color: var(--ink); font-size: 14px; }
.print button { margin: 0; padding: 10px 18px; font-size: 15px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .print.develop img { animation: none; } .c, .frame { transition: none; } }
@media (max-width: 520px) { .print figcaption { flex-direction: column; } }