:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #183329;
  background: #f7f8f4;
  --ink: #183329;
  --muted: #51665b;
  --pine: #132e27;
  --accent: #f9d697;
  --paper: #fff;
  --line: #d9e2d9;
  --green: #235e45;
  line-height: 1.55;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--green); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #946126; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { line-height: 1.09; }
h1 { font-family: Georgia, serif; font-size: clamp(2.45rem, 6vw, 4.25rem); letter-spacing: -.055em; font-weight: 500; overflow-wrap: anywhere; }
h2 { font-family: Georgia, serif; font-weight: 500; font-size: 1.95rem; letter-spacing: -.035em; overflow-wrap: anywhere; }
h3 { font-size: 1rem; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner, #app { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font-weight: 720; text-decoration: none; letter-spacing: -.025em; }
.brand-mark { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: none; background: var(--pine); border-radius: 8px; }
.brand-mark::before { content: "✶"; color: var(--accent); font-size: 1.0rem; line-height: 1; }
nav { display: flex; align-items: center; gap: 1rem; }
.account-email { max-width: 27ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .875rem; }
.plain { border: 0; padding: .4rem .15rem; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: .25rem; }
.preview { background: #fff4d6; padding: .5rem 1.5rem; text-align: center; color: #614627; font-size: .875rem; }
#app { flex: 1; padding-block: 2.5rem 4rem; }
footer { display: flex; align-items: center; justify-content: center; gap: .55rem; color: var(--muted); padding: 1.4rem; font-size: .875rem; border-top: 1px solid var(--line); }
footer .brand-mark { width: 20px; height: 20px; border-radius: 6px; }
footer .brand-mark::before { font-size: .78rem; }
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 415px; overflow: hidden; background: var(--pine); color: #fffaf0; border-radius: 24px; }
.hero-copy { padding: clamp(2rem, 5vw, 4.25rem); align-self: center; z-index: 1; }
.hero h1 { font-size: clamp(2.65rem, 6vw, 5.05rem); line-height: .98; }
.hero p { color: #d2e1d5; margin-top: 1.2rem; max-width: 32ch; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 8px; padding: .63rem 1rem; background: var(--green); color: #fff; font-weight: 650; text-decoration: none; text-align: center; }
.button:hover { filter: brightness(.92); }
.button.gold { background: var(--accent); color: #2b2418; }
.button.secondary { border-color: #b9ccbe; background: var(--paper); color: var(--ink); }
.button.ghost { border-color: #638376; color: #fffaf0; background: transparent; }
.button.ghost:hover { background: #28483d; filter: none; }
.hero-visual { position: relative; overflow: hidden; background: radial-gradient(ellipse at 45% 51%, #39614b 0%, #1d4133 49%, transparent 77%); min-height: 365px; }
.orbit { position: absolute; width: 83%; aspect-ratio: 1; top: 49%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #a5b68c3f; border-radius: 50%; }
.orbit.inner { width: 66%; border-style: dashed; opacity: .55; }
.spark { position: absolute; color: #f7d698; font: 1.65rem Georgia, serif; }
.spark.a { top: 14%; left: 26%; }
.spark.b { top: 24%; right: 21%; font-size: 1rem; }
.spark.c { bottom: 20%; left: 16%; font-size: 1.2rem; }
.spark.d { bottom: 22%; right: 13%; font-size: 1.85rem; }
.spark.e { top: 32%; left: 13%; opacity: .55; font-size: .8rem; }
.gift { position: absolute; width: 53%; max-width: 260px; aspect-ratio: 1.19; top: 54%; left: 52%; transform: translate(-50%, -50%) rotate(-10deg); filter: drop-shadow(11px 22px 23px #091b13aa); }
.gift-body { position: absolute; inset: 16% 3% 0; background: repeating-linear-gradient(125deg, #fff0 0 15px, #f8af9710 15px 16px), linear-gradient(135deg, #b85e58, #793c43); border: 1px solid #ebaaa05c; border-radius: 2% 2% 8% 8%; }
.gift-lid { position: absolute; inset: 11% 0 auto; height: 23%; background: linear-gradient(135deg, #dc8977, #a55352); border: 1px solid #eab4a37d; border-radius: 5px; box-shadow: 0 8px 6px #38201c30; }
.ribbon { position: absolute; inset: 11% 41% 0 42%; background: linear-gradient(90deg, #e2a961, #ffdda1 56%, #e7b36c); box-shadow: 4px 0 8px #6a403b45; }
.bow { position: absolute; width: 38%; height: 28%; bottom: 83%; border: clamp(7px, 1.2vw, 13px) solid #e8b874; box-shadow: inset 1px 2px 5px #52442c89, 2px 3px 5px #45362563; }
.bow.left { right: 49%; border-radius: 70% 70% 15% 70%; transform: rotate(18deg); }
.bow.right { left: 49%; border-radius: 70% 70% 70% 15%; transform: rotate(-18deg); }
.gift-tag { position: absolute; top: 37%; left: 54%; width: 28%; height: 25%; display: grid; place-items: center; background: #f7deb0; color: #6f5141; border-radius: 7px 4px 4px 7px; font-size: clamp(1.1rem, 2vw, 1.65rem); transform: rotate(14deg); box-shadow: 3px 4px 7px #542e34a8; }
.intro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: clamp(1.2rem, 3vw, 2rem); min-width: 0; }
.card > p, .muted { color: var(--muted); }
.card > h2 + p, .card > p + p { margin-top: .65rem; }
.intro-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .85rem; }
.intro-card h2 { font: 690 1rem "Segoe UI", system-ui, sans-serif; letter-spacing: normal; }
.intro-card p { color: var(--muted); margin-top: .25rem; }
.mini-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 9px; background: #edf3ec; color: var(--green); font-weight: 750; }
.narrow { max-width: 640px; margin-inline: auto; }
.form-title, .page-title { margin-bottom: 1.3rem; }
.form-title p, .page-title p { color: var(--muted); margin-top: .55rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form-grid .wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 640; font-size: .93rem; }
label small { font-weight: 400; color: var(--muted); font-size: .875rem; }
input, textarea { width: 100%; padding: .66rem .7rem; border-radius: 7px; border: 1px solid #a9bdad; background: #fff; color: var(--ink); font-size: 1rem; }
textarea { resize: vertical; min-height: 7rem; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { font-weight: 700; margin: 0 0 .55rem; }
.error, .notice { margin-top: 1rem; padding: .7rem .9rem; border-radius: 8px; overflow-wrap: anywhere; }
.error { background: #fbece8; color: #7a2624; }
.notice { background: #eaf3eb; color: #254e38; }
.lobby-banner { background: var(--pine); color: #fffaf0; padding: clamp(1.4rem, 4vw, 3rem); border-radius: 18px; margin-bottom: 1rem; }
.lobby-banner h1 { margin-top: .6rem; }
.lobby-banner p { color: #d2e1d5; margin-top: .65rem; }
.badge { display: inline-block; padding: .23rem .58rem; border-radius: 100px; color: #244e39; background: #e8f0e6; font-size: .875rem; font-weight: 670; }
.lobby-banner .badge { color: #32281a; background: var(--accent); }
.lobby-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
.lobby-grid > :only-child { grid-column: 1 / -1; }
.exchange-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.exchange { text-decoration: none; color: var(--ink); display: block; }
.exchange:hover { border-color: var(--green); }
.exchange h2 { margin-top: .6rem; }
.exchange p { margin-top: .55rem; }
.host-summary { display: flex; align-items: baseline; gap: .55rem; margin-top: .65rem; }
.host-summary strong { font: 500 2.6rem Georgia, serif; }
.readback { display: grid; gap: .75rem; margin-top: 1rem; }
.readback address, .readback .wishlist { font-style: normal; white-space: pre-wrap; overflow-wrap: anywhere; }
.readback h3 { margin-bottom: .2rem; }
.sealed { background: #f0f5ed; border-color: #d3e1d2; }
.match-name { font: 500 clamp(2rem, 5vw, 3.4rem) Georgia, serif; letter-spacing: -.045em; overflow-wrap: anywhere; margin-top: .5rem; }
dialog { max-width: min(480px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 15px; padding: 1.7rem; color: var(--ink); }
dialog::backdrop { background: #10271fd0; }
dialog p { color: var(--muted); margin-top: .65rem; }
.loading { color: var(--muted); padding-block: 2rem; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 710px) {
  .topbar-inner, #app { width: calc(100% - 2rem); }
  .topbar-inner { min-height: 64px; }
  #app { padding-top: 1.25rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { min-height: 255px; }
  .orbit { width: min(85%, 290px); }
  .orbit.inner { width: min(70%, 230px); }
  .gift { width: min(43%, 165px); }
  .lobby-grid, .exchange-list { grid-template-columns: 1fr; }
}
@media (max-width: 470px) {
  .intro-grid, .form-grid { grid-template-columns: 1fr; }
  .account-email { display: none; }
  .hero-visual { min-height: 225px; }
}
