:root {
  color-scheme: light;
  --bg: #F7F3EA;
  --surface: #FFFDF8;
  --surface-2: #F0EBDD;
  --surface-3: #E7EBDD;
  --text: #1F2A22;
  --muted: #5C6B60;
  --line: #E3DCC9;
  --brand: #2C4A3B;
  --brand-strong: #20382C;
  --brand-soft: #E4EBDD;
  --leaf: #6B8A6A;
  --terracotta: #A85F49;
  --terracotta-soft: #F2E3DB;
  --gold: #9A7B3F;
  --danger: #A64A42;
  --claimed: #A8B89A;
  --shadow: 0 18px 48px rgba(31, 42, 34, .08);
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111914;
  --surface: #18221c;
  --surface-2: #202d25;
  --surface-3: #293a2f;
  --text: #f2f4ed;
  --muted: #aeb7b0;
  --line: #35443a;
  --brand: #9ac178;
  --brand-strong: #d9edc8;
  --brand-soft: #253a2b;
  --leaf: #9ac178;
  --terracotta: #e08a73;
  --terracotta-soft: #482a23;
  --gold: #d5ae61;
  --danger: #ff9287;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font-ui); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--leaf), transparent 35%); outline-offset: 2px; }
[hidden] { display: none !important; }

.boot { min-height: 100vh; display: grid; place-content: center; gap: 14px; justify-items: center; color: var(--muted); }
.boot img { width: 54px; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-4px); opacity: .72; } }

.icon { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-lockup img { width: 38px; height: 38px; }
.brand-name { font: 700 25px/1 var(--font-display); letter-spacing: -.04em; }
.theme-button, .icon-button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); }
.theme-button:hover, .icon-button:hover { background: var(--surface-2); }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr); position: relative; overflow: hidden; }
.auth-story { min-height: 100vh; padding: 34px clamp(34px, 5vw, 76px) 40px; position: relative; display: flex; flex-direction: column; isolation: isolate; }
.auth-story::after { content: ""; position: absolute; inset: auto -12% -28% 12%; aspect-ratio: 1; border-radius: 50%; background: var(--brand-soft); opacity: .72; z-index: -2; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-copy { width: min(500px, 55%); margin-top: clamp(60px, 10vh, 128px); position: relative; z-index: 2; }
.auth-copy h1 { font-size: clamp(49px, 5.1vw, 80px); line-height: .98; margin-bottom: 24px; max-width: 9ch; }
.auth-copy p { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 37ch; }
.auth-art { position: absolute; right: -1%; bottom: -7%; width: min(55%, 650px); height: 86%; object-fit: contain; object-position: bottom center; z-index: -1; filter: saturate(.88); }
.story-notes { margin-top: auto; display: flex; gap: 30px; flex-wrap: wrap; color: var(--muted); font-size: 13px; position: relative; z-index: 2; }
.story-note { display: flex; align-items: center; gap: 8px; }
.story-note .icon { color: var(--brand); }

.auth-panel-wrap { min-height: 100vh; padding: 30px clamp(24px, 4vw, 66px); display: grid; place-items: center; background: color-mix(in srgb, var(--surface), transparent 12%); border-left: 1px solid var(--line); }
.auth-panel { width: min(500px, 100%); }
.auth-panel h2 { font-size: clamp(34px, 3vw, 48px); margin-bottom: 8px; }
.auth-panel > p { color: var(--muted); margin-bottom: 28px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 26px; }
.auth-tab { padding: 11px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 700; }
.auth-tab.active { background: var(--surface); color: var(--brand-strong); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.field { margin-bottom: 17px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 7px; }
.input-wrap { position: relative; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 13px; padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted), transparent 22%); }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand), transparent 85%); }
textarea { min-height: 104px; resize: vertical; }
.password-button { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: -2px 0 10px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 10px 15px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand), var(--line) 50%); }
.button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast, #fff); }
.button.danger { color: var(--danger); }
.button.ghost { background: transparent; border-color: transparent; }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.auth-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-footnote .icon { color: var(--brand); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; padding: 25px 18px 20px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; z-index: 20; }
.sidebar .brand-lockup { padding: 0 8px 28px; }
.nav-list { display: grid; gap: 5px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px; padding: 11px 12px; background: transparent; color: var(--muted); text-align: left; font-weight: 600; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--brand-strong); background: var(--brand-soft); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 7px; }
.sidebar-quote { padding: 15px 12px; color: var(--muted); font: 600 15px/1.45 var(--font-display); }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; }
.profile-button:hover { background: var(--surface-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 800; flex: 0 0 auto; background: var(--brand); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.app-body { min-width: 0; }
.mobile-header { display: none; height: 64px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg), transparent 6%); backdrop-filter: blur(15px); border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; padding: 0 16px; z-index: 18; }
.mobile-header .brand-name { font-size: 21px; }
.mobile-actions { display: flex; align-items: center; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 290px; min-height: 100vh; }
.main-content { min-width: 0; padding: 48px clamp(28px, 4.5vw, 74px) 80px; }
.aside { padding: 39px 25px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface), transparent 35%); }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 29px; }
.page-title h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1.03; margin-bottom: 8px; }
.page-title p { margin: 0; color: var(--muted); font-size: 16px; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.filter.active { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.select-inline { width: auto; min-width: 146px; padding: 9px 33px 9px 12px; background-color: var(--surface); }
.quick-add { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 7px 8px 7px 14px; margin: 17px 0 8px; background: var(--surface); }
.quick-add input { border: 0; background: transparent; box-shadow: none; padding: 8px; }
.quick-add input:focus { box-shadow: none; }

.wish-list { display: grid; }
.wish-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: center; }
.wish-image { width: 104px; height: 88px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.wish-placeholder { display: grid; place-items: center; color: var(--brand); }
.wish-placeholder .icon { width: 30px; height: 30px; }
.wish-copy { min-width: 0; }
.wish-copy h3 { margin: 0 0 4px; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 5px; }
.wish-price { font-weight: 700; }
.priority { font-size: 12px; font-weight: 700; color: var(--terracotta); }
.priority.medium { color: var(--gold); }
.priority.low { color: var(--brand); }
.wish-note { color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish-actions { display: flex; gap: 5px; }
.wish-actions .icon-button { width: 38px; height: 38px; }
.end-cap, .empty-state { margin-top: 22px; padding: 24px; border: 1px dashed var(--line); border-radius: 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.end-cap h3, .empty-state h2 { margin: 0 0 3px; font-size: 20px; }
.end-cap p, .empty-state p { margin: 0; color: var(--muted); }
.empty-state { min-height: 260px; justify-content: center; text-align: center; flex-direction: column; }
.empty-state > .icon { width: 38px; height: 38px; color: var(--brand); }

.aside-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.aside-head h2 { font-size: 27px; margin: 0; }
.occasion-list { display: grid; gap: 4px; }
.occasion { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px 0; }
.occasion-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.occasion-icon.terra { color: var(--terracotta); background: var(--terracotta-soft); }
.occasion strong { display: block; }
.occasion span { color: var(--muted); font-size: 12px; }
.aside-message { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font: 600 16px/1.5 var(--font-display); }

.panel { border-top: 1px solid var(--line); padding: 25px 0; }
.panel:first-of-type { border-top: 0; padding-top: 0; }
.panel-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 16px; }
.panel h2 { font-size: 25px; margin: 0; }
.profile-grid, .group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.profile-card, .group-card, .claim-row { border: 1px solid var(--line); border-radius: 15px; padding: 17px; background: var(--surface); }
.profile-card { display: flex; align-items: center; gap: 13px; }
.profile-card .avatar { width: 46px; height: 46px; }
.profile-card-copy { min-width: 0; flex: 1; }
.profile-card-copy strong { display: block; }
.profile-card-copy span { color: var(--muted); font-size: 12px; }
.group-card h3 { margin: 0 0 4px; font-size: 21px; }
.group-card p { color: var(--muted); margin: 0 0 14px; }
.group-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-code {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: 700 12px/1 var(--font-ui);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}
.invite-code > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.invite-code > strong {
  font: 800 12px/1 var(--font-ui);
  letter-spacing: .1em;
}
.invite-code .icon {
  width: 13px;
  height: 13px;
  opacity: .55;
}
.invite-code:hover,
.invite-code:focus-visible {
  border-color: color-mix(in srgb, var(--brand), var(--line) 50%);
  background: color-mix(in srgb, var(--brand-soft), transparent 20%);
  color: var(--brand-strong);
  transform: translateY(-1px);
}
.invite-code:hover .icon,
.invite-code:focus-visible .icon {
  opacity: 1;
}
.claim-list { display: grid; gap: 10px; }
.claim-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 13px; align-items: center; }
.claim-row img, .claim-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 11px; background: var(--surface-2); }
.claim-row h3 { margin: 0 0 3px; font: 700 16px var(--font-ui); }
.claim-row p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-form { max-width: 610px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger), transparent 55%); }

.modal-layer { position: fixed; inset: 0; background: rgba(10, 17, 12, .62); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; z-index: 60; animation: fade .14s ease-out; }
.modal { width: min(610px, 100%); max-height: min(90vh, 850px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; animation: rise .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: .7; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 30px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.share-box { display: flex; gap: 8px; }
.share-box input { min-width: 0; }
.toggle-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 12px 0; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--brand-soft); border-color: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--brand); }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 15px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); animation: rise .2s ease-out; }

.public-page { min-height: 100vh; }
.public-header { max-width: 980px; margin: auto; padding: 26px 24px; display: flex; justify-content: space-between; align-items: center; }
.public-main { max-width: 850px; margin: auto; padding: 42px 24px 90px; }
.public-title { text-align: center; margin-bottom: 45px; }
.public-title .avatar { width: 62px; height: 62px; margin: 0 auto 15px; }
.public-title h1 { font-size: 48px; margin-bottom: 5px; }
.public-title p { color: var(--muted); }
.public-claimed { opacity: .58; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .aside { border-left: 0; border-top: 1px solid var(--line); padding: 28px clamp(28px, 4.5vw, 74px) 55px; }
  .occasion-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-message { display: none; }
  .auth-copy { width: 62%; }
  .auth-art { right: -10%; width: 63%; opacity: .82; }
}
@media (max-width: 840px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding: 24px; }
  .auth-copy { width: 100%; margin: 65px auto 40px; text-align: center; }
  .auth-copy h1 { max-width: 11ch; margin-left: auto; margin-right: auto; }
  .auth-copy p { margin-left: auto; margin-right: auto; }
  .auth-art, .story-notes { display: none; }
  .auth-panel-wrap { min-height: auto; padding: 45px 22px 70px; border-left: 0; border-top: 1px solid var(--line); }
  .app-shell { display: block; }
  .sidebar { display: none; position: fixed; width: 270px; left: 0; top: 0; }
  .sidebar.open { display: flex; }
  .mobile-header { display: flex; }
  .main-content { padding-top: 32px; }
  .page-head { align-items: flex-start; }
}
@media (max-width: 620px) {
  .main-content, .aside { padding-left: 17px; padding-right: 17px; }
  .page-head { display: grid; }
  .head-actions { justify-content: flex-start; }
  .head-actions .button { flex: 1; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .select-inline { width: 100%; }
  .wish-row { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; }
  .wish-image { width: 76px; height: 76px; }
  .wish-copy h3 { font-size: 17px; }
  .wish-actions { flex-direction: column; }
  .quick-add { grid-template-columns: auto minmax(0,1fr); }
  .quick-add .button { grid-column: 1 / -1; }
  .profile-grid, .group-grid, .occasion-list { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .end-cap { align-items: flex-start; flex-direction: column; }
  .public-title h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Product interaction details */
.muted-copy { color: var(--muted); font-size: 13px; }
.utility-row { display: flex; align-items: center; gap: 4px; padding: 0 5px; }
.profile-button > span:not(.avatar) { min-width: 0; flex: 1; display: grid; }
.profile-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button > .icon { width: 16px; height: 16px; color: var(--muted); }
.profile-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 15px; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 7px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); background: var(--surface); font-weight: 700; font-size: 13px; }
.profile-chip:hover, .profile-chip.active { color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand), var(--line) 35%); background: var(--brand-soft); }
.profile-chip .avatar { width: 27px; height: 27px; font-size: 10px; }
.mini { width: 30px !important; height: 30px !important; }
.empty-mini { color: var(--muted); padding: 15px 0; font-size: 13px; }
.soft-tag { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 3px 9px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.inline-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); text-decoration: none; font-size: 13px; font-weight: 700; margin-top: 5px; }
.inline-link .icon { width: 14px; height: 14px; }
.claim-state { color: var(--muted); font-size: 13px; font-weight: 700; padding: 8px 0; }
.card-actions, .claim-actions { display: flex; align-items: center; gap: 4px; }
.group-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.member-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.member-pills span { padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 8px; font-weight: 700; }
.back-link:hover { color: var(--brand); }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 610px; }
.setting-line > div { display: grid; }
.setting-line span { color: var(--muted); font-size: 13px; }
.session-list { display: grid; gap: 7px; max-width: 760px; }
.session-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.session-row > div { display: flex; align-items: center; gap: 11px; }
.session-row span { display: grid; }
.session-row small { color: var(--muted); }
.optional { color: var(--muted); font-weight: 500; }
.modal-delete-left { margin-right: auto; }
.profile-picker { display: grid; gap: 8px; }
.profile-pick-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 30px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.profile-pick-row:hover,
.profile-pick-row.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.profile-pick-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px 12px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.profile-pick-main > span:not(.avatar) {
  min-width: 0;
  flex: 1;
  display: grid;
}
.profile-pick-main strong,
.profile-pick-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-pick-main small { color: var(--muted); }
.profile-pick-edit,
.profile-pick-next {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.profile-pick-edit {
  width: 38px;
  height: 38px;
}
.profile-pick-next {
  width: 30px;
  height: 44px;
}
.profile-pick-edit:hover {
  background: color-mix(in srgb, var(--brand), transparent 88%);
  color: var(--brand);
  transform: translateY(-1px);
}
.profile-pick-next:hover {
  color: var(--text);
}
.profile-pick-edit .icon,
.profile-pick-next .icon {
  width: 17px;
  height: 17px;
}
.claim-thumb { display: grid; place-items: center; color: var(--brand); }
.claim-thumb .icon { width: 25px; height: 25px; }

@media (max-width: 620px) {
  .profile-tabs { margin-right: -17px; padding-right: 17px; }
  .group-card-top { align-items: flex-start; flex-direction: column; }
  .claim-row { grid-template-columns: 48px minmax(0, 1fr); }
  .claim-row img, .claim-thumb { width: 48px; height: 48px; }
  .claim-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .session-row { align-items: flex-start; }
}


/* Image-first wishlist cards */
.workspace.no-aside { grid-template-columns: minmax(0, 1fr); }
.workspace.no-aside .main-content { max-width: 1500px; width: 100%; margin: 0 auto; }

.wish-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}
.wish-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text), transparent 96%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.wish-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text), transparent 92%);
}
.wish-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
}
.wish-media .wish-image {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  display: block;
}
.wish-media .wish-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.wish-media .wish-placeholder .icon { width: 34px; height: 34px; color: var(--brand); }
.wish-card-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.wish-card-tools .icon-button {
  width: 34px;
  height: 34px;
  background: color-mix(in srgb, var(--surface), transparent 8%);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,.09);
}
.wish-owner {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface), transparent 7%);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wish-card-body { padding: 14px 14px 15px; }
.wish-card-body h3 {
  margin: 0 0 7px;
  font: 700 18px/1.2 var(--font-ui);
  letter-spacing: -.01em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wish-card .wish-meta { margin-bottom: 7px; gap: 8px; }
.wish-card .wish-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wish-card .inline-link { margin-top: 9px; }
.wish-card-footer { margin-top: 13px; }
.wide-state {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.public-claimed .wish-media { filter: saturate(.65); }

/* Upload control */
.image-upload {
  display: grid;
  gap: 8px;
  cursor: pointer;
}
.image-upload > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.image-upload-preview {
  min-height: 210px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--muted);
}
.image-upload-preview > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.image-upload-preview .icon { width: 20px; height: 20px; }
.image-upload-preview img {
  width: 100%;
  height: 250px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--surface);
}
.image-upload:hover .image-upload-preview {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.image-upload-copy { color: var(--muted); font-size: 12px; }
.remove-image {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

/* All-wishlists directory */
.directory-block { margin-top: 36px; }
.directory-block:first-of-type { margin-top: 0; }
.directory-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.directory-title h2 { margin: 2px 0 0; font-size: 30px; }
.directory-title p { margin: 5px 0 0; color: var(--muted); }
.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wishlist-shelf {
  padding: 23px 0 30px;
  border-top: 1px solid var(--line);
}
.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}
.shelf-person { display: flex; align-items: center; gap: 11px; }
.shelf-person .avatar { width: 44px; height: 44px; }
.shelf-person h2 { margin: 0; font: 700 22px var(--font-ui); }
.shelf-person p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.browse-wish-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.shelf-empty {
  min-height: 110px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
}
.tree-directory { padding-top: 28px; border-top: 1px solid var(--line); }
.tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.tree-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.tree-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.tree-preview {
  aspect-ratio: 16 / 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: var(--line);
  overflow: hidden;
}
.tree-preview.single { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.tree-preview img,
.tree-preview-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--brand);
}
.tree-preview-placeholder .icon { width: 28px; height: 28px; }
.tree-preview-placeholder.empty { grid-column: 1 / -1; grid-row: 1 / -1; }
.tree-card-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 16px;
}
.tree-card-copy h3 { margin: 0 0 3px; font: 700 18px var(--font-ui); }
.tree-card-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.tree-card-copy > .icon { width: 18px; height: 18px; color: var(--muted); }
.empty-state.compact { min-height: 190px; }

.public-main { max-width: 1200px; }

@media (min-width: 1500px) {
  .wish-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .browse-wish-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wish-list, .browse-wish-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-title, .shelf-head { align-items: flex-start; }
}
@media (max-width: 520px) {
  .wish-list, .browse-wish-list { grid-template-columns: 1fr; }
  .directory-title, .shelf-head { flex-direction: column; }
  .shelf-head .button, .directory-title .button { width: 100%; justify-content: center; }
  .tree-grid { grid-template-columns: 1fr; }
}


/* Sidebar links */
.sidebar a { text-decoration: none; }


/* Smoother navigation and tab motion */
.sidebar a,
.sidebar .nav-link,
.sidebar .brand-lockup {
  text-decoration: none !important;
}
.nav-link {
  transition: color .22s cubic-bezier(.2,.7,.2,1),
              background-color .22s cubic-bezier(.2,.7,.2,1),
              transform .22s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover { transform: translateX(2px); }
.nav-link.active { transform: translateX(0); }

.auth-tab,
.filter,
.profile-chip,
.theme-button,
.icon-button,
.profile-button {
  transition: color .2s cubic-bezier(.2,.7,.2,1),
              background-color .2s cubic-bezier(.2,.7,.2,1),
              border-color .2s cubic-bezier(.2,.7,.2,1),
              box-shadow .2s cubic-bezier(.2,.7,.2,1),
              transform .2s cubic-bezier(.2,.7,.2,1),
              opacity .2s cubic-bezier(.2,.7,.2,1);
}
.filter:hover,
.profile-chip:hover,
.auth-tab:hover { transform: translateY(-1px); }

.sidebar { view-transition-name: giftree-sidebar; }
.mobile-header { view-transition-name: giftree-mobile-header; }
.main-content { view-transition-name: giftree-main; }
.aside { view-transition-name: giftree-aside; }

::view-transition-old(giftree-sidebar),
::view-transition-new(giftree-sidebar),
::view-transition-old(giftree-mobile-header),
::view-transition-new(giftree-mobile-header) {
  animation: none;
}

::view-transition-old(giftree-main) {
  animation: giftree-page-out 130ms cubic-bezier(.4,0,1,1) both;
}
::view-transition-new(giftree-main) {
  animation: giftree-page-in 260ms cubic-bezier(.16,1,.3,1) both;
}
::view-transition-old(giftree-aside) {
  animation: giftree-aside-out 110ms ease both;
}
::view-transition-new(giftree-aside) {
  animation: giftree-aside-in 220ms cubic-bezier(.16,1,.3,1) both;
}

@keyframes giftree-page-out {
  to { opacity: 0; transform: translateY(-3px) scale(.998); }
}
@keyframes giftree-page-in {
  from { opacity: 0; transform: translateY(7px) scale(.998); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes giftree-aside-out {
  to { opacity: 0; }
}
@keyframes giftree-aside-in {
  from { opacity: 0; transform: translateX(5px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .nav-link,
  .auth-tab,
  .filter,
  .profile-chip,
  .theme-button,
  .icon-button,
  .profile-button {
    transition: none !important;
  }
}


/* Wish modal: fixed header/footer, scrollable fields */
.wish-modal {
  width: min(610px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.wish-modal-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.wish-form {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.wish-form-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 24px 10px;
  scrollbar-gutter: stable;
}
.wish-modal-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 24px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -12px 30px color-mix(in srgb, var(--bg), transparent 28%);
}
.wish-modal-actions .button {
  min-width: 112px;
}
.wish-modal-actions .button.primary {
  min-width: 132px;
}
@media (max-width: 620px) {
  .modal-layer {
    padding: 10px;
  }
  .wish-modal {
    width: min(100%, calc(100vw - 20px));
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }
  .wish-modal-head {
    padding: 18px 18px 14px;
  }
  .wish-form-scroll {
    padding: 15px 18px 8px;
  }
  .wish-modal-actions {
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }
  .wish-modal-actions .button {
    flex: 1;
  }
  .image-upload-preview {
    min-height: 160px;
  }
  .image-upload-preview img {
    height: 190px;
  }
}


/* Custom accent theme */
.appearance-settings {
  display: grid;
  gap: 22px;
  max-width: 720px;
}
.hue-setting {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(220px, 1.2fr) auto;
  align-items: center;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hue-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hue-copy > div {
  display: grid;
}
.hue-copy span:not(.hue-preview) {
  color: var(--muted);
  font-size: 13px;
}
.hue-preview {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.hue-range {
  width: 100%;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
.hue-range:focus {
  box-shadow: none;
}
.hue-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    hsl(0 78% 55%),
    hsl(45 78% 55%),
    hsl(90 70% 48%),
    hsl(135 62% 45%),
    hsl(180 68% 45%),
    hsl(225 76% 58%),
    hsl(270 70% 58%),
    hsl(315 72% 55%),
    hsl(360 78% 55%)
  );
}
.hue-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    hsl(0 78% 55%),
    hsl(45 78% 55%),
    hsl(90 70% 48%),
    hsl(135 62% 45%),
    hsl(180 68% 45%),
    hsl(225 76% 58%),
    hsl(270 70% 58%),
    hsl(315 72% 55%),
    hsl(360 78% 55%)
  );
}
.hue-range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--line), 0 3px 12px rgba(0,0,0,.18);
  appearance: none;
  -webkit-appearance: none;
}
.hue-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--line), 0 3px 12px rgba(0,0,0,.18);
}

/* Currency price input */
.currency-input {
  position: relative;
}
.currency-input > span {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
  pointer-events: none;
}
.currency-input input {
  padding-left: 29px;
  font-variant-numeric: tabular-nums;
}

/* Profile picture uploads */
.profile-photo-upload {
  width: fit-content;
}
.profile-photo-preview {
  width: 150px;
  height: 150px;
  min-height: 150px;
  border-radius: 50%;
  overflow: hidden;
}
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-photo-preview > span {
  width: 100%;
  height: 100%;
  padding: 18px;
  text-align: center;
  justify-content: center;
  flex-direction: column;
}
.profile-photo-upload .image-upload-copy {
  max-width: 180px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .hue-setting {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .hue-setting .button {
    justify-self: start;
  }
}


/* Theme color pickers */
.color-setting {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.theme-color-copy {
  display: grid;
  gap: 2px;
}
.theme-color-copy span {
  color: var(--muted);
  font-size: 13px;
}
.color-control {
  display: grid;
  grid-template-columns: 48px 112px;
  gap: 9px;
  align-items: center;
}
.color-picker {
  width: 48px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
}
.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}
.color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}
.hex-box {
  width: 112px;
  height: 42px;
  padding: 0 11px;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
@media (max-width: 700px) {
  .color-setting {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .color-control {
    width: fit-content;
  }
  .color-setting .button {
    justify-self: start;
  }
}


/* Preset theme chooser */
.appearance-settings {
  max-width: 980px;
}
.theme-preset-section {
  display: grid;
  gap: 13px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.theme-preset-heading {
  display: grid;
  gap: 2px;
}
.theme-preset-heading > span {
  color: var(--muted);
  font-size: 13px;
}
.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.theme-preset-card {
  min-width: 0;
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: transform .2s cubic-bezier(.2,.7,.2,1),
              border-color .2s cubic-bezier(.2,.7,.2,1),
              box-shadow .2s cubic-bezier(.2,.7,.2,1),
              background-color .2s ease;
}
.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 48%);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--text), transparent 93%);
}
.theme-preset-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand), transparent 80%);
}
.preset-preview {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.preset-preview-half {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 26% 1fr;
  gap: 5px;
  padding: 8px 7px 7px;
  border: 1px solid var(--pp-line);
  border-radius: 11px;
  background: var(--pp-bg);
  color: var(--pp-text);
}
.preset-preview-half > em {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pp-surface), transparent 4%);
  border: 1px solid var(--pp-line);
  color: var(--pp-text);
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
}
.pp-sidebar {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: color-mix(in srgb, var(--pp-brand), var(--pp-bg) 74%);
}
.pp-content {
  min-width: 0;
  align-self: end;
  display: grid;
  gap: 6px;
  padding-top: 18px;
}
.pp-title {
  display: block;
  width: 66%;
  height: 7px;
  border-radius: 999px;
  background: var(--pp-text);
  opacity: .8;
}
.pp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.pp-row i {
  display: block;
  height: 27px;
  border: 1px solid var(--pp-line);
  border-radius: 6px;
  background: var(--pp-surface);
}
.pp-button {
  display: block;
  width: 55%;
  height: 10px;
  border-radius: 999px;
  background: var(--pp-brand);
}
.preset-card-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.preset-card-copy strong {
  font: 700 19px/1.15 var(--font-display);
}
.preset-card-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.preset-swatches {
  display: flex;
  gap: 7px;
}
.preset-swatches i {
  width: 19px;
  height: 19px;
  display: block;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text), transparent 83%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, white, transparent 55%);
}
.preset-selected {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.theme-preset-card.active .preset-selected {
  color: var(--brand-strong);
}
.advanced-theme {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.advanced-theme > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-weight: 750;
  user-select: none;
}
.advanced-theme[open] > summary {
  color: var(--text);
}
.advanced-theme-body {
  display: grid;
  gap: 0;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2), transparent 42%);
}
.advanced-theme-body > p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
}
.advanced-theme-body .color-setting:first-of-type {
  border-top: 0;
}

@media (max-width: 760px) {
  .theme-preset-grid {
    grid-template-columns: 1fr;
  }
  .preset-preview {
    min-height: 105px;
  }
}


/* Compact preset theme cards */
.theme-preset-card {
  min-height: 0;
  align-content: start;
  padding: 16px;
}
.preset-card-copy strong {
  font-size: 21px;
}
.preset-swatches {
  gap: 9px;
  margin-top: 2px;
}
.preset-swatches i {
  width: 26px;
  height: 26px;
}
.preset-selected {
  margin-top: 1px;
}
.preset-preview,
.preset-preview-half,
.pp-sidebar,
.pp-content,
.pp-title,
.pp-row,
.pp-button {
  display: none !important;
}


/* Preset swatch colors: static CSS avoids CSP-blocked inline styles */
.theme-preset-card[data-preset="giftree"] .swatch-1 { background: #1B4332; }
.theme-preset-card[data-preset="giftree"] .swatch-2 { background: #6BBF71; }
.theme-preset-card[data-preset="giftree"] .swatch-3 { background: #F4EDE4; }
.theme-preset-card[data-preset="giftree"] .swatch-4 { background: #FFFDF8; }

.theme-preset-card[data-preset="ocean"] .swatch-1 { background: #0E4DB8; }
.theme-preset-card[data-preset="ocean"] .swatch-2 { background: #3B82F6; }
.theme-preset-card[data-preset="ocean"] .swatch-3 { background: #7EC8F8; }
.theme-preset-card[data-preset="ocean"] .swatch-4 { background: #E6F4FF; }

.theme-preset-card[data-preset="lavender"] .swatch-1 { background: #6D5BD0; }
.theme-preset-card[data-preset="lavender"] .swatch-2 { background: #A78BFA; }
.theme-preset-card[data-preset="lavender"] .swatch-3 { background: #EDE9FE; }
.theme-preset-card[data-preset="lavender"] .swatch-4 { background: #FAF5FF; }

.theme-preset-card[data-preset="rose"] .swatch-1 { background: #B91C5C; }
.theme-preset-card[data-preset="rose"] .swatch-2 { background: #F472B6; }
.theme-preset-card[data-preset="rose"] .swatch-3 { background: #FADADD; }
.theme-preset-card[data-preset="rose"] .swatch-4 { background: #FFF7F8; }

.theme-preset-card[data-preset="amber"] .swatch-1 { background: #D97706; }
.theme-preset-card[data-preset="amber"] .swatch-2 { background: #F59E0B; }
.theme-preset-card[data-preset="amber"] .swatch-3 { background: #FDECC8; }
.theme-preset-card[data-preset="amber"] .swatch-4 { background: #FFFBF0; }

.theme-preset-card[data-preset="mono"] .swatch-1 { background: #111827; }
.theme-preset-card[data-preset="mono"] .swatch-2 { background: #4B5563; }
.theme-preset-card[data-preset="mono"] .swatch-3 { background: #E5E7EB; }
.theme-preset-card[data-preset="mono"] .swatch-4 { background: #F9FAFB; }

.preset-swatch {
  background-clip: padding-box;
}


/* Profile photos and PIN protection */
.avatar.large {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.remove-photo-control {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.remove-photo-control > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.remove-photo-control > span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.remove-photo-control:hover > span {
  transform: translateY(-1px);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), var(--line) 55%);
}

.remove-photo-control > input:checked + span {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger), transparent 91%);
  border-color: color-mix(in srgb, var(--danger), var(--line) 38%);
}

.remove-photo-control .icon {
  width: 16px;
  height: 16px;
}

.profile-security {
  display: grid;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2), transparent 45%);
}

.profile-security > div:first-child {
  display: grid;
  gap: 2px;
}

.profile-security > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-security .field {
  margin-bottom: 0;
}

.pin-remove {
  width: fit-content;
  margin-top: 2px;
}

.profile-lock {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 3px;
  color: var(--muted);
}

.profile-lock .icon {
  width: 13px;
  height: 13px;
}

.pin-profile-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 2px 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.pin-profile-head strong {
  font-size: 18px;
}

@media (max-width: 620px) {
  .profile-photo-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


.profile-photo-preview.pending-remove {
  opacity: .38;
  filter: grayscale(1);
}


.profile-picker-actions {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}


/* Wishlists: compact Gift Circles strip */
.browse-page-head {
  margin-bottom: 20px;
}

.browse-circles {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface), transparent 18%);
}

.browse-circles-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.browse-circles-head h2 {
  margin: 3px 0 3px;
  font-size: 26px;
}

.browse-circles-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.browse-circle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.browse-circle-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 8px 11px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.browse-circle-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 72%);
}

.browse-circle-visual {
  width: 62px;
  height: 62px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--brand);
}

.browse-circle-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.browse-circle-visual .icon {
  width: 24px;
  height: 24px;
}

.browse-circle-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.browse-circle-copy small {
  color: var(--brand);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.browse-circle-copy strong {
  overflow: hidden;
  font: 700 16px/1.25 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-circle-copy > span {
  color: var(--muted);
  font-size: 11px;
}

.browse-circle-card > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.browse-circles-empty {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 11px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.browse-circles-empty > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.browse-circles-empty > div > .icon {
  width: 23px;
  height: 23px;
  color: var(--brand);
}

.browse-circles-empty span {
  display: grid;
  gap: 1px;
}

.browse-circles-empty small {
  color: var(--muted);
}

.family-directory {
  margin-top: 0;
}

@media (max-width: 700px) {
  .browse-circles {
    padding: 14px;
  }

  .browse-circles-head,
  .browse-circles-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .browse-circles-head .button,
  .browse-circles-empty .button {
    width: 100%;
    justify-content: center;
  }

  .browse-circle-grid {
    grid-template-columns: 1fr;
  }
}


/* Owner dashboard */
.owner-page-head {
  align-items: flex-end;
}
.owner-updated {
  display: grid;
  gap: 2px;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}
.owner-updated strong {
  color: var(--text);
  font-size: 12px;
}
.owner-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.owner-metric {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.owner-metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.owner-metric > strong {
  font: 700 29px/1 var(--font-display);
  color: var(--text);
}
.owner-metric > small {
  color: var(--muted);
}
.owner-accounts-panel {
  padding: 0;
  overflow: hidden;
}
.owner-accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.owner-accounts-head h2 {
  margin: 0 0 2px;
}
.owner-search {
  width: min(340px, 100%);
  position: relative;
}
.owner-search > span {
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.owner-search .icon {
  width: 17px;
  height: 17px;
}
.owner-search input {
  height: 40px;
  padding: 9px 12px 9px 38px;
}
.owner-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.owner-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 12px;
}
.owner-table th,
.owner-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
.owner-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.owner-table td:first-child {
  min-width: 220px;
}
.owner-table td:first-child strong,
.owner-table td:first-child span {
  display: block;
}
.owner-table td:first-child strong {
  margin-bottom: 2px;
  font-size: 13px;
}
.owner-table td:first-child span {
  max-width: 270px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}
.owner-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand-soft), transparent 50%);
}
.owner-empty-row {
  padding: 32px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 900px) {
  .owner-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .owner-accounts-head {
    align-items: stretch;
    flex-direction: column;
  }
  .owner-search {
    width: 100%;
  }
  .owner-updated {
    text-align: left;
  }
}
@media (max-width: 560px) {
  .owner-metrics {
    grid-template-columns: 1fr;
  }
}


/* Gift Circle members */
.circle-member-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-2), transparent 40%);
}

.circle-avatar-stack {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-left: 6px;
}

.circle-avatar-stack .avatar,
.circle-stack-more {
  width: 36px;
  height: 36px;
  margin-left: -7px;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--text), transparent 88%);
}

.circle-avatar-stack .avatar:first-child {
  margin-left: 0;
}

.circle-stack-more {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.circle-member-preview-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.circle-member-preview-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-member-preview-copy span {
  color: var(--muted);
  font-size: 11px;
}

.circle-members-section {
  margin: 4px 0 30px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface), transparent 14%);
}

.circle-members-head,
.circle-wishes-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.circle-members-head h2,
.circle-wishes-head h2 {
  margin: 3px 0 0;
  font-size: 25px;
}

.circle-member-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.circle-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.circle-member-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.circle-member-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 50%);
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 80%);
}

.circle-member-card .circle-member-avatar {
  width: 48px;
  height: 48px;
  font-size: 14px;
  border: 1px solid var(--line);
}

.circle-member-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.circle-member-copy strong {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-member-copy .soft-tag {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px 6px;
  font-size: 9px;
}

.circle-member-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-wishes-section {
  margin-top: 4px;
}

@media (max-width: 620px) {
  .circle-members-section {
    padding: 15px;
  }

  .circle-member-grid {
    grid-template-columns: 1fr;
  }

  .circle-members-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .circle-member-preview {
    align-items: flex-start;
  }
}


/* Legal pages */
.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--brand);
}

.sidebar-bottom > .legal-links {
  margin-top: 2px;
}

.auth-panel > .legal-links {
  margin-top: 12px;
}

.auth-legal-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.auth-legal-copy a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.public-footer {
  display: flex;
  justify-content: center;
  padding: 24px 20px 36px;
}

.public-attribution {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.public-attribution a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

.public-attribution a:hover { text-decoration: underline; text-underline-offset: 3px; }
.public-attribution .icon { width: 16px; height: 16px; }

@media (max-width: 520px) {
  .public-attribution { align-items: flex-start; flex-direction: column; }
}

.legal-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.legal-header,
.legal-footer {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-header {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legal-main {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.legal-main > h1 {
  margin: 7px 0 5px;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 1;
}

.legal-updated {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 12px;
}

.legal-copy {
  font-size: 15px;
  line-height: 1.72;
}

.legal-copy h2 {
  margin: 30px 0 7px;
  font: 700 22px/1.2 var(--font-ui);
}

.legal-copy p {
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--text), var(--muted) 20%);
}

.legal-footer {
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 620px) {
  .legal-header {
    min-height: 68px;
  }

  .legal-header-actions {
    gap: 8px;
  }

  .legal-header .legal-links {
    display: none;
  }

  .legal-main {
    padding-top: 36px;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Polished legal placement */
.app-footer {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
}

.app-footer .legal-links {
  justify-content: flex-end;
}

.legal-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.legal-setting-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.legal-setting-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 82%);
}

.legal-setting-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--brand);
}

.legal-setting-icon .icon {
  width: 18px;
  height: 18px;
}

.legal-setting-card > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.legal-setting-card strong {
  font-size: 13px;
}

.legal-setting-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-setting-card > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .app-footer {
    width: calc(100% - 32px);
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .app-footer .legal-links {
    justify-content: flex-start;
  }

  .legal-settings-grid {
    grid-template-columns: 1fr;
  }
}


/* Legal page spacing fix */
.legal-main .back-link {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
}

.legal-main .eyebrow {
  display: block;
  width: fit-content;
  margin: 0 0 10px;
}

.legal-main > h1 {
  margin-top: 0;
}

/* Wish audience picker */
.wish-audience-help {
  margin: 4px 0 10px;
}

.wish-audience-picker {
  display: grid;
  gap: 8px;
}

.wish-audience-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.wish-audience-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
}

.wish-audience-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand), var(--line) 25%);
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 68%);
}

.wish-audience-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
}

.wish-audience-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--brand);
}

.wish-audience-icon .icon {
  width: 18px;
  height: 18px;
}

.wish-audience-option > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wish-audience-option strong {
  font-size: 13px;
}

.wish-audience-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

/* Shared occasion list and details */
.occasion {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.occasion-main {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  padding: 10px 7px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease;
}

.occasion-main:hover {
  background: var(--surface-2);
}

.occasion-main > .icon:last-child {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.occasion-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.occasion-copy strong,
.occasion-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occasion-copy strong {
  color: var(--text);
  font-size: 13px;
}

.occasion-copy > span {
  color: var(--muted);
  font-size: 10px;
}

.occasion-delete {
  flex: 0 0 auto;
}

.occasion-detail {
  display: grid;
  gap: 10px;
}

.occasion-detail-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.occasion-detail-icon,
.occasion-detail-row .occasion-detail-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.occasion-detail-icon .icon {
  width: 20px;
  height: 20px;
}

.occasion-detail-row > div:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.occasion-detail-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.occasion-detail-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occasion-detail-row span:not(.avatar):not(.occasion-detail-icon) {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 620px) {
  .wish-audience-option {
    grid-template-columns: 18px 34px minmax(0, 1fr);
    padding: 10px;
  }

  .wish-audience-icon {
    width: 34px;
    height: 34px;
  }
}


/* Wish photo cropper */
.wish-photo-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wish-remove-photo {
  margin: 0;
}

.wish-photo-preview.pending-remove {
  opacity: .38;
  filter: grayscale(1);
}

.wish-image-editor {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-2), transparent 24%);
}

.wish-crop-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(45deg, color-mix(in srgb, var(--line), transparent 45%) 25%, transparent 25%),
    linear-gradient(-45deg, color-mix(in srgb, var(--line), transparent 45%) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--line), transparent 45%) 75%),
    linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--line), transparent 45%) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.wish-crop-stage canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  touch-action: none;
}

.wish-crop-controls {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.wish-crop-controls label {
  display: grid;
  gap: 6px;
}

.wish-crop-controls label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wish-crop-controls input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.wish-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 620px) {
  .wish-image-editor {
    padding: 11px;
  }

  .wish-photo-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wish-photo-actions > * {
    width: 100%;
  }

  .wish-remove-photo > span {
    width: 100%;
  }
}


/* Occasion comments */
.occasion-comments {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.occasion-comments-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.occasion-comments-title h3 {
  margin: 3px 0 0;
  font-size: 20px;
}

.occasion-comments-title > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.occasion-comment-list {
  display: grid;
  gap: 9px;
  max-height: 290px;
  overflow: auto;
  padding-right: 2px;
}

.occasion-comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.occasion-comment .occasion-comment-avatar {
  width: 38px;
  height: 38px;
  font-size: 11px;
}

.occasion-comment-body {
  min-width: 0;
}

.occasion-comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.occasion-comment-head > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.occasion-comment-head strong {
  font-size: 12px;
}

.occasion-comment-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occasion-comment-body p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.occasion-comments-empty {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.occasion-comment-form {
  display: grid;
  gap: 9px;
  margin-top: 11px;
}

.occasion-comment-form textarea {
  min-height: 78px;
  resize: vertical;
}

.occasion-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.occasion-comment-form-footer > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .occasion-comments-title,
  .occasion-comment-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .occasion-comment-form-footer .button {
    width: 100%;
  }

  .occasion-comment-list {
    max-height: 250px;
  }
}




/* Gift Circle invite flow */
.auth-invite-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--brand), var(--line) 45%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 72%);
}

.auth-invite-note > .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.auth-invite-note > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auth-invite-note strong {
  font-size: 12px;
}

.auth-invite-note small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.invite-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 50% 15%, color-mix(in srgb, var(--brand-soft), transparent 20%), transparent 34%),
    var(--bg);
  color: var(--text);
}

.invite-header,
.invite-footer {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

.invite-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invite-footer {
  display: flex;
  justify-content: center;
  padding: 24px 0 34px;
}

.invite-card {
  align-self: center;
  width: min(520px, calc(100% - 34px));
  margin: 26px auto 44px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface), transparent 4%);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--text), transparent 92%);
  text-align: center;
}

.invite-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand);
}

.invite-mark .icon {
  width: 29px;
  height: 29px;
}

.invite-card > h1 {
  margin: 7px 0 10px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.04;
}

.invite-card > h1 span {
  display: block;
  margin-top: 2px;
  color: var(--brand-strong);
}

.invite-card > p {
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.invite-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}

.invite-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.invite-meta .icon {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.invite-current-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  text-align: left;
}

.invite-current-profile > span {
  display: grid;
  gap: 1px;
}

.invite-current-profile small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.invite-current-profile strong {
  font-size: 13px;
}

.invite-actions {
  display: grid;
  gap: 8px;
}

.invite-card > .button + .button {
  margin-top: 7px;
}

.invite-fineprint {
  display: block;
  max-width: 420px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .invite-header {
    min-height: 66px;
  }

  .invite-card {
    padding: 24px 18px;
    border-radius: 18px;
  }
}


/* Editorial Giftree design system */
:root {
  --paper-shadow: 0 14px 38px rgba(31, 42, 34, .07);
  --paper-shadow-hover: 0 20px 46px rgba(31, 42, 34, .10);
}

body {
  letter-spacing: -.005em;
}

h1, h2, h3 {
  line-height: 1.14;
}

button,
.button,
.icon-button,
.theme-button,
.profile-chip,
.filter,
input,
textarea,
select,
.profile-card,
.group-card,
.wish-card,
.claim-row,
.browse-circle-card,
.legal-setting-card {
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

input,
textarea,
select {
  border-color: color-mix(in srgb, var(--line), transparent 10%);
  background: color-mix(in srgb, var(--surface), var(--bg) 12%);
}

input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--brand), var(--line) 48%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand), transparent 88%);
}

.button {
  border-radius: 11px;
  box-shadow: none;
}

.button.primary {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: var(--brand);
}

.button.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  transform: translateY(-1px);
}

.button.ghost:hover,
.button:not(.primary):not(.danger):hover {
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--brand), var(--line) 68%);
}

.sidebar {
  background: color-mix(in srgb, var(--bg), var(--surface-2) 28%);
  border-right-color: color-mix(in srgb, var(--line), transparent 20%);
}

.nav-link {
  border-radius: 11px;
}

.nav-link.active {
  background: color-mix(in srgb, var(--brand-soft), var(--bg) 28%);
  color: var(--brand-strong);
}

.main-content {
  padding-top: 54px;
}

.page-head {
  margin-bottom: 34px;
}

.page-title {
  max-width: 720px;
}

.page-title h1 {
  font-size: clamp(42px, 4.4vw, 66px);
  line-height: 1.02;
  letter-spacing: -.045em;
  margin-bottom: 10px;
}

.page-title p {
  max-width: 52ch;
  line-height: 1.6;
}

.eyebrow {
  color: var(--leaf);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: none;
}

.toolbar {
  padding: 10px 0 15px;
  border-bottom: 0;
}

.filter {
  border-color: transparent;
  background: transparent;
}

.filter:hover {
  background: color-mix(in srgb, var(--surface-2), transparent 20%);
}

.filter.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.quick-add {
  margin: 12px 0 22px;
  border-color: color-mix(in srgb, var(--line), transparent 20%);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(31, 42, 34, .045);
}

.panel {
  border-top-color: color-mix(in srgb, var(--line), transparent 32%);
}

.profile-card,
.group-card,
.claim-row {
  border-color: color-mix(in srgb, var(--line), transparent 18%);
  background: color-mix(in srgb, var(--surface), var(--bg) 5%);
  box-shadow: 0 8px 22px rgba(31, 42, 34, .035);
}

.profile-card:hover,
.group-card:hover,
.claim-row:hover {
  border-color: color-mix(in srgb, var(--brand), var(--line) 76%);
  box-shadow: var(--paper-shadow);
}

.wish-list {
  gap: 20px;
}

.wish-card {
  border-color: color-mix(in srgb, var(--line), transparent 18%);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 42, 34, .045);
}

.wish-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand), var(--line) 72%);
  box-shadow: var(--paper-shadow-hover);
}

.wish-media {
  background: color-mix(in srgb, var(--surface-2), var(--bg) 18%);
}

.wish-card-body {
  padding: 16px 16px 17px;
}

.wish-card-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.025em;
}

.wish-price {
  color: var(--brand-strong);
}

.inline-link {
  color: var(--brand);
}

.claim-button {
  min-height: 44px;
  justify-content: center;
}

.claim-button .icon,
.claim-state .icon,
.claimed-own-action .icon {
  width: 16px;
  height: 16px;
}

.claim-state {
  gap: 7px;
  min-height: 42px;
  align-items: center;
  background: color-mix(in srgb, var(--claimed), var(--surface) 55%);
  border-color: color-mix(in srgb, var(--claimed), var(--line) 35%);
  color: var(--brand-strong);
}

.claimed-own-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: color-mix(in srgb, var(--claimed), var(--surface) 68%);
}

.public-claimed {
  opacity: 1;
  background: color-mix(in srgb, var(--claimed), var(--surface) 82%);
}

.public-claimed .wish-media {
  filter: saturate(.72);
}

.owner-claimed {
  border-color: color-mix(in srgb, var(--claimed), var(--line) 30%);
}

.owner-claim-detail {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--claimed), var(--surface) 66%);
  color: var(--brand-strong);
}

.owner-claim-detail > .icon {
  width: 16px;
  height: 16px;
}

.owner-claim-detail > span {
  display: grid;
  gap: 1px;
}

.owner-claim-detail small {
  color: var(--muted);
  font-size: 9px;
}

.owner-claim-detail strong {
  font-size: 12px;
}

.claim-privacy-note {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: -4px 0 18px;
  padding: 13px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-soft), var(--bg) 24%);
}

.claim-privacy-note > .icon {
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.claim-privacy-note > div {
  display: grid;
  gap: 2px;
}

.claim-privacy-note strong {
  font-size: 12px;
}

.claim-privacy-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.first-wish-state {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(300px, 1.05fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: 420px;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface), var(--bg) 12%);
}

.first-wish-copy h2 {
  margin: 6px 0 10px;
  font-size: clamp(34px, 4vw, 50px);
}

.first-wish-copy p {
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.65;
}

.example-wish-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--paper-shadow);
}

.example-wish-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--paper-shadow-hover);
}

.example-image {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
}

.example-image .icon {
  width: 32px;
  height: 32px;
}

.example-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.example-copy strong {
  font: 600 21px/1.15 var(--font-display);
}

.example-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.example-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.customize-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 26px;
  padding: 20px 22px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-3), var(--bg) 34%);
}

.customize-prompt h3 {
  margin: 4px 0 4px;
  font-size: 25px;
}

.customize-prompt p {
  margin: 0;
  color: var(--muted);
}

.customize-prompt > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.profile-preferences {
  margin-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 20%);
}

.claim-privacy-toggle {
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 35%);
}

.public-page {
  background: var(--bg);
}

.public-header {
  max-width: 1120px;
  padding-top: 30px;
}

.public-main {
  max-width: 1040px;
  padding-top: 56px;
}

.public-title {
  max-width: 670px;
  margin: 0 auto 52px;
}

.public-title .avatar {
  width: 74px;
  height: 74px;
}

.public-title h1 {
  margin: 8px 0 12px;
  font-size: clamp(46px, 7vw, 72px);
  line-height: 1.02;
}

.public-title p {
  max-width: 54ch;
  margin: 0 auto;
  line-height: 1.65;
}

.public-how {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 700;
}

.public-how .icon {
  width: 14px;
  height: 14px;
}

.public-wish-list {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
}

/* Logged-out marketing */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.landing-header,
.landing-footer {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.landing-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.landing-header nav > a:not(.button) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.landing-hero {
  width: min(920px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(82px, 12vw, 150px) 0 92px;
  text-align: center;
}

.landing-hero h1 {
  max-width: 10ch;
  margin: 10px auto 20px;
  font-size: clamp(58px, 9vw, 104px);
  line-height: .96;
  letter-spacing: -.055em;
}

.landing-hero > p {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.landing-demo {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.landing-demo article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 22px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface), var(--bg) 7%);
}

.landing-demo article > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font: 700 11px/1 var(--font-ui);
}

.landing-demo strong {
  display: block;
  margin-bottom: 5px;
  font: 600 19px/1.2 var(--font-display);
}

.landing-demo p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.landing-closing {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto 72px;
  padding: 34px 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-closing h2 {
  max-width: 14ch;
  margin: 5px 0 0;
  font-size: clamp(34px, 4vw, 52px);
}

.landing-footer {
  padding: 24px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.landing-footer > a { color: inherit; text-decoration: none; }
.landing-footer > a:hover { color: var(--brand); }

.invite-page {
  background: var(--bg);
}

.auth-panel-wrap {
  background: color-mix(in srgb, var(--surface), var(--bg) 18%);
}

@media (max-width: 760px) {
  .landing-header {
    min-height: 72px;
  }

  .landing-header nav > a:not(.button) {
    display: none;
  }

  .landing-hero {
    padding-top: 68px;
  }

  .landing-demo {
    grid-template-columns: 1fr;
    margin-bottom: 68px;
  }

  .landing-closing {
    align-items: flex-start;
    flex-direction: column;
  }

  .first-wish-state {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 26px 18px;
  }

  .claim-privacy-note {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .claim-privacy-note .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .customize-prompt {
    align-items: flex-start;
    flex-direction: column;
  }

  .customize-prompt > div:last-child {
    width: 100%;
  }

  .customize-prompt .button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .landing-header,
  .landing-footer,
  .landing-hero,
  .landing-demo,
  .landing-closing {
    width: min(100% - 30px, 1120px);
  }

  .landing-header .button {
    padding-left: 12px;
    padding-right: 12px;
  }

  .landing-hero h1 {
    font-size: clamp(50px, 16vw, 72px);
  }

  .example-wish-card {
    grid-template-columns: 74px minmax(0, 1fr) 18px;
  }

  .example-image {
    width: 74px;
    height: 74px;
  }

  .public-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}


/* Gift Circle rename affordance */
.group-name-row,
.group-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-name-row h3,
.group-detail-title-row h1 {
  margin-bottom: 0;
}

.group-name-edit,
.group-title-edit {
  flex: 0 0 auto;
  color: var(--muted);
}

.group-name-edit {
  width: 30px;
  height: 30px;
}

.group-title-edit {
  width: 38px;
  height: 38px;
}

.group-name-edit .icon,
.group-title-edit .icon {
  width: 16px;
  height: 16px;
}

.group-name-edit:hover,
.group-title-edit:hover,
.group-name-edit:focus-visible,
.group-title-edit:focus-visible {
  background: color-mix(in srgb, var(--brand-soft), transparent 12%);
  color: var(--brand);
}

.group-detail-title-row {
  margin-bottom: 8px;
}

.group-detail-title-row h1 {
  line-height: 1.03;
}


/* Gift Circle ownership transfer */
.owner-transfer-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.owner-transfer-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.owner-transfer-option:hover {
  border-color: color-mix(in srgb, var(--brand), var(--line) 55%);
  background: color-mix(in srgb, var(--brand-soft), var(--surface) 78%);
  transform: translateY(-1px);
}

.owner-transfer-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.owner-transfer-avatar {
  width: 42px;
  height: 42px;
}

.owner-transfer-option > span:nth-of-type(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.owner-transfer-option strong,
.owner-transfer-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-transfer-option small {
  color: var(--muted);
  font-size: 10px;
}

.owner-transfer-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}

.owner-transfer-check .icon {
  width: 13px;
  height: 13px;
}

.owner-transfer-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand), var(--line) 30%);
  background: var(--brand-soft);
}

.owner-transfer-option:has(input:checked) .owner-transfer-check {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-contrast);
}


/* Family rename affordance */
.family-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-name-row h2 {
  margin-bottom: 0;
}

.family-name-edit {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--muted);
}

.family-name-edit .icon {
  width: 16px;
  height: 16px;
}

.family-name-edit:hover,
.family-name-edit:focus-visible {
  background: color-mix(in srgb, var(--brand-soft), transparent 12%);
  color: var(--brand);
}

.manage-family-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-2), var(--surface) 48%);
}

.manage-family-block + .manage-family-block {
  margin-top: 12px;
}

.manage-family-name-form .field,
.manage-family-name-form .form-error {
  margin-bottom: 0;
}

.manage-family-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manage-family-name-row .button {
  white-space: nowrap;
}

.manage-family-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.manage-family-section-head > div {
  display: grid;
  gap: 2px;
}

.manage-family-section-head > div > strong {
  font-size: 15px;
}

.manage-family-section-head > div > span {
  color: var(--muted);
  font-size: 12px;
}

.manage-family-people {
  display: grid;
  gap: 7px;
}

.manage-family-person {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.manage-family-person > span:not(.avatar) {
  min-width: 0;
  display: grid;
}

.manage-family-person strong,
.manage-family-person small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-family-person small {
  color: var(--muted);
  font-size: 11px;
}

.occasion-date-picker {
  display: grid;
  gap: 10px;
}

.occasion-date-summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--brand), var(--line) 56%);
  border-radius: 13px;
  background: var(--brand-soft);
}

.occasion-date-summary > .icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--brand);
}

.occasion-date-summary > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.occasion-date-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.occasion-date-summary strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occasion-date-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.occasion-date-shortcuts button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: 700 11px/1 var(--font-ui);
  touch-action: manipulation;
  transition: border-color .08s linear, background-color .08s linear, color .08s linear;
}

.occasion-date-shortcuts button:hover,
.occasion-date-shortcuts button:focus-visible {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.occasion-calendar {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.occasion-calendar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.occasion-calendar-head > strong {
  text-align: center;
  font-size: 14px;
}

.occasion-calendar-head .icon-button {
  width: 34px;
  height: 34px;
  touch-action: manipulation;
}

.occasion-calendar-head .icon-button:disabled {
  opacity: .28;
  cursor: default;
}

.occasion-calendar-prev .icon {
  transform: rotate(180deg);
}

.occasion-calendar-weekdays,
.occasion-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.occasion-calendar-weekdays {
  margin-bottom: 4px;
}

.occasion-calendar-weekdays span {
  padding: 3px 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.occasion-calendar-day,
.occasion-calendar-empty {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 9px;
}

.occasion-calendar-day {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: 700 12px/1 var(--font-ui);
  touch-action: manipulation;
  transition: background-color .06s linear, border-color .06s linear, color .06s linear;
}

.occasion-calendar-day:hover:not(:disabled),
.occasion-calendar-day:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.occasion-calendar-day.today {
  border-color: color-mix(in srgb, var(--brand), var(--line) 42%);
  color: var(--brand);
}

.occasion-calendar-day.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-contrast, #fff);
}

.occasion-calendar-day:disabled {
  color: color-mix(in srgb, var(--muted), transparent 52%);
  cursor: not-allowed;
  text-decoration: line-through;
}

@media (max-width: 520px) {
  .manage-family-name-row {
    grid-template-columns: 1fr;
  }

  .manage-family-name-row .button {
    width: 100%;
  }

  .manage-family-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .occasion-date-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .occasion-calendar {
    padding: 8px;
  }

  .occasion-calendar-weekdays,
  .occasion-calendar-grid {
    gap: 2px;
  }
}
