:root {
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #243a33;
  background: #f5f7f6;
  font-synthesis: none;
  --green: #184d3f;
  --muted: #60756d;
  --line: #dce5e0;
  --red: #a23842;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: white;
  padding: 13px 19px;
  font-weight: 650;
  min-height: 46px;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button.secondary {
  background: #eaf0ec;
  color: var(--green);
}
button.ghost {
  background: transparent;
  color: var(--green);
}
button.danger {
  background: #faedef;
  color: var(--red);
}
button.small {
  font-size: 0.875rem;
  padding: 10px 13px;
  min-height: 42px;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.brand img {
  width: 36px;
  height: 36px;
}
.top {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 28px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #e0ebe4;
  border-radius: 50%;
  font-weight: 700;
}
.shell {
  max-width: 1050px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}
.hero {
  background: var(--green);
  color: white;
  border-radius: 24px;
  padding: 38px;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow {
  color: #b9d6c7;
}
.hero p {
  color: #d2e4da;
  max-width: 450px;
  margin-bottom: 0;
}
.hero h1 {
  max-width: 580px;
  margin-bottom: 16px;
}
.hero-art {
  position: absolute;
  right: 35px;
  top: 35px;
  font-size: 6rem;
  opacity: 0.8;
  transform: rotate(-12deg);
  pointer-events: none;
}
.tabs {
  display: flex;
  gap: 7px;
  margin: 26px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}
.tabs button.active {
  background: #e1ece5;
  color: var(--green);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 22px;
}
.section-head h2 {
  margin-bottom: 7px;
}
.section-head p {
  margin: 0;
  font-size: 0.95rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.card h3,
.card p {
  overflow-wrap: anywhere;
}
.card p.notes {
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.95rem;
}
.card .price {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--green);
  margin-bottom: 12px;
}
.card a {
  font-size: 0.9rem;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  flex-wrap: wrap;
  width: 100%;
}
.purchased {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #edf5ef;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--green);
}
.check {
  font-size: 1rem;
}
.empty {
  text-align: center;
  padding: 48px 25px;
  background: white;
  border: 1px dashed #c9d8cf;
  border-radius: 18px;
  grid-column: 1/-1;
}
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: #edf3ee;
  border-radius: 17px;
  font-size: 1.6rem;
  color: var(--green);
}
.empty p {
  max-width: 380px;
  margin: 0 auto 22px;
  color: var(--muted);
}
.people {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.people button {
  background: white;
  color: var(--green);
  border: 1px solid var(--line);
}
.people button.active {
  background: var(--green);
  color: white;
}
.footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 1000px;
  margin: 65px auto;
  padding: 0 28px;
  gap: 60px;
  align-items: center;
}
.auth-story {
  padding: 32px 0;
}
.auth-story h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-family: Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.auth-story p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 400px;
}
.ornaments {
  display: flex;
  gap: 15px;
  margin: 30px 0;
}
.ornament {
  height: 75px;
  width: 75px;
  display: grid;
  place-items: center;
  background: #dce9df;
  border-radius: 50%;
  font-size: 2rem;
  color: var(--green);
}
.ornament:nth-child(2) {
  background: #f5e0e0;
  transform: translateY(18px);
  color: #a54c54;
}
.ornament:nth-child(3) {
  background: #f4e8c9;
  color: #967a30;
}
.auth-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 18px 55px #184d3f08;
}
.auth-panel h2 {
  margin-bottom: 10px;
}
.auth-panel p {
  font-size: 0.95rem;
  color: var(--muted);
}
label {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #c6d5cd;
  border-radius: 10px;
  padding: 13px;
  background: #fff;
  color: #243a33;
  min-height: 48px;
}
input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9dc8af;
  outline-offset: 3px;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
.field {
  margin: 20px 0;
}
.wide {
  width: 100%;
}
.help {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.notice {
  background: #fff3d7;
  color: #6a521f;
  padding: 14px;
  border-radius: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.error {
  color: #9b293a;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 14px;
}
.loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #213e32;
  color: white;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 8px 35px #0002;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 5;
  display: none;
}
#toast.show {
  display: block;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  width: min(500px, calc(100% - 30px));
  padding: 28px;
  color: #243a33;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #13332777;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  justify-content: flex-end;
}
.group-title {
  margin: 28px 0 15px;
}
.invite-output {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  padding: 15px;
  background: #edf3ee;
  border-radius: 10px;
}
.privacy-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 25px;
}
.family-select {
  max-width: 220px;
  margin-top: 20px;
}
@media (max-width: 700px) {
  .top {
    padding: 18px 20px;
  }
  .identity > span {
    display: none;
  }
  .shell {
    padding: 12px 18px 55px;
  }
  .hero {
    padding: 28px 24px;
  }
  .hero-art {
    display: none;
  }
  .tabs {
    gap: 0;
    justify-content: space-between;
  }
  .tabs button {
    font-size: 0.9rem;
    padding: 12px 10px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head h2 {
    font-size: 1.4rem;
  }
  .section-head p {
    font-size: 0.875rem;
  }
  .section-head > button {
    font-size: 0.875rem;
    padding: 12px 14px;
    white-space: nowrap;
  }
  .card {
    padding: 22px;
  }
  .auth {
    display: block;
    padding: 0 22px;
    margin: 10px auto 50px;
    max-width: 480px;
  }
  .auth-story {
    padding: 15px 5px 20px;
  }
  .auth-story h1 {
    font-size: 2.6rem;
    margin-bottom: 17px;
  }
  .auth-story p {
    font-size: 1rem;
  }
  .ornaments {
    display: none;
  }
  .auth-panel {
    padding: 26px;
  }
  .footer {
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      filter 0.15s;
  }
  .card {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.5;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Family actions stay ahead of list content at every viewport size. */
.family-hub {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
}
.family-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.family-context h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.family-context p {
  margin: 0;
}
.family-context .eyebrow {
  margin-bottom: 10px;
}
.invite-primary {
  flex-shrink: 0;
  padding-inline: 26px;
}
.family-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.family-tools .family-select {
  margin: 0;
  max-width: 280px;
  flex: 1;
  min-width: 150px;
}
.family-select select {
  margin-top: 7px;
}
.family-options {
  position: relative;
}
.family-options summary,
.footer summary,
.invite-settings summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 4px;
}
.family-options[open] > button {
  position: absolute;
  top: 48px;
  left: 0;
  white-space: nowrap;
  z-index: 2;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px #184d3f15;
}
.share-explainer {
  background: #edf3ee;
  padding: 18px;
  margin: 20px 0;
  border-radius: 12px;
}
.share-explainer p {
  margin: 8px 0 0;
  font-size: 0.95rem;
}
.share-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.share-actions button {
  flex: 1;
}
.invite-settings {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.onboarding {
  max-width: 900px;
  padding-top: 50px;
}
.onboarding > h1 {
  max-width: 650px;
}
.onboarding-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.onboarding-options .card button {
  margin-top: auto;
}
.onboarding-options .card h2 {
  font-size: 1.35rem;
}
button.small {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #23754e;
  outline-offset: 3px;
}
.footer p {
  margin-bottom: 4px;
}
.grid > .empty {
  grid-column: 1 / -1;
}
.list-content {
  min-width: 0;
}
@media (max-width: 700px) {
  .top {
    padding: 12px 18px;
  }
  .top .avatar {
    display: none;
  }
  .shell {
    padding-top: 8px;
  }
  .family-hub {
    padding: 20px;
    border-radius: 16px;
  }
  .family-context {
    flex-wrap: wrap;
    gap: 16px;
  }
  .family-context > div {
    flex: 1 1 100%;
  }
  .invite-primary {
    width: 100%;
  }
  .family-tools {
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
  }
  .family-tools > button {
    flex: 1;
    padding-inline: 10px;
    font-size: 0.9rem;
  }
  .family-tools .family-select {
    flex-basis: 100%;
    max-width: none;
    margin-bottom: 5px;
  }
  .family-options {
    flex-basis: 100%;
  }
  .tabs {
    margin-top: 18px;
    margin-bottom: 18px;
  }
  .section-head {
    margin-top: 20px;
  }
  .auth-story {
    padding-top: 8px;
    padding-bottom: 6px;
  }
  .auth-story h1 {
    font-size: 2rem;
    margin-bottom: 8px;
  }
  .auth-story .eyebrow {
    margin-bottom: 8px;
  }
  .auth-story p {
    margin-bottom: 12px;
  }
  .auth-panel {
    padding: 22px;
  }
  .onboarding {
    padding-top: 30px;
  }
  .onboarding-options {
    grid-template-columns: 1fr;
  }
  .share-actions {
    flex-direction: column;
  }
  .brand {
    font-size: 1rem;
  }
  .section-head {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .tabs button {
    flex: 1;
    min-width: 0;
    white-space: normal;
    line-height: 1.35;
    padding-inline: 8px;
  }
}
.invite-primary {
  max-width: 45%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.family-context > div {
  min-width: 0;
}
.dialog-head h2 {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .invite-primary {
    max-width: none;
  }
}
