:root {
  --red: #b3262e;
  --red-dark: #8c1c23;
  --green: #1f5f3f;
  --cream: #fffaf2;
  --ink: #2b2420;
  --muted: #6d625a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 50% 0%, #2c7a52, var(--green) 60%, #123826);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.snow {
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff8, transparent),
    radial-gradient(2px 2px at 120px 80px, #fff6, transparent),
    radial-gradient(3px 3px at 200px 150px, #fff7, transparent),
    radial-gradient(2px 2px at 60px 200px, #fff5, transparent);
  background-size: 240px 240px;
  animation: snow 20s linear infinite;
}
@keyframes snow { to { background-position: 0 240px; } }
@media (prefers-reduced-motion: reduce) { .snow { animation: none; } }

main { width: 100%; max-width: 560px; padding: 24px 16px 48px; position: relative; }

.card {
  background: var(--cream);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px #0006;
  border-top: 8px solid var(--red);
}

h1 { margin: 0 0 8px; font-size: 1.8rem; color: var(--red); }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }

label { display: block; margin: 16px 0 0; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input, textarea {
  display: block; width: 100%; margin-top: 6px;
  font: inherit; padding: 10px 12px;
  border: 1.5px solid #d8cfc4; border-radius: 10px; background: #fff;
}
input:focus, textarea:focus { outline: 3px solid #b3262e44; border-color: var(--red); }
details { margin-top: 16px; }
summary { cursor: pointer; color: var(--green); font-weight: 600; }

button, .button {
  font: inherit; cursor: pointer; border: 0; border-radius: 10px;
  padding: 8px 12px; background: var(--green); color: #fff;
  text-decoration: none; white-space: nowrap; display: inline-block;
}
button:hover, .button:hover { filter: brightness(1.12); }
button.big { width: 100%; margin-top: 20px; padding: 14px; font-size: 1.15rem; font-weight: 700; background: var(--red); }
button.secondary { background: #e9e0d4; color: var(--ink); }

.error { color: var(--red-dark); font-weight: 600; min-height: 1em; margin: 12px 0 0; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 16px; }

#link-list { list-style: none; padding: 0; margin: 16px 0; }
#link-list li {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed #d8cfc4;
}
#link-list .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row { display: flex; justify-content: flex-end; }

#reveal { text-align: center; }
#r-result { animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.target { font-size: 2.6rem; font-weight: 800; color: var(--red); margin: 0; word-break: break-word; }
.budget { display: inline-block; background: var(--green); color: #fff; padding: 4px 14px; border-radius: 999px; }
