:root {
  --bg: #fbf8f3; --card: #fff; --ink: #1d1b19; --sub: #6b655e; --line: #e8e2d9;
  --accent: #c8312b; --accent-ink: #fff; --green: #1f6b4a; --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.55; word-break: keep-all;
}
main { max-width: 480px; margin: 0 auto; padding: 20px 16px 48px; }
.ad { font-size: 12px; color: var(--sub); background: #f1ece4; border-radius: 10px; padding: 8px 12px; margin-bottom: 16px; }
h1 { font-size: 26px; margin: 8px 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.lead { color: var(--sub); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
.hint { font-weight: 400; color: var(--sub); font-size: 12px; }
input, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; margin: 0; font-weight: 600; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; text-align: center; padding: 11px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid #f0b429; outline-offset: 2px; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px; font: inherit; font-weight: 700; font-size: 16px;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-align: center; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { display: inline-block; width: auto; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn[aria-disabled="true"] { background: #d9d3ca; color: #fff; pointer-events: none; }
.error { color: var(--accent); font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.warn { background: #fff4e5; border: 1px solid #f3d6a8; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .acts { display: flex; gap: 6px; flex-shrink: 0; }
.reveal { text-align: center; padding: 28px 16px; }
.reveal .to { color: var(--accent); font-size: 34px; font-weight: 800; margin: 6px 0; letter-spacing: -0.02em; animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .reveal .to { animation: none; } }
.gifts { display: grid; gap: 10px; }
.gift { display: flex; flex-direction: column; gap: 6px; }
.gift .tag { font-size: 12px; color: var(--green); font-weight: 700; }
.gift .title { font-weight: 700; }
.gift .meta { font-size: 13px; color: var(--sub); }
footer { text-align: center; font-size: 12px; color: var(--sub); margin-top: 32px; }
.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; }
