@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/fonts/atkinson.woff2") format("woff2");
  font-display: swap;
}

:root {
  --cream: #f6f0e6;
  --paper: #fffdf8;
  --ink: #292723;
  --muted: #706b64;
  --line: #ded4c7;
  --coral: #b94d3d;
  --coral-dark: #8f372e;
  --sage: #8ca992;
  --sage-dark: #456b57;
  --gold: #a87728;
  --gold-soft: #d7b366;
  --shadow: 0 24px 55px rgba(60, 43, 28, .12), 0 3px 0 rgba(60, 43, 28, .08);
  --serif: "Fraunces", Georgia, serif;
  --body: "Atkinson", "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background:
    radial-gradient(circle at 12% 5%, rgba(216, 97, 76, .08), transparent 28rem),
    var(--cream); font-family: var(--body); line-height: 1.5;
}
body::before { content: ""; pointer-events: none; position: fixed; inset: 0; opacity: .14; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E"); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.app-shell { position: relative; width: min(100%, 780px); min-height: 100vh; margin: 0 auto; padding: max(1.25rem, env(safe-area-inset-top)) max(1.15rem, env(safe-area-inset-right)) max(2.25rem, env(safe-area-inset-bottom)) max(1.15rem, env(safe-area-inset-left)); }
.loading-state { display: grid; place-content: center; min-height: 70vh; text-align: center; color: var(--muted); }
.loading-state p { margin-top: .35rem; }
.eyebrow { display: block; color: var(--coral-dark); font-size: .72rem; font-weight: 700; letter-spacing: .15em; line-height: 1.2; text-transform: uppercase; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.28rem; font-weight: 650; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { width: 2.2rem; height: 2.2rem; flex: none; }
.brand-wordmark { line-height: 1; }
.topbar { align-items: center; display: flex; justify-content: space-between; min-height: 3rem; }
.landing-shell { width: min(100%, 1120px); }
.landing-page { animation: rise .5s ease both; }
.landing-header { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.landing-header .brand { font-size: 1.48rem; }
.landing-header .brand-mark { width: 2.65rem; height: 2.65rem; }
.landing-login { min-height: 44px; display: inline-flex; align-items: center; padding: .45rem .55rem; color: var(--coral-dark); font-weight: 700; text-underline-offset: .22em; }
.landing-hero { display: grid; align-items: center; gap: 2.5rem; min-height: min(720px, 78vh); padding: clamp(3rem, 9vw, 7rem) 0; }
.landing-copy .hero-title { max-width: 11ch; margin-top: .8rem; font-size: clamp(3.25rem, 11vw, 5.8rem); }
.landing-copy .hero-copy { max-width: 35rem; font-size: clamp(1.05rem, 2vw, 1.22rem); }
.landing-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.landing-actions .button, .landing-close .button { min-width: 9.5rem; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.landing-auth-note { margin: .85rem 0 0; color: var(--muted); font-size: .8rem; }
.landing-keepsake { position: relative; isolation: isolate; width: min(100%, 450px); min-height: 380px; margin: 0 auto; }
.landing-keepsake::before { content: ""; position: absolute; z-index: -2; width: 20rem; height: 20rem; top: 2rem; left: 50%; border-radius: 50%; background: rgba(215, 179, 102, .15); transform: translateX(-50%); }
.sample-name-card { position: absolute; width: min(76%, 310px); min-height: 265px; padding: 2.1rem 1.8rem; display: flex; flex-direction: column; justify-content: center; background: var(--paper); box-shadow: var(--shadow); }
.sample-name-card::after { content: ""; position: absolute; inset: .55rem -.48rem -.55rem .5rem; z-index: -1; border: 1px solid rgba(140, 169, 146, .55); background: rgba(255, 253, 248, .55); }
.sample-name-card-back { top: 0; right: .7rem; color: var(--muted); transform: rotate(5deg); }
.sample-name-card-front { bottom: 2rem; left: .5rem; transform: rotate(-4deg); }
.sample-name { color: var(--ink); font-family: var(--body); font-size: clamp(3rem, 12vw, 4.5rem); letter-spacing: -.05em; line-height: .95; }
.sample-note { margin-top: 1rem; color: var(--muted); font-size: .82rem; }
.sample-match { position: absolute; z-index: 2; right: 0; bottom: .35rem; display: flex; align-items: center; gap: .55rem; padding: .55rem .85rem; color: var(--sage-dark); border: 1px solid var(--sage); border-radius: 999px; background: var(--paper); box-shadow: 0 12px 28px rgba(60, 43, 28, .12); font-size: .76rem; font-weight: 700; }
.sample-match img { width: 1.65rem; height: 1.65rem; }
.landing-how { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.landing-how > h2, .landing-assurance h2, .landing-close h2 { max-width: 15ch; margin: .55rem 0 2rem; font-family: var(--serif); font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 550; letter-spacing: -.055em; line-height: 1; }
.landing-steps { display: grid; margin: 2.5rem 0 0; padding: 0; border-bottom: 1px solid var(--line); list-style: none; }
.landing-step { padding: 1.6rem .25rem 1.8rem; border-top: 1px solid var(--line); }
.step-number { color: var(--coral-dark); font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.landing-step h3 { margin: .85rem 0 .45rem; font-family: var(--serif); font-size: 1.45rem; font-weight: 570; letter-spacing: -.035em; line-height: 1.05; }
.landing-step p { max-width: 31ch; margin: 0; color: var(--muted); font-size: .92rem; }
.landing-assurance { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start; margin: clamp(3rem, 8vw, 6rem) 0; padding: clamp(1.5rem, 5vw, 3.2rem); border: 1px solid var(--line); border-left: 5px solid var(--sage); background: rgba(255, 253, 248, .66); box-shadow: 12px 12px 0 rgba(140, 169, 146, .12); }
.landing-assurance > img { width: clamp(3.5rem, 9vw, 5.5rem); height: auto; }
.landing-assurance h2 { margin-bottom: 1rem; }
.landing-assurance p { max-width: 45ch; margin: 0; color: var(--muted); font-size: 1rem; }
.landing-close { padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; }
.landing-close .eyebrow { text-align: center; }
.landing-close h2 { max-width: 16ch; margin-right: auto; margin-left: auto; }
.landing-footer { padding: 1.5rem 0 .5rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .78rem; text-align: center; }
.setup-page > .topbar, .links-page > .topbar { margin-bottom: 2.5rem; }
.overflow-menu { position: relative; }
.overflow-trigger { min-height: 44px; display: flex; align-items: center; cursor: pointer; padding: .55rem .7rem; color: var(--muted); font-size: .84rem; }
.overflow-body { position: absolute; z-index: 3; right: 0; top: 2.5rem; width: 210px; padding: .9rem; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.overflow-body a { display: block; padding: .4rem 0; font-weight: 700; }
.menu-note { margin: .7rem 0 0; color: var(--muted); font-size: .8rem; }
.primary-nav { display: flex; gap: .25rem; margin: 1.3rem 0 2.5rem; padding: .22rem; border-bottom: 1px solid var(--line); }
.nav-link { min-height: 44px; padding: .55rem .8rem; color: var(--muted); font-weight: 700; text-decoration: none; }
.nav-link.is-active { color: var(--ink); border-bottom: 3px solid var(--coral); }
.match-announcement { margin: -1.4rem 0 1.6rem; padding: .8rem 1rem; color: var(--sage-dark); border-left: 4px solid var(--sage); background: rgba(140, 169, 146, .14); }
.match-announcement strong { color: var(--ink); }
.page-content { padding-bottom: 2rem; }
.page-title, .hero-title { max-width: 12ch; margin: .55rem 0 1rem; font-family: var(--serif); font-size: clamp(2.2rem, 10vw, 4.6rem); font-weight: 580; letter-spacing: -.06em; line-height: .98; }
.hero-title { max-width: 10ch; margin-top: 1.3rem; }
.page-intro, .hero-copy { max-width: 37ch; margin: 0 0 1.8rem; color: var(--muted); font-size: 1.04rem; }
.vote-page, .search-page, .matches-page, .custom-page { animation: rise .45s ease both; }
.name-card { position: relative; isolation: isolate; min-height: min(61vh, 500px); margin: 2.5rem .25rem 1.1rem; padding: clamp(2rem, 10vw, 4rem) clamp(1.5rem, 8vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; background: var(--paper); box-shadow: var(--shadow); transform: rotate(-1.2deg); touch-action: pan-y; -webkit-user-select: none; user-select: none; will-change: transform; }
.name-card::before { content: ""; position: absolute; z-index: -1; inset: .6rem -.55rem -.8rem .6rem; border: 1px solid rgba(140, 169, 146, .55); background: rgba(255, 253, 248, .55); transform: rotate(3deg); }
.name-card::after { content: ""; position: absolute; top: 1rem; right: 1rem; padding: .3rem .55rem; opacity: 0; border: 2px solid currentColor; font-size: .72rem; font-weight: 700; letter-spacing: .12em; line-height: 1; transform: rotate(4deg) scale(.9); transition: opacity .12s ease, transform .12s ease; }
.name-card.is-dragging { cursor: grabbing; transition: none; }
.name-card.is-committed-like { outline: 4px solid var(--sage-dark); outline-offset: -4px; }
.name-card.is-committed-like::after { content: "LIKE"; color: var(--sage-dark); opacity: 1; transform: rotate(4deg) scale(1); }
.name-card.is-committed-dislike { outline: 4px solid var(--coral); outline-offset: -4px; }
.name-card.is-committed-dislike::after { content: "DISLIKE"; color: var(--coral-dark); opacity: 1; transform: rotate(-4deg) scale(1); }
.name-card.is-committed-like .swipe-hint { color: var(--sage-dark); font-weight: 700; }
.name-card.is-committed-dislike .swipe-hint { color: var(--coral-dark); font-weight: 700; }
.name-card.is-returning { transition: transform .18s ease-out; }
.name-card.is-exiting-like, .name-card.is-exiting-dislike { pointer-events: none; }
.name-card-details { transform: rotate(.5deg); }
.card-category { margin: 0 0 1rem; color: var(--sage-dark); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.name-title { max-width: 9ch; margin: 0; font-family: var(--body); font-size: clamp(3.2rem, 16vw, 7rem); font-weight: 700; letter-spacing: -.04em; line-height: .95; overflow-wrap: anywhere; }
.name-variants { margin: 1rem 0 0; color: var(--muted); font-size: .87rem; }
.name-meaning { max-width: 35ch; margin: 1.55rem 0 0; color: var(--muted); }
.name-meaning strong { color: var(--ink); font-weight: 700; }
.swipe-hint { margin: 2.2rem 0 0; color: var(--muted); font-size: .75rem; letter-spacing: .02em; }
.vote-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.button { min-height: 48px; padding: .65rem .8rem; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 700; transition: transform .18s ease, background .18s ease, color .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .5; }
.button-primary, .button-coral { color: #fffdf8; background: var(--coral); }
.button-primary:hover:not(:disabled), .button-coral:hover:not(:disabled) { background: var(--coral-dark); }
.button-coral-outline { color: var(--coral-dark); border-color: var(--coral); background: transparent; }
.button-sage { color: #fffdf8; background: var(--sage-dark); }
.button-gold { color: var(--ink); background: var(--gold-soft); }
.button-muted { color: var(--paper); background: var(--muted); }
.button-quiet { color: var(--ink); border-color: var(--line); background: transparent; }
.button-quiet:hover:not(:disabled) { background: #ebe3d6; }
.undo-note, .fine-print { margin: .8rem 0; color: var(--muted); font-size: .8rem; text-align: center; }
.state-panel { margin: 2rem 0; padding: 2rem 1.5rem; border: 1px solid var(--line); background: rgba(255, 253, 248, .56); }
.state-panel h1, .state-panel h2 { margin: .6rem 0 .4rem; font-family: var(--serif); font-weight: 550; letter-spacing: -.04em; line-height: 1.05; }
.muted { color: var(--muted); }
.inline-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.inline-actions .button { min-width: 125px; }
.form-error { padding: .7rem .8rem; color: var(--coral-dark); border-left: 3px solid var(--coral); background: rgba(216, 97, 76, .09); }
.search-form, .custom-form, .setup-form { display: grid; gap: 1rem; max-width: 540px; }
.participants-field { display: grid; gap: .7rem; margin: 0; padding: 0; border: 0; }
.participant-list { display: grid; gap: .8rem; }
.participant-entry { display: grid; gap: .7rem; padding: .9rem; border-left: 3px solid var(--sage); background: rgba(255, 253, 248, .46); }
.add-participant { justify-self: start; text-decoration: none; }
.participant-remove { min-height: 36px; justify-self: start; padding: 0; font-size: .8rem; }
.account-bar, .member-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.account-bar { justify-content: space-between; margin: 1rem 0; }
.member-manager { display: grid; gap: .8rem; margin: 2rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.member-row input, .member-row select { min-width: 0; flex: 1 1 10rem; }
label, legend { display: grid; gap: .4rem; color: var(--ink); font-size: .88rem; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 48px; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: rgba(255, 253, 248, .75); }
textarea { min-height: 112px; resize: vertical; }
.search-form { grid-template-columns: 1fr auto; align-items: end; }
.search-form label { grid-column: 1 / -1; }
.category-field { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; border: 0; }
.category-field legend { width: 100%; }
.check-option { display: flex; min-height: 44px; align-items: center; gap: .5rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 400; }
.check-option input { width: 1.1rem; min-height: 1.1rem; accent-color: var(--coral); }
.search-results { display: grid; gap: .7rem; margin-top: 1.8rem; }
.search-result { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.search-result-details .card-category { margin-bottom: .3rem; font-size: .66rem; }
.search-result-details .name-title { max-width: none; font-size: 2rem; letter-spacing: -.05em; }
.search-result-details .name-meaning { margin-top: .45rem; font-size: .86rem; }
.personal-state { margin: .5rem 0 0; color: var(--sage-dark); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.text-button { min-height: 44px; padding: .2rem 0; color: var(--coral-dark); border: 0; background: transparent; cursor: pointer; font-weight: 700; text-decoration: underline; }
.custom-prompt { margin-top: 1.7rem; color: var(--muted); }
.custom-form .inline-actions { justify-content: flex-end; }
.matches-list { display: grid; gap: .4rem; margin: 2rem 0; padding: 0; list-style: none; }
.match-item { display: flex; align-items: center; gap: 1rem; padding: 1rem .25rem; border-bottom: 1px solid var(--line); }
.match-copy { min-width: 0; flex: 1; }
.match-title { display: flex; align-items: baseline; gap: 1rem; flex: 1; }
.match-title h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 7vw, 2.8rem); font-weight: 530; letter-spacing: -.05em; line-height: 1; }
.match-detail { margin: .35rem 0 0; color: var(--muted); font-size: .84rem; }
.match-rank { color: var(--coral-dark); font-size: .75rem; font-weight: 700; }
.match-count { margin: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.setup-link { margin: 2rem 0; padding: 1.2rem; border: 1px solid var(--line); background: rgba(255, 253, 248, .6); }
.setup-link input, .link-row input { margin: .55rem 0; font-size: .78rem; }
.link-list { display: grid; gap: .7rem; margin-bottom: 1.5rem; }
.link-row { display: grid; grid-template-columns: minmax(5rem, .4fr) 1fr auto auto; align-items: center; gap: .55rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.link-row input { margin: 0; }
.link-row .button { min-height: 44px; }
.link-open { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.saved-rooms { margin: 2.7rem 0; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.saved-rooms h2 { margin: .45rem 0; font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.7rem); font-weight: 550; letter-spacing: -.04em; line-height: 1; }
.saved-rooms > .muted { margin: 0 0 1rem; }
.saved-room { margin-top: 1rem; padding: 1rem 1rem .35rem; border-left: 4px solid var(--sage); background: rgba(255, 253, 248, .58); }
.saved-room h3 { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-weight: 570; letter-spacing: -.025em; }
.saved-room-meta { margin: .2rem 0 .65rem; color: var(--muted); font-size: .78rem; }
.saved-room .link-list { margin-bottom: 0; }
.loading-inline { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript-message { margin: 4rem auto; max-width: 30rem; padding: 1rem; text-align: center; }
.confetti { position: fixed; z-index: 10; top: 50%; left: 50%; pointer-events: none; }
.confetti i { position: absolute; display: block; width: 8px; height: 18px; animation: confetti 1.25s cubic-bezier(.16,.72,.28,1) var(--d) both; }
.confetti .coral { background: var(--coral); } .confetti .sage { background: var(--sage); } .confetti .ink { background: var(--ink); } .confetti .gold { background: var(--gold); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes confetti { from { opacity: 1; transform: translate(0, 0) rotate(0); } to { opacity: 0; transform: translate(var(--x), 42vh) rotate(var(--r)); } }
@media (min-width: 700px) {
  .app-shell { padding-top: 2rem; padding-bottom: 4rem; }
  .primary-nav { margin-bottom: 4rem; }
  .name-card { margin-right: 3rem; margin-left: 1rem; }
  .vote-actions { max-width: 610px; margin: 0 auto; }
  .setup-page, .links-page { max-width: 650px; margin: 4rem auto; }
}
@media (min-width: 780px) {
  .landing-hero { grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); }
  .landing-steps { grid-template-columns: repeat(3, 1fr); }
  .landing-step { padding: 1.8rem 1.5rem 2.2rem; border-left: 1px solid var(--line); }
  .landing-step:first-child { padding-left: .25rem; border-left: 0; }
}
@media (min-width: 520px) {
  .participant-entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; align-items: end; }
  .participant-remove { margin-bottom: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 699px) {
  .app-shell { padding-bottom: max(5.4rem, calc(env(safe-area-inset-bottom) + 4.7rem)); }
  .app-shell.landing-shell { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }
  .landing-hero { min-height: 0; }
  .landing-assurance { grid-template-columns: 1fr; }
  .landing-assurance > img { width: 4rem; }
  .primary-nav { margin: .65rem 0 1rem; }
  .page-content { padding-bottom: 0; }
  .vote-page { padding-bottom: 4.8rem; animation: none; }
  .vote-page > .page-title { max-width: none; margin: .25rem 0 .35rem; font-size: clamp(1.75rem, 8vw, 2.15rem); letter-spacing: -.045em; line-height: 1; }
  .vote-page > .page-intro { max-width: none; margin-bottom: .7rem; font-size: .9rem; line-height: 1.35; }
  .vote-page .name-card { min-height: 0; margin: .8rem .2rem .8rem; padding: 1.35rem 1.25rem; }
  .vote-page .card-category { margin-bottom: .55rem; }
  .vote-page .name-title { font-size: clamp(2.8rem, 14vw, 4rem); line-height: .95; }
  .vote-page .name-meaning { margin-top: .8rem; font-size: .9rem; line-height: 1.38; }
  .vote-page .swipe-hint { margin-top: .9rem; }
  .vote-actions { position: fixed; z-index: 8; right: max(.75rem, env(safe-area-inset-right)); bottom: max(.45rem, env(safe-area-inset-bottom)); left: max(.75rem, env(safe-area-inset-left)); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; padding: .5rem; border: 1px solid var(--line); background: rgba(246, 240, 230, .96); box-shadow: 0 12px 35px rgba(41, 39, 35, .18); backdrop-filter: blur(10px); }
  .vote-actions .button { min-width: 0; padding: .55rem .25rem; font-size: .78rem; }
}
@media (max-width: 480px) {
  .search-form { display: grid; grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 1fr; }
  .search-result .button { width: 100%; }
  .link-row { grid-template-columns: 1fr auto auto; }
  .link-row input { grid-column: 1 / -1; grid-row: 2; }
}
