:root {
  --purple: #6c4cf1;
  --purple-dark: #4f35c8;
  --purple-pale: #f2eeff;
  --orange: #ff8a34;
  --orange-dark: #ee6914;
  --orange-pale: #fff0e3;
  --cream: #fff9f3;
  --ink: #292631;
  --muted: #817987;
  --line: #eee6df;
  --card: #fff;
  --green: #36b86d;
  --shadow: 0 12px 28px rgba(59, 36, 22, 0.09);
  --soft-shadow: 0 7px 18px rgba(59, 36, 22, 0.06);
}

.ingredient-purchase-heading > div { display: flex; align-items: center; gap: 9px; }
.ingredient-purchase-heading button { min-height: 32px; padding: 0 11px; border: 1px solid #d9ceff; border-radius: 10px; color: var(--purple-dark); background: var(--purple-pale); font-size: 9px; font-weight: 850; }
.purchase-backdrop { align-items: flex-end; }
.purchase-sheet { max-height: min(82vh, 680px); padding: 0 17px max(18px, env(safe-area-inset-bottom)); overflow: auto; border-radius: 28px 28px 0 0; background: #fffaf7; }
.purchase-sheet::before { content: ""; width: 34px; height: 4px; margin: 10px auto 12px; display: block; border-radius: 999px; background: #d8cfd9; }
.purchase-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.purchase-sheet-head h2 { margin: 4px 0 5px; font-size: 21px; }
.purchase-sheet-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.purchase-sheet-head > button { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; color: #7b7280; background: #f0eaf2; font-size: 20px; }
.purchase-ingredient-chips { margin: 14px 0 11px; padding: 11px; display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid #f0dcca; border-radius: 14px; background: #fff; }
.purchase-ingredient-chips span { padding: 7px 10px; border-radius: 9px; color: #89502a; background: #fff1e5; font-size: 11px; font-weight: 800; }
.purchase-route-tabs { margin: 0 0 12px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 17px; background: #f1edf3; }
.purchase-route-tabs button { min-height: 68px; padding: 9px 10px; border: 1px solid transparent; border-radius: 14px; color: #746c79; background: transparent; text-align: center; }
.purchase-route-tabs button b, .purchase-route-tabs button small { display: block; }
.purchase-route-tabs button b { font-size: 13px; }
.purchase-route-tabs button small { margin-top: 5px; font-size: 11px; line-height: 1.4; }
.purchase-route-tabs button.is-active { border-color: #7654f5; color: #5e3ee1; background: #fff; box-shadow: 0 7px 18px rgba(105,77,240,.11); }
.purchase-options { display: grid; gap: 9px; }
.purchase-option { min-height: 62px; padding: 10px 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid #e7dfe8; border-radius: 15px; background: #fff; }
.purchase-option.is-primary { border-color: #cfc3ff; box-shadow: 0 7px 18px rgba(105,77,240,.08); }
.purchase-option-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: #7554f3; font-size: 10px; font-weight: 900; }
.purchase-option.is-primary .purchase-option-icon { background: #08a65a; }
.purchase-option b, .purchase-option small { display: block; }
.purchase-option b { font-size: 13px; }
.purchase-option small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.purchase-option button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 11px; color: #fff; background: var(--purple); font-size: 11px; font-weight: 850; }
.purchase-option.is-primary button { background: #11a864; }
.purchase-option--douyin .purchase-option-icon, .purchase-option--douyin button { background: #ff3b38; }
.purchase-route-empty { padding: 22px 16px; border: 1px dashed #ddd4e0; border-radius: 15px; background: #fff; text-align: center; }
.purchase-route-empty b { font-size: 13px; }
.purchase-route-empty p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.purchase-disclosure { margin: 12px 0 0; padding: 11px; border-radius: 11px; color: #77707b; background: #f1edf2; font-size: 11px; line-height: 1.55; }

* { box-sizing: border-box; }

html { background: #eee9e5; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(108,76,241,.12), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(255,138,52,.13), transparent 25%),
    #eee9e5;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.desktop-brand {
  position: fixed;
  left: max(40px, calc(50vw - 490px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--purple);
}

.desktop-brand strong { display: block; font-size: 30px; }
.desktop-brand small { display: block; margin-top: 9px; color: #776e7a; }
.desktop-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(108,76,241,.24));
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 105% -3%, rgba(255,138,52,.12), transparent 23%),
    radial-gradient(circle at -10% 15%, rgba(108,76,241,.10), transparent 23%),
    var(--cream);
  box-shadow: 0 0 44px rgba(49, 32, 22, .13);
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 36px 24px;
  text-align: center;
}

.loading-screen h1 { margin: 22px 0 9px; color: var(--purple); font-size: 30px; }
.loading-screen p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.loading-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(108,76,241,.24));
  animation: breathe 1.3s ease-in-out infinite alternate;
}

@keyframes breathe { to { transform: translateY(-5px) scale(1.03); } }

.login-screen {
  min-height: 100vh;
  padding: 72px 24px 36px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,138,52,.22), transparent 28%),
    radial-gradient(circle at 0 42%, rgba(108,76,241,.16), transparent 31%),
    var(--cream);
}
.login-brand { text-align: center; }
.login-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(108,76,241,.24));
}
.login-brand h1 { margin: 7px 0 10px; font-size: 29px; letter-spacing: -1px; }
.login-brand p { max-width: 350px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-card { margin-top: 30px; padding: 21px; }
.login-card .primary-button { margin-top: 14px; }
.login-card > small { display: block; margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.55; text-align: center; }
.legal-consent-row { margin-top: 13px; display: grid !important; grid-template-columns: 17px 1fr; align-items: start; gap: 8px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.legal-consent-row input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--purple); }
.legal-consent-row button { padding: 0; color: var(--purple); border: 0; background: transparent; font-size: inherit; }
.invite-login-card { margin: 20px 0 -14px; padding: 13px 15px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; box-shadow: var(--soft-shadow); }
.invite-login-card > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--orange-pale); }
.invite-login-card b, .invite-login-card small { display: block; }
.invite-login-card b { font-size: 13px; }
.invite-login-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.invite-login-card i { padding: 5px 7px; border-radius: 8px; color: var(--orange-dark); background: var(--orange-pale); font-size: 9px; font-style: normal; font-weight: 750; }

.onboarding-screen { min-height: 100vh; padding: 48px 22px 38px; background: radial-gradient(circle at 100% 0, rgba(255,138,52,.19), transparent 28%), radial-gradient(circle at 0 42%, rgba(108,76,241,.14), transparent 31%), var(--cream); }
.onboarding-head { text-align: center; }
.login-logo.small { width: 58px; height: 58px; margin-bottom: 14px; border-radius: 19px; font-size: 27px; }
.onboarding-head h1 { margin: 7px 0 9px; font-size: 26px; letter-spacing: -.8px; }
.onboarding-head p { max-width: 360px; margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.65; }
.onboarding-card { margin-top: 22px; padding: 19px; }
.onboarding-card.featured { border-color: rgba(108,76,241,.13); box-shadow: 0 15px 34px rgba(65,43,99,.12); }
.onboarding-card-icon { width: 46px; height: 46px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 15px; background: var(--purple-pale); font-size: 23px; }
.onboarding-card h2 { margin: 4px 0 5px; font-size: 20px; }
.onboarding-card p { margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.onboarding-card label { display: block; margin-top: 14px; }
.onboarding-card .primary-button { margin-top: 12px; }
.onboarding-card.compact { margin-top: 0; box-shadow: var(--soft-shadow); }
.onboarding-divider { height: 45px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.onboarding-divider::before, .onboarding-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.invite-code-row { margin-top: 13px; display: grid; grid-template-columns: 1fr 105px; gap: 8px; }
.invite-code-row input { text-transform: uppercase; letter-spacing: 2px; font-weight: 750; }
.invite-code-row button { min-height: 46px; border-radius: 13px; font-size: 11px; }
.onboarding-link, .onboarding-logout { width: 100%; margin-top: 15px; border: 0; background: transparent; color: var(--purple); font-size: 11px; font-weight: 700; }
.onboarding-logout { margin-top: 10px; color: var(--muted); font-weight: 500; }

.invite-dialog-backdrop { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 22px; background: rgba(31,22,30,.5); backdrop-filter: blur(7px); }
.invite-dialog { width: min(100%, 410px); padding: 27px 22px 21px; position: relative; text-align: center; background: var(--cream); }
.invite-dialog-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 12px; color: var(--muted); background: white; font-size: 21px; }
.invite-dialog-icon { width: 62px; height: 62px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 21px; background: linear-gradient(145deg, var(--purple-pale), var(--orange-pale)); font-size: 30px; }
.invite-dialog h2 { margin: 6px 0 7px; font-size: 23px; }
.invite-dialog > p { margin: 0 auto; max-width: 300px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.invite-code-box { margin: 18px 0 14px; padding: 13px; border: 1px dashed rgba(108,76,241,.32); border-radius: 16px; background: var(--purple-pale); }
.invite-code-box small, .invite-code-box strong { display: block; }
.invite-code-box small { color: var(--muted); font-size: 9px; }
.invite-code-box strong { margin-top: 5px; color: var(--purple); font-size: 24px; letter-spacing: 5px; }
.invite-dialog .secondary-button { margin-top: 8px; }

.page { min-height: 100vh; padding-bottom: 104px; }
.page.detail-page, .page.confirm-page { padding-bottom: 112px; }
.page.no-nav { padding-bottom: 24px; }

.safe-top { height: max(14px, env(safe-area-inset-top)); }

.topbar {
  height: 58px;
  padding: 5px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title { font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--purple); font-weight: 850; font-size: 20px; }
.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(108,76,241,.22));
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255,255,255,.86);
  box-shadow: var(--soft-shadow);
  font-size: 21px;
}
.notification-button { position: relative; color: var(--purple); font-size: 18px; }
.notification-button > i {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cream);
  border-radius: 9px;
  color: white;
  background: var(--orange);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.chef-status-top {
  min-width: 104px;
  height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(54,184,109,.16);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: rgba(255,255,255,.9);
  box-shadow: var(--soft-shadow);
  text-align: left;
}
.chef-status-top-mark {
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #218a50;
  background: #e9f8ee;
  font-size: 13px;
  font-weight: 900;
}
.chef-status-top-copy small,
.chef-status-top-copy b { display: block; white-space: nowrap; }
.chef-status-top-copy small { color: var(--muted); font-size: 8px; line-height: 1.1; }
.chef-status-top-copy b { margin-top: 2px; font-size: 11px; line-height: 1.1; }
.chef-status-top--simple_only {
  border-color: rgba(238,105,20,.18);
  background: #fffaf5;
}
.chef-status-top--simple_only .chef-status-top-mark {
  color: #bd5a19;
  background: #fff0e3;
}
.chef-status-top--undecided {
  border-color: rgba(184,129,28,.2);
  background: #fffcf4;
}
.chef-status-top--undecided .chef-status-top-mark {
  color: #9c6a0c;
  background: #fff4cf;
}
.chef-status-top--resting {
  border-color: rgba(211,83,83,.22);
  background: #fff7f5;
}
.chef-status-top--resting .chef-status-top-mark {
  color: #bd4949;
  background: #ffe8e5;
}
.chef-status-top:active { opacity: .78; transform: scale(.98); }

.text-button { border: 0; background: transparent; color: var(--purple); font-weight: 720; }

.section { padding: 0 20px; }
.section-title {
  margin: 21px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title h2 { margin: 0; font-size: 19px; letter-spacing: -.5px; }
.section-title button, .section-title span { color: var(--purple); border: 0; background: none; font-size: 12px; font-weight: 700; }

.card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(74,55,43,.07);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.avatars { display: flex; align-items: center; }
.avatar {
  width: 37px;
  height: 37px;
  margin-left: -8px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: 0 4px 10px rgba(40,30,22,.09);
}
.avatar:first-child { margin-left: 0; }
.avatar.small { width: 31px; height: 31px; font-size: 16px; border-width: 2px; }

.tonight-card {
  margin: 12px 20px 0;
  min-height: 178px;
  padding: 22px;
  color: white;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6743ef, #865dfa);
  box-shadow: 0 14px 28px rgba(108,76,241,.23);
}
.tonight-card::before, .tonight-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.tonight-card::before { width: 170px; height: 170px; right: -50px; top: -42px; }
.tonight-card::after { width: 92px; height: 92px; right: 87px; bottom: -48px; }
.tonight-card h2 { margin: 0 0 15px; font-size: 24px; }
.tonight-line { display: flex; align-items: center; gap: 9px; margin: 10px 0; opacity: .93; font-size: 14px; }
.tonight-menu-copy { max-width:240px; margin:8px 0 12px; overflow:hidden; color:rgba(255,255,255,.88); font-size:12px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.tonight-menu-copy.is-empty { color:rgba(255,255,255,.7); }
.tonight-actions { display: flex; justify-content: space-between; align-items: end; position: relative; z-index: 1; }
.tonight-actions button {
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.17);
  color: white;
  border-radius: 13px;
  padding: 9px 12px;
  font-weight: 680;
}
.dish-orb {
  width: 116px;
  height: 116px;
  margin-top: -50px;
  margin-right: -12px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,.25);
  background: linear-gradient(145deg, #f5c98a, #ee7545);
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 20px rgba(34,20,13,.24);
}

.home-cook-intents {
  margin-top: 20px;
}

.home-cook-intent-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 20px 12px;
  scrollbar-width: none;
}

.home-cook-intent-scroll::-webkit-scrollbar {
  display: none;
}

.home-cook-intent-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  flex: 0 0 calc(100vw - 40px);
  max-width: 440px;
  min-height: 112px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f1ff, #fff);
}

.home-cook-intent-card .dish-photo {
  width: 112px;
  height: 112px;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.home-cook-intent-card > div:last-child {
  min-width: 0;
  padding: 12px 14px;
}

.home-cook-intent-card b,
.home-cook-intent-card small {
  display: block;
}

.home-cook-intent-card small {
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
}

.home-cook-intent-card b {
  overflow: hidden;
  margin-top: 7px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-cook-intent-card p {
  overflow: hidden;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-recommendations {
  margin-top: 20px;
}

.home-recommendation-title {
  padding: 0 20px;
}

.home-recommendation-title div small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.home-recommendation-title > span {
  padding: 5px 8px;
  border-radius: 9px;
  color: #277f5d;
  background: #eaf8f2;
  font-size: 10px;
}

.home-recommendation-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 20px 12px;
  scrollbar-width: none;
}

.home-recommendation-scroll::-webkit-scrollbar {
  display: none;
}

.home-recommendation-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  flex: 0 0 330px;
  overflow: hidden;
}

.home-recommendation-card .dish-photo {
  height: 150px;
}

.home-recommendation-card .dish-photo i {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(42, 34, 49, .76);
  font-size: 9px;
  font-style: normal;
}

.home-recommendation-card > div:last-child {
  min-width: 0;
  padding: 15px 14px;
}

.home-recommendation-card b,
.home-recommendation-card small {
  display: block;
}

.home-recommendation-card b {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-recommendation-card strong {
  display: block;
  margin-top: 6px;
  color: var(--purple);
  font-size: 10px;
}

.home-recommendation-card small {
  margin-top: 7px;
  color: var(--orange-dark);
  font-weight: 700;
}

.home-recommendation-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 20px 7px;
}

.home-filter-hint {
  margin: 6px 20px 0;
  color: var(--muted);
  font-size: 10px;
}
.chips::-webkit-scrollbar { display: none; }
.filter-chip {
  border: 1px solid #eee6df;
  background: rgba(255,255,255,.86);
  color: #625b65;
  border-radius: 14px;
  padding: 10px 13px;
  white-space: nowrap;
  font-size: 12px;
}
.filter-chip.active {
  color: white;
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: 0 7px 14px rgba(108,76,241,.2);
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 13px;
}
.dish-card {
  overflow: hidden;
  min-width: 0;
  transition: transform .18s ease;
}
.dish-card .dish-photo {
  height: auto;
  aspect-ratio: 3 / 4;
}
.dish-card:active { transform: scale(.985); }
.dish-photo {
  height: 160px;
  position: relative;
  overflow: hidden;
  background-color: #f1d6bd;
  background-repeat: no-repeat;
}
.dish-photo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-kungpao {
  background: linear-gradient(145deg, #f6c56e, #e76036);
}
.photo-beef {
  background: linear-gradient(145deg, #d9a06f, #8b4938);
}
.photo-greens {
  background: linear-gradient(145deg, #b9d887, #5e9c55);
}
.photo-ribs {
  background: linear-gradient(145deg, #efba82, #c85d45);
}
.photo-fallback {
  background: linear-gradient(135deg, #f5c98a, #ee7545);
}
.photo-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255,255,255,.93);
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 750;
}
.photo-manage-button {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 11px;
  color: var(--purple-dark);
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 14px rgba(41,27,70,.12);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 780;
}
.photo-manage-button:active,
.card-manage-button:active,
.detail-manage-trigger:active { transform: scale(.97); }
.dish-card-body { padding: 13px 13px 12px; }
.dish-card h3 { margin: 0 0 9px; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-sharer-line {
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}
.dish-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}
.dish-choice-button {
  min-width: 0;
  min-height: 38px;
  padding: 0 5px;
  border: 0;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}
.dish-choice-button.want { color: #d96822; background: #fff0e4; }
.dish-choice-button.cook { color: var(--purple); background: var(--purple-pale); }
.dish-choice-button.want.active { color: #fff; background: var(--orange); }
.dish-choice-button.cook.active { color: #fff; background: var(--purple); }

.meal-choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(42, 32, 51, .42);
  backdrop-filter: blur(6px);
}
.meal-choice-dialog {
  width: min(100%, 440px);
  padding: 18px;
  border-radius: 24px;
}
.meal-choice-dialog header {
  display: flex;
  align-items: start;
  justify-content: space-between;
}
.meal-choice-dialog header small { color: var(--purple); font-weight: 800; }
.meal-choice-dialog h2 { margin: 5px 0 0; font-size: 21px; }
.meal-choice-dialog header > button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  background: #f4f0f7;
  font-size: 22px;
}
.meal-choice-dialog > p { color: var(--muted); font-size: 11px; }
.meal-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 15px;
}
.meal-choice-grid button {
  min-height: 54px;
  border: 1px solid #ded3ff;
  border-radius: 16px;
  color: var(--purple);
  background: #f7f4ff;
  font-size: 14px;
  font-weight: 850;
}
.meal-choice-label {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.meal-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.meal-calendar button {
  min-width: 0;
  padding: 9px 2px;
  border: 1px solid #ece4df;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}
.meal-calendar button b,
.meal-calendar button span {
  display: block;
}
.meal-calendar button b { font-size: 10px; }
.meal-calendar button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.meal-calendar button.weekend {
  border-color: #ffc8a2;
  color: #d45d1a;
  background: #fff5ed;
}
.meal-calendar button.active {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
}
.meal-calendar button.active span { color: rgba(255,255,255,.78); }
.meal-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
}
.meal-slot-grid button,
.meal-flexible-button {
  min-height: 44px;
  border: 1px solid #ded3ff;
  border-radius: 14px;
  color: var(--purple);
  background: #f7f4ff;
  font-size: 12px;
  font-weight: 850;
}
.meal-flexible-button {
  width: 100%;
  margin-top: 10px;
  color: #73697b;
  border-color: #ebe3de;
  background: #fffaf6;
}
.tag-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tag-row::-webkit-scrollbar { display: none; }
.tag {
  flex: none;
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--purple-pale);
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 650;
}
.tag.orange { color: var(--orange-dark); background: var(--orange-pale); }
.dish-meta {
  min-height: 29px;
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.want-button {
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  color: white;
  background: linear-gradient(135deg, var(--orange), #ff6f1f);
  font-size: 11px;
  font-weight: 720;
}
.want-button.active { color: var(--orange-dark); background: var(--orange-pale); }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: 82px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5,1fr);
  background: rgba(255,255,255,.97);
  border-top: 1px solid #eee7e1;
  box-shadow: 0 -10px 28px rgba(48,31,20,.08);
}
.nav-item {
  border: 0;
  background: none;
  color: #aaa2aa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.nav-item strong { font-size: 21px; line-height: 25px; font-weight: 500; }
.nav-item.active { color: var(--purple); font-weight: 750; }
.nav-add strong {
  width: 51px;
  height: 51px;
  margin-top: -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 32px;
  background: linear-gradient(135deg, #ff9d44, #ff6e1d);
  box-shadow: 0 10px 22px rgba(255,112,29,.33);
}

.page-head { padding: 14px 20px 8px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; }
.page-head h1 { margin: 5px 0 4px; font-size: 28px; letter-spacing: -1px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-head .eyebrow { color: var(--purple); font-weight: 750; font-size: 12px; }

.page.library-page {
  background:
    radial-gradient(circle at 96% 2%, rgba(255, 178, 118, .22), transparent 24%),
    linear-gradient(180deg, #fffaf5 0, #fff7f0 52%, #fffaf6 100%);
}
.library-hero-contract {
  position: relative;
  min-height: 250px;
  margin: 8px 20px 0;
  padding: 25px 22px 22px;
  overflow: hidden;
  border: 1px solid rgba(120, 77, 47, .08);
  border-radius: 30px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.9), rgba(255,246,236,.72)),
    repeating-linear-gradient(0deg, rgba(117,76,47,.025) 0 1px, transparent 1px 5px);
  box-shadow:
    0 18px 40px rgba(89, 54, 31, .1),
    inset 0 1px 0 rgba(255,255,255,.9);
}
.library-hero-contract::before,
.library-hero-contract::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.library-hero-contract::before {
  width: 170px;
  height: 170px;
  top: -88px;
  right: -54px;
  background: rgba(108,76,241,.09);
}
.library-hero-contract::after {
  width: 120px;
  height: 120px;
  right: 70px;
  bottom: -82px;
  border: 22px solid rgba(255,138,52,.08);
}
.library-hero-copy {
  position: relative;
  z-index: 2;
}
.library-hero-kicker {
  max-width: 230px;
  overflow: hidden;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-hero-copy h1 {
  max-width: 220px;
  margin: 8px 0 8px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -1px;
}
.library-hero-copy > p {
  max-width: 215px;
  margin: 0;
  color: #716873;
  font-size: 13px;
  line-height: 1.65;
}
.library-hero-toolbar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.library-hero-count {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(108,76,241,.1);
  border-radius: 14px;
  color: #6b6170;
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(10px);
  font-size: 11px;
}
.library-hero-count b {
  color: var(--purple);
  font-size: 17px;
}
.library-hero-dishes {
  position: absolute;
  z-index: 1;
  top: 30px;
  right: 18px;
  width: 126px;
  height: 142px;
}
.library-hero-dish {
  position: absolute;
  display: block;
  width: 78px;
  height: 104px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,.94);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 13px 28px rgba(58,35,22,.18);
}
.library-hero-dish .dish-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.library-hero-dish-1 {
  right: 0;
  bottom: 0;
  z-index: 3;
  transform: rotate(6deg);
}
.library-hero-dish-2 {
  left: 0;
  bottom: 6px;
  z-index: 2;
  transform: rotate(-7deg);
}
.library-hero-dish-3 {
  top: 0;
  left: 30px;
  z-index: 1;
  transform: rotate(1deg);
  opacity: .82;
}
.library-hero-logo {
  position: absolute;
  top: 18px;
  right: 4px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 14px 30px rgba(85,54,34,.1);
}
.library-hero-logo img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(108,76,241,.16));
}
.search {
  margin: 12px 20px 0;
  height: 48px;
  border-radius: 16px;
  background: white;
  border: 1px solid #eee6df;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  box-shadow: var(--soft-shadow);
}
.search input { flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search span { color: #aaa2aa; }
.library-search-contract {
  position: relative;
  z-index: 5;
  height: 54px;
  margin: -18px 34px 0;
  padding: 0 17px;
  border-color: rgba(100, 67, 45, .08);
  box-shadow: 0 13px 30px rgba(73, 44, 25, .11);
}
.library-search-contract .library-search-label {
  flex: 0 0 auto;
  padding-right: 10px;
  border-right: 1px solid #eee6df;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
}
.library-search-label > i {
  position: relative;
  width: 13px;
  height: 13px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.library-search-label > i::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}
.library-search-contract input { font-size: 14px; }
.library-add-section { margin: 25px 20px 0; }
.library-section-heading,
.library-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.library-section-heading small,
.library-list-heading small {
  display: block;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 850;
}
.library-section-heading h2,
.library-list-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -.3px;
}
.library-section-heading > span {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}
.library-category-panel {
  margin: 18px 20px 4px;
  padding: 12px 18px 16px;
  border-color: rgba(95,70,52,.07);
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 32px rgba(74,47,30,.07);
}
.library-category-row {
  display: flex;
  gap: 14px;
}
.library-category-row {
  align-items: center;
  margin-top: 12px;
}
.library-category-row:first-child {
  margin-top: 0;
}
.library-category-row > b {
  flex: 0 0 74px;
  color: #3d3541;
  font-size: 12px;
}
.library-category-row > .library-category-controls {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 7px;
}
.library-category-scroll {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.library-category-scroll > span {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}
.library-category-panel button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #eee6df;
  border-radius: 14px;
  color: #655d67;
  background: #fff;
  font-size: 12px;
  font-weight: 760;
}
.library-category-panel button.active {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
}
.library-category-panel button.category-row-add {
  min-width: 48px;
  border-color: rgba(108,76,241,.3);
  color: var(--purple);
  background: #f6f2ff;
  font-size: 18px;
  font-weight: 500;
}
.library-primary-entries {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.library-primary-entries .card {
  width: 100%;
  margin: 0;
}
.library-secondary-entries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.video-library-entry,
.library-primary-entries .pantry-library-entry,
.library-primary-entries .original-recipe-entry {
  position: relative;
  overflow: hidden;
  padding: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(76, 52, 102, .06);
}
.video-library-entry {
  min-height: 90px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,151,73,.18), transparent 27%),
    linear-gradient(135deg, #fff0e2, #fffaf5 70%);
  box-shadow: 0 12px 28px rgba(123, 73, 34, .09);
}
.video-library-entry::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  right: -30px;
  bottom: -54px;
  border: 15px solid rgba(255,138,52,.08);
  border-radius: 50%;
}
.video-library-entry > *,
.library-primary-entries .pantry-library-entry > *,
.library-primary-entries .original-recipe-entry > * {
  position: relative;
  z-index: 1;
}
.video-library-entry > .library-entry-mark,
.library-primary-entries .pantry-library-entry > .library-entry-mark,
.library-primary-entries .original-recipe-entry > .library-entry-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  font-size: 11px;
  font-weight: 850;
}
.video-library-entry > .video-entry-mark {
  background: linear-gradient(135deg, #ff9b42, #ff6f1e);
  box-shadow: 0 9px 18px rgba(255,112,29,.24);
}
.library-primary-entries .pantry-library-entry > .pantry-entry-mark {
  color: #287e65;
  background: #ddf7ed;
}
.library-primary-entries .original-recipe-entry > .original-entry-mark {
  background: linear-gradient(135deg, #6c4cf1, #8b70f4);
  box-shadow: 0 9px 18px rgba(108,76,241,.2);
}
.video-entry-mark > i {
  position: relative;
  width: 25px;
  height: 19px;
  display: block;
  border: 2px solid #fff;
  border-radius: 7px;
}
.video-entry-mark > i::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #fff;
}
.video-entry-mark > i::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff7c27;
}
.pantry-entry-mark > i {
  position: relative;
  width: 19px;
  height: 26px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 5px;
}
.pantry-entry-mark > i > b {
  position: absolute;
  top: 8px;
  right: 0;
  left: 0;
  height: 2px;
  display: block;
  background: currentColor;
}
.pantry-entry-mark > i::before,
.pantry-entry-mark > i::after {
  content: "";
  position: absolute;
  right: 3px;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
}
.pantry-entry-mark > i::before { top: 2px; }
.pantry-entry-mark > i::after { top: 12px; }
.original-entry-mark > i {
  position: relative;
  width: 7px;
  height: 25px;
  display: block;
  border-radius: 4px 4px 2px 2px;
  background: #fff;
  transform: rotate(40deg);
}
.original-entry-mark > i::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 1px;
  border-top: 5px solid #fff;
  border-right: 3px solid transparent;
  border-left: 3px solid transparent;
}
.video-library-entry > div > b,
.library-primary-entries .pantry-library-entry > div > b,
.library-primary-entries .original-recipe-entry > div > b {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}
.video-library-entry > div > small,
.library-primary-entries .pantry-library-entry > div > small,
.library-primary-entries .original-recipe-entry > div > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.video-library-entry > i,
.library-primary-entries .pantry-library-entry > i,
.library-primary-entries .original-recipe-entry > i {
  color: var(--purple);
  font-size: 24px;
  font-style: normal;
}
.library-secondary-entries .pantry-library-entry,
.library-secondary-entries .original-recipe-entry {
  height: 90px;
  min-height: 90px;
  padding: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.library-secondary-entries .pantry-library-entry {
  border-color: rgba(45,144,108,.11);
  background:
    radial-gradient(circle at 100% 0, rgba(81,194,153,.11), transparent 30%),
    linear-gradient(145deg, #effbf7, #fff);
  box-shadow: 0 12px 26px rgba(56,113,92,.07);
}
.library-secondary-entries .original-recipe-entry {
  border-color: rgba(108,76,241,.11);
  background:
    radial-gradient(circle at 100% 0, rgba(108,76,241,.1), transparent 30%),
    linear-gradient(145deg, #f4f0ff, #fff);
  box-shadow: 0 12px 26px rgba(82,62,151,.08);
}
.library-secondary-entries .pantry-library-entry > span,
.library-secondary-entries .original-recipe-entry > span {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 15px;
}
.library-secondary-entries .pantry-library-entry > div,
.library-secondary-entries .original-recipe-entry > div {
  margin-left: 0;
  padding-right: 0;
}
.library-secondary-entries .pantry-library-entry > i,
.library-secondary-entries .original-recipe-entry > i {
  position: static;
  font-size: 20px;
}
.library-secondary-entries .pantry-library-entry > div > small,
.library-secondary-entries .original-recipe-entry > div > small {
  position: static;
  margin-top: 4px;
  line-height: 1.42;
}
.library-quick-add-contract {
  position: relative;
  margin: 14px 20px 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  color: white;
  background:
    radial-gradient(circle at 96% 5%, rgba(255,255,255,.2), transparent 26%),
    radial-gradient(circle at 4% 110%, rgba(255,151,73,.2), transparent 30%),
    linear-gradient(135deg, #5133d1, #7354e8 60%, #6849da);
  box-shadow:
    0 18px 38px rgba(68,43,169,.25),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.library-quick-add-contract::after {
  content: "";
  position: absolute;
  width: 126px;
  height: 126px;
  top: -78px;
  right: 40px;
  border: 20px solid rgba(255,255,255,.06);
  border-radius: 50%;
}
.library-quick-add-contract > * {
  position: relative;
  z-index: 1;
}
.library-quick-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.library-quick-head h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 18px;
}
.library-quick-head p {
  min-width: 0;
  margin: 0;
  color: rgba(255,255,255,.78);
  text-align: left;
  font-size: 11px;
  line-height: 1.35;
}
.library-quick-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
}
.library-quick-row input {
  min-width: 0;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 16px;
  outline: 0;
  font-size: 15px;
}
.library-quick-row button {
  min-width: 104px;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #ff9b42, #ff781f);
  box-shadow: 0 9px 20px rgba(188,73,6,.26);
  font-size: 14px;
  font-weight: 800;
}
.library-quick-row button:disabled { opacity: .6; }
.library-quick-suggestions {
  margin: 8px -15px 0;
  padding: 0 15px 1px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.library-quick-suggestions::-webkit-scrollbar { display: none; }
.library-quick-suggestions button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.13);
  font-size: 11px;
  font-weight: 730;
}
.library-quick-media {
  min-height: 35px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.library-quick-media label {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.15);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.library-quick-media span {
  color: rgba(255,255,255,.67);
  font-size: 11px;
}
.library-quick-media img {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
}
.library-list-heading {
  margin: 26px 20px 0;
}
.library-list-heading > span {
  color: var(--muted);
  font-size: 13px;
}
.library-list { padding: 14px 20px; display: grid; gap: 14px; }
.library-manage-actions { display: flex; align-items: center; gap: 8px; }
.library-manage-button,
.library-head-add {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #ded3ff;
  border-radius: 14px;
  color: var(--purple);
  background: white;
  font-size: 12px;
  font-weight: 780;
}
.library-head-add {
  border-color: transparent;
  color: white;
  background: var(--purple);
}
.library-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0,1fr);
  min-height: 150px;
  overflow: hidden;
}
.library-card.manage-selected {
  outline: 2px solid var(--purple);
  box-shadow: 0 10px 28px rgba(108,76,241,.18);
}
.library-select-mark {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: rgba(57,49,70,.55);
  box-shadow: 0 3px 10px rgba(36,25,52,.2);
  font-size: 13px;
  font-weight: 900;
}
.library-card.manage-selected .library-select-mark { background: var(--purple); }
.library-card .dish-photo { height: 150px; min-height: 150px; aspect-ratio: 3 / 4; }
.library-copy { padding: 17px 16px; min-width: 0; }
.library-copy h3 { margin: 0 0 10px; font-size: 19px; }
.library-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.library-heading h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-manage-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ded3ff;
  border-radius: 13px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 12px;
  font-weight: 780;
}
.library-card .tag { font-size: 11px; }
.library-info { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.library-choice-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.library-choice-actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #eadfff;
  border-radius: 13px;
  color: var(--purple);
  background: #f6f2ff;
  font-size: 12px;
  font-weight: 800;
}
.library-choice-actions button.cook {
  border-color: #ffd9bf;
  color: #d9671d;
  background: #fff5ed;
}
.library-choice-actions button.active {
  border-color: transparent;
  color: white;
  background: var(--purple);
}
.library-choice-actions button.cook.active { background: var(--orange); }
.library-order-page { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.library-order-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 8px;
}
.library-order-kicker {
  display: block;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
}
.library-order-header h1 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.8px; }
.library-order-header-actions { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.library-order-header-actions .library-manage-button { min-height: 36px; padding: 0 10px; font-size: 11px; }
.library-order-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 20px 14px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(109, 77, 60, .1);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 20px rgba(74,47,30,.06);
}
.library-order-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.library-order-search input::placeholder { color: #a096a2; }
.library-primary-category-heading {
  min-height: 24px;
  margin: 0 14px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.library-primary-category-heading b { font-weight: 650; }
.library-primary-category-heading span { display: inline-flex; align-items: center; gap: 5px; color: #756b7c; }
.library-primary-category-heading i {
  background-image: radial-gradient(circle, var(--purple) 0 1px, transparent 1.4px);
  background-size: 4px 4px;
}
.library-primary-category-heading i { width: 14px; height: 10px; }
.library-primary-category-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 12px 14px;
  padding: 2px 2px 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.library-primary-category-row::-webkit-scrollbar { display: none; }
.library-primary-category {
  position: relative;
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 78px;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  border-radius: 0;
  color: #62596a;
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity .16s ease, transform .16s ease;
}
.library-primary-category-icon {
  width: 54px;
  height: 54px;
  display: block;
  box-sizing: border-box;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 50%;
  object-fit: cover;
  background: #fff7ef;
  box-shadow: 0 5px 12px rgba(96,69,46,.12);
  pointer-events: none;
}
.library-primary-category.active { color: var(--purple); font-weight: 800; }
.library-primary-category.active .library-primary-category-icon { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108,76,241,.13), 0 6px 14px rgba(96,69,46,.15); }
.library-primary-category.dragging {
  opacity: .94;
  cursor: grabbing;
}
.library-primary-category.drag-ready {
  transform: translateY(-2px) scale(1.025);
}
.library-primary-category-row.is-reordering .library-primary-category[data-library-category-drag]:not(.drag-ready):not(.dragging) {
  opacity: .55;
}
.library-primary-category.drag-ready .library-primary-category-icon,
.library-primary-category.dragging .library-primary-category-icon {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(108,76,241,.16), 0 9px 18px rgba(67,45,126,.2);
}
.library-primary-category-add {
  flex: 0 0 30px;
  width: 30px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  align-self: flex-start;
  border: 2px dashed rgba(108,76,241,.25);
  border-radius: 50%;
  color: var(--purple);
  background: #f5f1ff;
  font-size: 20px;
  line-height: 1;
}
.library-order-layout { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 8px; padding: 0 8px 0 4px; align-items: start; }
.library-order-sidebar {
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
}
.library-order-sidebar::-webkit-scrollbar { display: none; }
.library-order-sidebar-title { display: block; margin: 2px 6px 8px; color: var(--muted); font-size: 11px; }
.library-order-category,
.library-order-category-add {
  width: 100%;
  min-height: 36px;
  padding: 0 7px;
  border: 0;
  border-radius: 11px;
  color: #615867;
  background: transparent;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-order-category.active { color: var(--purple); background: #eee8ff; font-weight: 800; }
.library-order-category-group { position: relative; margin-top: 14px; padding-top: 17px; border-top: 1px solid rgba(122,101,119,.12); }
.library-order-category-group > b { position: absolute; top: 0; left: 6px; color: #918894; font-size: 10px; font-weight: 700; }
.library-order-category-group > span { display: block; padding: 6px; color: #aaa0ad; font-size: 10px; line-height: 1.4; }
.library-order-category-add { width: 26px; min-height: 26px; height: 26px; margin: 5px auto 0; padding: 0; display: grid; place-items: center; color: var(--purple); background: #f5f1ff; text-align: center; font-size: 15px; line-height: 1; }
.library-order-content { min-width: 0; }
.library-order-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin: 1px 2px 9px; }
.library-order-list-heading small { display: block; color: var(--orange-dark); font-size: 10px; font-weight: 850; }
.library-order-list-heading h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.3px; }
.library-order-list-heading > span { color: var(--muted); font-size: 11px; }
.library-order-list { display: grid; gap: 10px; }
.library-order-card { display: grid; grid-template-columns: 112px minmax(0,1fr); min-height: 112px; overflow: hidden; }
.library-order-card.manage-selected { outline: 2px solid var(--purple); box-shadow: 0 10px 28px rgba(108,76,241,.18); }
.library-order-photo { position: relative; width: 112px; height: 112px; min-height: 112px; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; border: 0; background: #f1d6bd; text-align: left; cursor: pointer; }
.library-order-photo .dish-photo { width: 100%; height: 100%; min-height: 112px; aspect-ratio: 1 / 1; }
.library-order-photo .photo-badge { display: none; }
.library-order-select-mark { position: absolute; top: 9px; left: 9px; z-index: 2; width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: rgba(57,49,70,.55); font-size: 13px; font-weight: 900; }
.library-order-card.manage-selected .library-order-select-mark { background: var(--purple); }
.library-order-copy { min-width: 0; padding: 12px 11px 10px; }
.library-order-title-row { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.library-order-title-row h3 { min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font-size: 17px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.library-order-title-row .card-manage-button { min-height: 30px; padding: 0 8px; border-radius: 10px; font-size: 10px; }
.library-order-card .tag-row { margin-top: 7px; gap: 4px; }
.library-order-card .tag { padding: 4px 7px; font-size: 10px; }
.library-order-source { margin: 8px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.library-order-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 10px; }
.library-menu-action { min-height: 37px; padding: 0 5px; border: 1px solid #eadfff; border-radius: 11px; color: var(--purple); background: #f6f2ff; font-size: 11px; font-weight: 800; }
.library-menu-action.cook { border-color: #ffd9bf; color: #d9671d; background: #fff5ed; }
.library-menu-action.active { border-color: transparent; color: #fff; background: var(--purple); }
.library-menu-action.cook.active { background: var(--orange); }
.library-order-manage-hint { margin: 13px 0 0; color: var(--muted); font-size: 10px; }
.library-menu-selection-bar { position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 22; width: min(calc(100% - 28px), 492px); min-height: 62px; padding: 8px 9px 8px 13px; transform: translateX(-50%); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid rgba(108,76,241,.16); border-radius: 20px; background: rgba(255,255,255,.97); box-shadow: 0 12px 32px rgba(56,37,107,.2); backdrop-filter: blur(16px); }
.library-menu-selection-copy { display: grid; gap: 2px; }
.library-menu-selection-copy small { color: var(--orange-dark); font-size: 10px; font-weight: 800; }
.library-menu-selection-copy b { color: var(--ink); font-size: 13px; white-space: nowrap; }
.library-menu-selection-preview { min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.library-menu-selection-preview span { max-width: 82px; padding: 4px 6px; overflow: hidden; border-radius: 8px; color: var(--muted); background: #f7f3f1; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.library-menu-selection-bar > button { min-height: 42px; padding: 0 11px; border: 0; border-radius: 12px; color: #fff; background: var(--purple); font-size: 11px; font-weight: 800; white-space: nowrap; }
.library-manage-page { padding-bottom: 96px; }
.library-bulk-bar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 19;
  width: min(calc(100% - 28px), 492px);
  min-height: 66px;
  padding: 9px 10px 9px 14px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(52px,1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(108,76,241,.15);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 35px rgba(56,37,107,.2);
  backdrop-filter: blur(16px);
}
.library-bulk-bar > span { text-align: center; color: var(--muted); font-size: 11px; }
.library-bulk-bar > span b { color: var(--ink); font-size: 15px; }
.library-select-all {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  color: var(--purple);
  background: transparent;
  font-size: 11px;
  font-weight: 780;
}
.library-bulk-delete {
  min-width: 64px;
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: #e94b4b;
  box-shadow: 0 7px 15px rgba(217,54,54,.2);
  font-size: 12px;
  font-weight: 800;
}
.library-bulk-delete:disabled { opacity: .38; box-shadow: none; }
.library-bulk-category {
  min-width: 70px;
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #7554f3, #6041de);
  box-shadow: 0 7px 15px rgba(108,76,241,.22);
  font-size: 12px;
  font-weight: 800;
}
.library-bulk-category:disabled { opacity: .38; box-shadow: none; }
.bulk-delete-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 2px; }
.bulk-category-dialog {
  width: min(calc(100% - 32px), 460px);
  max-height: min(78vh, 660px);
  padding: 22px;
  overflow: hidden;
  border-radius: 26px;
}
.bulk-category-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.bulk-category-dialog > header small { color: var(--purple); font-size: 12px; font-weight: 780; }
.bulk-category-dialog > header h2 { margin: 5px 0 0; font-size: 24px; }
.bulk-category-dialog > header > button {
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: #f4f0f7;
  font-size: 24px;
}
.bulk-category-dialog > p { margin: 14px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bulk-category-options {
  max-height: min(45vh, 390px);
  display: grid;
  gap: 10px;
  overflow-y: auto;
}
.bulk-category-option {
  min-height: 64px;
  padding: 9px 12px 9px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e8deec;
  border-radius: 17px;
  color: var(--ink);
  background: white;
  text-align: left;
}
.bulk-category-option > span { display: grid; gap: 4px; font-size: 15px; font-weight: 760; }
.bulk-category-option small { color: var(--muted); font-size: 11px; font-weight: 500; }
.bulk-category-option i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #d7cce1;
  border-radius: 9px;
  color: white;
  font-style: normal;
}
.bulk-category-option.selected { border-color: rgba(108,76,241,.5); background: #f8f5ff; }
.bulk-category-option.selected i { border-color: var(--purple); background: var(--purple); }
.bulk-category-section-label { display: block; margin: 3px 0 8px; color: var(--purple); font-size: 11px; font-weight: 800; }
.bulk-category-section-label.system { margin-top: 16px; color: var(--muted); }
.bulk-category-system-options { max-height: 210px; }
.bulk-category-option.system { min-height: 52px; border-color: #eee9ef; background: #faf9fa; cursor: default; }
.bulk-category-option.system > span { font-size: 13px; font-weight: 650; }
.bulk-category-option.system small { color: #a098a3; }
.bulk-category-option.system i { width: auto; min-width: 38px; height: 24px; padding: 0 7px; border: 0; border-radius: 8px; color: #a098a3; background: #eeeaf0; font-size: 10px; }
.bulk-category-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 12px;
}
.bulk-category-actions button { min-height: 48px; border: 0; border-radius: 16px; font-size: 14px; font-weight: 800; }
.bulk-category-actions button:disabled { opacity: .38; box-shadow: none; cursor: not-allowed; }
.bulk-delete-preview span {
  padding: 5px 8px;
  border-radius: 9px;
  color: #8f3e3e;
  background: #fff0f0;
  font-size: 10px;
}

@media (max-width: 350px) {
  .library-hero-contract {
    min-height: 260px;
    margin-right: 14px;
    margin-left: 14px;
    padding-right: 18px;
    padding-left: 18px;
  }
  .library-hero-copy h1 { max-width: 230px; font-size: 28px; }
  .library-hero-copy > p { max-width: 220px; }
  .library-hero-dishes {
    right: -16px;
    opacity: .2;
    transform: scale(.9);
    transform-origin: right top;
  }
  .library-search-contract {
    margin-right: 25px;
    margin-left: 25px;
  }
  .library-section-heading { display: block; }
  .library-section-heading > span {
    display: block;
    max-width: none;
    margin-top: 6px;
    padding: 0;
    text-align: left;
  }
  .video-library-entry {
    min-height: 90px;
  }
  .library-secondary-entries .pantry-library-entry,
  .library-secondary-entries .original-recipe-entry {
    height: 90px;
    min-height: 90px;
  }
}

/* Discover: confirmed "My follows / Site picks" information architecture. */
.discover-page {
  padding-top: 18px;
  background:
    radial-gradient(circle at 96% 0, rgba(108, 76, 241, .08), transparent 22%),
    #fffaf6;
}
.discover-channel-tabs {
  width: min(100%, 300px);
  min-height: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 0 auto 14px;
  padding: 4px;
  border: 1px solid #eee5df;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 7px 20px rgba(61, 40, 29, .05);
}
.discover-channel-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  color: #50484e;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}
.discover-channel-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #4e0caa, #6424c9);
  box-shadow: 0 6px 14px rgba(78, 12, 170, .22);
}
.discover-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}
.discover-search-row .discover-search { min-width: 0; }
.discover-shuffle {
  width: 48px;
  height: 48px;
  position: relative;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #4e0caa, #6424c9);
  box-shadow: 0 8px 18px rgba(78, 12, 170, .2);
}
.discover-shuffle i,
.discover-shuffle i::before,
.discover-shuffle i::after {
  content: "";
  position: absolute;
}
.discover-shuffle i {
  width: 21px;
  height: 14px;
  inset: 17px auto auto 13px;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: skewX(-28deg);
}
.discover-shuffle i::before,
.discover-shuffle i::after {
  right: -4px;
  width: 7px;
  height: 7px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg) skewX(28deg);
}
.discover-shuffle i::before { top: -5px; }
.discover-shuffle i::after { bottom: -5px; }
.discover-filter-scroll { margin-top: 12px; }
.discover-filter-scroll button {
  min-height: 35px;
  padding: 0 13px;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}
.discover-filter-scroll .discover-all-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.discover-all-filter i {
  width: 12px;
  height: 8px;
  display: inline-block;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.discover-all-filter i::after {
  content: "";
  width: 12px;
  display: block;
  margin-top: 3px;
  border-top: 1.5px solid currentColor;
}
.discover-following-strip { margin: 1px 0 15px; }
.discover-following-strip h2 {
  margin: 0 0 10px 2px;
  font-size: 16px;
  line-height: 1.4;
}
.discover-people-scroll {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 0 18px 4px;
  scrollbar-width: none;
}
.discover-people-scroll::-webkit-scrollbar { display: none; }
.discover-person-filter {
  width: 58px;
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: #4f454a;
  background: transparent;
}
.discover-person-filter > span {
  width: 52px;
  height: 52px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--purple);
  background: linear-gradient(145deg, #f2ecff, #fff0e4);
  font-size: 13px;
  font-weight: 800;
}
.discover-person-filter.active > span {
  border-color: #5b16bd;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(91, 22, 189, .18);
}
.discover-person-filter img { width: 100%; height: 100%; object-fit: cover; }
.discover-person-filter b {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.discover-person-filter small { color: #958a92; font-size: 9px; }
.discover-feed { column-gap: 9px; }
.discover-card {
  margin-bottom: 9px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(59, 36, 22, .06);
}
.discover-card-photo { height: 188px; }
.discover-card-photo.is-short { height: 160px; }
.discover-card-copy { padding: 9px 9px 10px; }
.discover-card-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 7px;
}
.discover-person-open {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  color: #5d5359;
  background: transparent;
  font-size: 10px;
}
.discover-person-open > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.discover-person-open:disabled { opacity: 1; }
.discover-person-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6c4cf1, #ff8b42);
  font-size: 10px;
  font-weight: 800;
}
.discover-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discover-relation {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(94, 29, 188, .22);
  border-radius: 999px;
  color: #5e1dbc;
  background: #fff;
  font-size: 9px;
  font-weight: 750;
}
.discover-relation.has-relation { color: #6d4ca7; background: #f5f0fc; }
.discover-card-copy h3 { font-size: 15px; }
.discover-card-copy p { margin: 6px 0 7px; }
.discover-card-copy p span { padding: 3px 6px; font-size: 9px; }
.discover-source-row {
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.discover-source-row small {
  min-width: 0;
  overflow: hidden;
  color: #93898f;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.discover-source-row button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: #5b16bd;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}
.discover-collect {
  width: 100%;
  min-height: 34px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff6324, #ff7b25);
  font-size: 12px;
  font-weight: 800;
}
.discover-collect:disabled { color: #8f8799; background: #f2eef6; }
.discover-taxonomy-backdrop {
  position: fixed;
  z-index: 190;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(37, 29, 35, .48);
  backdrop-filter: blur(5px);
}
.discover-taxonomy-sheet {
  width: min(100%, 520px);
  height: 86vh;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px 18px calc(14px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  border-radius: 24px 24px 0 0;
  background: #fffdfb;
  box-shadow: 0 -18px 50px rgba(43, 29, 37, .2);
}
.discover-sheet-grabber {
  width: 38px;
  height: 4px;
  flex: 0 0 auto;
  margin: 0 auto 9px;
  border-radius: 999px;
  background: #ddd5da;
}
.discover-taxonomy-sheet > header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.discover-taxonomy-sheet h2 { margin: 0; font-size: 21px; }
.discover-taxonomy-sheet header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.discover-taxonomy-sheet header > button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #706771;
  background: #f2eef3;
  font-size: 24px;
  line-height: 1;
}
.discover-taxonomy-groups {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 12px -4px 10px;
  padding: 0 4px 8px;
}
.discover-taxonomy-group {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0e9e5;
}
.discover-taxonomy-group > b { padding-top: 8px; font-size: 12px; }
.discover-taxonomy-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.discover-taxonomy-group button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #ebe4e1;
  border-radius: 9px;
  color: #5d5458;
  background: #fff;
  font-size: 11px;
}
.discover-taxonomy-group button.active {
  border-color: #6b2ac8;
  color: #5b16bd;
  background: #f4edff;
  box-shadow: inset 0 0 0 1px rgba(91, 22, 189, .08);
}
.discover-taxonomy-sheet > footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}
.discover-taxonomy-sheet > footer button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  color: #443b41;
  background: #f0edee;
  font-size: 14px;
  font-weight: 750;
}
.discover-taxonomy-sheet > footer button:last-child {
  color: #fff;
  background: linear-gradient(135deg, #4e0caa, #6424c9);
}

@media (max-width: 350px) {
  .discover-people-scroll { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; }
  .discover-card-photo { height: 170px; }
  .discover-card-photo.is-short { height: 145px; }
  .discover-taxonomy-sheet { padding-right: 14px; padding-left: 14px; }
  .discover-taxonomy-group { grid-template-columns: 70px minmax(0, 1fr); gap: 7px; }
}

/* Creator commercial layer: keep the existing product shell and add dedicated views. */
body.creator-landing-mode .desktop-brand { display: none; }
body.creator-landing-mode .app-shell { width: min(100%, 520px); }

.creator-home-page {
  min-height: 100vh;
  padding-bottom: calc(34px + env(safe-area-inset-bottom));
  color: #302637;
  background:
    radial-gradient(circle at 96% 13%, rgba(255, 157, 73, .16), transparent 27%),
    #fff9f3;
}
.creator-home-hero {
  padding: 0 22px 24px;
  border-radius: 0 0 34px 34px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 171, 89, .42), transparent 31%),
    linear-gradient(145deg, #4d288f 0%, #6d36ba 58%, #8147c6 100%);
  box-shadow: 0 18px 34px rgba(77, 40, 143, .2);
}
.creator-home-safe { height: max(24px, env(safe-area-inset-top)); }
.creator-home-profile { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 16px; }
.creator-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .86);
  border-radius: 27px;
  color: #5b309c;
  background: #fff4e9;
  box-shadow: 0 12px 24px rgba(40, 15, 75, .24);
  font-size: 30px;
  font-weight: 900;
}
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-avatar-fallback { margin: 0 auto; }
.creator-home-kicker { color: #ffd5ad; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.creator-home-profile h1 { margin: 6px 0 5px; font-size: 27px; line-height: 1.15; letter-spacing: -.7px; }
.creator-home-profile p { margin: 0; color: rgba(255, 255, 255, .79); font-size: 12px; line-height: 1.55; }
.creator-home-summary {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 22px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
}
.creator-home-summary div { text-align: center; }
.creator-home-summary div + div { border-left: 1px solid rgba(255, 255, 255, .17); }
.creator-home-summary b, .creator-home-summary span { display: block; }
.creator-home-summary b { font-size: 20px; }
.creator-home-summary span { margin-top: 4px; color: rgba(255, 255, 255, .72); font-size: 10px; }

.creator-first-action {
  margin: 18px 18px 0;
  padding: 20px;
  border-color: rgba(255, 137, 52, .17);
  box-shadow: 0 16px 34px rgba(99, 58, 27, .11);
}
.creator-action-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff9d49, #ff721f);
  box-shadow: 0 9px 18px rgba(255, 114, 31, .24);
  font-size: 27px;
  font-weight: 400;
}
.creator-first-action small { color: #6c3ba4; font-size: 11px; font-weight: 800; }
.creator-first-action h2 { margin: 5px 0 7px; font-size: 21px; letter-spacing: -.4px; }
.creator-first-action p { margin: 0; color: #766c78; font-size: 12px; line-height: 1.6; }
.creator-primary-action {
  width: 100%;
  min-height: 54px;
  margin-top: 17px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #ff993f, #ff711e);
  box-shadow: 0 12px 22px rgba(255, 114, 30, .23);
  font-size: 15px;
  font-weight: 850;
}
.creator-benefit-strip {
  margin: 13px 18px 0;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #eadff7;
  border-radius: 18px;
  background: #f8f2ff;
}
.creator-benefit-strip b, .creator-benefit-strip span { display: block; }
.creator-benefit-strip b { color: #5d2e9b; font-size: 13px; }
.creator-benefit-strip span { margin-top: 3px; color: #766c78; font-size: 10px; }
.creator-benefit-strip button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 13px; color: #fff; background: #6c36b3; font-size: 11px; font-weight: 800; }

.creator-library-section { padding: 26px 18px 0; }
.creator-library-section > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.creator-library-section > header span { color: #6b34a9; font-size: 11px; font-weight: 850; }
.creator-library-section > header h2 { margin: 4px 0 0; font-size: 19px; line-height: 1.3; }
.creator-library-section > header > small { flex: 0 0 auto; color: #918791; font-size: 9px; }
.creator-recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.creator-recipe-card { overflow: hidden; border-radius: 21px; box-shadow: 0 8px 19px rgba(65, 42, 32, .07); }
.creator-recipe-open { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.creator-recipe-photo { height: 145px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f1e8ff, #fff0e3); }
.creator-recipe-photo.is-tall { height: 168px; }
.creator-recipe-photo img { width: 100%; height: 100%; object-fit: cover; }
.creator-recipe-photo > i { color: #6b37aa; font-size: 35px; font-style: normal; font-weight: 900; }
.creator-recipe-copy { display: block; padding: 12px 12px 10px; }
.creator-recipe-copy b, .creator-recipe-copy small, .creator-recipe-copy em { display: block; }
.creator-recipe-copy b { font-size: 15px; line-height: 1.35; }
.creator-recipe-copy small { min-height: 22px; margin-top: 7px; }
.creator-recipe-copy small i { display: inline-block; margin: 0 5px 4px 0; padding: 4px 6px; border-radius: 7px; color: #6f5f76; background: #f7f2f8; font-size: 9px; font-style: normal; }
.creator-recipe-copy em { color: #938893; font-size: 9px; font-style: normal; }
.creator-source-link { min-height: 38px; display: flex; align-items: center; padding: 8px 12px; border-top: 1px solid #f0e8e1; color: #6b35aa; background: #fffcf8; font-size: 9px; line-height: 1.4; text-decoration: none; }
.creator-source-link.is-copy { color: #8a8089; }
.creator-collect-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 20px);
  min-height: 36px;
  margin: 0 10px 10px;
  border: 0;
  border-radius: 11px;
  color: #6432a4;
  background: #f2eafe;
  font-size: 10px;
  font-weight: 850;
}
.creator-filter-chips { display: flex; gap: 8px; margin: -2px 0 13px; overflow-x: auto; scrollbar-width: none; }
.creator-filter-chips::-webkit-scrollbar { display: none; }
.creator-filter-chips span { flex: 0 0 auto; padding: 8px 13px; border: 1px solid #e8ded8; border-radius: 999px; color: #6f6670; background: #fff; font-size: 10px; }
.creator-filter-chips span.active { border-color: #6c42f4; color: #fff; background: #6c42f4; font-weight: 800; }
.creator-home-intro {
  margin: 4px 20px 0;
  padding: 14px 16px;
  border: 1px solid #ded3fb;
  border-radius: 15px;
  color: #5c5261;
  background: #f7f2ff;
  font-size: 12px;
  line-height: 1.65;
}
.creator-activity-card {
  margin: 13px 18px 0;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8cdfb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 23px rgba(82, 58, 105, .08);
}
.creator-activity-card.is-compact { margin-top: 8px; margin-bottom: 12px; }
.creator-activity-card.is-live { border-color: #f4c7c9; background: #fff9f8; }
.creator-activity-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #7654f4, #6540e8); font-size: 12px; font-weight: 900; }
.creator-activity-card.is-live .creator-activity-mark { background: linear-gradient(145deg, #f16468, #e5444a); font-size: 10px; letter-spacing: .3px; }
.creator-activity-copy b, .creator-activity-copy small { display: block; }
.creator-activity-copy b { color: #342d38; font-size: 14px; line-height: 1.35; }
.creator-activity-copy small { margin-top: 4px; color: #827987; font-size: 11px; line-height: 1.45; }
.creator-activity-card > button { min-height: 40px; padding: 0 13px; border: 0; border-radius: 12px; color: #fff; background: #6b48ed; font-size: 11px; font-weight: 850; }
.creator-activity-card.is-live > button { background: #e84d53; }
.creator-import-box {
  margin-top: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 17px;
  background: #fff;
}
.creator-import-box textarea {
  min-width: 0;
  min-height: 44px;
  padding: 10px 11px;
  resize: none;
  border: 0;
  outline: 0;
  color: #3e3543;
  background: transparent;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}
.creator-import-box .creator-primary-action {
  min-height: 48px;
  margin: 0;
  border-radius: 14px;
  font-size: 12px;
}

/* Keep the approved creator-owned landing hierarchy: profile first, platform quiet. */
.creator-home-hero {
  padding: 0 20px 18px;
  border-radius: 0;
  color: #302637;
  background: transparent;
  box-shadow: none;
}
.creator-home-safe { height: max(22px, env(safe-area-inset-top)); }
.creator-home-profile { grid-template-columns: 60px 1fr; gap: 13px; }
.creator-home-profile .creator-avatar {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #7544f6, #8d65ff);
  box-shadow: 0 12px 22px rgba(108, 66, 244, .23);
  font-size: 24px;
}
.creator-home-kicker { color: #6c42f4; font-size: 10px; letter-spacing: .4px; }
.creator-home-profile h1 { margin: 4px 0 4px; font-size: 23px; }
.creator-home-profile p { color: #847a86; font-size: 11px; }
.creator-first-action {
  margin-top: 14px;
  padding: 19px 17px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #6740ea, #8a62f8);
  box-shadow: 0 16px 32px rgba(104, 64, 234, .22);
}
.creator-action-icon { display: none; }
.creator-first-action small { color: #efe9ff; }
.creator-first-action h2 { margin-top: 6px; color: #fff; font-size: 20px; }
.creator-first-action p { color: rgba(255, 255, 255, .82); }
.creator-library-section { padding-top: 23px; }
.creator-library-section > header h2 { margin-top: 0; font-size: 18px; }
.creator-recipe-photo,
.creator-recipe-photo.is-tall { height: 150px; }
.creator-home-empty { padding: 24px 20px; text-align: center; }
.creator-home-empty b { font-size: 16px; }
.creator-home-empty p { margin: 7px 0 16px; color: #807682; font-size: 11px; line-height: 1.6; }
.creator-home-empty button { min-height: 44px; padding: 0 17px; border: 0; border-radius: 14px; color: #fff; background: #6c36b3; font-size: 12px; font-weight: 800; }
.creator-service-footer { margin: 28px 18px 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; color: #9a9198; font-size: 9px; }
.creator-service-footer img { width: 18px; height: 18px; object-fit: contain; opacity: .76; }
.creator-service-footer b { color: #766b77; }
.creator-service-footer button { min-height: 34px; margin-left: 3px; padding: 6px 8px; border: 0; border-radius: 10px; color: #6c36b3; background: #f1ebfa; font-size: 9px; font-weight: 750; }
.creator-home-state { display: grid; place-content: center; justify-items: center; padding: 36px 24px; text-align: center; }
.creator-home-state h1 { margin: 18px 0 7px; font-size: 23px; }
.creator-home-state p { max-width: 320px; margin: 0 0 18px; color: #817987; font-size: 12px; line-height: 1.6; }
.creator-home-spinner { width: 46px; height: 46px; margin-bottom: 16px; border: 4px solid #e8def5; border-top-color: #6c36b3; border-radius: 50%; animation: creator-spin .8s linear infinite; }
@keyframes creator-spin { to { transform: rotate(360deg); } }

.creator-workbench-entry span:first-child { color: #6031a1; font-weight: 850; }
.creator-dashboard-page { padding-bottom: 122px; }
.creator-dashboard-hero { margin: 0 18px; padding: 22px; border-radius: 25px; color: #fff; background: linear-gradient(145deg, #4e288f, #7340bb); box-shadow: 0 14px 29px rgba(81, 43, 142, .2); }
.creator-dashboard-hero span { color: #ffd3a7; font-size: 10px; font-weight: 850; }
.creator-dashboard-hero h1 { margin: 4px 0 5px; font-size: 25px; }
.creator-dashboard-hero p { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; }
.creator-dashboard-hero a { display: inline-block; margin-top: 15px; color: #fff; font-size: 11px; font-weight: 800; text-decoration: none; }
.creator-dashboard-period { margin: 13px 18px 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.creator-dashboard-period small, .creator-dashboard-period b { display: block; }
.creator-dashboard-period small { color: #8a7e88; font-size: 9px; }
.creator-dashboard-period b { margin-top: 3px; font-size: 11px; }
.creator-dashboard-period > span { padding: 5px 7px; border-radius: 8px; color: #2e8f59; background: #eaf8ef; font-size: 9px; }
.creator-metric-grid { margin: 13px 18px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.creator-metric-card { min-height: 105px; padding: 15px; }
.creator-metric-card small, .creator-metric-card b, .creator-metric-card span { display: block; }
.creator-metric-card small { color: #817683; font-size: 10px; }
.creator-metric-card b { margin-top: 7px; color: #583099; font-size: 25px; }
.creator-metric-card span { margin-top: 3px; color: #9a8f99; font-size: 9px; }
.creator-income-card { margin: 13px 18px 0; padding: 18px; }
.creator-income-card > header { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.creator-income-card header small { color: #817683; font-size: 10px; }
.creator-income-card header h2 { margin: 4px 0 0; color: #5e309f; font-size: 28px; }
.creator-income-card header > span { color: #817683; font-size: 10px; }
.creator-income-sources { margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.creator-income-sources div { padding: 11px; border-radius: 13px; background: #faf6fc; }
.creator-income-sources span, .creator-income-sources b { display: block; }
.creator-income-sources span { color: #817683; font-size: 9px; }
.creator-income-sources b { margin-top: 4px; font-size: 13px; }
.creator-share-rule { margin-top: 15px; padding-top: 13px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; border-top: 1px solid #eee6ef; }
.creator-share-rule div { display: flex; justify-content: space-between; padding: 10px; border-radius: 11px; color: #6433a3; background: #f5effb; font-size: 10px; }
.creator-share-rule p { grid-column: 1 / -1; margin: 2px 0 0; color: #8a7f89; font-size: 9px; line-height: 1.55; }
.creator-settlement-section { margin: 22px 18px 0; }
.creator-settlement-row { margin-top: 9px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; }
.creator-settlement-row b, .creator-settlement-row small, .creator-settlement-row span { display: block; }
.creator-settlement-row small { margin-top: 4px; color: #8a7f89; font-size: 9px; }
.creator-settlement-row > div:last-child { text-align: right; }
.creator-settlement-row span { color: #6b36a9; font-size: 9px; }
.creator-settlement-row > div:last-child b { margin-top: 4px; font-size: 14px; }
.creator-dashboard-empty { margin: 18px; padding: 24px; text-align: center; }
.creator-dashboard-empty b { font-size: 16px; }
.creator-dashboard-empty p { margin: 8px 0 0; color: #817987; font-size: 11px; line-height: 1.6; }
.creator-dashboard-empty button { min-height: 42px; margin-top: 15px; padding: 0 16px; border: 0; border-radius: 13px; color: #fff; background: #6c36b3; font-size: 11px; font-weight: 800; }

@media (max-width: 350px) {
  .creator-home-profile { grid-template-columns: 66px 1fr; }
  .creator-avatar { width: 66px; height: 66px; border-radius: 23px; }
  .creator-home-profile h1 { font-size: 23px; }
  .creator-benefit-strip { align-items: stretch; flex-direction: column; }
  .creator-benefit-strip button { width: 100%; }
}

/* 2026-08 add-flow information architecture */
.home-brand {
  min-width: 0;
  gap: 7px;
}
.home-brand > span { flex: 0 0 auto; }
.home-brand > small {
  max-width: 118px;
  padding-left: 8px;
  color: #807583;
  border-left: 1px solid rgba(108, 76, 241, .18);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  white-space: normal;
}
.home-quick-tools {
  margin-top: 13px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.home-quick-tool {
  min-width: 0;
  min-height: 66px;
  padding: 8px 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
  border: 1px solid rgba(118, 94, 130, .1);
  border-radius: 17px;
  background: #fffaf6;
  box-shadow: 0 8px 18px rgba(73, 48, 35, .05);
}
.home-quick-tool-pantry { background: linear-gradient(145deg, #effcf7, #f8fffc); }
.home-quick-tool-original { background: linear-gradient(145deg, #f5f1ff, #fffaff); }
.home-quick-tool b {
  overflow: hidden;
  max-width: 100%;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-quick-tool .library-entry-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 11px;
}
.home-quick-tool .library-entry-icon { width: 22px; height: 22px; }
.library-entry-icon {
  width: 26px;
  height: 26px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
}
.home-quick-tool .video-entry-mark,
.add-hub-tool .video-entry-mark {
  color: white;
  background: linear-gradient(135deg, #ff9b42, #ff6f1e);
  box-shadow: 0 9px 18px rgba(255,112,29,.2);
}
.home-quick-tool .pantry-entry-mark,
.add-hub-tool .pantry-entry-mark {
  color: #287e65;
  background: #ddf7ed;
}
.home-quick-tool .original-entry-mark,
.add-hub-tool .original-entry-mark {
  color: white;
  background: linear-gradient(135deg, #6c4cf1, #8b70f4);
  box-shadow: 0 9px 18px rgba(108,76,241,.18);
}

.add-hub-page {
  background: #faf8f5;
}
.add-hub-page > .safe-top { height: max(7px, env(safe-area-inset-top)); }
.add-hub-page > .topbar .icon-button {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 30px;
  font-weight: 300;
}
.add-hub-smart {
  margin: 8px 16px 18px;
}
.add-hub-smart-head,
.add-hub-other-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.add-hub-smart-head { margin: 0 2px 9px; }
.add-hub-smart-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}
.add-hub-smart-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}
.add-hub-smart-head small,
.add-hub-other-title small {
  color: var(--muted);
  font-size: 12px;
}
.add-hub-smart-head small { display: none; }
.add-hub-smart .add-hub-import-panel {
  margin: 0;
  padding: 16px;
  border: 1px solid #eae4de;
  border-radius: 21px;
  box-shadow: 0 8px 24px rgba(50,35,25,.06);
}
.import-source-wrap { position: relative; }
.add-hub-import-panel .platforms { margin-bottom: 12px; }
.add-hub-import-panel .platform { min-height: 32px; padding: 0 10px; font-size: 12px; }
.add-hub-import-panel .import-source-wrap .link-input {
  display: block;
  min-height: 130px;
  padding: 15px 15px 52px;
  border: 1px solid #e3dfe4;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
}
.import-paste-button {
  position: absolute;
  right: 9px;
  bottom: 9px;
  min-width: 84px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--purple);
  border: 0;
  border-radius: 12px;
  background: var(--purple-pale);
  font-size: 13px;
  font-weight: 750;
}
.add-hub-import-panel .primary-button {
  min-height: 52px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(120deg,#ff9636,#ff771f);
  box-shadow: 0 8px 18px rgba(235,112,26,.16);
  font-size: 19px;
  font-weight: 800;
}
.add-hub-import-panel .copyright-note { margin-top: 9px; font-size: 12px; line-height: 1.5; }
.add-hub-other-title {
  margin: 0 18px 10px;
  align-items: baseline;
}
.add-hub-other-title span { font-size: 17px; font-weight: 750; }
.add-hub-tools {
  margin: 0 16px;
  display: block;
}
.add-hub-tool {
  position: relative;
  width: 100%;
  min-height: 80px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  border: 1px solid #ded4f6;
  border-radius: 17px;
  background: linear-gradient(135deg,#f3eeff,#fbf9ff 72%,#fff);
  box-shadow: none;
  text-align: left;
}
.add-hub-tool-pantry { background: linear-gradient(145deg, #effcf7, #fbfffd); }
.add-hub-tool-original { background: linear-gradient(135deg,#f3eeff,#fbf9ff 72%,#fff); }
.add-hub-tool > span:nth-child(2) { min-width: 0; text-align: left; }
.add-hub-tool b,
.add-hub-tool small { display: block; }
.add-hub-tool b { font-size: 16px; font-weight: 700; }
.add-hub-tool small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.add-hub-tool > i { display: block; color: #8a8390; font-size: 24px; font-style: normal; }
.add-hub-tool .library-entry-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--purple);
  background: #eae3ff;
  box-shadow: none;
}
.add-hub-tool .library-entry-icon { width: 24px; height: 24px; }
.add-hub-quick {
  margin: 12px 16px 0;
  padding: 17px 15px 15px;
  border-radius: 23px;
  background:
    radial-gradient(circle at 96% 5%,rgba(255,255,255,.12),transparent 26%),
    linear-gradient(135deg,#5f39eb,#7856f0);
  box-shadow: 0 12px 26px rgba(88,58,177,.17);
}
.add-hub-quick .library-quick-head { gap: 10px; }
.add-hub-quick .library-quick-head h2 { font-size: 19px; }
.add-hub-quick .library-quick-head p { color: rgba(255,255,255,.9); font-size: 12px; }
.add-hub-quick .library-quick-row { grid-template-columns: minmax(0,1fr) 104px; gap: 9px; margin-top: 12px; }
.add-hub-quick .library-quick-row input { height: 50px; border: 0; border-radius: 16px; font-size: 15px; }
.add-hub-quick .library-quick-row button {
  min-width: 104px;
  min-height: 50px;
  border-radius: 16px;
  background: linear-gradient(120deg,#ff9636,#ff771f);
  font-size: 19px;
}
.add-hub-quick .library-quick-suggestions { margin-top: 10px; gap: 7px; }
.add-hub-quick .library-quick-suggestions button { min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 12px; }

.bottom-nav-four { grid-template-columns: repeat(5, 1fr); }
.bottom-nav-four .nav-item:last-child { grid-column: 5; }

@media (max-width: 370px) {
  .home-brand > small { max-width: 92px; font-size: 9px; }
  .home-quick-tools { gap: 5px; }
  .home-quick-tool { gap: 4px; padding-right: 4px; padding-left: 4px; }
  .home-quick-tool .library-entry-mark { width: 28px; height: 28px; border-radius: 10px; }
  .home-quick-tool .library-entry-icon { width: 20px; height: 20px; }
  .home-quick-tool b { font-size: 11px; }
  .add-hub-tools { margin-right: 14px; margin-left: 14px; }
  .add-hub-tool { min-height: 72px; padding: 9px 11px; grid-template-columns: 44px minmax(0,1fr) 20px; }
  .add-hub-tool .library-entry-mark { width: 44px; height: 44px; }
  .add-hub-tool b { font-size: 15px; }
  .add-hub-smart { margin-right: 14px; margin-bottom: 10px; margin-left: 14px; }
  .add-hub-smart-head { margin-bottom: 5px; }
  .add-hub-other-title { margin-right: 16px; margin-left: 16px; }
  .add-hub-smart .add-hub-import-panel { padding: 12px 14px; }
  .add-hub-import-panel .import-source-wrap .link-input { height: 96px; min-height: 96px; }
  .add-hub-import-panel .primary-button { margin-top: 10px; }
  .add-hub-import-panel .copyright-note { margin-top: 7px; }
  .add-hub-quick { margin: 10px 14px 0; padding: 14px; }
  .add-hub-quick .library-quick-row { grid-template-columns: minmax(0,1fr) 94px; }
  .add-hub-quick .library-quick-row button { min-width: 94px; }
  .add-hub-quick .library-quick-suggestions { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
}

/* Confirmed three-channel discover: recipes, community circle and following. */
.discover-channel-row { gap: 5px; }
.discover-sticky-stack .discover-channel-tabs button {
  min-width: 104px;
  padding: 0 12px;
}
.discover-hot-comment {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  margin-top: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  color: #6f646b;
  background: #faf6ff;
  text-align: left;
}
.discover-hot-comment b {
  color: var(--purple);
  font-size: 11px;
}
.discover-hot-comment span {
  overflow: hidden;
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.community-share-filter {
  color: #ed6b2e;
  background: #fff1e8;
}
.community-compose-entry {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1px solid #eee4de;
  border-radius: 18px;
  color: #302832;
  background: #fff;
  text-align: left;
}
.community-compose-entry > span:first-child {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--purple);
  background: #f1ebfc;
  font-weight: 800;
}
.community-compose-entry b,
.community-compose-entry small { display: block; }
.community-compose-entry b { font-size: 14px; }
.community-compose-entry small { margin-top: 3px; color: #8f858b; font-size: 11px; }
.community-compose-entry i {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff6727, #ff8b42);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.community-feed {
  columns: 2;
  column-gap: 10px;
}
.community-card {
  width: 100%;
  overflow: hidden;
  break-inside: avoid;
  display: inline-block;
  margin: 0 0 10px;
  border: 1px solid #eee3dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(66, 44, 31, .06);
  cursor: pointer;
}
.community-card-media {
  width: 100%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #f4eee8;
}
.community-card:nth-child(3n + 2) .community-card-media { aspect-ratio: 4 / 5; }
.community-card-media img,
.community-card-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.community-card-media::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 58px;
  background: linear-gradient(180deg, rgba(25, 20, 23, .28), transparent);
}
.community-media-badge {
  min-height: 25px;
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 25, 28, .64);
  font-size: 10px;
  font-weight: 750;
}
.community-play {
  width: 42px;
  height: 42px;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(31, 25, 28, .65);
}
.community-play::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 17px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
}
.community-card-copy { padding: 11px; }
.community-card-copy h3 {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  color: #2d2630;
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.community-author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #5d5359;
  font-size: 11px;
}
.community-author span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6c4cf1, #ff8b42);
  font-weight: 800;
}
.community-author b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.community-related {
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  padding: 7px 9px;
  border: 1px solid #e7dcf3;
  border-radius: 10px;
  color: #5d27b6;
  background: #faf6ff;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}
.community-card-copy footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eee5e1;
}
.community-card-copy footer button {
  min-height: 30px;
  padding: 0;
  border: 0;
  color: #766c72;
  background: transparent;
  font-size: 11px;
}
.community-composer-dialog,
.community-post-dialog {
  width: min(100% - 24px, 470px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  position: relative;
  border-radius: 24px;
  background: #fffdfb;
  box-shadow: 0 24px 80px rgba(42, 28, 37, .24);
}
.community-composer-dialog > header {
  min-height: 62px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid #eee5e1;
}
.community-composer-dialog > header h2 { margin: 0; font-size: 18px; text-align: center; }
.community-composer-dialog > header button { min-height: 42px; padding: 0; border: 0; color: #655b61; background: transparent; }
.community-composer-dialog form { padding: 18px; }
.community-body-field > span,
.community-related-select > span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.community-body-field textarea {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  resize: vertical;
  padding: 14px;
  border: 1px solid #e7deda;
  border-radius: 16px;
  color: #332d34;
  background: #fff;
  font: inherit;
  line-height: 1.6;
}
.community-media-picker { margin-top: 14px; }
.community-media-picker label {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed #d7c5ea;
  border-radius: 18px;
  color: var(--purple);
  background: #faf7fd;
  text-align: center;
  cursor: pointer;
}
.community-media-picker input { display: none; }
.community-media-picker label i { font-size: 34px; font-style: normal; }
.community-media-picker label b { font-size: 14px; }
.community-media-picker label small { color: #8f858b; font-size: 11px; }
.community-media-picker figure {
  height: 250px;
  overflow: hidden;
  position: relative;
  margin: 0;
  border-radius: 18px;
  background: #221d20;
}
.community-media-picker figure img,
.community-media-picker figure video { width: 100%; height: 100%; object-fit: cover; }
.community-media-picker figure button {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(31, 25, 28, .68);
  font-size: 23px;
}
.community-related-select { display: block; margin-top: 16px; }
.community-related-select select {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #e7deda;
  border-radius: 13px;
  color: #332d34;
  background: #fff;
}
.community-related-select small { display: block; margin-top: 7px; color: #8f858b; font-size: 11px; }
.community-review-note { color: #81777e; font-size: 11px; line-height: 1.55; }
.community-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #ff6727, #ff8b42);
  font-size: 15px;
  font-weight: 850;
}
.community-submit:disabled { opacity: .55; }
.community-post-dialog { padding-bottom: 24px; }
.community-post-media { max-height: 520px; overflow: hidden; border-radius: 24px 24px 0 0; background: #231e21; }
.community-post-media img,
.community-post-media video { width: 100%; max-height: 520px; display: block; object-fit: contain; }
.community-post-content { padding: 20px; }
.community-post-content > small { color: #8e838a; }
.community-post-content h2 { margin: 8px 0 14px; font-size: 23px; line-height: 1.45; }
.community-related--detail { max-width: 320px; font-size: 12px; }

/* Owner-approved 厨友圈作品详情 R2, 2026-09-05. */
.community-post-backdrop { align-items: center; padding: 12px; }
.community-post-dialog {
  width: min(100%, 430px);
  height: min(calc(100dvh - 24px), 932px);
  max-height: none;
  overflow: hidden;
  padding: 0;
  position: relative;
  border-radius: 24px;
  color: #28252d;
  background: #faf8f5;
}
.community-post-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 86px;
  scrollbar-width: none;
}
.community-post-scroll::-webkit-scrollbar { display: none; }
.community-post-nav {
  height: 58px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(238, 230, 223, .76);
  background: rgba(250, 248, 245, .96);
  backdrop-filter: blur(14px);
}
.community-post-nav b { font-size: 19px; font-weight: 650; text-align: center; }
.community-post-nav button {
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
}
.community-post-nav button span { display: block; transform: translateY(-2px); }
.community-post-media {
  width: 100%;
  height: min(300px, 42vh);
  max-height: none;
  overflow: hidden;
  position: relative;
  border-radius: 0;
  background: #f2ece7;
}
.community-post-media img,
.community-post-media video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  object-fit: cover;
}
.community-post-media-count {
  min-width: 42px;
  height: 26px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  position: absolute;
  right: 16px;
  bottom: 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 27, 33, .58);
  font-size: 12px;
}
.community-post-content { padding: 0 16px 32px; }
.community-post-author {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eee6df;
}
.community-post-avatar,
.community-post-comment-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7a3510;
  background: linear-gradient(145deg, #ffd6b8, #ff9d57);
  font-size: 15px;
  font-weight: 700;
}
.community-post-author > span:last-child { min-width: 0; display: grid; gap: 4px; }
.community-post-author b { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 650; }
.community-post-author i {
  padding: 3px 7px;
  border-radius: 8px;
  color: #4f35c8;
  background: #f2eeff;
  font-size: 11px;
  font-style: normal;
  font-weight: 550;
}
.community-post-author small { color: #716a78; font-size: 12px; }
.community-post-content h2 {
  margin: 16px 0 14px;
  overflow-wrap: anywhere;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .1px;
}
.community-post-recipe {
  padding: 13px;
  border: 1px solid #e1d5ff;
  border-radius: 16px;
  background: linear-gradient(130deg, #fff, #fbf9ff);
  box-shadow: 0 8px 24px rgba(79, 53, 200, .06);
}
.community-post-recipe-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #4f35c8;
  font-size: 12px;
  font-weight: 650;
}
.community-post-recipe-label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.community-post-recipe-main { display: flex; align-items: center; gap: 11px; }
.community-post-recipe-main > img,
.community-post-recipe-empty {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
}
.community-post-recipe-empty { display: grid; place-items: center; color: #4f35c8; background: #f2eeff; font-size: 22px; font-weight: 700; }
.community-post-recipe-main > span:last-child { min-width: 0; display: grid; gap: 4px; }
.community-post-recipe-main b { font-size: 16px; font-weight: 650; }
.community-post-recipe-main small { overflow-wrap: anywhere; color: #716a78; font-size: 12px; line-height: 1.4; }
.community-post-recipe-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 11px; }
.community-post-recipe-actions button {
  min-width: 0;
  height: 44px;
  border: 1px solid #d8ccfb;
  border-radius: 12px;
  color: #4f35c8;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
}
.community-post-recipe-actions button.primary { border-color: #ff8a34; color: #fff; background: #ff8a34; box-shadow: 0 6px 15px rgba(255, 138, 52, .18); }
.community-post-recipe-actions button:disabled { border-color: #e5ded8; color: #817a84; background: #f0ece9; box-shadow: none; }
.community-post-engagement {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eee6df;
  color: #716a78;
  font-size: 13px;
}
.community-post-engagement b { color: #28252d; font-weight: 650; }
.community-post-engagement > b { color: #4f35c8; text-align: right; }
.community-post-comments { padding-top: 12px; }
.community-post-comments > header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
.community-post-comments h3 { margin: 0; font-size: 18px; font-weight: 650; }
.community-post-comments > header button { min-height: 44px; padding: 0 0 0 14px; border: 0; color: #4f35c8; background: transparent; font-size: 13px; }
.community-post-comment-form {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 4px 0 8px;
}
.community-post-comment-form input {
  width: 0;
  min-width: 0;
  min-height: 44px;
  flex: 1 1 auto;
  padding: 0 13px;
  border: 1px solid #e4ddd7;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.community-post-comment-form button {
  width: 70px;
  min-width: 0;
  min-height: 44px;
  flex: 0 0 70px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #6c4cf1;
  font-size: 14px;
  font-weight: 650;
}
.community-post-comment { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eee6df; }
.community-post-comment-avatar { width: 32px; height: 32px; color: #1c7650; background: #e9f6ee; font-size: 12px; }
.community-post-comment-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.community-post-comment-copy b { color: #716a78; font-size: 12px; font-weight: 550; }
.community-post-comment-copy span { overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.community-post-comment-copy small { color: #958d97; font-size: 11px; }
.community-post-comment > button { min-height: 44px; padding: 0 4px 0 10px; border: 0; color: #9e5e58; background: transparent; font-size: 12px; }
.community-post-comment-list > p { padding: 16px 0; color: #716a78; font-size: 13px; }
.community-post-dock {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 66px;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #eee6df;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -10px 24px rgba(40, 37, 45, .05);
  backdrop-filter: blur(14px);
}
.community-post-comment-entry {
  min-width: 0;
  height: 46px;
  overflow: hidden;
  padding: 0 15px;
  border: 1px solid #e4ddd7;
  border-radius: 23px;
  color: #716a78;
  background: #f7f4f1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-post-dock-action {
  height: 52px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #514b58;
  background: transparent;
}
.community-post-dock-action svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.community-post-dock-action small { font-size: 11px; white-space: nowrap; }
.community-post-dock-action.active { color: #d94e58; }
.community-post-dock-action.active svg { fill: currentColor; }
.community-post-dock-action.share { color: #4f35c8; }
.community-share-scrim { position: absolute; inset: 0; z-index: 20; background: rgba(28, 22, 32, .48); }
.community-share-sheet {
  max-height: calc(100% - 70px);
  overflow-y: auto;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 21;
  padding: 12px 16px calc(22px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #faf8f5;
  box-shadow: 0 -18px 50px rgba(30, 22, 35, .2);
}
.community-share-handle { width: 42px; height: 4px; display: block; margin: 0 auto 12px; border-radius: 4px; background: #d7d0ca; }
.community-share-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.community-share-sheet > header > span { min-width: 0; }
.community-share-sheet h3 { margin: 0; font-size: 20px; font-weight: 700; }
.community-share-sheet header small { display: block; margin-top: 5px; color: #716a78; font-size: 12px; line-height: 1.45; }
.community-share-sheet header button { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #f0ece8; font-size: 22px; }
.community-share-native {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid #cfe8d6;
  border-radius: 16px;
  background: #f7fff9;
  text-align: left;
}
.community-share-native > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 4px; }
.community-share-native b { font-size: 15px; font-weight: 650; }
.community-share-native small { color: #716a78; font-size: 12px; line-height: 1.4; }
.community-share-native > i { color: #aaa1ad; font-size: 22px; font-style: normal; }
.community-share-platform { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; }
.community-share-platform svg { width: 23px; height: 23px; }
.community-share-platform.wechat { color: #189d50; background: #e3f7e8; }
.community-share-platform.wechat svg { fill: currentColor; }
.community-share-platform.moments { color: #4f35c8; background: #f2eeff; }
.community-share-platform.xiaohongshu { color: #d7493c; background: #fff0ed; }
.community-share-platform.moments svg,
.community-share-platform.xiaohongshu svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.community-share-sheet h4 { margin: 18px 0 9px; font-size: 14px; font-weight: 650; }
.community-share-materials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.community-share-materials > button {
  min-width: 0;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 13px;
  border: 1px solid #eee6df;
  border-radius: 16px;
  background: #fff;
  text-align: left;
}
.community-share-materials > button:disabled { opacity: .7; }
.community-share-materials b { margin-top: 9px; font-size: 15px; font-weight: 650; }
.community-share-materials small { min-height: 34px; margin-top: 4px; color: #716a78; font-size: 12px; line-height: 1.4; }
.community-share-materials strong { margin-top: auto; color: #4f35c8; font-size: 13px; font-weight: 650; }
.community-share-note { margin: 14px 4px 0; color: #716a78; font-size: 12px; line-height: 1.55; }

@media (max-width: 560px) {
  .community-post-backdrop { padding: 0; }
  .community-post-dialog { width: 100%; height: 100dvh; border-radius: 0; }
  .community-post-media { height: min(300px, 39vh); }
}

@media (max-width: 370px) {
  .community-post-content { padding-right: 12px; padding-left: 12px; }
  .community-post-recipe-actions { grid-template-columns: 1fr 1.15fr; }
  .community-post-dock { grid-template-columns: minmax(0, 1fr) 50px 64px; padding-right: 10px; padding-left: 10px; }
  .community-share-materials { gap: 8px; }
  .community-share-sheet { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 370px) {
  .discover-sticky-stack .discover-channel-tabs button { min-width: 96px; }
  .community-feed { column-gap: 8px; }
  .community-card { margin-bottom: 8px; }
  .community-card-copy { padding: 9px; }
}

/* Discover uses a compact, image-first two-column rhythm. It intentionally
   previews only the signed-in family's real recipes until public moderation
   and cross-family copying are available. */
.discover-page {
  min-height: 100vh;
  padding: 24px 18px 112px;
  background:
    radial-gradient(circle at 100% 0, rgba(108, 76, 241, .12), transparent 25%),
    radial-gradient(circle at 0 15%, rgba(255, 138, 52, .1), transparent 24%),
    #fffaf6;
}
.discover-filter-scroll::-webkit-scrollbar { display: none; }
.discover-search {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(79, 53, 200, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px rgba(83, 54, 35, .07);
}
.discover-search i {
  width: 16px;
  height: 16px;
  position: relative;
  flex: 0 0 auto;
  border: 2px solid var(--purple);
  border-radius: 50%;
}
.discover-search i::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -5px;
  bottom: -3px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: var(--purple);
}
.discover-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}
.discover-filter-scroll {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin: 14px -18px 0;
  padding: 0 18px 12px;
  scrollbar-width: none;
}
.discover-filter-scroll button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid #ece2dc;
  border-radius: 999px;
  color: #69616c;
  background: rgba(255, 255, 255, .88);
  font-size: 13px;
}
.discover-filter-scroll button.active {
  border-color: var(--purple);
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #825df7);
  box-shadow: 0 7px 16px rgba(108, 76, 241, .23);
}
.discover-preview-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(108, 76, 241, .12);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(245, 241, 255, .96), rgba(255, 248, 240, .96));
}
.discover-preview-note div { min-width: 0; }
.discover-preview-note b,
.discover-preview-note small { display: block; }
.discover-preview-note b { font-size: 14px; }
.discover-preview-note div small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.discover-preview-note > strong {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: 24px;
  line-height: 1;
  text-align: center;
}
.discover-preview-note > strong small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.discover-feed {
  column-count: 2;
  column-gap: 10px;
}
.discover-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid rgba(71, 48, 34, .06);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(59, 36, 22, .07);
  cursor: pointer;
}
.discover-card-photo {
  height: 226px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: linear-gradient(145deg, #f3edff, #fff1e7);
  font-size: 42px;
  font-weight: 800;
}
.discover-card-photo.is-short { height: 176px; }
.discover-card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.discover-card-photo i {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 28, 32, .66);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-style: normal;
}
.discover-card-copy { padding: 10px 11px 11px; }
.discover-card-copy h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.discover-card-copy p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0 9px;
}
.discover-card-copy p span {
  padding: 4px 6px;
  border-radius: 7px;
  color: #6855b9;
  background: #f4f0ff;
  font-size: 10px;
}
.discover-card-copy footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.discover-card-copy footer small {
  overflow: hidden;
  color: #958c96;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.discover-card-copy footer button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff9a43, #ff7627);
  font-size: 11px;
  font-weight: 700;
}
.discover-card-copy footer button:disabled {
  color: #8f8799;
  background: #f2eef6;
  box-shadow: none;
}
.discover-empty {
  padding: 50px 20px;
  border: 1px dashed #dfd3ce;
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  text-align: center;
}
.discover-empty b { font-size: 18px; }
.discover-empty p { color: var(--muted); font-size: 13px; }
.discover-empty button {
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--orange);
  font-weight: 700;
}

@media (max-width: 350px) {
  .discover-page { padding-right: 13px; padding-left: 13px; }
  .discover-filter-scroll { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; }
  .discover-card-photo { height: 205px; }
  .discover-card-photo.is-short { height: 160px; }
  .discover-card-copy { padding-right: 9px; padding-left: 9px; }
}

.publication-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(106, 75, 241, .13);
  background: linear-gradient(135deg, rgba(246, 241, 255, .96), rgba(255, 248, 240, .96));
}
.publication-entry > div { min-width: 0; }
.publication-entry small {
  color: var(--purple);
  font-weight: 800;
}
.publication-entry h2 { margin: 5px 0 3px; font-size: 18px; }
.publication-entry p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.publication-entry > button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #7352f5, #5a38df);
}
.publication-entry.published {
  border-color: rgba(37, 168, 114, .18);
  background: linear-gradient(135deg, rgba(235, 251, 244, .98), rgba(250, 246, 255, .98));
}

.public-dialog-backdrop {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(16px, env(safe-area-inset-top));
  background: rgba(29, 22, 38, .48);
  backdrop-filter: blur(6px);
}
.public-recipe-dialog,
.publication-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  border-radius: 28px 28px 0 0;
  background: #fffaf6;
  box-shadow: 0 -24px 60px rgba(33, 24, 49, .24);
}
.public-recipe-backdrop { align-items: stretch; padding: 0; background: #fffaf6; backdrop-filter: none; }
.public-recipe-dialog { height: 100dvh; border-radius: 0; box-shadow: 0 0 36px rgba(38, 28, 45, .12); }
.public-recipe-topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  min-height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  color: #241f28;
  background: rgba(255, 250, 246, .96);
  border-bottom: 1px solid rgba(235, 225, 218, .78);
  backdrop-filter: blur(18px);
}
.public-recipe-topbar strong { text-align: center; font-size: 18px; }
.public-dialog-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #2e2637;
  font-size: 25px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 24px rgba(34, 24, 45, .12);
}
.public-recipe-topbar .public-dialog-close { position: static; font-size: 36px; line-height: 1; background: transparent; box-shadow: none; }
.public-recipe-hero { height: min(52vh, 440px); background: #efe7e1; }
.public-recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.public-recipe-hero video { width: 100%; height: 100%; object-fit: cover; background: #18131b; }
.public-recipe-hero > span { display: grid; height: 100%; place-items: center; color: #7d6e64; font-size: 68px; font-weight: 900; }
.public-recipe-content { padding: 22px 22px 110px; }
.public-recipe-content > small { color: var(--purple); font-size: 13px; font-weight: 800; }
.public-recipe-content h2 { margin: 5px 0 12px; font-size: 28px; line-height: 1.2; }
.public-recipe-content blockquote {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid #ff8a34;
  border-radius: 0 14px 14px 0;
  color: #5a4d45;
  line-height: 1.6;
  background: #fff2e8;
}
.public-recipe-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 22px; }
.public-recipe-metrics span { padding: 12px 8px; border-radius: 13px; text-align: center; color: #635b69; background: #f5f0f7; }
.public-community-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -10px 0 20px; }
.public-community-metrics > * { min-height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; color: #6d626f; background: #fff; font: inherit; font-size: 13px; }
.public-community-metrics button { color: #d94e58; background: #fff0f1; font-weight: 800; cursor: pointer; }
.public-recipe-content h3 { margin: 23px 0 10px; font-size: 19px; }
.public-recipe-content ul,
.public-recipe-content ol { margin: 0; padding: 0; list-style: none; }
.public-recipe-content ul li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px solid #eee6e1; }
.public-recipe-content ol { counter-reset: public-step; }
.public-recipe-content ol li { position: relative; padding: 2px 0 16px 42px; line-height: 1.65; }
.public-recipe-content ol li::before { counter-increment: public-step; content: counter(public-step); position: absolute; left: 0; top: 0; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #fff; font-weight: 800; background: #7352f5; }
.public-source-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px; border-radius: 14px; color: #716774; font-size: 12px; background: #f4eef7; }
.public-source-note a { color: var(--purple); font-weight: 800; white-space: nowrap; }
.public-rights-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 13px; color: #786d78; background: #fff2e8; font-size: 12px; line-height: 1.45; }
.public-rights-row button { flex: 0 0 auto; border: 0; color: var(--purple); background: transparent; font-weight: 800; cursor: pointer; }
.public-comment-form { box-sizing: border-box; width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
.public-comment-form input { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #e5dce5; border-radius: 12px; font: inherit; }
.public-comment-form button { box-sizing: border-box; width: 76px; min-width: 0; padding: 0 12px; border: 0; border-radius: 12px; color: #fff; background: var(--purple); font-weight: 800; }
.public-comment-list { margin-top: 10px; }
.public-comment-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 12px 2px; border-bottom: 1px solid #eee5df; }
.public-comment-list span { display: grid; gap: 4px; color: #3d3440; font-size: 14px; }
.public-comment-list b { color: var(--purple); font-size: 12px; }
.public-comment-list small { color: var(--muted); }
.public-comment-list button { border: 0; color: #b55b58; background: transparent; }
.recipe-social-dock {
  position: fixed;
  z-index: 260;
  left: 50%;
  bottom: 0;
  width: min(100%, 560px);
  min-height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 64px 68px 72px minmax(112px, 1fr);
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  padding: 9px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(230, 221, 216, .86);
  background: rgba(255, 253, 251, .96);
  box-shadow: 0 -9px 30px rgba(48, 34, 28, .10);
  backdrop-filter: blur(18px);
}
.recipe-social-dock button { font: inherit; }
.recipe-social-dock-action {
  min-width: 0;
  min-height: 52px;
  padding: 3px 2px;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #3f3943;
  background: transparent;
}
.recipe-social-dock-action > span:first-child { color: #50464f; font-size: 22px; line-height: 1; }
.recipe-social-dock-action > small,
.recipe-social-dock-action > span:last-child { font-size: 11px; font-weight: 750; white-space: nowrap; }
.recipe-social-dock-action .rj-icon { width: 22px; height: 22px; margin: 0; }
.recipe-social-dock-action.active { color: var(--purple); }
.recipe-social-dock-action:disabled { opacity: .62; }
.recipe-social-dock-input {
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid #e7e0e8;
  border-radius: 22px;
  color: #8a818c;
  background: #f6f3f5;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.recipe-social-dock-input.is-private { color: #6d6373; background: #f2edff; }
.recipe-social-dock-public .recipe-social-dock-action:first-child { color: var(--purple); }
.public-recipe-content { padding-bottom: 118px; }

.publication-dialog { padding: 30px 22px calc(22px + env(safe-area-inset-bottom)); }
.publication-dialog .eyebrow { color: var(--purple); font-weight: 800; }
.publication-dialog h2 { margin: 7px 48px 5px 0; font-size: 25px; }
.publication-status-copy { margin: 0 48px 20px 0; color: var(--muted); line-height: 1.55; }
.publication-dialog form > label:not(.publication-consent) { display: block; margin: 14px 0; font-size: 14px; font-weight: 800; }
.publication-dialog input[type="text"],
.publication-dialog input[name="public_kitchen_name"],
.publication-dialog textarea { width: 100%; margin-top: 7px; border: 1px solid #e4dbe5; border-radius: 14px; color: #2f2735; font: inherit; background: #fff; }
.publication-dialog input[name="public_kitchen_name"] { min-height: 48px; padding: 0 13px; }
.publication-dialog textarea { min-height: 104px; padding: 12px 13px; resize: vertical; }
.publication-media-options { display: grid; gap: 8px; margin: 16px 0; padding: 14px; border: 1px solid #e5dbe5; border-radius: 14px; }
.publication-media-options legend { padding: 0 6px; font-size: 14px; font-weight: 800; }
.publication-media-options label { display: flex; align-items: center; gap: 8px; margin: 0 !important; padding: 10px; border-radius: 10px; background: #faf6fb; }
.publication-media-options label.disabled { color: var(--muted); }
.publication-external-note { padding: 12px 14px; border-radius: 13px; color: #6b5e62; background: #fff1e6; font-size: 12px; line-height: 1.55; }
.publication-rights-basis select { width: 100%; min-height: 44px; margin-top: 7px; padding: 0 12px; border: 1px solid #e4dbe5; border-radius: 12px; background: #fff; font: inherit; }
.publication-privacy-list { display: grid; gap: 7px; margin: 17px 0; padding: 15px; border-radius: 16px; color: #5d5362; font-size: 13px; background: #f3effb; }
.publication-privacy-list b { color: #2e2735; font-size: 15px; }
.publication-consent { display: flex; align-items: flex-start; gap: 10px; margin: 15px 0; color: #5f5663; font-size: 13px; line-height: 1.5; }
.publication-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: #7048f3; }

@media (max-width: 390px) {
  .publication-entry { align-items: flex-start; flex-direction: column; }
  .publication-entry > button { width: 100%; }
  .public-recipe-content { padding-right: 17px; padding-left: 17px; }
  .recipe-social-dock { grid-template-columns: 58px 62px 66px minmax(106px, 1fr); padding-right: 8px; padding-left: 8px; }
  .recipe-social-dock-input { padding-right: 11px; padding-left: 11px; }
}

.import-panel { margin: 13px 20px; padding: 18px; }
.platforms { display: flex; gap: 8px; margin-bottom: 15px; }
.platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f7f4f2;
  color: #615a63;
  font-size: 11px;
}
.platform i {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: #242027;
  font-style: normal;
  font-weight: 800;
}
.platform.red i { background: #f1404b; }
.platform.orange i { background: #ff5538; }
.link-input {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  resize: none;
  border: 1.5px solid #ddd2ff;
  border-radius: 17px;
  outline: none;
  color: var(--ink);
  background: #fbf9ff;
}
.link-input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-pale); }
.primary-button, .secondary-button {
  min-height: 53px;
  border-radius: 17px;
  font-weight: 780;
  border: 0;
}
.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--orange), #ff6f1e);
  box-shadow: 0 10px 20px rgba(255,112,29,.22);
}
.secondary-button { color: var(--purple); background: white; border: 1.5px solid var(--purple); }
.wide { width: 100%; }
.import-panel .primary-button { margin-top: 13px; }

.fallback-block { padding: 4px 20px 20px; }
.fallback-block h3 { margin: 13px 0 11px; font-size: 15px; }
.fallback-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.fallback-card {
  min-height: 92px;
  border: 1px solid #eee5df;
  border-radius: 17px;
  background: white;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: #625b64;
  font-size: 11px;
}
.fallback-card b { font-size: 23px; font-weight: 500; }
.copyright-note { margin: 12px 0 0; text-align: center; color: #999199; font-size: 10px; }

.progress-card { margin: 13px 20px; padding: 17px; }
.progress-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.progress-spark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 21px;
}
.progress-head h3 { margin: 0; font-size: 17px; }
.progress-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.source-preview { display: grid; grid-template-columns: 58px 1fr; gap: 11px; align-items: center; padding: 9px; border-radius: 15px; background: #faf8ff; }
.source-preview .dish-photo { width: 58px; height: 58px; border-radius: 12px; }
.source-preview strong { font-size: 13px; }
.source-preview small { display: block; margin-top: 5px; color: var(--muted); }
.recognition-steps { display: grid; gap: 9px; margin-top: 15px; }
.recognition-step { display: flex; align-items: center; gap: 10px; color: #68616b; font-size: 12px; }
.recognition-step i {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--purple);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.recognition-step.active { color: var(--ink); font-weight: 720; }
.recognition-step.active i { background: var(--orange); box-shadow: 0 0 0 5px var(--orange-pale); animation: pulse .8s ease-in-out infinite alternate; }
.recognition-step.pending i { color: #aaa2ad; background: #ece7ef; }
@keyframes pulse { to { transform: scale(1.1); } }
.import-wander-card {
  margin: 8px 20px 110px;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  border-color: rgba(255,138,52,.2);
  background: linear-gradient(135deg, #fffaf4, #fff);
}
.import-wander-card > span { font-size: 27px; }
.import-wander-card b { display: block; font-size: 13px; }
.import-wander-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.import-wander-card button {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d7cdfa;
  border-radius: 14px;
  color: #4f35c8;
  background: #f2eeff;
  font-size: 12px;
  font-weight: 780;
}

.import-progress-page {
  min-height: 100vh;
  background: #faf8f5;
}
.import-progress-hero {
  padding: 24px 20px 4px;
  text-align: center;
}
.import-progress-hero h1 {
  margin: 0;
  color: #28252d;
  font-size: 28px;
  line-height: 1.25;
}
.import-progress-hero p {
  margin: 7px 0 0;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.5;
}
.import-progress-card {
  margin-top: 14px;
  padding: 16px 15px 12px;
  border-color: #eee6df;
  text-align: center;
  box-shadow: 0 5px 14px rgba(55, 37, 70, .045);
}
.import-progress-ring {
  width: 82px;
  height: 82px;
  margin: 0 auto;
  padding: 9px;
  box-sizing: border-box;
  border-radius: 50%;
}
.import-progress-ring i {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 50%;
  color: #28252d;
  background: #fff;
  font-size: 22px;
  font-style: normal;
  font-weight: 750;
}
.import-progress-card > h3 {
  margin: 10px 0 0;
  color: #28252d;
  font-size: 16px;
}
.import-progress-card > p {
  margin: 4px 0 0;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.5;
}
.import-progress-card .recognition-steps {
  margin-top: 12px;
  text-align: left;
}
.import-progress-page .import-wander-card {
  border-color: #eee6df;
  background: #fff;
  box-shadow: 0 5px 14px rgba(55, 37, 70, .045);
}
.import-wander-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  box-sizing: border-box;
  border: 1.5px solid #ff8a34;
  border-radius: 50%;
  color: #d85f12;
  background: #fff4ea;
  font-size: 15px !important;
  font-weight: 750;
}

.confirm-hero {
  width: calc(100% - 40px);
  height: clamp(240px, 42vh, 360px);
  margin: 12px 20px 0;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #eee5df;
  box-shadow: 0 16px 42px rgba(65, 40, 28, .09);
}
.confirm-hero .dish-photo, .confirm-hero .photo-carousel { height: 100%; }
.confirm-continue-hint {
  width: calc(100% - 40px);
  min-height: 62px;
  margin: 10px 20px 0;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ded3ff;
  border-radius: 20px;
  color: var(--purple-dark);
  background: linear-gradient(135deg, #fff, #f6f1ff);
  text-align: left;
}
.confirm-continue-hint span,
.confirm-continue-hint b,
.confirm-continue-hint small { display: block; }
.confirm-continue-hint b { font-size: 14px; }
.confirm-continue-hint small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.confirm-continue-hint i { font-size: 24px; font-style: normal; }
@media (min-width: 700px) {
  .confirm-hero { height: min(42vh, 380px); }
}
.photo-selected-pill {
  position: absolute;
  left: 16px;
  top: 15px;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 11px;
  color: white;
  background: rgba(60,35,28,.62);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 750;
}
.source-video-link {
  margin: 12px 20px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: white;
  border: 1px solid #eee5df;
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  text-decoration: none;
}
.source-video-link > span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--purple), #8d69ff);
  font-size: 12px;
}
.source-video-link b { display: block; font-size: 13px; }
.source-video-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-video-link i { color: var(--orange); font-style: normal; font-size: 17px; }
.play-button {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid white;
  color: white;
  background: rgba(30,22,20,.62);
  display: grid;
  place-items: center;
  font-size: 24px;
  padding-left: 4px;
}
.success-banner {
  margin: 0 20px 13px;
  padding: 13px 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--purple-dark);
  background: var(--purple-pale);
  border-radius: 17px;
  font-size: 12px;
}
.success-banner .source-label {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.success-banner b { display: block; margin-bottom: 3px; font-size: 14px; }
.edit-form { padding: 0 20px; display: grid; gap: 12px; scroll-margin-top: 76px; }
.form-card { padding: 16px; box-shadow: var(--soft-shadow); }
.dish-image-editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.dish-image-editor-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.dish-image-editor-head > b {
  flex: none;
  color: var(--purple);
  font-size: 10px;
}
.dish-image-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}
.dish-image-editor-grid figure,
.dish-image-add {
  position: relative;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  margin: 0;
  border-radius: 15px;
}
.dish-image-editor-grid figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-image-editor-grid figure i {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(108,76,241,.9);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}
.dish-image-editor-grid figure button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: rgba(35,28,42,.76);
  font-size: 18px;
}
.dish-image-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed #cfc2fb;
  color: var(--purple);
  background: #f8f5ff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.dish-image-add strong {
  margin-bottom: 5px;
  font-size: 30px;
  font-weight: 400;
}
.dish-cover-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 9px;
}
.dish-cover-editor-actions .dish-image-add {
  min-height: 48px;
  aspect-ratio: auto;
  flex-direction: row;
  gap: 8px;
}
.dish-cover-editor-actions .dish-image-add strong { margin: 0; }
.dish-cover-secondary-action {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd4f6;
  border-radius: 12px;
  color: var(--purple);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.ai-image-add {
  border-color: rgba(108,76,241,.34);
  color: var(--purple);
  background: linear-gradient(145deg, #f4efff, #fff8ef);
}
.ai-image-add strong { font-size: 15px; font-weight: 900; }
.ai-image-notice,
.voice-privacy-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.voice-field-heading {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.recipe-voice-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 10px;
  font-weight: 800;
}
.recipe-voice-button.recording {
  color: white;
  background: #ff6b55;
}
.recipe-voice-pending,
.recipe-voice-note {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid rgba(108,76,241,.14);
  border-radius: 13px;
  background: #faf8ff;
  font-size: 10px;
}
.recipe-voice-pending > span,
.recipe-voice-note > span {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}
.recipe-voice-pending audio,
.recipe-voice-note audio {
  width: 100%;
  height: 34px;
}
.recipe-voice-pending > div,
.recipe-voice-note {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recipe-voice-pending > div {
  justify-content: flex-end;
  margin-top: 8px;
}
.recipe-voice-pending button,
.recipe-voice-note button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 9px;
  font-weight: 800;
}
.recipe-voice-note > span { flex: 0 0 100px; margin: 0; }
.recipe-voice-note audio { flex: 1; min-width: 100px; }
.recipe-voice-note button { color: #b35448; }
.field-label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.text-field, .select-field {
  width: 100%;
  height: 42px;
  border: 1px solid #e9e1dc;
  border-radius: 12px;
  outline: none;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
}
.text-field:focus, .select-field:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-pale); }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.text-area-field {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid #e9e1dc;
  border-radius: 13px;
  outline: none;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1.7;
}
.text-area-field:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-pale); }
.form-card > label + label { display: block; margin-top: 14px; }
.choice-group { margin: 17px 0 0; padding: 0; border: 0; }
.choice-list { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip { cursor: pointer; }
.choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chip span {
  min-height: 30px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e8dfec;
  border-radius: 10px;
  color: #6d6571;
  background: #fff;
  font-size: 11px;
  transition: .16s ease;
}
.choice-chip input:checked + span {
  color: var(--purple-dark);
  border-color: #c9baff;
  background: var(--purple-pale);
  box-shadow: inset 0 0 0 1px rgba(108,76,241,.05);
}
.mini-list { display: grid; gap: 8px; margin-top: 8px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; color: #5f5861; font-size: 12px; }
.ai-badge { color: var(--orange-dark); border: 1px solid var(--orange); border-radius: 8px; padding: 3px 6px; font-size: 9px; }
.sticky-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%,480px);
  padding: 14px 20px max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #eee7e1;
  box-shadow: 0 -10px 28px rgba(48,31,20,.08);
  z-index: 50;
}

.photo-carousel {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #eaded5;
}
.photo-carousel-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  /* Horizontal swiping must not trap the page's vertical scroll gesture. */
  touch-action: pan-x pan-y;
}
.photo-carousel-track::-webkit-scrollbar { display: none; }
.photo-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.photo-carousel-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.carousel-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(25,17,14,.28);
  pointer-events: none;
}
.carousel-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.52);
  transition: width .18s ease, background .18s ease;
}
.carousel-dots i.active { width: 15px; border-radius: 4px; background: white; }
.carousel-count {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  padding: 6px 8px;
  border-radius: 9px;
  color: white;
  background: rgba(25,17,14,.45);
  font-size: 9px;
  pointer-events: none;
}
.detail-hero { width: 100%; aspect-ratio: 3 / 4; position: relative; overflow: hidden; background: #eee5df; }
.detail-hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 112px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20,15,23,.34), transparent);
}
.detail-hero .dish-photo, .detail-hero .photo-carousel { height: 100%; }
.detail-top {
  position: absolute;
  left: 18px;
  right: 18px;
  top: max(15px, env(safe-area-inset-top));
  z-index: 4;
  display: flex;
  justify-content: space-between;
}
.detail-top-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 92px;
}
.detail-top > .icon-button {
  width: 40px;
  height: 40px;
  color: white;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(27,21,30,.46);
  box-shadow: 0 6px 18px rgba(23,16,25,.16);
  backdrop-filter: blur(12px);
}
.detail-manage-trigger {
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 42px;
  gap: 7px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  color: white;
  background: rgba(25,22,29,.56);
  box-shadow: 0 7px 20px rgba(23,16,25,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 800;
}
.detail-share-trigger {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: white;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.detail-manage-trigger:active { background: rgba(255,255,255,.12); }
.detail-share-trigger:active { opacity: .82; }
.detail-edit-icon {
  position: relative;
  width: 13px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
.detail-edit-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-left: 3px solid currentColor;
}
.detail-share-icon {
  display: block;
  width: 42px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(16,10,18,.48));
}
.source-pill { position: absolute; z-index: 4; left: 18px; bottom: 16px; padding: 9px 11px; border-radius: 12px; color: white; background: rgba(26,18,16,.62); backdrop-filter: blur(8px); font-size: 11px; font-weight: 700; text-decoration: none; }
.detail-hero .carousel-dots { bottom: 22px; }
.detail-hero .carousel-count { display: none; }
.detail-body { margin-top: -1px; padding: 22px 20px 28px; position: relative; background: var(--cream); border-radius: 30px 30px 0 0; }
.detail-title-row { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.detail-title-row h1 { margin: 0 0 12px; font-size: 30px; letter-spacing: -.8px; }
.detail-title-row .tag { padding: 6px 9px; font-size: 12px; }
.collection-chef-icon { display:inline-block; width:24px; height:24px; flex:none; background:currentColor; mask:url('/assets/icons/collection-chef.svg') center/contain no-repeat; -webkit-mask:url('/assets/icons/collection-chef.svg') center/contain no-repeat; }
.detail-collection-count { display:flex; flex:0 0 auto; min-width:56px; height:46px; align-items:center; justify-content:center; gap:4px; border-radius:15px; color:#6c4cf1; background:#f2eeff; }
.detail-collection-count b { font-size:14px; line-height:1; }
.heart {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 22px;
}
.detail-metrics { margin: 18px 0; padding: 16px 0; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { text-align: center; color: var(--muted); font-size: 12px; }
.metric b { display: block; margin-top: 6px; color: var(--ink); font-size: 16px; }
.want-people { display: flex; align-items: center; justify-content: space-between; }
.want-people-copy { display: flex; align-items: center; gap: 9px; }
.classification-card { margin: 18px 0 13px; padding: 16px; }
.classification-heading { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.classification-heading h2 { margin: 0; font-size: 19px; }
.classification-heading button { color: var(--purple); font-size: 13px; font-weight: 750; }
.classification-row { min-height: 48px; padding: 10px 0; display: grid; grid-template-columns: 72px 1fr; gap: 10px; border-top: 1px solid var(--line); }
.classification-label { padding-top: 5px; color: var(--muted); font-size: 12px; }
.classification-values { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip { padding: 6px 9px; border-radius: 9px; color: var(--purple-dark); background: var(--purple-pale); font-size: 12px; }
.empty-value { padding-top: 5px; color: #aaa1ab; font-size: 12px; }
.detail-actions {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  background: rgba(255,252,249,.94);
  border-top: 1px solid rgba(235,225,218,.82);
  box-shadow: 0 -10px 30px rgba(50,32,23,.10);
  backdrop-filter: blur(18px);
}
.detail-primary-actions {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: .95fr 1.2fr;
  overflow: hidden;
  border-radius: 19px;
  box-shadow: 0 9px 22px rgba(97,61,193,.18);
}
.detail-cook-button {
  min-width: 0;
  padding: 0 8px;
  border: 0;
  color: white;
  background: linear-gradient(135deg, #7654ed, #633bd7);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.15;
}
.detail-cook-button.active {
  color: white;
  background: linear-gradient(135deg, #5f3bd0, #4725ad);
}
.detail-want-button {
  min-width: 0;
  padding: 0 10px;
  border: 0;
  color: white;
  background: linear-gradient(135deg, #ff9a3d, #ff6f1d);
  font-size: 14px;
  font-weight: 850;
}
.detail-want-button.active {
  background: linear-gradient(135deg, #f4882e, #ed5f17);
}
.home-shortcut {
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #5f5664;
  background: transparent;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
}
.home-shortcut:active { background: rgba(108,76,241,.08); transform: scale(.98); }
.home-shortcut:focus-visible { outline: 3px solid rgba(108,76,241,.24); outline-offset: 2px; }
.home-shortcut strong { color: var(--purple); font-size: 22px; line-height: 1; }
.home-shortcut small { font-size: 11px; font-weight: 780; }
.edit-page { padding-bottom: 112px; }
.source-edit-label { margin-top: 14px; }
.danger-text { color: #cf4545; }
.edit-actions { grid-template-columns: 88px 75px 1fr; }
.danger-button {
  height: 48px;
  border: 1px solid #ffd0cd;
  border-radius: 14px;
  color: #c83f3f;
  background: #fff2f0;
  font-weight: 750;
}
.danger-button.solid { color: white; border-color: #d94b46; background: #d94b46; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(31,22,30,.42);
  backdrop-filter: blur(5px);
}
.confirm-dialog {
  width: min(100%, 360px);
  padding: 24px 20px 18px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(32,20,29,.24);
}
.danger-symbol {
  width: 44px;
  height: 44px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #c83f3f;
  background: #fff0ef;
  font-size: 21px;
  font-weight: 850;
}
.confirm-dialog h2 { margin: 0; font-size: 19px; }
.confirm-dialog p { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dialog-actions button { min-height: 46px; }
.want-people-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.want-people-copy b { color: var(--purple); font-size: 15px; }
.dish-memory {
  margin-top: 14px;
  padding: 14px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  box-shadow: var(--soft-shadow);
}
.dish-memory > div { padding: 0 7px; text-align: center; border-left: 1px solid var(--line); }
.dish-memory > div:first-child { border-left: 0; }
.dish-memory small { display: block; color: var(--muted); font-size: 11px; }
.dish-memory b { display: block; margin-top: 5px; color: var(--purple); font-size: 15px; }
.household-notes { margin-top: 14px; padding: 15px; box-shadow: var(--soft-shadow); }
.household-notes header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.household-notes header span { color: var(--orange-dark); font-size: 11px; font-weight: 800; }
.household-notes header h2 { margin: 4px 0 0; font-size: 18px; }
.household-notes header i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-pale); font-style: normal; }
.household-note-list { margin-top: 12px; display: grid; gap: 8px; }
.household-note { padding: 10px; display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 8px; border-radius: 13px; background: #fff8ef; }
.household-note > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: white; }
.household-note b, .household-note small { display: block; }
.household-note b { font-size: 13px; line-height: 1.5; }
.household-note small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.identity-card { margin-top: 14px; padding: 14px; display: grid; grid-template-columns: repeat(3,1fr); box-shadow: var(--soft-shadow); }
.identity { color: var(--muted); font-size: 12px; }
.identity b { display: block; margin-top: 5px; color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ingredient-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.ingredient {
  min-width: 0;
  padding: 11px;
  border: 1px solid #eee7e1;
  border-radius: 14px;
  background: white;
  font-size: 14px;
}
.ingredient small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-list { display: grid; gap: 9px; }
.cook-step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 14px 15px; border-radius: 15px; background: white; border: 1px solid #eee7e1; font-size: 14px; line-height: 1.6; }
.cook-step b { color: var(--purple); }
.ai-warning { margin-top: 13px; padding: 12px 13px; color: var(--orange-dark); background: var(--orange-pale); border-radius: 14px; font-size: 12px; line-height: 1.5; }

.order-tabs { margin: 10px 20px 0; padding: 4px; display: grid; grid-template-columns: repeat(3,1fr); background: #eee9e5; border-radius: 15px; }
.order-tab { height: 38px; border: 0; background: transparent; color: #8e878e; border-radius: 12px; font-size: 12px; }
.order-tab.active { color: var(--purple); background: white; box-shadow: var(--soft-shadow); font-weight: 750; }
.order-summary { margin: 15px 20px; padding: 16px; color: white; background: linear-gradient(135deg,#6844ef,#865efa); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 12px 25px rgba(108,76,241,.21); }
.order-summary b { display: block; font-size: 16px; }
.order-summary small { display: block; margin-top: 5px; opacity: .82; }
.chef-pill { padding: 8px 10px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.16); border-radius: 13px; font-size: 10px; }
.order-summary-compact { min-height: 54px; padding: 11px 14px; background: linear-gradient(135deg,#f1ebff,#faf7ff); color: var(--ink); box-shadow: none; }
.order-summary-compact b { color: var(--purple); font-size: 15px; }
.order-summary-compact .chef-pill { color: var(--purple-dark); border-color: #d9ccff; background: rgba(255,255,255,.8); font-size: 11px; }
.orders { padding: 0 20px; display: grid; gap: 13px; }
.order-card { overflow: hidden; }
.order-card .dish-photo { height: 170px; }
.order-body { padding: 14px; }
.order-title { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.order-title h3 { margin: 0 0 8px; font-size: 19px; }
.votes { color: var(--orange-dark); background: var(--orange-pale); border-radius: 11px; padding: 7px 9px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.request-row { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.request-person { display: flex; align-items: center; gap: 8px; }
.request-person small { color: var(--muted); line-height: 1.45; }
.note-pill { color: var(--orange-dark); background: var(--orange-pale); border-radius: 11px 11px 3px 11px; padding: 7px 9px; font-size: 10px; }
.next-time-reminder { margin-top: 12px; padding: 10px 11px; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; border-radius: 13px; border: 1px solid #eadfff; background: linear-gradient(135deg, #f5f1ff, #fff9f1); }
.next-time-reminder span { grid-column: 1 / -1; color: var(--purple); font-size: 9px; font-weight: 800; }
.next-time-reminder b { font-size: 11px; line-height: 1.4; }
.next-time-reminder small { color: var(--muted); font-size: 8px; }
.order-ingredient-check { width: 100%; margin-top: 12px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 13px; color: var(--ink); background: #eef8f0; text-align: left; }
.order-ingredient-check.missing { background: #fff4e8; }
.order-ingredient-check b, .order-ingredient-check small { display: block; }
.order-ingredient-check b { color: #337847; font-size: 11px; }
.order-ingredient-check.missing b { color: #c55f27; }
.order-ingredient-check small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.order-ingredient-check i { color: var(--purple); font-size: 18px; font-style: normal; }
.shopping-list-card { margin: 14px 20px; padding: 20px 16px; border-radius: 16px; }
.shopping-list-card > header { display: flex; align-items: start; justify-content: space-between; }
.shopping-list-card > header h2 { margin: 3px 0 0; font-size: 24px; line-height: 1.45; }
.shopping-list-card > header > span { padding: 5px 9px; color: var(--purple-dark); border-radius: 9px; background: var(--purple-pale); font-size: 13px; font-weight: 650; }
.shopping-list-row { min-height: 96px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.shopping-list-row:first-of-type { margin-top: 10px; }
.shopping-list-check { width: 20px; height: 20px; overflow: hidden; color: #c6bdcf; font-size: 21px; line-height: 16px; }
.shopping-list-row b, .shopping-list-row small { display: block; }
.shopping-list-row b { font-size: 17px; font-weight: 650; }
.shopping-list-row small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.shopping-list-row button { min-width: 66px; min-height: 44px; padding: 0 8px; color: var(--purple-dark); border: 0; border-radius: 10px; background: var(--purple-pale); font-size: 14px; font-weight: 650; }
.household-purchase-return { margin: 12px 0 3px; padding: 12px; display: flex; gap: 9px; color: var(--purple-dark); border-radius: 10px; background: var(--purple-pale); font-size: 14px; line-height: 1.55; }
.household-purchase-return svg { width: 18px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.household-purchase-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; }
.household-purchase-actions button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.household-purchase-actions svg, .household-purchase-sheet svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.household-purchase-copy { color: var(--purple-dark); border: 1px solid #d9d2e0; background: #fff; }
.household-purchase-open { color: #fff; border: 0; background: var(--purple); }
.household-purchase-open svg { width: 18px; }
.household-purchase-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.rj-basket-purchase button { width: 100%; min-height: 44px; padding: 0; display: flex; align-items: center; justify-content: space-between; color: var(--purple-dark); border: 0; background: transparent; font-size: 14px; text-align: left; }
.household-purchase-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(40,32,46,.32); }
.household-purchase-sheet { width: min(100%, 480px); max-height: calc(100vh - 70px); padding: 12px 20px max(24px, env(safe-area-inset-bottom)); position: fixed; z-index: 151; right: 0; bottom: 0; left: 50%; overflow-y: auto; transform: translateX(-50%); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -12px 35px rgba(48,35,55,.15); }
.household-purchase-handle { width: 36px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: #d6d0dc; }
.household-purchase-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.household-purchase-sheet > header h2 { margin: 0; font-size: 24px; line-height: 1.4; }
.household-purchase-sheet > header button { width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: #665e6a; border: 0; border-radius: 50%; background: #f6f3f8; }
.household-purchase-intro { margin: 4px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.household-purchase-warning { margin: 12px 0 18px; padding: 14px; display: flex; gap: 10px; color: #755026; border: 1px solid #f4dfc4; border-radius: 12px; background: #fff5e9; font-size: 13px; line-height: 1.55; }
.household-purchase-warning svg { width: 20px; }
.household-purchase-warning strong { display: block; margin-bottom: 4px; color: #60401e; font-size: 14px; }
.household-purchase-summary { margin-bottom: 20px; padding: 14px; border-radius: 12px; background: var(--purple-pale); }
.household-purchase-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.household-purchase-summary b { font-size: 15px; }
.household-purchase-summary p { margin: 5px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.household-purchase-summary button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--purple-dark); border: 1px solid #d4c9ee; border-radius: 9px; background: #fff; }
.household-purchase-label { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.household-purchase-loading { padding: 22px 0; color: var(--muted); font-size: 14px; text-align: center; }
.household-purchase-channel { min-height: 80px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.household-purchase-channel-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: #715300; border-radius: 13px; background: #fff6d6; }
.household-purchase-channel.taobao .household-purchase-channel-icon { color: #af480c; background: #fff0e6; }
.household-purchase-channel > span:nth-child(2) { min-width: 0; flex: 1; }
.household-purchase-channel b, .household-purchase-channel small { display: block; }
.household-purchase-channel b { font-size: 17px; font-weight: 650; }
.household-purchase-channel small { margin-top: 4px; color: var(--muted); font-size: 13px; }
.household-purchase-channel button { min-width: 72px; min-height: 44px; padding: 0 9px; color: var(--purple-dark); border: 1px solid #ddd5e7; border-radius: 10px; background: #fff; font-size: 14px; white-space: nowrap; }
.household-purchase-channel button:disabled { color: #78717e; border-color: transparent; background: #f1eef3; cursor: default; }
.household-purchase-terms { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.household-purchase-leave { width: 100%; min-height: 46px; margin-top: 8px; color: var(--purple-dark); border: 0; background: transparent; }
.shopping-list-card-r7 { padding: 14px 14px 12px; }
.shopping-list-card-r7 > header { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shopping-list-card-r7 > header h2 { margin: 2px 0 0; font-size: 24px; line-height: 1.15; }
.shopping-list-card-r7 > header > div > small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.shopping-save-image { min-height: 44px; padding: 0 2px 0 10px; display: flex; align-items: center; gap: 5px; color: var(--purple); border: 0; background: transparent; font-size: 13px; font-weight: 650; white-space: nowrap; }
.shopping-save-image svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.shopping-price-mode { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shopping-price-mode > span { color: var(--muted); font-size: 9px; }
.shopping-price-mode > div { padding: 3px; display: flex; border-radius: 10px; background: #f1edf7; }
.shopping-price-mode button { min-width: 48px; min-height: 27px; padding: 0 5px; color: #78717e; border: 0; border-radius: 8px; background: transparent; font-size: 10px; }
.shopping-price-mode button.active { color: var(--purple); background: #fff; box-shadow: 0 1px 4px #dcd4e8; font-weight: 700; }
.shopping-list-columns,
.shopping-list-row-r7 { display: grid; grid-template-columns: 18px minmax(0,1fr) minmax(82px,96px) minmax(70px,82px); align-items: center; gap: 6px; }
.shopping-list-columns { min-height: 22px; color: #aaa3ad; border-bottom: 1px solid var(--line); font-size: 9px; }
.shopping-list-columns span:nth-child(3), .shopping-list-columns span:nth-child(4) { text-align: center; }
.shopping-list-group > header { min-height: 27px; margin-top: 4px; padding: 0 7px; display: flex; align-items: center; justify-content: space-between; border-radius: 8px; color: #6552a2; background: #f3f1fb; font-size: 13px; font-weight: 750; }
.shopping-list-group > header small { color: #89828e; font-size: 9px; font-weight: 500; }
.shopping-list-group > header b { font-size: 9px; white-space: nowrap; }
.shopping-list-group.meat > header { color: #a95839; background: #fff3ef; }
.shopping-list-group.vegetable > header { color: #3e8155; background: #eff8f1; }
.shopping-list-group.seasoning > header { color: #947027; background: #fff8e8; }
.shopping-list-row-r7 { min-height: 48px; border-top: 0; border-bottom: 1px solid #f0ece8; }
.shopping-list-row-r7 .shopping-list-check { width: 18px; min-width: 0; height: 18px; min-height: 0; padding: 0; border: 2px solid var(--orange); border-radius: 5px; background: #fff; }
.shopping-list-row-r7 .shopping-list-check:disabled { opacity: 1; }
.shopping-list-row-r7.is-purchased .shopping-list-check { color:#fff; border-color:var(--green); background:var(--green); font-size:12px; line-height:14px; }
.shopping-list-row-r7.is-purchased .shopping-list-item-copy { opacity:.58; }
.shopping-list-row-r7.is-purchased .shopping-list-quantity,
.shopping-list-row-r7.is-purchased .shopping-list-price { opacity:.58; }
.shopping-list-item-copy { min-width: 0; }
.shopping-list-item-copy b { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; }
.shopping-list-item-copy small { margin-top: 3px; overflow: hidden; color: #aaa3ad; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; line-height: 1.2; }
.shopping-list-quantity { width: 100%; min-height: 30px; display: grid; grid-template-columns: 23px minmax(0,1fr) 23px; align-items: center; color: #514b55; border: 1px solid #e5dfea; border-radius: 9px; text-align: center; font-size: 10px; }
.shopping-list-quantity button { min-width: 0; min-height: 28px; padding: 0; color: var(--purple); border: 0; background: transparent; font-size: 17px; }
.shopping-list-quantity button:disabled { color: #cfc8d4; }
.shopping-list-quantity span { overflow: hidden; border-right: 1px solid #eee8f1; border-left: 1px solid #eee8f1; text-overflow: ellipsis; white-space: nowrap; }
.shopping-list-price { width:100%; max-width:100%; min-width:0; min-height:40px; padding:2px; box-sizing:border-box; display:flex; align-items:center; justify-content:flex-end; gap:1px; overflow:hidden; color:var(--orange-dark); border:0; background:transparent; text-align:right; font-size:10px; font-weight:700; line-height:1.15; }
.shopping-list-price:disabled { cursor:default; }
.shopping-list-price span { min-width:0; display:flex; flex-direction:column; align-items:flex-end; }
.shopping-list-price em { max-width:100%; display:block; overflow:hidden; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.shopping-list-price i { flex:none; font-style:normal; }
.shopping-list-recipes { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #5f5965; border-bottom: 1px solid var(--line); font-size: 10px; }
.shopping-list-recipes b { overflow: hidden; color: var(--purple); text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.shopping-list-recipes button { padding: 0; color: inherit; border: 0; background: transparent; font: inherit; font-weight: inherit; }
.shopping-list-total { min-height: 48px; margin-top: 3px; padding: 5px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; background: #faf7ff; }
.shopping-list-total b { display: block; font-size: 13px; }
.shopping-list-total small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.shopping-list-total strong { color: var(--purple); font-size: 20px; white-space: nowrap; }
.shopping-list-card-r7 .household-purchase-actions { margin-top: 8px; grid-template-columns: 112px 1fr; }
.shopping-list-card-r7 .household-purchase-actions button { min-height: 46px; }
.shopping-price-sheet { width: min(100%, 480px); max-height: calc(100vh - 48px); padding: 18px 20px max(24px, env(safe-area-inset-bottom)); position: fixed; z-index: 152; right: 0; bottom: 0; left: 50%; overflow-y: auto; transform: translateX(-50%); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -12px 35px rgba(48,35,55,.15); }
.shopping-price-sheet > header { margin-bottom: 12px; display: flex; align-items: start; justify-content: space-between; }
.shopping-price-sheet > header h2 { margin: 0; font-size: 21px; }
.shopping-price-sheet > header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.shopping-price-sheet > header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f5f1f8; font-size: 20px; }
.shopping-price-sheet > label, .shopping-price-range label { margin-top: 10px; display: block; color: #827a86; font-size: 12px; }
.shopping-price-sheet input, .shopping-price-sheet select { width: 100%; min-height: 44px; margin-top: 5px; padding: 0 12px; color: var(--ink); border: 1px solid #e7e0ea; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; }
.shopping-price-basis { min-height: 44px; margin-top: 5px; padding: 0 12px; display: flex; align-items: center; color: #4f4754; border: 1px solid #e7e0ea; border-radius: 12px; background: #faf7fc; font-size: 14px; font-weight: 700; }
.shopping-price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.shopping-price-sheet fieldset { margin: 13px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; }
.shopping-price-sheet legend { margin-bottom: 6px; color: #827a86; font-size: 12px; }
.shopping-price-sheet fieldset label { min-height: 40px; padding: 0 9px; display: flex; align-items: center; gap: 5px; border: 1px solid #ded7e7; border-radius: 12px; font-size: 12px; }
.shopping-price-sheet fieldset input { width: auto; min-height: 0; margin: 0; }
.shopping-price-source-note { margin: 11px 0 0; padding: 9px 11px; color: #746c79; border-radius: 10px; background: #faf7ff; font-size: 10px; line-height: 1.55; }
.shopping-price-save { width: 100%; min-height: 48px; margin-top: 14px; color: #fff; border: 0; border-radius: 14px; background: var(--purple); font-size: 15px; font-weight: 750; }
@media (max-width: 374px) {
  .shopping-list-card { margin-right: 12px; margin-left: 12px; }
  .shopping-list-columns, .shopping-list-row-r7 { grid-template-columns: 18px minmax(0,1fr) 78px 68px; gap: 4px; }
  .shopping-price-mode { align-items: flex-start; flex-direction: column; padding: 7px 0; }
  .shopping-price-mode > div { align-self: stretch; }
  .shopping-price-mode button { flex: 1; }
}
.timeline { margin: 16px 0 13px; display: grid; grid-template-columns: repeat(4,1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 8px; left: 11%; right: 11%; height: 2px; background: #e5dfea; }
.phase { position: relative; z-index: 1; text-align: center; color: #aaa2ad; font-size: 9px; }
.phase i { width: 18px; height: 18px; margin: 0 auto 5px; border-radius: 50%; display: grid; place-items: center; color: white; background: #e6e0e9; font-style: normal; }
.phase.done { color: var(--purple); font-weight: 720; }
.phase.done i { background: var(--purple); }
.order-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; }
.order-actions button { min-height: 46px; border-radius: 14px; font-size: 12px; }
.order-card-wanted-compact { min-height: 174px; display: grid; grid-template-columns: 118px minmax(0,1fr); }
.order-card-wanted-compact .dish-photo { width: 118px; height: 100%; min-height: 174px; border-radius: 0; }
.order-card-wanted-compact .dish-photo-image { width: 100%; height: 100%; object-fit: cover; }
.order-wanted-body { min-width: 0; padding: 13px 13px 12px; display: flex; flex-direction: column; }
.order-wanted-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-wanted-title h3 { min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font-size: 19px; font-weight: 780; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.order-wanted-title > span { flex: none; padding: 5px 7px; color: var(--purple-dark); border-radius: 9px; background: var(--purple-pale); font-size: 10px; font-weight: 700; }
.order-wanted-people { min-width: 0; margin-top: 9px; display: flex; align-items: center; gap: 7px; }
.order-wanted-people .avatars { flex: none; }
.order-wanted-people small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.order-wanted-detail { min-width: 0; margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.order-wanted-detail span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-wanted-detail b { flex: none; color: var(--orange-dark); font-size: 11px; font-weight: 700; }
.order-wanted-actions { grid-template-columns: 82px minmax(0,1fr); gap: 8px; margin-top: auto; padding-top: 10px; }
.order-wanted-actions button { min-height: 44px; font-size: 13px; }
.order-wanted-actions .secondary-button { color: var(--purple-dark); border: 1px solid #d9ccff; background: #fff; }
.meal-record { padding: 16px; overflow: hidden; box-shadow: var(--soft-shadow); }
.meal-record-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.meal-date { color: var(--purple); font-size: 10px; font-weight: 750; }
.meal-record-head h3 { margin: 6px 0 0; font-size: 17px; }
.auto-recorded { flex: 0 0 auto; padding: 6px 8px; border-radius: 9px; color: #20864b; background: #e8f8ed; font-size: 9px; font-weight: 750; }
.meal-dishes { margin-top: 13px; display: grid; gap: 8px; }
.meal-dish-row {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffdfa;
}
.meal-dish-main {
  width: 100%;
  min-height: 62px;
  padding: 7px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: transparent;
}
.meal-dish-main:disabled { opacity: 1; }
.meal-dish-thumb { width: 54px; height: 48px; overflow: hidden; border-radius: 11px; }
.meal-dish-thumb .dish-photo { width: 100%; height: 100%; }
.meal-dish-copy { min-width: 0; }
.meal-dish-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.meal-dish-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.meal-dish-copy em { display: block; margin-top: 5px; overflow: hidden; color: var(--orange-dark); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-style: normal; }
.meal-dish-main i { color: var(--purple); font-size: 18px; font-style: normal; }
.meal-feedback-button { width: 100%; min-height: 31px; border: 0; border-top: 1px solid var(--line); color: var(--purple); background: #faf7ff; font-size: 9px; font-weight: 750; }
.meal-praise-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.meal-praise-tags span { padding: 6px 8px; border-radius: 9px; color: var(--orange-dark); background: var(--orange-pale); font-size: 8px; font-weight: 750; }
.meal-record-foot { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.meal-record-foot > div { display: flex; gap: 6px; }
.meal-record-foot button { padding: 7px 9px; border: 0; border-radius: 10px; color: white; background: linear-gradient(135deg, var(--orange), #ff6f1f); font-size: 9px; font-weight: 750; }
.meal-record-foot button.secondary { color: var(--purple); background: var(--purple-pale); }
.meal-share-notifications { margin-top: 10px; }
.share-affirmation { align-self: center; margin-left: auto; color: var(--orange-dark); font-size: 9px; font-weight: 800; }
.ingredient-dialog-backdrop { z-index: 230; }
.ingredient-dialog { width: min(100%, 430px); max-height: min(82vh, 720px); padding: 18px; overflow: hidden; }
.ingredient-dialog > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ingredient-dialog > header h2 { margin: 5px 0 0; font-size: 19px; }
.ingredient-dialog > header > button { width: 34px; height: 34px; border: 0; border-radius: 11px; background: #eee8e3; color: var(--muted); font-size: 20px; }
.ingredient-dialog > p { margin: 11px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ingredient-dialog-list { max-height: 48vh; overflow-y: auto; }
.ingredient-dialog-row { min-height: 55px; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); }
.ingredient-dialog-row > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: var(--orange-dark); background: var(--orange-pale); font-weight: 800; }
.ingredient-dialog-row > span.available { color: #287643; background: #eaf8ee; }
.ingredient-dialog-row b, .ingredient-dialog-row small { display: block; }
.ingredient-dialog-row b { font-size: 11px; }
.ingredient-dialog-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.ingredient-dialog-row em { color: #287643; font-size: 9px; font-style: normal; font-weight: 750; }
.ingredient-row-actions { display: flex; gap: 5px; }
.ingredient-row-actions button { padding: 7px 8px; border: 0; border-radius: 9px; color: var(--purple); background: var(--purple-pale); font-size: 8px; font-weight: 800; }
.ingredient-row-actions button:last-child { color: var(--orange-dark); background: var(--orange-pale); }
.ingredient-dialog > footer { margin-top: 13px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.empty {
  margin: 42px 20px;
  padding: 40px 22px;
  text-align: center;
}
.empty strong { display: block; margin-bottom: 8px; }
.empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.family-hero {
  margin: 10px 20px;
  padding: 20px;
  color: white;
  background: linear-gradient(135deg,#6844ef,#865efa);
}
.family-hero-row { display: flex; align-items: center; justify-content: space-between; }
.family-hero h2 { margin: 0 0 7px; font-size: 23px; }
.family-hero p { margin: 0; opacity: .82; font-size: 12px; }
.family-icon { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 30px; }
.family-stats { margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); }
.family-stat { text-align: center; border-left: 1px solid rgba(255,255,255,.18); font-size: 10px; opacity: .84; }
.family-stat:first-child { border-left: 0; }
.family-stat b { display: block; margin-bottom: 4px; font-size: 17px; opacity: 1; }
.chef-inbox { margin-top: 9px; }
.chef-inbox .section-title > div h2 { margin-top: 4px; }
.chef-message-list { display: grid; gap: 9px; }
.chef-message { padding: 12px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: start; gap: 10px; box-shadow: var(--soft-shadow); }
.chef-message-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; font-size: 21px; }
.chef-message-copy { min-width: 0; }
.chef-message-copy > b { display: block; font-size: 12px; }
.chef-message-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.chef-message-tags span { padding: 4px 6px; border-radius: 7px; color: var(--orange-dark); background: var(--orange-pale); font-size: 8px; }
.chef-message-copy p { margin: 7px 0 0; color: #5e5660; font-size: 10px; line-height: 1.45; }
.chef-message-voice { width:100%; height:34px; margin-top:7px; }
.chef-message-copy > small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; }
.chef-message-action { align-self: center; }
.chef-message-action button { padding: 7px 8px; border: 0; border-radius: 9px; color: white; background: var(--purple); font-size: 8px; font-weight: 750; }
.chef-message-action span { display: block; max-width: 76px; color: var(--green); text-align: center; font-size: 8px; line-height: 1.35; }
.chef-message-action .praise-received { color: var(--orange-dark); }
.member-list { padding: 0 20px; display: grid; gap: 10px; }
.member-card { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--soft-shadow); }
.member-main { display: flex; align-items: center; gap: 11px; }
.member-avatar { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; }
.member-main h3 { margin: 0 0 4px; font-size: 15px; }
.member-main p { margin: 0; color: var(--muted); font-size: 10px; }
.role-pill { color: var(--purple); background: var(--purple-pale); border-radius: 10px; padding: 6px 8px; font-size: 10px; }
.settings-list { margin: 0 20px; overflow: hidden; box-shadow: var(--soft-shadow); }
.setting-row { width: 100%; min-height: 56px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 13px; }
.setting-row:last-child { border-bottom: 0; }
.setting-row span:last-child { color: var(--muted); font-size: 11px; }

.family-page { padding-bottom: 112px; }
.family-page-head { padding: 8px 20px 6px; }
.family-page-head .page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.family-page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.6px; }
.family-page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.home-return-button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 11px;
  font-weight: 800;
}
.family-section-note {
  margin: -5px 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.other-family-button { margin-top: 10px; }
.member-main { min-width: 0; }
.member-main > div:last-child { min-width: 0; }
.member-main h3,
.member-main p {
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-card-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 5px;
}
.member-card-actions button { border: 0; font-weight: 750; }
.member-remove-button {
  padding: 5px 8px;
  color: #b65344;
  background: transparent;
  font-size: 9px;
}
.family-action-card,
.family-management-card,
.family-settings-summary {
  margin: 14px 20px 0;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}
.family-action-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 15px;
}
.family-action-card h2,
.family-management-card h2 {
  margin: 5px 0 6px;
  font-size: 18px;
}
.family-action-card p,
.family-management-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.family-action-card .primary-button {
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
}
.family-management-card { display: grid; gap: 14px; }
.family-management-card label { display: grid; gap: 7px; }
.family-management-card select,
.family-management-card input[type="text"],
.family-management-card .text-field {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fffdfb;
  font: inherit;
}
.family-profile-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.family-management-card fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.family-management-card legend {
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
}
.family-management-card fieldset > small {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.family-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.family-profile-chip {
  position: relative;
  display: block !important;
}
.family-profile-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.family-profile-chip span {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 9px;
  font-weight: 750;
}
.family-profile-chip input:checked + span {
  border-color: rgba(108,76,241,.35);
  color: var(--purple);
  background: var(--purple-pale);
}
.family-profile-chip.warning input:checked + span {
  border-color: rgba(197,84,59,.35);
  color: #a74231;
  background: #fff0eb;
}
.family-profile-consent {
  grid-template-columns: auto minmax(0,1fr) !important;
  align-items: start;
  gap: 8px !important;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.family-profile-consent input { margin-top: 2px; }
.family-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.family-settings-summary b,
.family-settings-summary small { display: block; }
.family-settings-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.family-settings-summary > span {
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.session-card-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.leave-family-button {
  width: calc(100% - 40px);
  min-height: 46px;
  margin: 12px 20px 0;
  border: 1px solid rgba(197,84,59,.18);
  border-radius: 14px;
  color: #a94c3c;
  background: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 800;
}

.notification-summary {
  padding: 8px 20px 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.notification-summary h1 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.8px; }
.notification-summary > span { margin-bottom: 4px; color: var(--orange-dark); font-size: 11px; font-weight: 750; }
.notification-list { padding: 0 20px; display: grid; gap: 9px; }
.notification-card {
  width: 100%;
  padding: 13px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 11px;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--soft-shadow);
}
.notification-card.unread {
  border-color: rgba(108,76,241,.24);
  background: linear-gradient(135deg, #fff, #f8f5ff);
}
.notification-card.unread::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: 13px;
  right: 13px;
  border-radius: 50%;
  background: var(--orange);
}
.notification-card { position: relative; }
.notification-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 20px;
  font-weight: 800;
}
.notification-icon.want { color: var(--orange-dark); background: var(--orange-pale); }
.notification-icon.scheduled { color: var(--purple); background: var(--purple-pale); }
.notification-icon.preparing { color: #a45d18; background: #fff3dc; }
.notification-icon.completed { color: #20864b; background: #e8f8ed; }
.notification-icon.recipe-ready { color: var(--purple); background: var(--purple-pale); }
.background-import-notice {
  position: fixed;
  right: max(12px, calc((100vw - 520px) / 2 + 12px));
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 18;
  width: 158px;
  height: 54px;
  padding: 3px 9px 3px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(108,76,241,.18);
  border-radius: 999px;
  color: #4f35c8;
  background: rgba(255,255,255,.98);
  box-shadow: 0 10px 28px rgba(56,37,107,.14);
  backdrop-filter: blur(16px);
  touch-action: none;
  cursor: grab;
  transition: box-shadow .16s ease, transform .16s ease;
}
.background-import-notice.dragging { cursor: grabbing; transform: scale(1.04); box-shadow: 0 14px 32px rgba(56,37,107,.2); }
.background-import-label { white-space: nowrap; font-size: 12px; font-weight: 650; letter-spacing: .1px; }
.background-import-arrow { color: var(--purple); font-size: 22px; font-weight: 500; line-height: 1; }
.background-import-ring {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fffdfa;
}
.background-import-ring i { width: 34px; height: 34px; display:grid; place-items:center; border-radius:50%; color:var(--purple); background:#fffdfa; font-size:10px; font-style:normal; font-weight:900; }
.background-import-notice.ready .background-import-ring i { color:#278d58; font-size:16px; }
.background-import-notice.needs-input .background-import-ring i { color:#df6d28; }
.background-import-notice.ready .background-import-label { color:#278d58; }
.background-import-notice.needs-input .background-import-label { color:#df6d28; }
.background-import-notice > em { position:absolute; top:1px; right:1px; width:9px; height:9px; border:2px solid #fffdfa; border-radius:50%; background:var(--orange); }
.background-import-notice.ready > em { background:#2e9d62; }
.background-import-notice.needs-input > em { background:#ed7d32; }
@media (max-width: 380px) {
  .background-import-notice { width: 54px; padding: 3px; }
  .background-import-label, .background-import-arrow { display: none; }
}
.notification-title-row { padding-right: 8px; display: flex; justify-content: space-between; gap: 10px; }
.notification-title-row b { font-size: 13px; }
.notification-title-row time { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.notification-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.notification-card small { display: block; margin-top: 7px; color: var(--purple); font-size: 9px; font-weight: 700; }
.notification-empty { padding: 30px 24px; text-align: center; box-shadow: var(--soft-shadow); }
.notification-empty span { display: block; color: var(--purple); font-size: 30px; }
.notification-empty b { display: block; margin-top: 7px; font-size: 15px; }
.notification-empty p { margin: 7px auto 0; max-width: 260px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.notification-preference-section { margin-top: 5px; }
.notification-preferences { overflow: hidden; box-shadow: var(--soft-shadow); }
.notification-preference-row {
  width: 100%;
  min-height: 64px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
}
.notification-preference-row:last-child { border-bottom: 0; }
.notification-preference-row b, .notification-preference-row small { display: block; }
.notification-preference-row b { font-size: 12px; }
.notification-preference-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.notification-preference-row > i {
  width: 38px;
  height: 22px;
  padding: 3px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #ddd8dd;
  transition: .2s ease;
}
.notification-preference-row > i span {
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(41,38,49,.18);
  transition: .2s ease;
}
.notification-preference-row > i.active { background: var(--purple); }
.notification-preference-row > i.active span { transform: translateX(16px); }

.referral-login-card > span { color: white; background: linear-gradient(145deg, var(--purple), var(--orange)); }
.loading-inline { margin: 36px 20px; padding: 28px; color: var(--muted); text-align: center; border-radius: 22px; background: white; font-size: 11px; }
.referral-hero {
  margin: 5px 20px 14px;
  padding: 21px;
  overflow: hidden;
  position: relative;
  color: white;
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(135deg, #6040e7, #815bf3 58%, #ff8a34 145%);
  box-shadow: 0 15px 30px rgba(108,76,241,.23);
}
.referral-hero .eyebrow { color: #f1ebff; }
.referral-hero h1 { margin: 6px 0 7px; font-size: 24px; letter-spacing: -.7px; }
.referral-hero > p { max-width: 340px; margin: 0; opacity: .82; font-size: 10px; line-height: 1.55; }
.referral-stats { margin-top: 18px; display: grid; grid-template-columns: repeat(4,1fr); }
.referral-stats > div { text-align: center; border-left: 1px solid rgba(255,255,255,.2); }
.referral-stats > div:first-child { border-left: 0; }
.referral-stats b, .referral-stats small { display: block; }
.referral-stats b { font-size: 17px; }
.referral-stats small { margin-top: 3px; opacity: .72; font-size: 8px; }
.referral-commission-summary { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.referral-commission-summary > div { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.1); }
.referral-commission-summary small { opacity: .72; font-size: 8px; }
.referral-commission-summary b { font-size: 15px; }
.referral-rule-card { margin: 0 20px 10px; padding: 16px; box-shadow: var(--soft-shadow); }
.referral-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.referral-rule-head h2 { margin: 4px 0 0; font-size: 19px; }
.referral-rule-head > b { padding: 5px 8px; color: var(--purple); border-radius: 9px; background: var(--purple-pale); font-size: 8px; }
.referral-rule-card > p { margin: 10px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.referral-rule-reward-label { margin: 2px 0 7px; color: var(--purple-dark); font-size: 9px; font-weight: 800; }
.referral-rule-rewards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.referral-rule-rewards > div { padding: 11px 12px; border-radius: 13px; background: #faf8ff; }
.referral-rule-rewards small, .referral-rule-rewards b { display: block; }
.referral-rule-rewards small { color: var(--muted); font-size: 8px; }
.referral-rule-rewards b { margin-top: 4px; color: var(--purple-dark); font-size: 17px; }
.referral-rule-definition { margin-top: 9px; padding: 10px 12px; border-radius: 13px; background: var(--orange-pale); }
.referral-rule-definition small, .referral-rule-definition span { display: block; }
.referral-rule-definition small { color: var(--orange-dark); font-size: 8px; font-weight: 800; }
.referral-rule-definition span { margin-top: 4px; color: #705b4e; font-size: 9px; line-height: 1.55; }
.referral-ledger-note { margin: 0 20px 10px; padding: 13px 15px; display: grid; gap: 4px; color: #574b63; background: #faf8ff; box-shadow: var(--soft-shadow); }
.referral-ledger-note b { color: var(--purple-dark); font-size: 11px; }
.referral-ledger-note span { color: var(--muted); font-size: 8px; line-height: 1.5; }
.referral-create-card { margin: 0 20px; padding: 17px; box-shadow: var(--soft-shadow); }
.referral-create-card h2 { margin: 4px 0 13px; font-size: 19px; }
.referral-create-card > label { display: block; }
.referral-form-grid { margin: 10px 0 12px; display: grid; grid-template-columns: .85fr 1.35fr; gap: 8px; }
.referral-code-list { padding: 0 20px; display: grid; gap: 10px; }
.referral-code-card { padding: 16px; box-shadow: var(--soft-shadow); }
.referral-code-card.inactive { opacity: .63; }
.referral-code-head { display: flex; align-items: center; justify-content: space-between; }
.referral-code-head > span:last-child { color: var(--green); font-size: 9px; }
.referral-code-card.inactive .referral-code-head > span:last-child { color: var(--muted); }
.referral-platform { padding: 5px 8px; color: var(--purple); border-radius: 9px; background: var(--purple-pale); font-size: 9px; font-weight: 750; }
.referral-code-card h3 { margin: 10px 0 4px; font-size: 17px; }
.referral-code-card > p { margin: 0; color: var(--muted); font-size: 9px; }
.referral-code-value { margin-top: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px dashed rgba(108,76,241,.24); border-radius: 13px; background: #faf8ff; }
.referral-code-value small { color: var(--muted); font-size: 8px; }
.referral-code-value strong { color: var(--purple); letter-spacing: 2px; }
.referral-code-metrics { margin: 13px 0; display: grid; grid-template-columns: repeat(5,1fr); }
.referral-code-metrics > div { text-align: center; border-left: 1px solid var(--line); }
.referral-code-metrics > div:first-child { border-left: 0; }
.referral-code-metrics b, .referral-code-metrics small { display: block; }
.referral-code-metrics b { font-size: 13px; }
.referral-code-metrics small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.referral-code-actions { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 7px; }
.referral-code-actions .primary-button { min-height: 42px; }
.referral-code-actions .text-button { min-height: 42px; }
.referral-qr { width: 210px; height: 210px; margin: 17px auto 12px; padding: 10px; border-radius: 20px; background: white; box-shadow: inset 0 0 0 1px var(--line), 0 9px 24px rgba(52,37,80,.1); }
.referral-qr img { width: 100%; height: 100%; display: block; }
.referral-dialog .invite-code-box { margin-top: 10px; }

.membership-setting-row span:first-child { color: var(--purple-dark); font-weight: 750; }
.membership-setting-row span:first-child::before { content: "✦"; margin-right: 7px; color: var(--orange); }
.membership-hero {
  margin: 5px 20px 14px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  color: white;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.2), transparent 35%),
    radial-gradient(circle at 0 100%, rgba(255,138,52,.32), transparent 40%),
    linear-gradient(135deg, #5635db, #7952f0 65%, #9a65f6);
  box-shadow: 0 16px 32px rgba(90,58,215,.25);
}
.membership-hero-head { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 750; }
.membership-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; color: var(--purple-dark); background: white; }
.membership-hero h1 { margin: 17px 0 7px; font-size: 25px; letter-spacing: -.8px; }
.membership-hero > p { margin: 0; max-width: 340px; opacity: .82; font-size: 10px; line-height: 1.6; }
.membership-price { margin-top: 20px; padding-top: 17px; display: flex; align-items: end; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.2); }
.membership-price > div { display: flex; align-items: baseline; gap: 4px; }
.membership-price small { margin-right: 5px; opacity: .68; font-size: 8px; }
.membership-price strong { font-size: 34px; line-height: 1; }
.membership-price strong i { margin-right: 2px; font-size: 16px; font-style: normal; }
.membership-price span { opacity: .78; font-size: 10px; }
.membership-price em { padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 8px; font-style: normal; }
.membership-plan-picker { margin: 0 20px 12px; padding: 17px; box-shadow: var(--soft-shadow); }
.membership-plan-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.membership-plan-head b { color: var(--ink); font-size: 13px; }
.membership-plan-head span { color: var(--muted); font-size: 9px; }
.membership-plan-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.membership-plan-option { min-width: 0; min-height: 101px; padding: 16px 7px 10px; position: relative; display: grid; align-content: center; justify-items: center; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fffdfb; }
.membership-plan-option.active { border-color: var(--purple); background: linear-gradient(180deg, #f5f1ff, #fff); box-shadow: 0 8px 18px rgba(108,76,241,.13); }
.membership-plan-option i { position: absolute; top: -1px; right: -1px; padding: 4px 7px; border-radius: 0 16px 0 10px; color: #8f837d; background: #f1ece8; font-size: 7px; font-style: normal; }
.membership-plan-option.active i { color: #fff; background: var(--purple); }
.membership-plan-option > span { font-size: 11px; font-weight: 750; }
.membership-plan-option strong { margin-top: 5px; font-size: 19px; line-height: 1; }
.membership-plan-option strong small { margin-right: 1px; font-size: 10px; }
.membership-plan-option em { margin-top: 7px; max-width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.membership-beta-banner, .membership-quota-card, .membership-feature-card, .membership-status-card { margin: 0 20px 12px; padding: 18px; box-shadow: var(--soft-shadow); }
.membership-beta-banner { display: grid; gap: 5px; color: #287354; border: 1px solid #cde9dc; background: #f2fff8; }
.membership-beta-banner b { font-size: 12px; }
.membership-beta-banner span { color: #65917d; font-size: 9px; line-height: 1.55; }
.membership-quota-card { border: 1px solid #e3d9ff; background: linear-gradient(145deg, #fff, #f7f3ff); }
.membership-quota-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.membership-quota-head h2 { margin: 5px 0 0; color: var(--ink); font-size: 22px; }
.membership-quota-head b { flex: none; padding: 5px 8px; border-radius: 999px; color: var(--purple-dark); background: #eee8ff; font-size: 8px; }
.membership-quota-card p, .membership-quota-card small { display: block; margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.membership-quota-card small { margin-top: 4px; color: #9a8eb0; }
.membership-credit-pack-button { margin-top: 14px; }
.membership-feature-card.premium { border: 1px solid rgba(108,76,241,.11); }
.membership-feature-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.membership-feature-head h2 { margin: 5px 0 10px; font-size: 18px; letter-spacing: -.4px; }
.membership-free-badge { padding: 5px 8px; color: #258662; border-radius: 999px; background: #eaf9f1; font-size: 8px; white-space: nowrap; }
.membership-feature-list { display: grid; }
.membership-feature-list > div { padding: 11px 0; display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 9px; border-bottom: 1px solid var(--line); }
.membership-feature-list > div:last-child { padding-bottom: 2px; border-bottom: 0; }
.membership-feature-list i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--purple); border-radius: 12px; background: var(--purple-pale); font-style: normal; font-weight: 800; }
.membership-feature-list i.free { color: #26966a; background: #eaf9f1; }
.membership-feature-list span, .membership-feature-list b, .membership-feature-list small { display: block; }
.membership-feature-list b { font-size: 11px; }
.membership-feature-list small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.membership-benefits h2 { margin: 5px 0 15px; font-size: 19px; letter-spacing: -.4px; }
.membership-benefit-list { display: grid; gap: 11px; }
.membership-benefit-list > div { display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 9px; }
.membership-benefit-list i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--purple); border-radius: 12px; background: var(--purple-pale); font-style: normal; font-weight: 800; }
.membership-benefit-list span { font-size: 11px; }
.membership-benefit-list b { color: var(--green); font-size: 11px; }
.membership-status-head { display: flex; align-items: center; gap: 9px; }
.membership-status-head > span { padding: 5px 8px; border-radius: 9px; font-size: 8px; font-weight: 800; }
.membership-status-head > span.beta { color: var(--orange-dark); background: var(--orange-pale); }
.membership-status-head > span.paid { color: #238c50; background: #e7f7ec; }
.membership-status-head b { font-size: 14px; }
.membership-status-card > p { margin: 12px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.membership-pay-button[disabled] { color: #8b8390; background: #e9e5ea; box-shadow: none; cursor: not-allowed; }
.membership-admin-note { padding: 12px; color: var(--purple-dark); border-radius: 13px; background: var(--purple-pale); font-size: 10px; line-height: 1.55; }
.membership-security-note { display: block; margin-top: 11px; color: var(--muted); text-align: center; font-size: 8px; line-height: 1.5; }
.membership-order-list { margin: 0 20px; overflow: hidden; box-shadow: var(--soft-shadow); }
.membership-order-list > div { padding: 13px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.membership-order-list > div:last-child { border-bottom: 0; }
.membership-order-list span:last-child { text-align: right; }
.membership-order-list b, .membership-order-list small { display: block; }
.membership-order-list b { font-size: 11px; }
.membership-order-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.membership-order-actions { min-width: 66px; }
.membership-order-actions button { min-height: 34px; padding: 0 10px; border: 1px solid #dfd2f0; border-radius: 11px; color: var(--purple-dark); background: var(--purple-pale); font-size: 9px; font-weight: 800; }
.membership-order-actions .refund-status { margin: 0; padding: 5px 7px; border-radius: 8px; color: #856f55; background: #f7f0e4; white-space: nowrap; }
.membership-order-actions .refund-status-refunded { color: #277a50; background: #eaf8ef; }
.membership-order-actions .refund-status-rejected { color: #a34e4e; background: #fff0ef; }
.membership-support-card { margin: 14px 20px 0; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; box-shadow: var(--soft-shadow); }
.membership-support-card h2 { margin: 5px 0 5px; font-size: 16px; }
.membership-support-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.membership-support-card > button { min-height: 42px; padding: 0 14px; border: 0; border-radius: 13px; color: #fff; background: var(--purple); font-size: 10px; font-weight: 800; }

/* Approved membership V6: one-row plan carousel and one complete benefit card. */
.membership-page { padding-bottom: 154px; background: radial-gradient(circle at 100% 0, rgba(255,122,42,.11), transparent 18%), var(--cream); }
.membership-page .membership-hero {
  margin: 5px 16px 0;
  padding: 21px 20px 19px;
  border-radius: 25px;
  background: linear-gradient(140deg, #3f2589 0%, #6e4bed 72%, #805ef4 100%);
  box-shadow: 0 16px 34px rgba(77,49,169,.21);
}
.membership-page .membership-hero::after { content: ""; position: absolute; right: -52px; top: -50px; width: 160px; height: 160px; border: 28px solid rgba(255,255,255,.06); border-radius: 50%; }
.membership-page .membership-hero > small { position: relative; z-index: 1; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 750; }
.membership-page .membership-hero h1 { position: relative; z-index: 1; margin: 9px 0 0; font-size: 26px; line-height: 1.26; letter-spacing: -.6px; }
.membership-page .membership-hero > p { position: relative; z-index: 1; margin: 9px 0 0; max-width: none; color: rgba(255,255,255,.79); font-size: 13px; line-height: 1.5; opacity: 1; }
.membership-page .membership-plan-picker { margin: 18px 0 0; padding: 0 0 0 16px; box-shadow: none; }
.membership-page .membership-plan-head { margin: 0 19px 10px 3px; align-items: end; }
.membership-page .membership-plan-head b { font-size: 19px; }
.membership-page .membership-plan-head span { font-size: 10px; }
.membership-page .membership-plan-options { padding: 2px 46px 12px 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.membership-page .membership-plan-options::-webkit-scrollbar { display: none; }
.membership-page .membership-plan-option { flex: 0 0 250px; min-height: 129px; padding: 15px 14px; display: block; scroll-snap-align: start; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 9px 23px rgba(61,43,75,.06); }
.membership-page .membership-plan-option.active { border: 2px solid var(--purple); background: linear-gradient(158deg,#f2edff,#fff 68%); box-shadow: 0 12px 28px rgba(104,72,238,.15); }
.membership-page .membership-plan-option > i { top: -1px; right: -1px; padding: 5px 9px; border-radius: 0 17px 0 11px; color: #fff; background: var(--purple); font-size: 9px; font-weight: 800; }
.membership-page .membership-plan-option > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.membership-page .membership-plan-option > span b { font-size: 15px; }
.membership-page .membership-plan-option > span em { margin: 0; color: var(--muted); font-size: 9px; font-weight: 500; }
.membership-page .membership-plan-option > strong { margin-top: 10px; display: flex; align-items: end; gap: 2px; font-size: 28px; line-height: 1; }
.membership-page .membership-plan-option > strong small { margin: 0 0 3px; font-size: 12px; }
.membership-page .membership-plan-option > strong em { margin: 0 0 2px 4px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 500; }
.membership-page .membership-plan-option > small { margin-top: 12px; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.membership-page .membership-plan-option > small b { color: var(--purple-dark); font-size: 12px; }
.membership-benefit-title { margin: 9px 19px 11px; display: flex; align-items: center; gap: 12px; color: var(--purple-dark); }
.membership-benefit-title::before, .membership-benefit-title::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #b9a8f5); }
.membership-benefit-title::after { background: linear-gradient(90deg, #b9a8f5, transparent); }
.membership-benefit-title b { white-space: nowrap; font-size: 18px; }
.membership-benefits-card { margin: 0 16px; padding: 18px 17px 17px; border: 1px solid rgba(83,61,96,.08); border-radius: 24px; box-shadow: 0 12px 30px rgba(61,43,75,.08); }
.membership-benefits-head { padding-bottom: 15px; display: flex; align-items: start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.membership-benefits-head small { display: block; color: var(--purple); font-size: 10px; font-weight: 800; }
.membership-benefits-head h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.28; }
.membership-benefits-head > span { flex: none; padding: 6px 8px; color: var(--purple-dark); border-radius: 999px; background: var(--purple-pale); font-size: 9px; font-weight: 750; }
.membership-benefits-quota { margin: 14px 0 4px; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 17px; background: linear-gradient(135deg,#f3efff,#fbf9ff); }
.membership-benefits-quota div small { display: block; color: var(--muted); font-size: 9px; }
.membership-benefits-quota div b { display: block; margin-top: 3px; font-size: 15px; }
.membership-benefits-quota > strong { color: var(--purple); font-size: 28px; }
.membership-benefits-quota > strong small { margin-left: 2px; font-size: 11px; }
.membership-benefit-list { margin-top: 5px; }
.membership-benefit-row { padding: 13px 1px; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; border-bottom: 1px solid var(--line); }
.membership-benefit-row:last-child { border-bottom: 0; }
.membership-benefit-row > i { width: 38px; height: 38px; display: grid; place-items: center; color: var(--purple); border-radius: 13px; background: var(--purple-pale); }
.membership-benefit-row > i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.membership-benefit-row > div { min-width: 0; }
.membership-benefit-row > div > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.membership-benefit-row > div > span b { color: var(--ink); font-size: 15px; }
.membership-benefit-row > div > span em { flex: none; color: var(--purple); font-size: 10px; font-style: normal; font-weight: 750; }
.membership-benefit-row p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.membership-free-strip { margin: 12px 16px 0; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #cce8da; border-radius: 17px; background: #eef8f2; }
.membership-free-strip b, .membership-free-strip span { display: block; }
.membership-free-strip b { color: #315b49; font-size: 12px; }
.membership-free-strip span { margin-top: 3px; color: #638071; font-size: 9px; }
.membership-free-strip em { flex: none; padding: 5px 7px; color: #277353; border-radius: 999px; background: #fff; font-size: 9px; font-style: normal; font-weight: 750; }
.membership-terms { margin: 11px 22px 14px; color: var(--muted); text-align: center; font-size: 9px; line-height: 1.45; }
.membership-page .membership-status-card { margin-top: 0; }
.membership-checkout-bar { position: fixed; left: 50%; bottom: 67px; z-index: 82; width: min(calc(100% - 24px), 406px); padding: 10px 11px; display: grid; grid-template-columns: 108px 1fr; align-items: center; gap: 10px; transform: translateX(-50%); border: 1px solid rgba(83,63,96,.08); border-radius: 21px; background: #fffdfa; box-shadow: 0 13px 34px rgba(47,30,69,.18); }
.membership-checkout-bar div small, .membership-checkout-bar div strong, .membership-checkout-bar div span, .membership-checkout-bar button small { display: block; }
.membership-checkout-bar div small { color: var(--muted); font-size: 9px; }
.membership-checkout-bar div strong { margin-top: 2px; font-size: 22px; }
.membership-checkout-bar div span { margin-top: 2px; color: var(--purple-dark); font-size: 9px; }
.membership-checkout-bar button { min-height: 55px; border: 0; border-radius: 16px; color: #fff; background: linear-gradient(135deg,var(--orange),#ff6719); box-shadow: 0 9px 19px rgba(238,105,20,.25); font-size: 13px; font-weight: 800; opacity: 1; }
.membership-checkout-bar button small { margin-top: 2px; color: rgba(255,255,255,.82); font-size: 9px; font-weight: 600; }

/* Approved membership V10: compact plan carousel and explicit member/free rules. */
.membership-page {
  padding-bottom: 154px;
  background: linear-gradient(180deg, #6848e6 0, #7958ee 458px, #fff7ef 458px, #fffaf6 100%);
}
.membership-page > .topbar { color: #fff; }
.membership-page > .topbar .topbar-title { color: #fff; }
.membership-page > .topbar .icon-button { color: #322d3a; background: rgba(255,255,255,.95); box-shadow: none; }
.membership-page .membership-hero {
  height: 166px;
  margin: 0 18px;
  padding: 25px 4px 12px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.membership-page .membership-hero::after { display: none; }
.membership-page .membership-hero > small { font-size: 13px; opacity: .84; }
.membership-page .membership-hero h1 { margin-top: 5px; font-size: 38px; line-height: 1.12; letter-spacing: -1px; }
.membership-page .membership-hero > p { margin-top: 12px; color: rgba(255,255,255,.78); font-size: 12px; }
.membership-hero-ring { position: absolute; right: -24px; top: 3px; width: 168px; height: 168px; border: 27px solid rgba(255,255,255,.07); border-radius: 50%; }
.membership-hero-home { position: absolute; right: 25px; bottom: 19px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 20px; background: rgba(255,255,255,.13); }
.membership-hero-home svg { width: 31px; height: 31px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.membership-page .membership-plan-picker { margin: 0; padding: 0; }
.membership-page .membership-plan-options { padding: 2px 18px 7px; gap: 12px; }
.membership-page .membership-plan-option {
  flex: 0 0 207px;
  min-height: 135px;
  padding: 16px;
  color: rgba(255,255,255,.56);
  border: 0;
  border-radius: 22px;
  background: rgba(59,52,82,.72);
  box-shadow: none;
}
.membership-page .membership-plan-option.active { color: var(--ink); border: 0; background: #fffaf2; box-shadow: 0 14px 26px rgba(49,29,103,.2); }
.membership-page .membership-plan-option > i,
.membership-page .membership-plan-option.active > i { padding: 6px 11px; border-radius: 0 21px 0 13px; background: linear-gradient(135deg,#55b8ff,#1676dc); font-size: 10px; }
.membership-page .membership-plan-option > span { display: block; }
.membership-page .membership-plan-option > span b { color: inherit; font-size: 17px; }
.membership-page .membership-plan-option > em { display: block; margin-top: 5px; overflow: visible; color: inherit; font-size: 11px; white-space: normal; }
.membership-page .membership-plan-option > strong { margin-top: 15px; display: block; color: inherit; font-size: 30px; }
.membership-page .membership-plan-option.active > strong { color: #e59622; }
.membership-page .membership-plan-option > strong small { margin-right: 2px; font-size: 13px; }
.membership-page .membership-plan-option > small { margin-top: 13px; padding: 0; color: inherit; border: 0; font-size: 10px; }
.membership-page .membership-plan-option > small b { color: #fff; font-size: 10px; }
.membership-page .membership-plan-option.active > small b { color: #e59622; }
.membership-page .membership-plan-picker > p { margin: 2px 18px 16px; color: rgba(255,255,255,.72); text-align: center; font-size: 10px; }
.membership-page .membership-benefit-title { margin: 0 20px 14px; color: #fff; }
.membership-page .membership-benefit-title::before,
.membership-page .membership-benefit-title::after { background: rgba(255,255,255,.6); }
.membership-page .membership-benefit-title b { font-size: 18px; }
.membership-page .membership-benefits-card { margin: 0 18px; padding: 20px 18px 18px; border: 0; border-radius: 28px; background: #fffaf1; box-shadow: 0 15px 35px rgba(60,43,90,.10); }
.membership-page .membership-benefits-head { padding-bottom: 13px; align-items: center; justify-content: start; gap: 10px; border-color: #e9e1da; }
.membership-page .membership-benefits-head > span { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; color: #249260; border-radius: 10px; background: #effaf3; }
.membership-page .membership-benefits-head > span svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.membership-page .membership-benefits-head h2 { margin: 0; font-size: 20px; }
.membership-page .membership-benefits-head p { margin: 7px 0 0; color: #7f777f; font-size: 11px; line-height: 1.5; }
.membership-page .membership-benefits-quota { margin: 0; padding: 16px 0 14px; display: block; border-bottom: 1px solid #e9e1da; border-radius: 0; background: transparent; }
.membership-page .membership-benefits-quota > strong { display: block; color: #5a95e9; font-size: 29px; line-height: 1; }
.membership-page .membership-benefits-quota > small { display: block; margin-top: 7px; color: #7f777f; font-size: 10px; }
.membership-page .membership-benefit-list { margin: 0; }
.membership-page .membership-benefit-row { padding: 14px 0 13px; grid-template-columns: 37px 1fr; gap: 11px; border-color: #ece5df; }
.membership-page .membership-benefit-row > i { width: 35px; height: 35px; margin-top: 1px; border-radius: 12px; }
.membership-page .membership-benefit-row > i svg { width: 19px; height: 19px; }
.membership-page .membership-benefit-row > div > b { color: var(--ink); font-size: 17px; line-height: 1.25; }
.membership-page .membership-benefit-row p { margin-top: 6px; color: #8c858c; font-size: 11px; }
.membership-page .membership-benefit-row p::before { content: "*"; margin-right: 2px; }
.membership-page .membership-free-strip { margin: 13px 0 0; padding: 13px 14px; border-radius: 17px; }
.membership-page .membership-free-strip b { font-size: 14px; }
.membership-page .membership-free-strip span { margin-top: 5px; font-size: 10px; line-height: 1.45; }
.membership-page .membership-terms { margin: 12px 0 0; font-size: 10px; }
.membership-page .membership-status-card { margin: 14px 18px 12px; }
.membership-page .membership-order-list { margin: 0 18px; }
.membership-page .membership-support-card { margin-right: 18px; margin-left: 18px; }
.membership-page .membership-checkout-bar { width: min(calc(100% - 24px), 406px); }
.membership-page .membership-checkout-bar button { color: #e6941d; border: 2px solid #f4a52d; background: #fffaf1; box-shadow: none; }
.membership-page .membership-checkout-bar button small { color: inherit; opacity: .82; }
.membership-page .membership-checkout-bar button[disabled] { opacity: 1; }

.legal-dialog-backdrop { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 18px; background: rgba(31,22,30,.58); backdrop-filter: blur(8px); }
.legal-dialog-backdrop.consent-required { z-index: 170; }
.legal-dialog { width: min(100%, 430px); max-height: min(88vh, 780px); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 26px; background: var(--cream); box-shadow: 0 24px 60px rgba(24,16,28,.28); }
.legal-dialog > header { padding: 20px 20px 14px; display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); background: white; }
.legal-dialog > header h1 { margin: 4px 0 0; font-size: 24px; }
.legal-dialog > header button { width: 34px; height: 34px; border: 0; border-radius: 12px; color: var(--muted); background: var(--cream); font-size: 20px; }
.legal-dialog > .legal-copy { padding: 3px 20px 20px; overflow-y: auto; }
.legal-dialog > footer { padding: 12px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.legal-copy section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.legal-copy section:last-child { border-bottom: 0; }
.legal-copy h2 { margin: 0 0 7px; font-size: 15px; }
.legal-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.legal-consent-dialog { width: min(100%, 390px); padding: 25px 21px 18px; text-align: center; }
.legal-consent-icon { width: 58px; height: 58px; margin: 0 auto 13px; display: grid; place-items: center; color: white; border-radius: 20px; background: linear-gradient(145deg, var(--purple), #8b62f7); font-size: 27px; box-shadow: 0 12px 26px rgba(108,76,241,.24); }
.legal-consent-icon.photo { color: var(--purple); background: var(--purple-pale); box-shadow: none; }
.legal-consent-icon.danger { color: #c84848; background: #ffeded; box-shadow: none; }
.legal-consent-dialog h2 { margin: 7px 0 9px; font-size: 21px; letter-spacing: -.5px; }
.legal-consent-dialog > p { margin: 0 auto 15px; max-width: 330px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.legal-consent-links { margin: 13px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.legal-consent-links button { min-height: 40px; color: var(--purple); border: 1px solid #ddd3ff; border-radius: 13px; background: var(--purple-pale); font-size: 10px; font-weight: 750; }
.legal-consent-dialog > .text-button { margin-top: 7px; }
.deletion-dialog { text-align: left; }
.deletion-dialog .legal-consent-icon, .deletion-dialog > .eyebrow, .deletion-dialog > h2, .deletion-dialog > p { text-align: center; }
.deletion-dialog label { display: block; margin-top: 10px; }
.deletion-dialog textarea, .content-report-form textarea { width: 100%; min-height: 82px; padding: 12px; resize: vertical; color: var(--ink); border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #fffdfb; font-size: 11px; }

.chef-status-card {
  margin-top: 14px;
  overflow: hidden;
  border-color: rgba(108, 76, 241, .12);
}
.chef-status-card--notice {
  border-color: rgba(238, 105, 20, .16);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 138, 52, .12), transparent 38%),
    rgba(255, 255, 255, .97);
}
.chef-status-main {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.chef-status-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--purple-pale), var(--orange-pale));
  font-size: 25px;
}
.chef-status-copy {
  min-width: 0;
  flex: 1;
  display: block;
  margin-left: 13px;
}
.chef-status-copy small,
.chef-status-copy b,
.chef-status-copy i {
  display: block;
}
.chef-status-copy small {
  color: var(--purple);
  font-size: 9px;
  font-weight: 800;
}
.chef-status-copy b {
  margin-top: 2px;
  font-size: 15px;
}
.chef-status-copy i {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}
.chef-status-main em {
  margin-left: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.chef-status-tomorrow {
  width: calc(100% - 32px);
  min-height: 44px;
  margin: 0 16px;
  display: flex;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.chef-status-tomorrow strong {
  flex: none;
  padding: 4px 7px;
  border-radius: 8px;
  color: #d96a15;
  background: var(--orange-pale);
  font-size: 9px;
}
.chef-status-tomorrow span {
  min-width: 0;
  flex: 1;
  margin-left: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chef-status-tomorrow i {
  margin-left: 8px;
  color: var(--purple);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.chef-status-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(31, 22, 30, .5);
  backdrop-filter: blur(6px);
}
.chef-status-dialog {
  width: min(100%, 480px);
  padding: 20px 18px max(20px, env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--cream);
  box-shadow: 0 -20px 60px rgba(24, 16, 28, .2);
}
.chef-status-dialog > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
}
.chef-status-dialog > header small {
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
}
.chef-status-dialog > header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.chef-status-dialog > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: #eee8e3;
  font-size: 21px;
}
.chef-status-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 15px;
  padding: 4px;
  border-radius: 14px;
  background: #eee8e3;
}
.chef-status-targets button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}
.chef-status-targets button.active {
  color: var(--purple);
  background: white;
  box-shadow: 0 5px 14px rgba(55, 37, 70, .08);
}
.chef-status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}
.chef-status-options button {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink);
  background: white;
  text-align: left;
}
.chef-status-options button.active {
  border-color: rgba(108, 76, 241, .4);
  color: var(--purple);
  background: var(--purple-pale);
}
.chef-status-options button span {
  font-size: 20px;
}
.chef-status-options button b {
  flex: 1;
  margin-left: 7px;
  font-size: 11px;
}
.chef-status-options button i {
  width: 17px;
  color: var(--purple);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
#chef-status-form > label {
  display: block;
  margin-top: 13px;
  padding: 12px;
  border-radius: 14px;
  background: white;
}
#chef-status-form > label > span {
  display: block;
  font-size: 10px;
  font-weight: 800;
}
#chef-status-note {
  width: 100%;
  min-height: 52px;
  margin-top: 7px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
}
#chef-status-form footer {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
#chef-status-form footer button {
  min-height: 46px;
  flex: 1;
}

.web-identity-notice {
  display: flex;
  align-items: center;
  margin: 8px 0 12px;
  padding: 12px 13px;
  border-color: rgba(255, 138, 52, .18);
  background: linear-gradient(135deg, #fff2e5, #faf6ff);
}
.web-identity-notice > span {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(145deg, var(--orange), var(--purple));
  font-size: 20px;
  font-weight: 900;
}
.web-identity-notice > div {
  min-width: 0;
  flex: 1;
  margin-left: 10px;
}
.web-identity-notice b,
.web-identity-notice small {
  display: block;
}
.web-identity-notice b {
  font-size: 11px;
}
.web-identity-notice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.web-identity-notice button {
  flex: none;
  margin-left: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--purple);
  font-size: 9px;
  font-weight: 800;
}
.web-link-login-card {
  margin-top: 18px;
  padding: 18px;
  border-color: rgba(108, 76, 241, .15);
  background: linear-gradient(145deg, white, #faf7ff);
}
.web-link-login-card h2 {
  margin: 5px 0 6px;
  font-size: 18px;
}
.web-link-login-card > p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.web-link-login-card label,
.web-link-dialog-form label {
  display: block;
}
.web-link-login-card .primary-button,
.web-link-dialog-form .primary-button {
  margin-top: 10px;
}
.web-link-login-card > small,
.web-link-dialog-form > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}
.web-link-code-input {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 850;
}
.web-scan-login-card {
  margin-top: 18px;
  padding: 18px;
  border-color: rgba(108, 76, 241, .15);
  background: linear-gradient(145deg, #fff, #faf7ff);
}
.web-scan-login-card h2 {
  margin: 5px 0 6px;
  font-size: 18px;
}
.web-scan-login-card > p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.web-scan-dialog-content {
  padding: 4px 0 0;
}
.web-scan-qr-shell {
  display: grid;
  width: 188px;
  height: 188px;
  place-items: center;
  margin: 14px auto 10px;
  padding: 9px;
  border: 1px solid rgba(108, 76, 241, .13);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(55, 38, 69, .09);
}
.web-scan-qr {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: contain;
}
.web-scan-loading,
.web-scan-error {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 11px;
  padding: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.web-scan-loading i {
  width: 30px;
  height: 30px;
  border: 4px solid #eee8ff;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: web-scan-spin .8s linear infinite;
}
.web-scan-error b,
.web-scan-error span {
  display: block;
}
.web-scan-error b {
  color: var(--ink);
  font-size: 12px;
}
.web-scan-instruction {
  text-align: center;
}
.web-scan-instruction b,
.web-scan-instruction small {
  display: block;
}
.web-scan-instruction b {
  font-size: 11px;
}
.web-scan-instruction small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.web-scan-refresh {
  min-height: 40px;
  margin-top: 10px;
}
.web-scan-open-wechat {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 13px;
  text-decoration: none;
}
.web-scan-fallback-toggle,
.independent-login-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 6px 9px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
}
.web-scan-dialog-content .web-link-dialog-form {
  margin-top: 8px;
  border: 1px solid rgba(108, 76, 241, .10);
}
.independent-login-toggle {
  margin-top: 15px;
}
.independent-login-card {
  margin-top: 7px;
}
@keyframes web-scan-spin {
  to { transform: rotate(360deg); }
}

.phone-login-screen {
  min-height: 100vh;
  padding: 22px 16px 28px;
  background:
    radial-gradient(circle at 103% 0%, rgba(108, 76, 241, .14), transparent 24%),
    radial-gradient(circle at -8% 45%, rgba(255, 138, 52, .12), transparent 27%),
    #faf8f5;
}
.phone-login-brand-lockup {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-login-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 8px 13px rgba(108, 76, 241, .18));
}
.phone-login-wordmark {
  width: 102px;
  height: 51px;
  object-fit: contain;
}
.phone-login-brand-lockup > span {
  width: 94px;
  color: #514b5e;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
}
.phone-login-intro { margin-top: 42px; }
.phone-login-intro h1 {
  margin: 0;
  color: #28252d;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.8px;
}
.phone-login-intro p {
  margin: 10px 0 0;
  color: #655e6c;
  font-size: 15px;
  line-height: 1.6;
}
.phone-login-screen .invite-login-card { margin-top: 20px; margin-bottom: -10px; }
.phone-login-card {
  margin-top: 26px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(108, 76, 241, .09);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(55, 39, 47, .08);
}
.phone-login-tabs {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: #f3eff1;
}
.phone-login-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  color: #716a76;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
}
.phone-login-tabs button.is-active {
  color: var(--purple-dark);
  background: #fff;
  box-shadow: 0 5px 13px rgba(71, 48, 93, .09);
}
.phone-login-form { margin-top: 24px; }
.phone-login-field { display: block; }
.phone-login-field + .phone-login-field { margin-top: 18px; }
.phone-login-field > span:first-child {
  display: block;
  margin: 0 0 8px 2px;
  color: #28252d;
  font-size: 14px;
  font-weight: 650;
}
.phone-login-input {
  min-height: 52px;
  display: flex !important;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dcd4df;
  border-radius: 13px;
  background: #fff;
}
.phone-login-input:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(108, 76, 241, .10);
}
.phone-login-input > i {
  height: 24px;
  padding: 0 13px 0 15px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: #4d4852;
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
}
.phone-login-input input {
  min-width: 0;
  height: 50px;
  flex: 1;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: #28252d;
  background: transparent;
  font-size: 16px;
}
.phone-login-input input::placeholder { color: #aaa3ad; }
.phone-login-input > button {
  min-width: 106px;
  min-height: 40px;
  margin-right: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: var(--purple-dark);
  background: var(--purple-pale);
  font-size: 14px;
  font-weight: 650;
}
.phone-login-input > button.phone-password-visible {
  min-width: 56px;
  color: #6c6570;
  background: transparent;
  font-weight: 500;
}
.phone-password-forgot {
  min-height: 40px;
  margin-left: auto;
  padding: 8px 2px 2px 12px;
  display: block;
  border: 0;
  color: var(--purple-dark);
  background: transparent;
  font-size: 13px;
}
.phone-login-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #7558f4, #5f40e8);
  box-shadow: 0 11px 22px rgba(108, 76, 241, .22);
  font-size: 16px;
  font-weight: 700;
}
.phone-login-primary:disabled { opacity: .66; box-shadow: none; }
.phone-login-register-note,
.phone-login-code-sent {
  margin: 13px 0 0;
  color: #5f5864;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}
.phone-login-register-note strong { color: var(--purple-dark); font-weight: 650; }
.phone-login-code-sent {
  margin-top: 9px;
  color: #655e6c;
  font-size: 12px;
  text-align: left;
}
.phone-login-consent {
  margin-top: 20px;
  display: grid !important;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: #77707b;
  font-size: 12px;
  line-height: 1.65;
}
.phone-login-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  appearance: none;
  display: grid;
  place-content: center;
  border: 1.5px solid #bcb2c4;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.phone-login-consent input:checked {
  border-color: var(--purple);
  background: var(--purple);
}
.phone-login-consent input:checked::after {
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: translateY(-1px) rotate(45deg);
}
.phone-login-consent button {
  padding: 0;
  border: 0;
  color: var(--purple-dark);
  background: transparent;
  font-size: inherit;
}
.phone-login-security-note {
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #827a85;
  font-size: 12px;
}
.phone-login-security-note > span {
  width: 15px;
  height: 17px;
  border: 1.5px solid #8a8190;
  border-radius: 8px 8px 10px 10px;
  transform: scale(.88);
}
.phone-password-reset-heading {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
}
.phone-password-reset-heading > button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--purple-dark);
  background: var(--purple-pale);
  font-size: 28px;
}
.phone-password-reset-heading h2 { margin: 0; font-size: 20px; }
.phone-password-reset-heading p {
  margin: 4px 0 0;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.5;
}
.login-method-divider {
  position: relative;
  margin: 18px 0 3px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}
.login-method-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}
.login-method-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--cream);
}
.web-link-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 22, 30, .54);
  backdrop-filter: blur(7px);
}
.web-link-dialog {
  width: min(100%, 410px);
  padding: 22px 19px 18px;
  border-radius: 23px;
  background: var(--cream);
  box-shadow: 0 24px 60px rgba(24, 16, 28, .26);
}
.web-link-dialog > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
}
.web-link-dialog > header h2 {
  margin: 5px 0 0;
  font-size: 21px;
}
.web-link-dialog > header > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: #eee8e3;
  font-size: 20px;
}
.web-link-dialog > p {
  margin: 12px 0 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.web-link-dialog-form {
  padding: 15px;
  border-radius: 16px;
  background: white;
}
.danger-button { margin-top: 12px; background: #c94d4d; box-shadow: 0 9px 18px rgba(201,77,77,.18); }
.legal-readiness { margin: 4px 20px 12px; padding: 11px 13px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: #8a5b16; border: 1px solid #f2d5a5; border-radius: 14px; background: #fff5e5; }
.legal-readiness b { padding: 4px 6px; border-radius: 7px; background: #ffe2b5; font-size: 8px; }
.legal-readiness span { font-size: 9px; line-height: 1.45; }
.legal-tabs { margin: 0 20px 8px; padding: 4px; display: grid; grid-template-columns: repeat(4,1fr); border-radius: 15px; background: #eee9e5; }
.legal-tabs button { min-height: 37px; padding: 0 3px; color: var(--muted); border: 0; border-radius: 12px; background: transparent; font-size: 9px; }
.legal-tabs button.active { color: var(--purple); background: white; box-shadow: var(--soft-shadow); font-weight: 750; }
.legal-page-content { padding: 0 20px 8px; }
.legal-page-content > .legal-copy { padding: 2px 17px 10px; border: 1px solid rgba(108,76,241,.08); border-radius: 21px; background: white; box-shadow: var(--soft-shadow); }
.content-report-form { margin-top: 12px; padding: 18px; box-shadow: var(--soft-shadow); }
.content-report-form h2 { margin: 5px 0 7px; font-size: 18px; }
.content-report-form label { display: block; margin-top: 11px; }
.content-report-form .secondary-button { margin-top: 12px; }
.report-source { margin: 0 0 7px; color: var(--muted); font-size: 9px; }
.account-data-card, .deletion-status-card { padding: 18px; box-shadow: var(--soft-shadow); }
.account-data-card h2, .deletion-status-card h2 { margin: 6px 0 12px; font-size: 20px; }
.account-data-grid { display: grid; grid-template-columns: repeat(3,1fr); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-data-grid > div { text-align: center; border-left: 1px solid var(--line); }
.account-data-grid > div:first-child { border-left: 0; }
.account-data-grid b, .account-data-grid span { display: block; }
.account-data-grid b { font-size: 19px; }
.account-data-grid span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.account-data-card > p, .deletion-status-card > p { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.deletion-status-card { margin-top: 12px; }
.deletion-status-card > button { margin-top: 13px; }
.status-pill { padding: 5px 8px; color: var(--purple); border-radius: 8px; background: var(--purple-pale); font-size: 8px; font-weight: 750; }
.status-pill.pending { color: var(--orange-dark); background: var(--orange-pale); }
.source-rights-note { margin: -3px 0 15px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); border-radius: 13px; background: #f6f2ef; font-size: 11px; line-height: 1.5; }
.source-rights-note button { flex: 0 0 auto; padding: 0; color: var(--purple); border: 0; background: transparent; font-size: 11px; font-weight: 750; }
.photo-privacy-link { grid-column: 1 / -1; justify-self: center; margin-top: 4px; padding: 4px 0; color: var(--purple); border: 0; background: transparent; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

.home-primary-card {
  width: calc(100% - 40px);
  margin-left: 20px;
  margin-right: 20px;
}
.pantry-home-card {
  min-height: 82px;
  margin-top: 13px;
  margin-bottom: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-align: left;
  border: 1px solid #ddd3ff;
  background: linear-gradient(135deg, #f5f1ff, #fff7ef);
  box-shadow: var(--soft-shadow);
}
.pantry-home-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(145deg, var(--purple), #9479ff);
  font-size: 23px;
}
.pantry-home-card b, .pantry-library-entry b { display: block; font-size: 15px; }
.pantry-home-card small, .pantry-library-entry small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.pantry-home-card i, .pantry-library-entry i { color: var(--purple); font-size: 23px; font-style: normal; }
.getting-started {
  margin: 13px 20px 8px;
  padding: 17px;
  overflow: hidden;
  border-color: rgba(108,76,241,.16);
  background:
    radial-gradient(circle at 100% 0, rgba(255,138,52,.13), transparent 34%),
    linear-gradient(145deg, #fff, #faf8ff);
  box-shadow: var(--soft-shadow);
}
.getting-started-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.getting-started-head h2 { margin: 5px 0 4px; font-size: 19px; letter-spacing: -.45px; }
.getting-started-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.getting-started-dismiss {
  flex: 0 0 auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.getting-started-progress {
  height: 6px;
  margin: 13px 0 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #eee9fa;
}
.getting-started-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  transition: width .25s ease;
}
.getting-started-tasks { display: grid; gap: 7px; }
.getting-started-task {
  width: 100%;
  min-height: 52px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(108,76,241,.1);
  border-radius: 15px;
  background: rgba(255,255,255,.88);
}
.getting-started-task > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--purple);
  font-size: 12px;
  font-weight: 800;
}
.getting-started-task b, .getting-started-task small { display: block; }
.getting-started-task b { font-size: 12px; }
.getting-started-task small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.getting-started-task > i {
  color: var(--orange-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}
.getting-started-task.done { opacity: .68; }
.getting-started-task.done > span { background: var(--green); }
.getting-started-task.done > i { color: var(--green); }
.getting-started-task.locked { opacity: .52; background: #f5f2f6; }
.getting-started-task.locked > span { background: #bdb5c4; }
.getting-started-task.locked > i { max-width: 62px; color: var(--muted); text-align: right; }
.pantry-library-entry {
  width: calc(100% - 40px);
  min-height: 64px;
  margin: 13px 20px 2px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: var(--purple-pale);
}
.pantry-library-entry > span { font-size: 20px; }
.original-recipe-entry {
  width: calc(100% - 40px);
  min-height: 64px;
  margin: 9px 20px 2px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  border: 0;
  background: linear-gradient(135deg, #f4efff, #fff);
}
.original-recipe-entry > span { color: var(--purple); font-size: 20px; font-weight: 900; }
.original-recipe-entry b { display: block; font-size: 15px; }
.original-recipe-entry small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.original-recipe-entry i { color: var(--purple); font-size: 23px; font-style: normal; }
.pantry-page { background: linear-gradient(180deg, #f3efff 0, var(--cream) 360px); }
.pantry-hero { padding: 20px; display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 10px; }
.pantry-hero h1 { margin: 6px 0 10px; font-size: 27px; line-height: 1.22; letter-spacing: -.8px; }
.pantry-hero p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pantry-score {
  width: 88px;
  min-height: 112px;
  padding: 15px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 28px;
  color: white;
  background: linear-gradient(150deg, var(--purple), #8e6aff 65%, var(--orange));
  box-shadow: 0 14px 28px rgba(108,76,241,.25);
}
.pantry-score b { font-size: 29px; line-height: 1; }
.pantry-score small { margin: 4px 0 10px; opacity: .75; font-size: 9px; }
.pantry-score strong { padding: 5px 7px; border-radius: 8px; background: rgba(255,255,255,.17); font-size: 9px; }
.pantry-input-card { margin: 0 20px; padding: 15px; box-shadow: var(--soft-shadow); }
.pantry-voice-card { margin:12px 20px 0; padding:16px; box-shadow:var(--soft-shadow); }
.pantry-voice-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pantry-voice-head h2 { margin:4px 0; font-size:16px; }
.pantry-voice-head p { margin:0; color:var(--muted); font-size:11px; }
.pantry-voice-head > button { flex:0 0 auto; min-height:42px; padding:0 13px; border:0; border-radius:13px; background:#f1ecff; color:var(--purple); font-weight:800; }
.pantry-voice-head > button.recording { background:#fff0e7; color:#c85b2d; }
.pantry-voice-example { display:grid; gap:4px; margin-top:12px; padding:11px 12px; border-radius:12px; background:#fff9f3; color:#756c78; font-size:11px; line-height:1.45; }
.pantry-voice-example small { color:var(--muted); }
.pantry-voice-pending { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:8px; align-items:center; margin-top:12px; font-size:11px; }
.pantry-voice-pending audio { width:100%; height:34px; }
.pantry-voice-pending button { min-height:34px; border-radius:10px; }
.pantry-voice-transcript { margin:12px 0; padding:12px; border-radius:13px; background:#f7f3ff; }
.pantry-voice-transcript p { margin:6px 0; color:var(--ink); line-height:1.5; }
.pantry-voice-transcript small { color:var(--muted); }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.pantry-photo-card { margin: 0 20px; padding: 16px; display: grid; grid-template-columns: 46px 1fr; gap: 11px; box-shadow: var(--soft-shadow); }
.pantry-photo-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, var(--purple), #9479ff);
  font-size: 24px;
}
.pantry-photo-copy h2 { margin: 4px 0 5px; font-size: 16px; }
.pantry-photo-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.pantry-photo-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pantry-photo-actions button { min-height: 43px; border-radius: 13px; font-size: 11px; }
.pantry-photo-actions button:disabled { opacity: .55; }
.photo-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: pantry-spin .8s linear infinite;
}
@keyframes pantry-spin { to { transform: rotate(360deg); } }
.pantry-divider { margin: 12px 20px; display: flex; align-items: center; gap: 9px; color: #aaa1aa; font-size: 9px; }
.pantry-divider::before, .pantry-divider::after { content: ""; height: 1px; flex: 1; background: #e8e0e7; }
.pantry-input { width: 100%; min-height: 68px; padding: 10px 11px; resize: vertical; border: 1px solid #e9e1dc; border-radius: 13px; outline: none; font-size: 12px; line-height: 1.6; }
.pantry-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-pale); }
.pantry-input-card .primary-button { width: 100%; margin-top: 9px; }
.quick-add { margin: 13px 20px 0; }
.quick-add > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.quick-pantry-chip { padding: 7px 9px; border: 1px solid #ddd3ff; border-radius: 10px; color: var(--purple); background: white; font-size: 10px; }
.pantry-stock-section { margin-top: 11px; }
.pantry-groups { display: grid; gap: 13px; }
.pantry-group h3 { margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.pantry-items { display: flex; flex-wrap: wrap; gap: 7px; }
.pantry-item {
  min-height: 38px;
  padding: 7px 8px 7px 10px;
  display: inline-grid;
  grid-template-columns: auto auto 20px;
  align-items: center;
  gap: 5px;
  border: 1px solid #e9e1dc;
  border-radius: 12px;
  background: white;
}
.pantry-item b { font-size: 11px; }
.pantry-item small { color: var(--orange-dark); font-size: 9px; }
.pantry-item button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 7px; color: #a49ba5; background: #f4f0f4; }
.empty-pantry { padding: 24px 18px; text-align: center; border: 1px dashed #ddd2e1; box-shadow: none; }
.empty-pantry > span { display: block; margin-bottom: 8px; color: var(--purple); font-size: 26px; }
.empty-pantry b { display: block; font-size: 14px; }
.empty-pantry p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pantry-recommend-section .section-title { align-items: end; }
.pantry-recommend-section .section-title h2 { margin-top: 4px; }
.pantry-filter-chips { padding: 0; margin-bottom: 11px; }
.pantry-recipes, .pantry-ideas { display: grid; gap: 11px; }
.pantry-recipe-card { padding: 10px; display: grid; grid-template-columns: 102px 1fr; gap: 11px; overflow: hidden; box-shadow: var(--soft-shadow); }
.pantry-recipe-photo { height: 145px; overflow: hidden; border-radius: 14px; }
.pantry-recipe-photo .dish-photo { height: 100%; border-radius: 0; }
.pantry-recipe-copy { min-width: 0; }
.pantry-recipe-title { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.pantry-recipe-title h3 { margin: 2px 0 8px; font-size: 16px; }
.match-badge { flex: 0 0 auto; padding: 5px 6px; border-radius: 8px; font-size: 8px; font-weight: 750; }
.match-badge.ready { color: #20864b; background: #e8f8ed; }
.match-badge.almost { color: var(--orange-dark); background: var(--orange-pale); }
.match-badge.later { color: var(--muted); background: #f1edef; }
.match-meter { height: 5px; margin-bottom: 7px; overflow: hidden; border-radius: 5px; background: #eee8ef; }
.match-meter i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--orange)); }
.pantry-recipe-copy p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pantry-recipe-copy p b { color: var(--ink); }
.pantry-recipe-copy .missing-copy { color: #bd6040; }
.pantry-recipe-copy .ready-copy { color: #20864b; }
.pantry-recipe-actions { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pantry-recipe-actions button { min-height: 32px; border-radius: 10px; font-size: 10px; }
.ai-pantry-section { margin-top: 20px; }
.ai-pantry-hero { padding: 17px; display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: 10px; color: white; background: linear-gradient(135deg, #5d3dd6, #7f5def); }
.ai-pantry-hero .eyebrow { color: #ffd5b6; }
.ai-pantry-hero h2 { margin: 5px 0; font-size: 18px; }
.ai-pantry-hero p { margin: 0; opacity: .76; font-size: 10px; line-height: 1.5; }
.ai-pantry-hero .primary-button { min-height: 42px; background: var(--orange); box-shadow: none; font-size: 11px; }
.ai-pantry-hero .primary-button:disabled { opacity: .55; }
.pantry-ideas { margin-top: 11px; }
.pantry-idea-card { padding: 15px; box-shadow: var(--soft-shadow); }
.idea-title { display: flex; align-items: center; gap: 9px; }
.idea-title > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-pale); }
.idea-title h3 { margin: 0 0 3px; font-size: 16px; }
.idea-title small { color: var(--muted); font-size: 9px; }
.pantry-idea-card > p { margin: 10px 0; color: #5f5861; font-size: 11px; line-height: 1.55; }
.idea-line { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.idea-line b { margin-right: 7px; color: var(--green); }
.idea-line.missing b { color: var(--orange-dark); }
.photo-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: end;
  background: rgba(31,22,30,.48);
  backdrop-filter: blur(6px);
}
.photo-review-sheet {
  width: min(100%, 480px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto auto auto minmax(0,1fr) auto;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: var(--cream);
  box-shadow: 0 -18px 60px rgba(31,20,28,.25);
}
.photo-review-head { min-height: 72px; padding: 12px 17px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: rgba(255,249,243,.97); }
.photo-review-head .icon-button { width: 36px; height: 36px; }
.photo-review-head h2 { margin: 3px 0 0; font-size: 18px; }
.photo-review-head > span { color: var(--purple); font-size: 11px; font-weight: 750; }
.photo-review-preview { margin: 12px 17px 0; height: 118px; position: relative; overflow: hidden; border-radius: 17px; background: #e8e0dc; }
.photo-review-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-review-preview p { position: absolute; left: 8px; right: 8px; bottom: 7px; margin: 0; padding: 7px 9px; border-radius: 10px; color: white; background: rgba(31,22,24,.62); backdrop-filter: blur(6px); font-size: 9px; }
.photo-review-notes { margin: 9px 17px 0; padding: 9px 10px; color: var(--orange-dark); background: var(--orange-pale); border-radius: 11px; font-size: 9px; line-height: 1.5; }
.photo-review-form { min-height: 0; padding: 12px 17px 18px; display: grid; gap: 9px; overflow-y: auto; overscroll-behavior: contain; }
.photo-item-card { padding: 11px; display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 9px; border: 1px solid #e7dfe8; border-radius: 16px; background: white; }
.photo-item-check { position: relative; }
.photo-item-check input { position: absolute; opacity: 0; }
.photo-item-check span { width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid #d8cedb; border-radius: 9px; color: transparent; background: #faf8fa; font-size: 13px; font-weight: 800; }
.photo-item-check input:checked + span { color: white; border-color: var(--purple); background: var(--purple); }
.photo-item-fields { min-width: 0; }
.photo-item-name-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; }
.photo-item-name-row .text-field, .photo-item-grid .text-field, .photo-item-grid .select-field { height: 36px; border-radius: 10px; font-size: 11px; }
.confidence-pill { padding: 5px 6px; border-radius: 8px; font-size: 8px; font-weight: 750; }
.confidence-pill.high { color: #20864b; background: #e8f8ed; }
.confidence-pill.medium { color: var(--orange-dark); background: var(--orange-pale); }
.confidence-pill.low { color: #a24848; background: #fff0ef; }
.photo-item-grid { margin-top: 7px; display: grid; grid-template-columns: .65fr .65fr 1.15fr 1fr; gap: 5px; }
.photo-item-fields > small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.photo-review-actions { padding: 11px 17px max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.3fr; gap: 9px; border-top: 1px solid var(--line); background: white; }
.photo-review-actions button { min-height: 48px; border-radius: 14px; }
.photo-empty-result { padding: 30px 15px; text-align: center; }
.photo-empty-result span { display: block; color: var(--purple); font-size: 28px; }
.photo-empty-result b { display: block; margin-top: 8px; font-size: 15px; }
.photo-empty-result p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.feedback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  justify-content: center;
  align-items: end;
  background: rgba(31,22,30,.48);
  backdrop-filter: blur(6px);
}
.feedback-sheet {
  width: min(100%, 480px);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: var(--cream);
  box-shadow: 0 -18px 60px rgba(31,20,28,.25);
}
.feedback-head { min-height: 76px; padding: 13px 17px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: rgba(255,249,243,.98); }
.feedback-head .icon-button { width: 38px; height: 38px; }
.feedback-head h2 { margin: 4px 0 0; font-size: 18px; }
.feedback-head > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--orange-pale); font-size: 21px; }
.feedback-form { padding: 17px 17px max(18px, env(safe-area-inset-bottom)); }
.feedback-form > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.feedback-tags { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-tags button { min-height: 36px; padding: 0 11px; border: 1px solid #e5dce8; border-radius: 12px; color: #655c68; background: white; font-size: 10px; }
.feedback-tags button.active { color: white; border-color: var(--orange); background: linear-gradient(135deg, var(--orange), #ff7021); box-shadow: 0 7px 15px rgba(255,112,33,.2); }
.feedback-comment { margin-top: 18px; display: block; }
.feedback-comment > span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 750; }
.feedback-comment textarea { width: 100%; min-height: 82px; padding: 11px; resize: vertical; border: 1px solid #e4dce5; border-radius: 14px; outline: none; background: white; font-size: 11px; line-height: 1.55; }
.feedback-comment textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-pale); }
.feedback-voice-box { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; margin-top:14px; padding:12px; border-radius:14px; background:#f8f4ff; }
.feedback-voice-box > div:first-child { display:grid; gap:3px; }
.feedback-voice-box small { color:var(--muted); font-size:9px; }
.feedback-voice-box > button { min-height:38px; padding:0 12px; border:0; border-radius:12px; background:var(--purple); color:#fff; font-weight:800; }
.feedback-voice-box > button.recording { background:var(--orange); }
.feedback-voice-row { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; }
.feedback-voice-row audio { width:100%; height:34px; }
.feedback-voice-row button { border:0; background:transparent; color:var(--orange-dark); }
.feedback-kindness { margin-top: 10px; padding: 9px 10px; border-radius: 11px; color: #756b77; background: #f2edf4; font-size: 8px; line-height: 1.5; }
.feedback-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.feedback-actions button { min-height: 48px; border-radius: 14px; }

.support-sheet { max-height: min(92vh, 760px); }
.support-head-mark { color: var(--purple-dark); background: var(--purple-pale) !important; font-weight: 850; }
.support-sheet-body { padding: 17px 17px max(20px, env(safe-area-inset-bottom)); }
.support-channel { width: 100%; min-height: 62px; margin-bottom: 10px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e5dce8; border-radius: 16px; color: var(--ink); background: white; text-align: left; text-decoration: none; }
.support-channel span, .support-channel b, .support-channel small { display: block; }
.support-channel b { font-size: 12px; }
.support-channel small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.support-channel em { flex: none; color: var(--purple); font-size: 10px; font-style: normal; font-weight: 800; }
.support-request-form { display: grid; gap: 13px; }
.support-request-form > label { display: grid; gap: 7px; }
.support-request-form > label > span { color: var(--ink); font-size: 10px; font-weight: 800; }
.support-request-form select, .support-request-form input, .support-request-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #e1d8e3; border-radius: 13px; outline: none; color: var(--ink); background: white; font: inherit; font-size: 11px; }
.support-request-form textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.support-request-form select:focus, .support-request-form input:focus, .support-request-form textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-pale); }
.support-login-note { padding: 16px; border-radius: 16px; background: white; text-align: center; }
.support-login-note b { font-size: 12px; }
.support-login-note p { margin: 7px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.support-login-note button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; color: white; background: var(--purple); font-size: 10px; font-weight: 800; }
.support-hours { display: block; margin-top: 12px; color: var(--muted); text-align: center; font-size: 8px; }
.support-form-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 9px; }
.support-form-actions button { min-height: 46px; }
.refund-notice { margin: 0; padding: 12px; border-radius: 13px; color: #835f35; background: #fff3df; font-size: 9px; line-height: 1.6; }

@media (max-width: 390px) {
  .membership-order-list > div { grid-template-columns: minmax(0, 1fr) auto; }
  .membership-order-actions { grid-column: 1 / -1; text-align: right; }
  .membership-support-card { grid-template-columns: 1fr; }
  .membership-support-card > button { width: 100%; }
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 28px;
  transform: translate(-50%, -24px);
  max-width: calc(100vw - 40px);
  padding: 11px 16px;
  border-radius: 13px;
  color: white;
  background: rgba(43,38,49,.93);
  box-shadow: 0 10px 25px rgba(36,27,22,.2);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  font-size: 12px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.family-switcher { padding: 0 20px 18px; }
.family-switcher .section-title { margin-top: 3px; }
.family-choice-list { display: grid; gap: 8px; }
.family-choice {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  background: rgba(255,255,255,.82);
}
.family-choice > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--orange-pale); }
.family-choice b, .family-choice small { display: block; }
.family-choice b { font-size: 13px; }
.family-choice small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.family-choice i { color: var(--muted); font-style: normal; }
.family-choice.active { border-color: rgba(108,76,241,.28); background: var(--purple-pale); box-shadow: 0 7px 16px rgba(108,76,241,.09); }
.family-choice.active i { color: var(--purple); font-weight: 800; }
.primary-family-status,
.primary-family-action {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(108, 76, 241, .16);
  border-radius: 16px;
  background: #faf8ff;
  color: var(--text);
  text-align: left;
}
.primary-family-status { display: flex; align-items: center; justify-content: space-between; }
.primary-family-action { display: grid; gap: 4px; cursor: pointer; }
.primary-family-status b,
.primary-family-action b { color: var(--purple); font-size: 13px; }
.primary-family-status span,
.primary-family-action span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.create-family-form { margin-top: 10px; display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.create-family-form .secondary-button { min-height: 46px; border-radius: 13px; font-size: 11px; }
.session-card { margin: 18px 20px 0; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: var(--soft-shadow); }
.session-card b, .session-card small { display: block; }
.session-card b { font-size: 13px; }
.session-card small { max-width: 280px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.session-card button { flex: 0 0 auto; }

@media (max-width: 820px) {
  .desktop-brand { display: none; }
  .app-shell { margin: 0; width: 100%; box-shadow: none; }
}

@media (max-width: 360px) {
  .dish-grid { gap: 9px; }
  .dish-photo { height: 145px; }
  .section, .edit-form { padding-left: 15px; padding-right: 15px; }
  .tonight-card, .progress-card, .import-panel, .order-summary, .family-hero { margin-left: 15px; margin-right: 15px; }
  .bottom-nav { padding-left: 5px; padding-right: 5px; }
  .family-action-card { grid-template-columns: 1fr; }
  .family-profile-grid { grid-template-columns: 1fr; }
  .session-card { align-items: flex-start; flex-direction: column; }
}

.meal-member-grid,
.meal-task-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.meal-member-grid button,
.meal-task-options button,
.meal-member-grid .choice-chip { min-height:46px; border:1px solid #eadff1; border-radius:14px; background:#fff; color:var(--ink); font-size:14px; font-weight:700; }
.meal-member-grid button.active,
.meal-task-options button.active { border-color:var(--purple); background:#f2edff; color:var(--purple); }
.dialog-field { display:grid; gap:8px; margin-top:14px; color:var(--muted); font-size:13px; font-weight:700; }
.dialog-field select,
.dialog-field input { min-height:48px; border:1px solid #eadff1; border-radius:14px; background:#fff; padding:0 14px; font:inherit; color:var(--ink); }
.meal-plan-dialog { max-height:min(88vh,760px); overflow-y:auto; }
.meal-plan-dishes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:210px; overflow-y:auto; padding:4px; }
.meal-plan-dishes label { display:flex; align-items:center; gap:8px; min-height:42px; border:1px solid #eadff1; border-radius:12px; padding:8px 10px; background:#fff; }
.home-wish-shortcuts { display:grid; gap:12px; margin-top:14px; margin-bottom:14px; padding:16px; }
.home-wish-shortcuts header div { display:grid; gap:4px; }
.home-wish-shortcuts header b { font-size:18px; }
.home-wish-shortcuts header small { color:var(--muted); line-height:1.45; }
.home-wish-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.home-wish-actions button,
.managed-member-entry { display:flex; align-items:center; gap:10px; min-height:54px; padding:10px 12px; border:1px solid #eadff1; border-radius:15px; background:#faf7ff; color:var(--ink); text-align:left; }
.home-wish-actions button b { flex:1; font-size:15px; }
.home-wish-shortcuts span,
.managed-member-entry > span { font-size:26px; }
.managed-member-entry div { display:grid; gap:4px; flex:1; }
.managed-member-entry small { color:var(--muted); line-height:1.45; }
.tonight-menu-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.category-create-form { display:grid; grid-template-columns:1fr auto; gap:10px; }
.category-assign-dialog { max-height:min(88vh,760px); overflow:hidden; }
.category-assign-dialog > p { margin:10px 0 12px; font-size:13px; line-height:1.55; }
.category-assign-list { display:grid; gap:8px; max-height:52vh; overflow-y:auto; padding:2px; }
.category-assign-dish { display:grid; grid-template-columns:58px minmax(0,1fr) 30px; align-items:center; gap:11px; width:100%; min-height:68px; padding:7px; border:1px solid #eee3f1; border-radius:16px; color:var(--ink); background:#fff; text-align:left; }
.category-assign-dish .dish-photo { width:58px; height:58px; min-height:0; border-radius:12px; overflow:hidden; }
.category-assign-dish > span { display:grid; gap:4px; min-width:0; }
.category-assign-dish b { font-size:15px; }
.category-assign-dish small { color:var(--muted); font-size:12px; }
.category-assign-dish i { display:grid; place-items:center; width:26px; height:26px; border:1px solid #dcd1e4; border-radius:9px; color:#fff; font-style:normal; }
.category-assign-dish.selected { border-color:rgba(108,76,241,.48); background:#f8f5ff; }
.category-assign-dish.selected i { border-color:var(--purple); background:var(--purple); }
.category-assign-actions { display:grid; grid-template-columns:1fr 1.5fr; gap:10px; margin-top:14px; }
.category-assign-actions button { min-height:48px; }
.category-assign-empty { margin:16px 0; padding:18px; border-radius:16px; background:#faf7ff; text-align:center; }
.category-assign-empty p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.category-empty button { min-height:44px; margin-top:12px; padding:0 18px; border:0; border-radius:14px; color:#fff; background:var(--purple); font-weight:800; }
.category-manage-list { display:grid; gap:8px; margin-top:14px; }
.category-manage-list > div { display:flex; align-items:center; justify-content:space-between; border:1px solid #eee3f1; border-radius:12px; padding:10px 12px; }
.category-manage-list span { display:flex; gap:8px; align-items:baseline; font-weight:800; }
.category-manage-list .category-row-actions { align-items:center; }
.category-manage-list small { color:var(--muted); font-weight:500; }
.inline-category-create { margin-top:12px; border:1px dashed var(--purple); border-radius:12px; padding:12px; color:var(--purple); background:#f8f4ff; }
.meal-wishes-inbox,
.upcoming-meal-plans { margin:14px 20px; }
.meal-wishes-inbox { padding:16px; }
.meal-wishes-inbox header,
.meal-wishes-inbox article { display:flex; justify-content:space-between; gap:12px; }
.meal-wishes-inbox header { align-items:start; margin-bottom:12px; }
.meal-wishes-inbox article { flex-direction:column; padding:12px 0 0; border-top:1px solid #f0e7f0; }
.meal-wishes-inbox article > div:first-child { display:grid; gap:5px; }
.meal-wishes-inbox small { color:var(--muted); }
.wish-dish-picker { display:flex; gap:8px; margin:0 -2px 12px; padding:2px 2px 6px; overflow-x:auto; scrollbar-width:none; }
.wish-dish-picker::-webkit-scrollbar { display:none; }
.wish-dish-chip { flex:0 0 auto; min-width:118px; max-width:170px; padding:10px 11px; border:1px solid #eee5f2; border-radius:13px; color:var(--ink); background:#fffdfa; text-align:left; }
.wish-dish-chip b,.wish-dish-chip small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wish-dish-chip b { font-size:11px; }
.wish-dish-chip small { margin-top:5px; font-size:8px; }
.wish-dish-chip.active { border-color:var(--purple); color:var(--purple); background:linear-gradient(135deg,#f3efff,#fff9f2); box-shadow:0 7px 16px rgba(86,57,215,.13); }
.wish-decision-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding-bottom:3px; }
.wish-decision-actions button { min-height:36px; border:1px solid #eadff1; border-radius:999px; padding:7px 8px; background:#fff; color:var(--purple); font-size:10px; line-height:1.25; }
.wish-decision-actions button.selected { border-color:#5c3ee5; color:#fff; background:linear-gradient(135deg,#7654f4,#5639d7); box-shadow:0 6px 15px rgba(86,57,215,.22); font-weight:800; transform:translateY(-1px); }
.order-card.selected-for-batch { border-color:rgba(108,76,241,.48); box-shadow:0 16px 34px rgba(86,57,215,.15); }
.order-actions .primary-button.selected { background:linear-gradient(135deg,#7654f4,#5639d7); }
.order-batch-bar { position:fixed; right:max(14px,calc((100vw - 520px)/2 + 14px)); bottom:calc(82px + env(safe-area-inset-bottom)); left:max(14px,calc((100vw - 520px)/2 + 14px)); z-index:17; display:flex; align-items:center; gap:8px; min-height:62px; padding:9px 10px 9px 14px; border:1px solid rgba(108,76,241,.18); border-radius:19px; background:rgba(255,255,255,.97); box-shadow:0 13px 34px rgba(56,37,107,.2); backdrop-filter:blur(16px); }
.order-batch-bar > span { flex:1; min-width:0; }
.order-batch-bar b,.order-batch-bar small { display:block; }
.order-batch-bar b { font-size:12px; }
.order-batch-bar small { margin-top:4px; overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.order-batch-bar button { min-height:40px; padding:0 11px; border:0; border-radius:12px; font-size:10px; font-weight:800; }
.order-batch-bar .clear { color:var(--muted); background:transparent; }
.order-batch-bar .submit { color:#fff; background:linear-gradient(135deg,#7654f4,#5639d7); }
.upcoming-meal-plans { display:grid; gap:10px; }
.upcoming-meal-plans article { display:grid; gap:8px; padding:14px; }
.upcoming-meal-plans article > div { display:grid; gap:4px; }
.upcoming-meal-plans small,
.upcoming-meal-plans span,
.upcoming-meal-plans p { color:var(--muted); }
.managed-member-entry { width:calc(100% - 40px); margin:0 20px 12px; }
.family-video-editor input[type="file"] { width:100%; margin:12px 0; }
.family-video-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; margin-top:10px; }
.family-video-row video,
.family-video-gallery video { width:100%; max-height:360px; border-radius:16px; background:#1d1820; }
.family-video-gallery { display:grid; gap:12px; }

@media (max-width:420px) {
  .home-wish-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Family library first-screen density: keep the three add paths equal and quiet. */
.library-hero-contract {
  min-height: 142px;
  padding: 16px 16px 14px;
  border-radius: 24px;
}
.library-hero-contract::before {
  width: 110px;
  height: 110px;
  top: -60px;
  right: -38px;
}
.library-hero-contract::after {
  width: 78px;
  height: 78px;
  right: 58px;
  bottom: -58px;
  border-width: 15px;
}
.library-hero-kicker {
  max-width: 215px;
  font-size: 10px;
  font-weight: 600;
}
.library-hero-copy h1 {
  max-width: 225px;
  margin: 5px 0 4px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.4px;
}
.library-hero-copy > p {
  max-width: 220px;
  font-size: 12px;
  line-height: 1.4;
}
.library-hero-toolbar {
  margin-top: 10px;
  gap: 6px;
}
.library-hero-count,
.library-manage-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 400;
}
.library-hero-count b {
  font-size: 15px;
  font-weight: 600;
}
.library-hero-dishes {
  top: 19px;
  right: 12px;
  width: 96px;
  height: 105px;
}
.library-hero-dish {
  width: 55px;
  height: 74px;
  border-width: 3px;
  border-radius: 16px;
  box-shadow: 0 9px 18px rgba(58,35,22,.15);
}
.library-hero-dish-2 { bottom: 4px; }
.library-hero-dish-3 { left: 23px; }
.library-hero-logo {
  top: 8px;
  right: 2px;
  width: 82px;
  height: 82px;
  border-radius: 24px;
}
.library-hero-logo img {
  width: 58px;
  height: 58px;
}
.library-search-contract {
  height: 46px;
  margin: -10px 30px 0;
  padding: 0 14px;
  border-radius: 15px;
}
.library-add-section {
  margin: 14px 20px 0;
}
.library-primary-entries {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px;
  margin-top: 0;
}
.library-secondary-entries {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.video-library-entry,
.library-secondary-entries .pantry-library-entry,
.library-secondary-entries .original-recipe-entry {
  width: 100%;
  height: 82px;
  min-height: 82px;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 18px;
  text-align: center;
}
.video-library-entry::after { display: none; }
.video-library-entry > .library-entry-mark,
.library-primary-entries .pantry-library-entry > .pantry-entry-mark,
.library-primary-entries .original-recipe-entry > .original-entry-mark,
.library-secondary-entries .pantry-library-entry > span,
.library-secondary-entries .original-recipe-entry > span {
  width: 36px;
  height: 36px;
  border-radius: 13px;
}
.video-entry-mark > i {
  width: 20px;
  height: 15px;
  border-radius: 5px;
}
.video-entry-mark > i::before {
  top: 3px;
  left: 6px;
  border-top-width: 3px;
  border-bottom-width: 3px;
  border-left-width: 6px;
}
.pantry-entry-mark > i {
  width: 16px;
  height: 22px;
}
.original-entry-mark > i {
  width: 6px;
  height: 20px;
}
.video-library-entry > div > b,
.library-primary-entries .pantry-library-entry > div > b,
.library-primary-entries .original-recipe-entry > div > b {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.library-quick-head h2,
.library-category-panel h2,
.library-list-heading h2 {
  font-weight: 400;
}
.library-secondary-entries .pantry-library-entry > div,
.library-secondary-entries .original-recipe-entry > div {
  margin: 0;
}

@media (max-width: 350px) {
  .library-hero-contract {
    min-height: 142px;
    margin-right: 14px;
    margin-left: 14px;
    padding: 14px;
  }
  .library-hero-copy h1 {
    max-width: 205px;
    font-size: 20px;
  }
  .library-hero-copy > p { max-width: 200px; }
  .library-hero-dishes {
    right: 2px;
    opacity: .55;
    transform: scale(.88);
  }
  .library-search-contract {
    margin-right: 24px;
    margin-left: 24px;
  }
  .video-library-entry,
  .library-secondary-entries .pantry-library-entry,
  .library-secondary-entries .original-recipe-entry {
    height: 78px;
    min-height: 78px;
  }
}

/* Final Discover overrides follow the legacy section in source order. */
.discover-page {
  padding: 18px 18px 112px;
  background:
    radial-gradient(circle at 96% 0, rgba(108, 76, 241, .08), transparent 22%),
    #fffaf6;
}
.discover-filter-scroll { margin-top: 12px; }
.discover-filter-scroll button {
  min-height: 35px;
  padding: 0 13px;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}
.discover-filter-scroll button.active {
  border-color: var(--purple);
  color: #fff;
  background: linear-gradient(135deg, #4e0caa, #6424c9);
}
.discover-feed { column-gap: 9px; }
.discover-card {
  margin-bottom: 9px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(59, 36, 22, .06);
}
.discover-card-photo { height: 188px; }
.discover-card-photo.is-short { height: 160px; }
.discover-card-copy { padding: 9px 9px 10px; }
.discover-card-copy h3 { font-size: 15px; }
.discover-card-copy p { margin: 6px 0 7px; }
.discover-card-copy p span { padding: 3px 6px; font-size: 9px; }

@media (max-width: 350px) {
  .discover-page { padding-right: 13px; padding-left: 13px; }
  .discover-card-photo { height: 170px; }
  .discover-card-photo.is-short { height: 145px; }
}

/* Confirmed Discover mockup: image first, creator second, paired actions. */
.discover-channel-tabs {
  width: min(100%, 250px);
  min-height: 48px;
  gap: 5px;
  margin-bottom: 12px;
  border-radius: 17px;
}
.discover-channel-tabs button { min-height: 40px; border-radius: 13px; font-size: 15px; }
.discover-search { border-color: #ded4cf; border-radius: 23px; box-shadow: none; }
.discover-shuffle {
  border: 1px solid rgba(104, 41, 173, .18);
  border-radius: 16px;
  color: var(--purple);
  background: var(--purple-soft, #f3ecfb);
  box-shadow: none;
}
.discover-shuffle i { border-color: var(--purple); }
.discover-shuffle i::before,
.discover-shuffle i::after { border-color: var(--purple); }
.discover-filter-scroll button { color: #5c5258; background: #f6f0eb; }
.discover-filter-scroll .discover-all-filter { color: var(--purple); border-color: #d7c3ea; background: #faf7fd; }
.discover-filter-scroll button.active { color: #fff; background: var(--purple); box-shadow: none; }
.discover-sticky-stack {
  position: sticky;
  z-index: 30;
  top: 0;
  margin: 0 -18px 4px;
  padding: 7px 18px 8px;
  border-bottom: 1px solid rgba(226, 214, 208, .72);
  background: rgba(255, 250, 246, .97);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(61, 40, 29, .05);
}
body:has(.discover-page) .app-shell { overflow: clip; }
.discover-sticky-stack .discover-channel-tabs {
  width: 100%;
  min-height: 40px;
  display: block;
  overflow-x: auto;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}
.discover-sticky-stack .discover-channel-tabs::-webkit-scrollbar { display: none; }
.discover-channel-row {
  width: max-content;
  min-width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.discover-sticky-stack .discover-channel-tabs button {
  min-width: 112px;
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid #e8ded8;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
}
.discover-sticky-stack .discover-channel-tabs button.active {
  border-color: var(--purple);
  background: var(--purple);
}
.discover-compact-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}
.discover-search-trigger {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(104, 41, 173, .2);
  border-radius: 14px;
  color: var(--purple);
  background: #faf7fd;
}
.discover-search-trigger i {
  width: 18px;
  height: 18px;
  position: relative;
  box-sizing: border-box;
  border: 2.5px solid currentColor;
  border-radius: 50%;
}
.discover-search-trigger i::after {
  content: "";
  width: 8px;
  height: 2.5px;
  position: absolute;
  right: -7px;
  bottom: -4px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: currentColor;
}
.discover-compact-controls .discover-filter-scroll {
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 0;
}
.discover-compact-controls .discover-filter-scroll button { min-height: 38px; padding: 0 14px; }
.discover-compact-controls .discover-shuffle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.discover-compact-controls .discover-shuffle i { inset: 15px auto auto 11px; }
.discover-search-expanded {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
}
.discover-search-expanded .discover-search {
  height: 44px;
  border-color: #8a51c4;
  border-radius: 15px;
  box-shadow: 0 0 0 3px rgba(104, 41, 173, .08);
}
.discover-search-cancel {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--purple);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}
.discover-following-strip { margin: 2px 0 13px; }
.discover-following-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.discover-following-head.is-collapsed { margin-bottom: 0; }
.discover-following-strip h2 { margin: 0; font-size: 16px; }
.discover-following-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px 0 12px;
  border: 0;
  color: var(--purple);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}
.discover-following-toggle i {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.discover-following-toggle[aria-expanded="true"] i {
  margin-top: 5px;
  transform: rotate(225deg);
}
.discover-card { border-radius: 18px; box-shadow: 0 7px 18px rgba(66, 44, 31, .06); }
.discover-card-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  background: #f4eee8;
}
.discover-card-photo::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 54px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(25, 20, 23, .25), transparent);
}
.discover-cover-placeholder {
  display: grid;
  place-items: center;
  gap: 9px;
  color: #8c7e84;
  font-size: 11px;
  font-weight: 650;
}
.discover-cover-placeholder i {
  width: 54px;
  height: 32px;
  position: static;
  border: 3px solid #d7c5cf;
  border-top: 0;
  border-radius: 0 0 32px 32px;
  background: transparent;
}
.discover-source-badge {
  min-height: 28px;
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 25, 28, .62);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 750;
}
.discover-source-badge i {
  width: 0;
  height: 0;
  position: static;
  padding: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #fff;
  border-radius: 0;
  background: transparent;
}
.discover-card-copy { padding: 10px; }
.discover-card-copy h3 { font-size: 16px; }
.discover-card-copy p { margin: 7px 0 9px; }
.discover-card-copy p span { padding: 4px 7px; border-radius: 999px; font-size: 11px; }
.discover-card-copy p span:first-child { color: #cc611c; background: #fff0e2; }
.discover-card-person { margin: 0; }
.discover-person-open { gap: 7px; font-size: 11px; text-align: left; }
.discover-person-open > span:last-child { min-width: 0; }
.discover-person-open b,
.discover-person-open small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.discover-person-open b { font-size: 11px; }
.discover-person-open small { margin-top: 2px; color: #92888e; font-size: 10px; }
.discover-person-avatar { width: 30px; height: 30px; flex-basis: 30px; }
.discover-relation { min-height: 30px; font-size: 10px; }
.discover-card-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 6px; margin-top: 9px; }
.discover-card-actions button { min-height: 38px; border: 0; border-radius: 10px; font-size: 11px; font-weight: 800; }
.discover-card-actions .tutorial { color: var(--purple); background: #f5effa; }
.discover-card-actions .discover-collect { width: auto; min-height: 38px; margin: 0; }

/* Keep the confirmed three equal discover channels after legacy overrides. */
.discover-channel-row { gap: 5px; }
.discover-sticky-stack .discover-channel-tabs button { min-width: 104px; padding: 0 12px; }
.discover-hot-comment { display: grid; }
@media (max-width: 370px) {
  .discover-sticky-stack .discover-channel-tabs button { min-width: 96px; }
}

/* Creator feature application: approved GPT R2 flow. */
.creator-feature-entry span:first-child { color: #5f31a4; font-weight: 850; }
.creator-application-page {
  min-height: 100vh;
  padding: 0 16px 122px;
  background: linear-gradient(180deg, #fbf7ff 0, #fffaf4 260px, var(--bg) 100%);
}
.creator-application-page .topbar { margin: 0 -16px 8px; padding-inline: 16px; background: rgba(255,255,255,.86); backdrop-filter: blur(16px); }
.creator-application-form { display: grid; gap: 14px; max-width: 620px; margin: 0 auto; }
.creator-application-copy { padding: 22px 6px 6px; }
.creator-application-copy h1 { margin: 8px 0 8px; color: #21172a; font-size: clamp(25px, 7vw, 34px); line-height: 1.18; letter-spacing: -.7px; }
.creator-application-copy p { margin: 0; color: #776d7c; font-size: 14px; line-height: 1.65; }
.creator-account-list { display: grid; gap: 12px; }
.creator-account-card, .creator-application-section { padding: 18px; border: 1px solid rgba(106,62,176,.1); box-shadow: 0 12px 34px rgba(69,42,80,.07); }
.creator-account-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.creator-account-card header b, .creator-application-section h2 { color: #281a31; font-size: 17px; }
.creator-account-card header button { border: 0; color: #a64e45; background: transparent; font-size: 12px; }
.creator-account-card label, .creator-contact-fields label { display: grid; gap: 7px; margin-top: 12px; color: #514758; font-size: 12px; font-weight: 750; }
.creator-account-card input, .creator-account-card select, .creator-contact-fields input {
  width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #e7deea; border-radius: 13px; outline: 0; color: #251b2c; background: #fff; font-size: 15px;
}
.creator-account-card input:focus, .creator-account-card select:focus, .creator-contact-fields input:focus { border-color: #7c4dcc; box-shadow: 0 0 0 3px rgba(124,77,204,.1); }
.creator-account-card > small { display: block; margin-top: 12px; color: #928698; font-size: 11px; line-height: 1.55; }
.creator-add-account { min-height: 48px; border: 1px dashed #bca7d6; border-radius: 14px; color: #6335a2; background: #faf6ff; font-weight: 800; }
.creator-application-section > p { margin: 5px 0 13px; color: #958a9a; font-size: 12px; }
.creator-choice-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.creator-choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.creator-choice-chip span { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; border: 1px solid #e6ddeb; border-radius: 999px; color: #655a6a; background: #fff; font-size: 13px; font-weight: 700; }
.creator-choice-chip input:checked + span { border-color: #6c37b7; color: #5c269f; background: #f1e8ff; box-shadow: inset 0 0 0 1px #6c37b7; }
.creator-other-direction { display: grid; gap: 7px; margin-top: 15px; color: #625669; font-size: 12px; font-weight: 750; }
.creator-other-direction input { min-height: 44px; padding: 0 13px; border: 1px solid #e7deea; border-radius: 13px; outline: 0; font-size: 14px; }
.creator-other-direction input:focus { border-color: #7c4dcc; box-shadow: 0 0 0 3px rgba(124,77,204,.1); }
.creator-application-actions { display: grid; grid-template-columns: .8fr 1.45fr; gap: 10px; }
.creator-application-actions button { min-height: 50px; }
.creator-application-footnote { margin: 0 4px; color: #928a92; font-size: 11px; line-height: 1.65; text-align: center; }
.creator-application-status-card { max-width: 620px; margin: 28px auto 0; padding: 28px 20px; text-align: center; }
.creator-application-status-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #8248da, #5b27ae); box-shadow: 0 12px 24px rgba(90,39,174,.22); font-size: 25px; font-weight: 900; }
.creator-application-status-card h1 { margin: 8px 0; font-size: 27px; }
.creator-application-status-card > p { margin: 0 auto 22px; color: #776d7c; line-height: 1.6; }
.creator-application-status-card > small { display: block; margin: 18px 0; color: #9a909d; }
.creator-application-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 22px 0; }
.creator-application-progress div { position: relative; display: grid; justify-items: center; gap: 7px; color: #9c92a1; font-size: 10px; }
.creator-application-progress div::before { content: ""; width: calc(100% - 28px); height: 2px; position: absolute; top: 13px; left: calc(-50% + 14px); background: #e7dfea; }
.creator-application-progress div:first-child::before { display: none; }
.creator-application-progress i { width: 28px; height: 28px; display: grid; place-items: center; position: relative; z-index: 1; border-radius: 50%; color: #8e8296; background: #eee8f1; font-style: normal; font-weight: 850; }
.creator-application-progress .completed,
.creator-application-progress .current { color: #582996; font-weight: 800; }
.creator-application-progress .completed::before,
.creator-application-progress .completed i { color: #fff; background: #713cbd; }
.creator-application-progress .current i { color: #713cbd; background: #f1e9ff; box-shadow: inset 0 0 0 2px #713cbd; }
.creator-review-note { display: grid; gap: 6px; padding: 14px; border-radius: 13px; color: #744139; background: #fff3ea; text-align: left; font-size: 13px; }
.creator-review-note span { line-height: 1.55; }

/* 2026-09-02 UI unification v2: confirmed four-page visual baseline */
:root {
  --ui-v2-bg: #faf8f5;
  --ui-v2-card: #fff;
  --ui-v2-text: #28252d;
  --ui-v2-muted: #817a84;
  --ui-v2-purple: #6548eb;
  --ui-v2-orange: #ff8a34;
  --ui-v2-line: #eee8e2;
  --ui-v2-shadow: 0 8px 24px rgba(64, 48, 38, .07);
}

body { color: var(--ui-v2-text); background: var(--ui-v2-bg); }
.page { padding-bottom: 104px; background: var(--ui-v2-bg); }
.card { border-color: var(--ui-v2-line); box-shadow: var(--ui-v2-shadow); }
.page button, .page input, .page select, .page textarea { font-family: inherit; }

/* Shared navigation */
.bottom-nav {
  height: 82px;
  padding-top: 8px;
  padding-bottom: max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(78, 61, 50, .08);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 26px rgba(57, 43, 34, .07);
  backdrop-filter: blur(18px);
}
.bottom-nav .nav-item { min-width: 0; color: #7e7880; font-size: 11px; }
.bottom-nav .nav-item strong { width: 25px; height: 25px; display: grid; place-items: center; font-size: 0; }
.bottom-nav .nav-item strong svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav .nav-item.active { color: var(--ui-v2-purple); }
.bottom-nav .nav-item.active span { font-weight: 800; }
.bottom-nav .nav-add { width: auto; height: auto; align-self: stretch; margin: 0; border: 0; background: none; box-shadow: none; }
.bottom-nav .nav-add strong { width: 58px; height: 58px; margin-top: -20px; border: 4px solid #fff; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff9b48, #f57a25); box-shadow: 0 8px 19px rgba(247, 125, 39, .27); font-size: 34px; font-weight: 300; }

/* Home: one decision card, three tools, then recommendations */
.topbar { padding-inline: 20px; }
.home-brand { display: grid; grid-template-columns: 40px auto; grid-template-rows: auto auto; column-gap: 9px; }
.home-brand .brand-logo-image { width: 40px; height: 40px; grid-row: 1 / 3; }
.home-brand > span { align-self: end; color: #2f235e; font-size: 20px; line-height: 1; }
.home-brand > small { margin-top: 4px; color: var(--ui-v2-muted); font-size: 11px; line-height: 1.1; }
.notification-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.web-identity-notice { margin: 4px 20px 12px; border-color: #e8dcff; background: #f7f2ff; box-shadow: none; }
.tonight-card {
  min-height: 248px;
  margin: 0 20px 16px;
  padding: 22px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #5b42dd 0%, #7657ed 100%);
  box-shadow: 0 13px 28px rgba(87, 60, 204, .25);
}
.tonight-card h2 { margin-bottom: 17px; font-size: 27px; }
.tonight-actions { align-items: flex-start; }
.tonight-line { margin-bottom: 10px; color: rgba(255,255,255,.9); font-size: 14px; }
.tonight-menu-copy { min-height: 21px; margin-top: 4px; color: rgba(255,255,255,.78); font-size: 13px; }
.tonight-menu-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.tonight-menu-buttons button { min-height: 44px; padding: 0 15px; border-radius: 12px; font-size: 13px; font-weight: 800; }
.tonight-menu-buttons button:first-child { border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.08); }
.tonight-menu-buttons button:last-child { border: 0; color: #fff; background: var(--ui-v2-orange); box-shadow: 0 7px 15px rgba(151, 72, 19, .24); }
.tonight-card .dish-orb { width: 76px; height: 76px; margin-top: 82px; border: 7px double rgba(255,255,255,.24); background-color: rgba(255,255,255,.08); box-shadow: none; }
.tonight-card .dish-orb:not([style]) { background-image: radial-gradient(circle, rgba(255,255,255,.05) 0 35%, transparent 36%), radial-gradient(circle, transparent 0 53%, rgba(255,255,255,.22) 54% 58%, transparent 59%); }
.home-quick-tools { margin: 0 20px 22px; gap: 10px; }
.home-quick-tool { min-height: 94px; padding: 12px 6px; border: 1px solid var(--ui-v2-line); border-radius: 18px; background: #fff; box-shadow: var(--ui-v2-shadow); flex-direction: column; }
.home-quick-tool b { font-size: 13px; }
.home-quick-tool .library-entry-mark { width: 38px; height: 38px; }
.home-recommendations, .home-cook-intents { margin-top: 0; }
.home-recommendation-title { padding-inline: 20px; }
.home-recommendation-title h2 { font-size: 20px; }
.home-recommendation-title small { font-size: 12px; }
.home-recommendation-scroll { padding: 0 20px 8px; gap: 12px; }
.home-recommendation-card { min-width: min(372px, calc(100vw - 40px)); border-radius: 18px; overflow: hidden; }
.creator-activity-card.is-compact { margin: 0 20px 18px; }
.getting-started { margin: 0 20px 18px; }

/* Menu: one left-hand category rail */
.library-order-page { padding-inline: 0; }
.library-order-header { padding: 19px 20px 10px; }
.library-order-header h1 { font-size: 28px; }
.library-order-kicker { color: var(--ui-v2-purple); font-size: 11px; font-weight: 800; }
.library-manage-button { min-height: 38px; padding-inline: 12px; border-radius: 12px; font-size: 12px; }
.library-order-search { min-height: 50px; margin: 0 20px 15px; border: 1px solid var(--ui-v2-line); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(62,44,32,.04); }
.library-category-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 9px; }
.library-category-heading b { font-size: 15px; }
.library-category-heading span { color: var(--ui-v2-muted); font-size: 11px; }
.library-order-layout { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 0 12px 0 10px; }
.library-order-sidebar { position: sticky; top: 0; display: grid; gap: 6px; padding: 4px 0 18px; overflow: visible; background: transparent; }
.library-order-category { min-height: 60px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 7px 3px; border: 0; border-radius: 14px; color: #6f6872; background: transparent; font-size: 11px; }
.library-order-category img, .library-sidebar-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; object-fit: cover; }
.library-sidebar-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.library-order-category b { font-size: 11px; line-height: 1.2; }
.library-order-category.active { color: var(--ui-v2-purple); background: #f0ecff; box-shadow: inset 3px 0 var(--ui-v2-purple); }
.library-order-sidebar.is-reordering .library-order-category:not(.dragging) { opacity: .58; }
.library-order-category.dragging { position: relative; background: #fff; box-shadow: 0 10px 24px rgba(72,48,126,.2); }
.library-order-category-add { min-height: 56px; display: grid; place-items: center; gap: 2px; padding: 5px; border: 1px dashed #bfb2f6; border-radius: 14px; color: var(--ui-v2-purple); background: #faf8ff; font-size: 21px; }
.library-order-category-add span { font-size: 10px; font-weight: 750; }
.library-secondary-filters { display: flex; gap: 7px; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.library-secondary-filters button { min-height: 32px; flex: 0 0 auto; padding: 0 11px; border: 1px solid #e5def6; border-radius: 999px; color: #716779; background: #fff; font-size: 11px; }
.library-secondary-filters button.active { border-color: var(--ui-v2-purple); color: #fff; background: var(--ui-v2-purple); }
.library-order-list-heading { margin: 0 0 9px; padding: 0 3px; }
.library-order-list-heading h2 { font-size: 20px; }
.library-order-card { grid-template-columns: 44% minmax(0, 1fr); min-height: 142px; border-radius: 17px; }
.library-order-copy { padding: 12px 10px; }
.library-order-copy h3 { font-size: 17px; }
.library-order-source { font-size: 11px; line-height: 1.45; }
.library-order-card .tag { font-size: 10px; }
.library-menu-action { min-height: 34px; font-size: 11px; }

/* Discover: image-led two-column cards */
.discover-sticky-stack { padding: 13px 20px 7px; background: rgba(250,248,245,.95); }
.discover-channel-tabs { padding: 4px; border: 1px solid var(--ui-v2-line); border-radius: 16px; background: #fff; }
.discover-channel-row { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
.discover-sticky-stack .discover-channel-tabs button { min-width: 0; min-height: 39px; border-radius: 12px; font-size: 14px; }
.discover-sticky-stack .discover-channel-tabs button.active { color: #fff; background: var(--ui-v2-purple); box-shadow: 0 5px 12px rgba(101,72,235,.22); }
.discover-compact-controls { margin-top: 8px; }
.discover-feed { column-count: 2; column-gap: 10px; padding: 8px 20px 24px; }
.discover-card { margin: 0 0 10px; border-radius: 18px; break-inside: avoid; overflow: hidden; }
.discover-card-photo { height: 190px; }
.discover-card-photo.is-short { height: 160px; }
.discover-card-copy { padding: 11px; }
.discover-card-copy h3 { font-size: 16px; }
.discover-card-copy p span { font-size: 10px; }
.discover-card-copy footer small { font-size: 11px; }
.discover-card-actions { grid-template-columns: .7fr 1.4fr; }
.discover-card-actions button { min-height: 38px; font-size: 11px; }
.discover-card-actions .discover-collect { color: #fff; background: linear-gradient(145deg, #ff9a43, #f57928); }

/* Family: overview first, details afterwards */
.family-page-head { padding: 19px 20px 10px; }
.family-page-head h1 { font-size: 28px; }
.family-page-head p { font-size: 11px; }
.family-hero { margin: 0 20px 10px; padding: 20px; border: 0; border-radius: 22px; background: linear-gradient(135deg, #6045df, #7859ed); box-shadow: 0 12px 26px rgba(88,60,200,.22); }
.family-hero h2 { font-size: 25px; }
.family-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.13); }
.family-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.family-stats { margin-top: 18px; }
.family-stat b { font-size: 22px; }
.family-switcher { margin: 0 20px 18px; padding: 0; }
.family-switcher > .section-title, .family-switcher > .family-section-note { display: none; }
.family-choice-list { display: flex; gap: 7px; overflow-x: auto; }
.family-choice { min-width: 100%; min-height: 62px; padding: 10px 13px; border: 1px solid var(--ui-v2-line); border-radius: 16px; background: #fff; box-shadow: var(--ui-v2-shadow); }
.family-choice > span { font-size: 0; }
.family-choice > span::after { content: "↔"; color: var(--ui-v2-purple); font-size: 20px; }
.primary-family-status, .primary-family-action, .other-family-button { display: none; }
.family-page > .section { padding-inline: 20px; }
.family-page > .section .section-title h2, .family-collaboration-section h2 { font-size: 20px; }
.member-list { display: flex; gap: 9px; padding: 0 20px 10px; overflow-x: auto; scrollbar-width: none; }
.member-card { min-width: 82px; display: grid; justify-items: center; align-content: start; gap: 7px; padding: 11px 6px; border: 0; background: transparent; box-shadow: none; text-align: center; }
.member-main { display: grid; justify-items: center; gap: 5px; }
.member-avatar { width: 48px; height: 48px; font-size: 22px; }
.member-main h3 { max-width: 74px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-main p { max-width: 75px; margin-top: 2px; color: var(--ui-v2-muted); font-size: 10px; line-height: 1.3; }
.member-card-actions { min-height: 20px; }
.member-card-actions .role-pill { padding: 3px 5px; font-size: 9px; }
.member-remove-button { display: none; }
.family-member-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin: 0 20px 22px; padding: 9px; border: 1px solid var(--ui-v2-line); border-radius: 16px; background: #fff; }
.family-member-actions button { min-height: 40px; border: 1px solid #e4dff0; border-radius: 11px; color: #5d5362; background: #fff; font-size: 12px; font-weight: 800; }
.family-member-actions button.primary { border-color: var(--ui-v2-purple); color: #fff; background: var(--ui-v2-purple); }
.family-collaboration-section { margin: 0 20px 20px; }
.family-collaboration-section > .section-title { padding: 0 1px 10px; }
.family-collaboration-section small { color: var(--ui-v2-muted); font-size: 11px; }
.family-collaboration-list { overflow: hidden; border-radius: 17px; }
.family-collaboration-list > button, .family-collaboration-list > a { width: 100%; min-height: 67px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--ui-v2-line); color: inherit; background: #fff; text-align: left; text-decoration: none; }
.family-collaboration-list > :last-child { border-bottom: 0; }
.family-collaboration-list b, .family-collaboration-list small { display: block; }
.family-collaboration-list b { font-size: 14px; }
.family-collaboration-list small { margin-top: 4px; }
.family-collaboration-list i { color: #928a95; font-size: 20px; font-style: normal; }
.family-collaboration-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--ui-v2-purple); background: #f0ecff; }
.family-collaboration-icon.profile { color: #d17842; background: #fff0e6; }
.family-collaboration-icon.pantry { color: #328a69; background: #eaf8f2; }
.family-collaboration-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.family-management-card, .family-profile-card, .settings-list, .session-card, .leave-family-button { margin-inline: 20px; }

@media (max-width: 374px) {
  .tonight-card { padding: 19px 17px; }
  .tonight-card .dish-orb { display: none; }
  .library-order-layout { grid-template-columns: 76px minmax(0, 1fr); gap: 7px; padding-inline: 8px; }
  .library-order-card { grid-template-columns: 41% minmax(0, 1fr); }
  .discover-feed { padding-inline: 14px; }
}
