/* Tokens: light by default, dark from the system or the theme button. */
:root {
  color-scheme: light;
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text2: #6A6A70;
  --hairline: rgba(0, 0, 0, 0.1);
  --dash: rgba(0, 0, 0, 0.18);
  --divider: rgba(0, 0, 0, 0.08);
  --nav: rgba(255, 255, 255, 0.72);
  --nav-border: rgba(0, 0, 0, 0.06);
  --inv-bg: #1D1D1F;
  --inv-text: #FFFFFF;
  --seg: #E8E8ED;
  --seg-on: #FFFFFF;
  --seg-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  --panel: rgba(0, 0, 0, 0.05);
  --track: rgba(0, 0, 0, 0.09);
  --switch-off: rgba(0, 0, 0, 0.14);
  --switch-on: #30B35A;
  --sheet: rgba(255, 255, 255, 0.9);
  --sheet-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
  --scrim: rgba(0, 0, 0, 0.28);
  --success: #1E8E3E;
  --link: #0066CC;
  --avatar: #E3E3E8;
  --danger: #D70015;
  --card-mix: 7.5%;
  --tile-mix: 12%;
  --gutter: clamp(16px, 4vw, 24px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1C1C1E;
    --text: #F5F5F7;
    --text2: #A1A1A6;
    --hairline: rgba(255, 255, 255, 0.12);
    --dash: rgba(255, 255, 255, 0.2);
    --divider: rgba(255, 255, 255, 0.1);
    --nav: rgba(28, 28, 30, 0.72);
    --nav-border: rgba(255, 255, 255, 0.08);
    --inv-bg: #F5F5F7;
    --inv-text: #000000;
    --seg: #1C1C1E;
    --seg-on: #3A3A3C;
    --seg-shadow: none;
    --panel: rgba(255, 255, 255, 0.08);
    --track: rgba(255, 255, 255, 0.16);
    --switch-off: rgba(255, 255, 255, 0.22);
    --sheet: rgba(36, 36, 38, 0.9);
    --sheet-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    --scrim: rgba(0, 0, 0, 0.55);
    --success: #30D158;
    --link: #2997FF;
    --avatar: #2C2C2E;
    --danger: #FF6961;
    --card-mix: 13%;
    --tile-mix: 20%;
  }
  :root:not([data-theme="light"]) .cat-text { color: var(--cat-d); }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1C1C1E;
  --text: #F5F5F7;
  --text2: #A1A1A6;
  --hairline: rgba(255, 255, 255, 0.12);
  --dash: rgba(255, 255, 255, 0.2);
  --divider: rgba(255, 255, 255, 0.1);
  --nav: rgba(28, 28, 30, 0.72);
  --nav-border: rgba(255, 255, 255, 0.08);
  --inv-bg: #F5F5F7;
  --inv-text: #000000;
  --seg: #1C1C1E;
  --seg-on: #3A3A3C;
  --seg-shadow: none;
  --panel: rgba(255, 255, 255, 0.08);
  --track: rgba(255, 255, 255, 0.16);
  --switch-off: rgba(255, 255, 255, 0.22);
  --sheet: rgba(36, 36, 38, 0.9);
  --sheet-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  --scrim: rgba(0, 0, 0, 0.55);
  --success: #30D158;
  --link: #2997FF;
  --avatar: #2C2C2E;
  --danger: #FF6961;
  --card-mix: 13%;
  --tile-mix: 20%;
}
:root[data-theme="dark"] .cat-text { color: var(--cat-d); }

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}
body.locked { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
svg.ic { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
svg.star { flex: 0 0 auto; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.page { position: relative; min-height: 100vh; padding-bottom: 96px; }
.wrap { max-width: 1168px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- glass nav ---------- */

.nav-wrap { position: sticky; top: 0; z-index: 20; padding: 12px var(--gutter) 0; }
.nav {
  max-width: 1120px; height: 56px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 6px 0 22px; border-radius: 28px;
  background: var(--nav); border: 1px solid var(--nav-border);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.nav.nav-admin { padding: 0 6px; }
.brand { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.nav-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); text-decoration: none;
}
.icon-btn.muted { color: var(--text2); }
.icon-btn.filled { background: var(--panel); }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 16px 0 10px;
  border-radius: 999px; color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
}

/* ---------- buttons, chips, segmented controls ---------- */

.btn {
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--inv-bg); color: var(--inv-text);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: opacity 0.2s ease;
}
.btn.plain { background: var(--panel); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.big { height: 52px; border-radius: 16px; font-size: 17px; font-weight: 600; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.35; }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--seg); }
.seg > button {
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--text);
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color 0.2s ease;
}
.seg > button[aria-pressed="true"] { background: var(--seg-on); box-shadow: var(--seg-shadow); }
.seg.compact > button { padding: 0 16px; }
.seg.icons > button { width: 52px; padding: 0; display: flex; align-items: center; justify-content: center; }
.seg.modes { background: var(--panel); border-radius: 16px; }
.seg.modes > button { flex: 1 1 0; min-width: 0; padding: 0 8px; border-radius: 13px; }
.seg.inset { background: var(--panel); border-radius: 14px; }
.seg.inset > button { flex: 1 1 0; min-width: 0; padding: 0 10px; border-radius: 11px; overflow: hidden; text-overflow: ellipsis; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--panel); color: var(--text);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chip[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }

.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 15px;
  border: 0; border-radius: 999px; background: var(--seg); color: var(--text);
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.pill-btn.small { height: 44px; background: var(--panel); }

/* ---------- hero ---------- */

.hero { padding-top: 72px; padding-bottom: 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--avatar); color: var(--text2); font-size: 44px; font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 64px; height: 64px; font-size: 26px; }
.hero h1 { margin: 24px 0 0; font-size: clamp(40px, 7vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.hero .caption { margin: 12px 0 0; max-width: 560px; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; letter-spacing: -0.01em; color: var(--text2); text-wrap: balance; }
.hero .seg { margin-top: 32px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.countdown { margin: 14px 0 0; font-size: 15px; color: var(--text2); font-variant-numeric: tabular-nums; }

/* ---------- filters ---------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cat-scroll { flex: 1 1 640px; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar, .hero .seg::-webkit-scrollbar { display: none; }
.cat-scroll .chip { padding: 0 18px; background: var(--surface); }
.cat-scroll .chip[aria-pressed="true"] { background: var(--inv-bg); }
.filter-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- cards ---------- */

.cat-text { color: var(--cat-l); font-size: 13px; font-weight: 600; }
.tinted { background: color-mix(in srgb, var(--cat) var(--card-mix), var(--surface)); transition: background-color 0.35s ease; }
.tile { background: color-mix(in srgb, var(--cat) var(--tile-mix), var(--surface)); }

.gifts { padding-top: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; min-height: 264px; padding: 24px; border-radius: 28px; }
.card .photo { display: block; width: 100%; aspect-ratio: 16 / 10; margin-bottom: 18px; border-radius: 18px; object-fit: cover; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.card.has-photo .card-top { min-height: 0; }
.icon-img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.fav { margin-top: 24px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.card.has-photo .fav { margin-top: 12px; }
.card h3 { margin: 28px 0 0; font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-wrap: pretty; overflow-wrap: anywhere; }
.card.has-photo h3 { margin-top: 12px; }
.card .fav + h3 { margin-top: 6px; }
.card .why { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--text2); text-wrap: pretty; overflow-wrap: anywhere; }
.meta-line { margin: 16px 0 0; display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.3; color: var(--text2); }
.meta-line strong { font-weight: 600; color: var(--text); }
.pool { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.pool-text { font-size: 14px; line-height: 1.35; color: var(--text2); }
.pool-text strong { font-weight: 600; color: var(--text); }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--text); transition: width 0.4s ease; }
.bar.thick { height: 8px; }
.card-foot { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.add-card {
  min-height: 264px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; border: 0; border-radius: 28px; background: var(--surface); color: var(--text);
}
.add-card .plus { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--panel); }
.add-card .label { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* list view */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 16px 18px; border-radius: 22px; }
.row-main { flex: 1 1 360px; min-width: 0; display: flex; align-items: center; gap: 18px; }
.row-photo { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.row-icon { flex: 0 0 auto; width: 40px; display: flex; justify-content: center; }
.row-icon .icon-img { border-radius: 11px; }
.row-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.row h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.row .why { margin: 0; font-size: 15px; line-height: 1.4; color: var(--text2); text-wrap: pretty; overflow-wrap: anywhere; }
.row .meta-line { margin-top: 4px; }
.row .pool { margin-top: 6px; gap: 6px; max-width: 320px; }
.row-side { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 18px; }
.add-row {
  width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border: 0; border-radius: 22px; background: var(--surface); color: var(--text); text-align: left;
}
.add-row .plus { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--panel); }
.add-row .label { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.empty { padding: 48px 16px; text-align: center; color: var(--text2); font-size: 17px; }

/* gifts from guests */
.guests { padding-top: 64px; }
.guests h2 { margin: 0 0 20px; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.guest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 20px 24px; border-radius: 22px; }
.guest-row .title { flex: 1 1 240px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.guest-row h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.guest-row .who { font-size: 15px; color: var(--text2); }

/* ---------- sheets, dialogs, toast ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--scrim); animation: fade 0.2s ease;
}
.scrim.top { z-index: 55; }
.sheet {
  width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px; padding: 28px; border-radius: 32px;
  background: var(--sheet); box-shadow: var(--sheet-shadow);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sheet-head.center { align-items: center; }
.sheet-head > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sheet h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.sheet .photo { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 20px; object-fit: cover; }
.sheet .why { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text2); overflow-wrap: anywhere; }
.sheet-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-price .price { font-size: 21px; }
.shop-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 16px; color: var(--link); text-decoration: none; overflow-wrap: anywhere; }
.hr { height: 1px; background: var(--hairline); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack.tight { gap: 12px; }
.stack.xs { gap: 4px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.people li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.people li span:last-child { color: var(--text2); font-variant-numeric: tabular-nums; }
.status-title { font-size: 17px; font-weight: 600; }
.status-who { font-size: 15px; color: var(--text2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 160px; height: 50px; border-radius: 16px; font-size: 16px; }
.actions .btn:first-child { font-weight: 600; }
.joined { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.joined span { font-size: 17px; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; }
.input {
  width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--panel); color: var(--text); font-size: 17px;
}
textarea.input { height: auto; padding: 14px 16px; line-height: 1.4; resize: vertical; }
.input.num { font-variant-numeric: tabular-nums; }
.input::placeholder { color: var(--text2); opacity: 0.8; }

.alert { max-width: 340px; gap: 8px; padding: 28px 24px 20px; border-radius: 28px; text-align: center; }
.alert h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; }
.alert p { margin: 0 0 16px; font-size: 15px; line-height: 1.45; color: var(--text2); }
.alert .btn { height: 50px; border-radius: 16px; font-size: 17px; }
.alert .btn:first-of-type { font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 13px 20px 13px 16px; border-radius: 999px;
  background: var(--sheet); box-shadow: var(--sheet-shadow);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  animation: rise 0.25s ease;
}
.toast:empty { display: none; }
.toast span { overflow: hidden; text-overflow: ellipsis; }
.toast .ic { stroke: var(--success); }
.toast.error .ic { stroke: #FF453A; }
.ic.ok { stroke: var(--success); }
.sheet:focus { outline: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.toast { animation-name: toast-in; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- owner cabinet ---------- */

.admin-title { padding-top: 64px; padding-bottom: 32px; }
.admin-title h1 { margin: 0; font-size: clamp(36px, 5vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; }
.admin-body { display: flex; flex-direction: column; gap: 20px; }
.admin-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.panel { display: flex; flex-direction: column; gap: 24px; padding: 28px; border-radius: 28px; background: var(--surface); }
.panel.form { flex: 999 1 560px; min-width: 0; }
.panel.side { gap: 18px; padding: 24px; }
.panel h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.panel.side h2 { font-size: 21px; letter-spacing: -0.02em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.side-col { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.preview-wrap { display: flex; flex-direction: column; gap: 10px; }
.preview-label { padding-left: 4px; font-size: 14px; font-weight: 600; color: var(--text2); }
.form-submit { padding-top: 4px; }
.form-submit .btn { padding: 0 28px; }
.form-error { color: var(--danger); font-size: 15px; }
.btn.danger { background: var(--danger); color: #FFFFFF; }
.card .placeholder { color: var(--text2); }
.fake-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--inv-bg); color: var(--inv-text); font-size: 15px; font-weight: 500; }
.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1 1 auto; min-width: 0; }
.link-row .btn { height: 50px; border-radius: 14px; padding: 0 18px; }
.split { display: flex; flex-wrap: wrap; gap: 12px; }
.split > .field:first-child { flex: 1 1 160px; min-width: 0; }
.split > .field:last-child { flex: 2 1 320px; min-width: 0; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-opt {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 14px; background: var(--panel); color: var(--text); overflow: hidden;
  transition: background-color 0.2s ease;
}
.icon-opt[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-text); }
.icon-opt img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.upload {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; border: 1.5px dashed var(--dash); color: var(--text2); cursor: pointer;
  font-size: 15px; font-weight: 500;
}
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.upload.square { width: 48px; height: 48px; }
.upload.wide { height: 88px; border-radius: 16px; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-row img { width: 128px; height: 80px; border-radius: 14px; object-fit: cover; }
.file-btn {
  position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--panel); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer;
}
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-btn:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.switches { display: flex; flex-direction: column; border-radius: 16px; background: var(--panel); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 6px 4px 16px; font-size: 16px; }
.switches .divider { height: 1px; margin-left: 16px; background: var(--divider); }
.switch { flex: 0 0 auto; width: 64px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; }
.switch .track { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--switch-off); transition: background-color 0.2s ease; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease; }
.switch[aria-checked="true"] .track { background: var(--switch-on); }
.switch[aria-checked="true"] .knob { transform: translateX(20px); }
.occ-item { display: flex; flex-direction: column; gap: 6px; }
.occ-item .pair { display: flex; flex-wrap: wrap; gap: 8px; }
.occ-item .input { height: 48px; font-size: 16px; flex: 1 1 150px; min-width: 0; }
.occ-item .input[type="date"] { flex: 1 1 140px; padding: 0 12px; }
.occ-item .hint { padding-left: 4px; font-size: 14px; color: var(--text2); }
.profile-row { display: flex; align-items: center; gap: 16px; }

.list-panel { padding: 12px; border-radius: 28px; background: var(--surface); }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; }
.list-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.admin-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 8px 10px 10px; border-radius: 20px; transition: background-color 0.2s ease; }
.admin-row.editing { background: var(--panel); }
.admin-row .tile, .admin-row .tile-plain {
  flex: 0 0 auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; overflow: hidden;
}
.admin-row .tile-plain { background: var(--panel); color: var(--text2); }
.admin-row .tile img, .admin-row .tile-plain img { width: 48px; height: 48px; object-fit: cover; }
.admin-row .info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-row .name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.admin-row .name span { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .name.dim span { color: var(--text2); }
.admin-row .sub { font-size: 14px; font-weight: 500; color: var(--text2); }
.admin-row .sub .cat-text { font-size: 14px; font-weight: 500; }
.admin-row .state { flex: 0 1 240px; min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text2); white-space: nowrap; overflow: hidden; }
.admin-row .state > span { overflow: hidden; text-overflow: ellipsis; }
.admin-row .state strong { font-weight: 600; color: var(--text); }
.state-btn { min-height: 44px; padding: 0 4px; margin: 0 -4px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.state-btn:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.state-btn .chev { stroke: var(--text2); }
.people.editable li { align-items: center; }
.people-end { display: inline-flex; align-items: center; gap: 2px; }
.admin-row .price { min-width: 96px; text-align: right; }
.admin-row .tools { flex: 0 0 auto; display: flex; gap: 2px; }
.admin-row .who { font-size: 15px; color: var(--text2); }
.sub-title { margin: 0; padding: 28px 16px 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.list-empty { margin: 0; padding: 20px 16px 28px; font-size: 15px; color: var(--text2); }

.login { max-width: 420px; margin: 96px auto 0; display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: 28px; background: var(--surface); }
.login h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.login p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text2); }
.login code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }

@media (max-width: 560px) {
  .hero { padding-top: 48px; padding-bottom: 40px; }
  .filter-tools { width: 100%; }
  .filter-tools .seg.compact { flex: 1 1 auto; }
  .filter-tools .seg.compact > button { flex: 1 1 0; padding: 0 10px; }
  .sheet { padding: 24px 20px; border-radius: 28px; }
  .panel { padding: 22px 18px; }
  .admin-row .state { flex-basis: 100%; order: 3; padding-left: 64px; }
  .admin-row .price { min-width: 0; }
}

/* ---------- sharing, surprises, delivery ---------- */

a.brand { color: var(--text); text-decoration: none; }
.text-link { color: var(--link); text-decoration: none; }
.btn.with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px 0 14px; }
.btn.danger-text { color: var(--danger); padding: 0 12px; }
.field-hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text2); }

.share-sheet { gap: 18px; }
.share-note { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text2); }
.qr-card { align-self: center; width: min(260px, 100%); padding: 10px; border-radius: 24px; background: #FFFFFF; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.qr { display: block; width: 100%; height: auto; border-radius: 14px; }
.share-url {
  margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--panel);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.4;
  overflow-wrap: anywhere; user-select: all;
}
.share-warning { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text2); }
.share-actions { display: flex; flex-direction: column; gap: 8px; }
.share-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 16px; font-size: 16px; text-decoration: none; }

.surprise { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: 22px; background: var(--surface); }
.surprise.inset { margin: 0 4px; padding: 14px 16px; border-radius: 20px; background: var(--panel); }
.surprise-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.surprise-sub { margin: 2px 0 0; font-size: 15px; color: var(--text2); }

.delivery { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--panel); }
.delivery .label { font-size: 14px; font-weight: 600; }
.delivery-text { margin: 0; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; user-select: all; }
.delivery .btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; background: var(--seg-on); box-shadow: var(--seg-shadow); }

.seg.inset { overflow-x: auto; scrollbar-width: none; }
.seg.inset::-webkit-scrollbar { display: none; }
.seg.inset > button { flex: 1 0 auto; max-width: 100%; }
.occ-row { display: flex; align-items: flex-start; gap: 4px; }
.occ-row .pair { flex: 1 1 auto; min-width: 0; }
.add-occ { align-self: flex-start; }
.slug-line { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; color: var(--text2); }
.owner-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.panel .hr { margin: 0; }

/* ---------- home ---------- */

.home-mark { color: var(--text); }
.home-body { max-width: 608px; display: flex; flex-direction: column; gap: 20px; }
.slug-input { display: flex; align-items: center; gap: 0; border-radius: 14px; background: var(--panel); }
.slug-input > span { padding-left: 16px; font-size: 17px; color: var(--text2); }
.slug-input .input { background: transparent; padding-left: 2px; }
.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mine-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.mine-row .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mine-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-row .sub { font-size: 14px; color: var(--text2); }
.mine-row .btn { text-decoration: none; display: inline-flex; align-items: center; }
.avatar.mini { width: 44px; height: 44px; font-size: 18px; }
