:root {
  color-scheme: light dark;
  --bg: #f6f4ee;
  --surface: #ffffff;
  --fg: #1f2d26;
  --muted: #55635b;
  --line: #d9d8cf;
  --accent: #2f5d46;
  --accent-strong: #234835;
  --on-accent: #ffffff;
  --danger: #a3341f;
  --danger-bg: #fbe9e4;
  --ok: #24613f;
  --ok-bg: #e3f1e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16201b;
    --surface: #1f2b25;
    --fg: #eef2ec;
    --muted: #a9b6ae;
    --line: #36443c;
    --accent: #7fc29c;
    --accent-strong: #9ad4b3;
    --on-accent: #10201a;
    --danger: #ffb4a3;
    --danger-bg: #43231c;
    --ok: #a5dfbd;
    --ok-bg: #1d3a2a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 32px 0 12px; }
p { margin: 0 0 16px; }
.lead { color: var(--muted); }
.flush { margin: 0; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; color: var(--fg); text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 17px; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.top nav a, .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--fg);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.top nav a[aria-current="page"] { background: var(--bg); font-weight: 600; }

.page { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 28px 16px 40px; }
.page.narrow { max-width: 460px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 20px; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 6px; font-weight: 600; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 16px; }
input, select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.password { position: relative; display: block; }
.password input { padding-right: 112px; }
.toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-strong); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button.quiet { width: auto; min-height: 44px; background: none; color: var(--danger); border: 1.5px solid var(--line); }

.notice { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice:empty { display: none; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list strong { overflow-wrap: anywhere; }
.list small { display: block; color: var(--muted); font-size: 16px; }

.field em { margin-left: 6px; font-size: 15px; font-style: normal; font-weight: 500; color: var(--accent); }
.field em.optional { color: var(--muted); }
.field .label { display: block; margin-bottom: 8px; font-weight: 600; }
.hint { margin: 10px 0 16px; color: var(--muted); font-size: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.button.secondary { position: relative; background: none; color: var(--accent); border: 1.5px solid var(--accent); }
.button.secondary:hover { background: var(--bg); }
.button.secondary:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin-top: 12px; cursor: pointer; }
.check input { flex: none; width: 26px; height: 26px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--accent); }
.check.consent { margin: 0 0 20px; padding: 14px; border-radius: 10px; background: var(--bg); font-size: 16px; }
.avatar { display: block; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.avatar.initials { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 38px; font-weight: 700; }
.avatar.preview { margin: 0 auto 14px; }
.avatar[hidden] { display: none; }
.profile { text-align: center; }
.profile .avatar { margin: 0 auto 16px; }
.actions { display: grid; gap: 10px; margin: 20px 0; }
.profile dl { margin: 0 0 20px; padding: 0; text-align: left; }
.profile dt { margin-top: 14px; color: var(--muted); font-size: 16px; }
.profile dd { margin: 0; overflow-wrap: anywhere; }
.later { margin-top: 10px; text-align: center; }
.later .link { color: var(--muted); text-decoration: underline; }
.danger-zone { margin-top: 24px; text-align: center; }
@media (min-width: 560px) { .actions { grid-template-columns: 1fr 1fr; } }

.photo-adjust { margin-bottom: 10px; }
.photo-adjust[hidden] { display: none; }
.cropper { width: min(calc(100vw - 24px), 460px); max-height: calc(100dvh - 24px); padding: 18px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); }
.cropper::backdrop { background: rgba(10, 18, 14, 0.72); }
.cropper h2 { margin: 0 0 12px; }
.cropper .hint { margin: 10px 0 6px; }
.cropper .actions { grid-template-columns: 1fr 1fr; margin: 10px 0 0; }
.crop-stage { display: block; width: min(100%, calc(100dvh - 330px)); min-width: 200px; aspect-ratio: 1; margin: 0 auto; border-radius: 10px; background: #e9e6dc; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 8px; }
.crop-zoom input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; accent-color: var(--accent); }
.crop-zoom input:focus { outline: none; }
.crop-zoom input:focus-visible { outline: 3px solid var(--accent); }
.crop-step { flex: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: none; color: var(--fg); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 22px; font-size: 16px; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.attributes { padding: 0; border: 0; }
.attributes legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.filter-group { margin-bottom: 14px; }
.filter-group summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.filter-group summary::after { content: "▾"; margin-left: 8px; color: var(--muted); }
.reset { margin: 12px 0 0; text-align: center; }
.search + .hint { margin-top: 16px; }
.people { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.people a { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); text-decoration: none; }
.people .avatar { flex: none; width: 52px; height: 52px; font-size: 19px; }
.people strong, .people small { display: block; overflow-wrap: anywhere; }
.people small { color: var(--muted); font-size: 16px; }
@media (min-width: 720px) { .people { grid-template-columns: 1fr 1fr; } }
.tag { display: inline-flex; padding: 4px 12px; border-radius: 16px; background: var(--bg); font-size: 16px; }
.profile-chips { justify-content: center; margin-bottom: 14px; }
.start-link { margin-top: 14px; }
.filter-admin { margin-top: 16px; }
.filter-admin h2 { margin-top: 0; }
.filter-admin h2 small { color: var(--muted); font-weight: 400; }
.inline-add { margin-top: 12px; }

textarea { display: block; min-height: 132px; line-height: 1.45; resize: vertical; }
.custom-option { display: block; margin-top: 12px; }
.custom-option span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 16px; }
.about { text-align: left; white-space: pre-line; overflow-wrap: anywhere; }

.portfolio { display: grid; gap: 8px; }
.category { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.category[open] { border-color: var(--accent); }
.category summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; font-weight: 600; cursor: pointer; list-style: none; }
.category summary::-webkit-details-marker { display: none; }
.category summary > span:first-child { flex: 1; }
.category summary::after { content: "›"; flex: none; color: var(--muted); font-size: 24px; line-height: 1; transition: transform 0.15s; }
.category[open] summary::after { transform: rotate(90deg); }
.category > .chips, .category > .list, .category > .custom-option, .category > .inline-add, .category > .danger-zone { margin-left: 14px; margin-right: 14px; }
.category > :last-child { margin-bottom: 14px; }
.group-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 700; }
.group-count[hidden] { display: none; }
.chip small { margin-left: 7px; padding: 0 6px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600; }
.chip input:checked + span small { background: var(--on-accent); color: var(--accent); }
.custom-option small { margin-top: 6px; color: var(--muted); font-size: 15px; }
.picker-hint { margin: -2px 0 10px !important; }
.filter-title { margin: 0 0 8px; font-weight: 600; }
.profile-portfolio { margin-bottom: 18px; text-align: left; }
.profile-portfolio h2 { margin: 18px 0 8px; font-size: 1.1rem; }
.profile-portfolio h3 { margin: 10px 0 6px; color: var(--muted); font-size: 16px; font-weight: 600; }
.filter-admin .list small { display: block; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.move-option { display: flex; flex-wrap: wrap; gap: 8px; }
.move-option select { width: auto; max-width: 210px; min-height: 44px; padding: 6px 10px; font-size: 16px; }
.button.compact { width: auto; min-height: 44px; padding: 6px 12px; font-size: 16px; }
.filter-admin .notice .list li { border-color: var(--line); }

.bare { flex: 1; width: 100%; }
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(78dvh, 720px); overflow: hidden; background: #24483a; color: #fff; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 42% 45%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 28, 22, 0.05) 25%, rgba(10, 28, 22, 0.78) 100%); }
.hero-text { position: relative; z-index: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 32px 20px 56px; }
.hero-text h1 { max-width: 15em; margin-bottom: 12px; font-size: clamp(2.1rem, 6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; }
.hero-text p { max-width: 34em; margin-bottom: 22px; font-size: 1.08rem; }
.hero-text .eyebrow { margin-bottom: 10px; font-size: 16px; font-weight: 600; letter-spacing: 0.04em; }
.hero-text .button { width: auto; min-width: 200px; background: #fff; color: #234835; }
.hero-text .button:hover { background: #e9f0ea; }
.hero-text .button:focus-visible { outline-color: #fff; }
.hero-credit { position: absolute; z-index: 1; right: 8px; bottom: 6px; padding: 2px 6px; color: rgba(255, 255, 255, 0.86); font-size: 13px; text-decoration: none; }
.intro { display: grid; gap: 24px; max-width: 920px; margin: 0 auto; padding: 36px 20px 8px; }
.intro h2 { margin: 0 0 6px; color: var(--accent); }
.intro p { margin: 0; color: var(--muted); }
@media (min-width: 720px) { .intro { grid-template-columns: repeat(3, 1fr); } }
.invite-note { max-width: 920px; margin: 0 auto; padding: 22px 20px 34px; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.legal h2 { margin: 26px 0 8px; font-size: 1.12rem; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal { overflow-wrap: anywhere; }

.foot { display: flex; justify-content: center; gap: 20px; padding: 16px; color: var(--muted); font-size: 16px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }

.wishes { margin-top: 36px; scroll-margin-top: 16px; }
.wishes h2 { margin-top: 0; margin-bottom: 4px; }
.wish-new { margin-bottom: 16px; padding: 0 20px; }
.wish-new summary { display: flex; align-items: center; min-height: 56px; font-weight: 600; color: var(--accent); cursor: pointer; }
.wish-new summary::before { content: "+"; width: 24px; font-size: 1.3rem; line-height: 1; }
.wish-new[open] summary::before { content: "–"; }
.wish-new form { padding-bottom: 20px; }
.wish-new textarea { display: block; resize: vertical; }
.wish { margin-bottom: 14px; scroll-margin-top: 16px; overflow-wrap: anywhere; }
.wish:target { border-color: var(--accent); }
.wish h3 { margin: 0 0 2px; font-size: 1.15rem; line-height: 1.3; }
.wish-meta { margin-bottom: 12px; color: var(--muted); font-size: 16px; }
.wish-text { white-space: pre-line; }
.wish-reason { padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); white-space: pre-line; }
.wish-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.like { display: inline-flex; align-items: center; gap: 6px; min-width: 64px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 22px; background: none; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.like.active { border-color: var(--accent); background: var(--ok-bg); color: var(--ok); }
