:root {
  --green: #2F6357;
  --green-row: #285548;
  --ink: #1F4A40;
  --ink-soft: #4A6A61;
  --cream: #F6EBD7;
  --field: #FFFBF3;
  --field-line: #C9BFA8;
  --mint: #DCE8E2;
  --mint-2: #CFE0D8;
  --mint-3: #B9D0C6;
  --error: #9B2C1F;
  --display: Fraunces, Georgia, serif;
  --body: Figtree, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--green); }
body { margin: 0; background: var(--green); color: var(--cream); font-family: var(--body); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

.page { max-width: 440px; margin: 0 auto; padding: 0 20px; position: relative; }

.sparkle { position: absolute; color: var(--cream); pointer-events: none; }
.s-app-1 { width: 34px; height: 34px; top: 22px; right: 26px; }
.s-app-2 { width: 16px; height: 16px; top: 64px; right: 64px; opacity: .7; }
.s-gate-1 { width: 44px; height: 44px; top: 13vh; left: 20px; }
.s-gate-2 { width: 22px; height: 22px; top: calc(13vh - 24px); left: 72px; opacity: .7; }
.s-gate-3 { width: 36px; height: 36px; bottom: 15vh; right: 24px; }

.kicker { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.display { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .92; letter-spacing: -.01em; }

/* Passcode */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 32px; padding: 40px 4px; }
.gate-title { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.gate-title .kicker { font-size: 16px; }
.gate-title .display { font-size: 54px; line-height: .95; }
.hint { margin: 0; text-align: center; font-size: 14px; color: var(--mint-2); }

/* Signup */
.app { padding: 28px 0 40px; display: flex; flex-direction: column; gap: 28px; }
.head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.date-pill { background: var(--cream); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; }
.theme { margin-top: 4px; font-size: min(64px, 14vw); overflow-wrap: break-word; max-width: 100%; }
.theme.tbd { font-size: min(44px, 11vw); }
.lede { margin: 6px 0 0; color: var(--mint); line-height: 1.45; }

.card { background: var(--cream); color: var(--ink); border-radius: 22px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.card-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1.15; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 700; font-size: 14px; }
input { height: 50px; width: 100%; border: 2px solid var(--field-line); border-radius: 12px; background: var(--field); padding: 0 14px; font: 16px var(--body); color: var(--ink); }
input::placeholder { color: #8A8577; }
input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 74, 64, .2); }
input[aria-invalid="true"] { border-color: var(--error); }

.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.btn { height: 52px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--cream); font: 800 17px var(--body); cursor: pointer; padding: 0 18px; }
.btn:hover { background: #163830; border-color: #163830; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(31, 74, 64, .08); border-color: var(--ink); }
.btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.error { margin: -4px 0 0; color: var(--error); font-weight: 700; font-size: 14px; }
.error:empty { display: none; }

.done { display: flex; align-items: center; gap: 10px; }
.mine-item { font-weight: 800; font-size: 19px; overflow-wrap: anywhere; }
.mine-names { font-size: 15px; color: var(--ink-soft); overflow-wrap: anywhere; }

.list { display: flex; flex-direction: column; gap: 14px; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.list-head h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.15; }
.count { font-weight: 700; font-size: 14px; color: var(--mint); white-space: nowrap; }
#signups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#signups li { background: var(--green-row); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#signups li > div { min-width: 0; }
.li-item { font-weight: 800; font-size: 17px; color: #fff; overflow-wrap: anywhere; }
.li-names { font-size: 14px; color: var(--mint-2); overflow-wrap: anywhere; }
#signups li.mine { background: var(--cream); }
#signups li.mine .li-item { color: var(--ink); }
#signups li.mine .li-names { color: var(--ink-soft); }
.you { background: var(--ink); color: var(--cream); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; flex: none; }
.empty { margin: 0; color: var(--mint); }

.foot { font-size: 13px; color: var(--mint-3); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.foot p { margin: 0; }
.link { background: none; border: 0; padding: 12px 8px; min-height: 44px; font: 700 14px var(--body); color: var(--cream); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: #fff; }
.link:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; border-radius: 6px; }
.loading { text-align: center; padding-top: 40vh; margin: 0; color: var(--mint); }
