:root {
  --primary: #4f39f6;
  --primary-hover: #432dd7;
  --ink: #172033;
  --muted: #5e6777;
  --soft: #f6f8fb;
  --line: #dfe5ef;
  --panel: #ffffff;
  --panel-muted: #f9fbfe;
  --green: #15a86b;
  --amber: #d79318;
  --red: #dd4c4c;
  --blue: #1769d1;
  --shadow: 0 1px 2px rgba(18, 27, 43, 0.05), 0 1px 3px rgba(18, 27, 43, 0.06);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  min-width: 320px;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

button,
input,
select,
textarea {
  font: inherit;
  line-height: 1.35;
}

button {
  border: 0;
  cursor: pointer;
}

.brand {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  font-size: 24px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
}

.brand img {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.auth-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(79, 57, 246, 0.13), transparent 30%),
    radial-gradient(circle at 83% 22%, rgba(24, 164, 108, 0.11), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  min-height: 100vh;
  padding: 22px 28px 34px;
}

.landing-shell {
  margin: 0 auto;
  max-width: 1240px;
  width: 100%;
}

.landing-nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.landing-nav .brand img {
  height: 58px;
}

.landing-nav-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.landing-nav-actions a {
  border-radius: 999px;
  color: #566176;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 15px;
}

.landing-nav-actions a.active,
.landing-nav-actions a:hover {
  background: #eef0ff;
  color: var(--primary);
}

.landing-nav-actions .landing-signup {
  background: var(--primary);
  color: #fff;
}

.landing-nav-actions .landing-signup:hover,
.landing-nav-actions .landing-signup.active {
  background: var(--primary-hover);
  color: #fff;
}

.landing-hero {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(224, 230, 241, 0.9);
  border-radius: 24px;
  box-shadow: 0 24px 90px rgba(36, 45, 74, 0.08);
  display: grid;
  gap: 54px;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 470px);
  padding: 54px;
}

.landing-hero-full {
  grid-template-columns: 1fr;
}

.landing-copy {
  max-width: 920px;
}

.landing-kicker {
  color: var(--primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.landing-copy h1 {
  color: #121b2f;
  font-size: 64px;
  line-height: 0.98;
  margin: 0;
  max-width: 760px;
}

.landing-lede {
  color: #526074;
  font-size: 18px;
  line-height: 1.58;
  margin: 22px 0 0;
  max-width: 760px;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.landing-cta,
.landing-cta-secondary {
  min-height: 50px;
  padding-left: 22px;
  padding-right: 22px;
  width: auto;
}

.landing-proof {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.landing-proof span {
  align-items: center;
  color: #4c586d;
  display: flex;
  font-size: 15px;
  gap: 8px;
}

.landing-proof span::before {
  background: #18a46c;
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.landing-product-preview {
  background: #fff;
  border: 1px solid #e2e8f2;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(18, 27, 43, 0.09);
  margin-top: 28px;
  max-width: 560px;
  padding: 16px;
}

.preview-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.preview-head span {
  color: #687487;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-head strong {
  background: #ecfdf4;
  border-radius: 999px;
  color: #12805a;
  font-size: 12px;
  padding: 5px 9px;
}

.preview-list {
  display: grid;
  gap: 8px;
}

.preview-list div {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
}

.preview-list span {
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.preview-list strong {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.preview-list em {
  color: #6b7586;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-auth-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 223, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(18, 27, 43, 0.14);
  padding: 22px;
  width: 100%;
}

.auth-only-card {
  margin: 46px auto 0;
  max-width: 470px;
}

.auth-preview-link {
  align-items: center;
  background: #f3f5ff;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 8px 12px;
}

.auth-preview-link:hover {
  background: #e9ecff;
}

#clerk-auth-root {
  display: flex;
  justify-content: center;
}

#clerk-auth-root > * {
  max-width: 100%;
}

.landing-auth-head {
  border-bottom: 1px solid #edf1f7;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.landing-auth-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-auth-head h2 {
  color: #172033;
  font-size: 24px;
  line-height: 1.15;
  margin: 7px 0 6px;
}

.landing-auth-head p {
  color: #647084;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.auth-brand {
  display: none;
  justify-content: center;
  margin-bottom: 34px;
}

.auth-brand .brand img {
  height: 96px;
}

.auth-panel h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 30px;
  text-align: center;
}

.landing-feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.landing-showcase {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.15fr 0.95fr 0.9fr;
  margin-top: 18px;
}

.showcase-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e4eaf3;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(18, 27, 43, 0.06);
  padding: 18px;
}

.showcase-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.showcase-card-head > span {
  align-items: center;
  background: #f0f2ff;
  border-radius: 10px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.showcase-card-head svg {
  height: 19px;
  width: 19px;
}

.showcase-card-head strong {
  color: #172033;
  display: block;
  font-size: 17px;
}

.showcase-card-head em {
  color: #687487;
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  margin-top: 2px;
}

.inventory-preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-preview-grid div,
.recipe-preview-list div {
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.inventory-preview-grid strong,
.recipe-preview-list strong {
  color: #172033;
  font-size: 15px;
}

.inventory-preview-grid span,
.recipe-preview-list span {
  color: #566176;
  font-size: 13px;
  font-weight: 700;
}

.inventory-preview-grid em,
.recipe-preview-list em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.recipe-preview-list,
.shopping-preview-list {
  display: grid;
  gap: 10px;
}

.shopping-preview-list label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  color: #172033;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.shopping-preview-list input {
  accent-color: var(--primary);
  box-shadow: none;
  flex: 0 0 auto;
  height: 16px;
  min-height: 16px;
  padding: 0;
  width: 16px;
}

.landing-feature-grid article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(18, 27, 43, 0.05);
  padding: 20px;
}

.landing-feature-grid article > span {
  align-items: center;
  background: #f0f2ff;
  border-radius: 9px;
  color: var(--primary);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  margin-bottom: 14px;
  width: 36px;
}

.landing-feature-grid .icon,
.landing-feature-grid svg {
  height: 18px;
  width: 18px;
}

.landing-feature-grid h3 {
  color: #172033;
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.landing-feature-grid p {
  color: #5e6777;
  font-size: 14px;
  line-height: 1.48;
  margin: 0;
}

.landing-bottom {
  align-items: center;
  background: #172033;
  border-radius: 16px;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 18px 0 0;
  padding: 30px;
}

.landing-bottom .landing-kicker {
  color: #c7c2ff;
  margin-bottom: 8px;
}

.landing-bottom h2 {
  font-size: 28px;
  line-height: 1.12;
  margin: 0;
}

.landing-bottom p {
  color: #c7cedb;
  font-size: 15px;
  line-height: 1.55;
  margin: 10px 0 0;
  max-width: 720px;
}

.landing-bottom .btn {
  flex: 0 0 auto;
  width: auto;
}

.landing-legal {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  padding: 18px 0 4px;
  text-align: center;
}

.ownership-notice {
  margin: 0;
}

.auth-ownership {
  border-top: 1px solid var(--line);
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
  padding-top: 14px;
  text-align: center;
}

.landing-topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(248, 249, 252, 0.86);
  border: 1px solid rgba(226, 232, 242, 0.78);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(18, 27, 43, 0.06);
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr auto;
  margin-bottom: 38px;
  padding: 12px 18px;
  position: sticky;
  top: 12px;
  z-index: 30;
}

.landing-section-links {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: center;
}

.landing-section-links a {
  color: #596274;
  font-size: 14px;
  font-weight: 900;
}

.landing-section-links a:hover {
  color: var(--primary);
}

.stitch-hero {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  padding: 74px 0 56px;
}

.stitch-hero-copy h1 {
  color: #111827;
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 0;
  max-width: 650px;
}

.stitch-hero-copy h1 span {
  color: var(--primary);
}

.stitch-hero-copy p {
  color: #566176;
  font-size: 18px;
  line-height: 1.65;
  margin: 24px 0 0;
  max-width: 610px;
}

.landing-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.landing-status-row span {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #4b5567;
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
}

.stitch-dashboard {
  background: #fff;
  border: 1px solid #e4e8f1;
  border-radius: 32px;
  box-shadow: 0 28px 80px rgba(54, 0, 224, 0.08), 0 12px 36px rgba(18, 27, 43, 0.08);
  display: grid;
  gap: 22px;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  padding: 22px;
}

.stitch-dashboard-side {
  border-right: 1px solid #edf0f5;
  display: grid;
  gap: 10px;
  padding-right: 18px;
}

.stitch-dashboard-side button {
  align-items: center;
  background: transparent;
  border-radius: 12px;
  color: #687487;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 10px;
  min-height: 42px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.stitch-dashboard-side button.active,
.stitch-dashboard-side button:hover {
  background: var(--primary);
  color: var(--primary);
}

.stitch-dashboard-side button.active {
  color: #fff;
}

.stitch-dashboard-side button:hover:not(.active) {
  background: #eef0ff;
  color: var(--primary);
}

.stitch-dashboard-side svg {
  height: 18px;
  width: 18px;
}

.stitch-dashboard-main {
  display: grid;
  gap: 18px;
}

.mock-page-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.mock-page-head span {
  color: #687487;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mock-page-head strong {
  color: #111827;
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.mock-page-head a {
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  padding: 10px 14px;
}

.inventory-mock-grid article {
  min-height: 116px;
}

.shopping-mock-list {
  background: #f2f3f8;
  border-radius: 24px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.landing-recipe-preview-list {
  background: #f2f3f8;
  border-radius: 24px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.landing-recipe-preview-list article {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  display: grid;
  gap: 6px;
  padding: 15px;
}

.landing-recipe-preview-list strong {
  color: #111827;
  font-size: 17px;
}

.landing-recipe-preview-list span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.landing-recipe-preview-list em {
  color: #687487;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.stitch-dashboard .shopping-mock-list {
  font-size: 14px;
}

.shopping-mock-list div {
  align-items: center;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 14px;
}

.shopping-mock-list div > * {
  min-width: 0;
}

.shopping-mock-list span {
  align-items: center;
  background: #eef0ff;
  border-radius: 999px;
  color: var(--primary);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.shopping-mock-list strong {
  color: #111827;
  display: block;
  font-size: 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-mock-list em {
  color: #687487;
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.stitch-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stitch-metrics div {
  background: #f8f9fc;
  border: 1px solid #edf0f5;
  border-radius: 20px;
  display: grid;
  gap: 7px;
  padding: 18px;
}

.stitch-metrics span {
  color: #687487;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stitch-metrics strong {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.stitch-metrics .warn {
  color: #ba1a1a;
}

.stitch-metrics .good {
  color: #006e2f;
}

.stitch-mini-grid {
  background: #f2f3f8;
  border-radius: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.stitch-mini-grid article,
.pantry-grid article {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.stitch-mini-grid span,
.pantry-grid h3 {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
}

.stitch-mini-grid strong,
.pantry-grid p {
  color: #566176;
  font-size: 14px;
}

.stitch-mini-grid em,
.pantry-grid em {
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.landing-alert-section,
.pantry-section,
.landing-capability-section,
.recipe-shopping-section,
.savings-section,
.spaces-section {
  margin-top: 34px;
}

#welcome-features,
#welcome-scan,
#welcome-recipes,
#welcome-planning,
#welcome-spaces {
  scroll-margin-top: 128px;
}

.landing-section-head {
  margin-bottom: 24px;
}

.landing-section-head h2 {
  color: #111827;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.landing-section-head p {
  color: #566176;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 780px;
}

.expiry-card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expiry-card {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(18, 27, 43, 0.05);
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.expiry-card.urgent {
  border-color: #ffd4d4;
}

.expiry-pill {
  background: #ba1a1a;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
  position: absolute;
  right: 18px;
  text-transform: uppercase;
  top: 18px;
}

.food-icon {
  align-items: center;
  background: #f2f3f6;
  border-radius: 16px;
  display: flex;
  font-size: 30px;
  height: 64px;
  justify-content: center;
  margin-bottom: 12px;
  width: 64px;
}

.expiry-card h3 {
  color: #111827;
  font-size: 21px;
  margin: 0;
}

.expiry-card p {
  color: #687487;
  font-weight: 800;
  margin: 0;
}

.expiry-card strong {
  color: #f59e0b;
  font-size: 24px;
  margin-top: 10px;
}

.expiry-card.urgent strong {
  color: #ba1a1a;
}

.expiry-card a {
  align-self: start;
  background: #f2f0ff;
  border-radius: 999px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  margin-top: 8px;
  padding: 10px 13px;
}

.pantry-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stock {
  align-self: start;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  justify-self: start;
  padding: 5px 9px;
}

.stock.good {
  background: #d9ffe4;
  color: #005321;
}

.stock.mid {
  background: #e1e0ff;
  color: #2e2dbe;
}

.stock.low {
  background: #ffdad6;
  color: #93000a;
}

.pantry-grid i {
  background: #e7e8eb;
  border-radius: 999px;
  display: block;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  position: relative;
}

.pantry-grid i::after {
  background: var(--primary);
  border-radius: inherit;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: var(--fill);
}

.landing-capability-section {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 32px;
  box-shadow: 0 16px 44px rgba(18, 27, 43, 0.05);
  padding: 34px;
}

.landing-capability-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-capability-grid article {
  background: #f8f9fc;
  border: 1px solid #edf0f5;
  border-radius: 20px;
  display: grid;
  gap: 10px;
  padding: 20px;
}

.landing-capability-grid .product-picture-feature {
  background: #fbfcff;
}

.landing-capability-grid article > span {
  align-items: center;
  background: #eef0ff;
  border-radius: 14px;
  color: var(--primary);
  display: flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.landing-product-photo-mock {
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #e4e9f4;
  border-radius: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 88px;
  padding: 14px;
}

.landing-product-photo-mock span {
  background-position: center;
  background-size: cover;
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(18, 27, 43, 0.1);
  display: block;
  height: 56px;
  width: 48px;
}

.landing-product-photo-mock span:nth-child(1) {
  background-image: linear-gradient(135deg, #f7d487, #b94c3f);
  transform: rotate(-5deg);
}

.landing-product-photo-mock span:nth-child(2) {
  background-image: linear-gradient(135deg, #dbeafe, #6366f1);
  transform: translateY(-3px);
}

.landing-product-photo-mock span:nth-child(3) {
  background-image: linear-gradient(135deg, #bbf7d0, #10b981);
  transform: rotate(5deg);
}

.landing-capability-grid svg {
  height: 22px;
  width: 22px;
}

.landing-capability-grid h3 {
  color: #111827;
  font-size: 20px;
  margin: 4px 0 0;
}

.landing-capability-grid p {
  color: #566176;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
}

.recipe-shopping-section {
  background: #f2f3f6;
  border-radius: 32px;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  padding: 34px;
}

.landing-recipe-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-recipe-grid article {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(18, 27, 43, 0.06);
  overflow: hidden;
}

.recipe-photo {
  background-position: center;
  background-size: cover;
  min-height: 178px;
}

.recipe-photo.pasta-bake {
  background-image:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.5), transparent 20%),
    linear-gradient(135deg, #d87530, #f3bf6a 46%, #557a31);
}

.recipe-photo.berry-bowl {
  background-image:
    radial-gradient(circle at 35% 40%, #f04e75 0 12%, transparent 13%),
    radial-gradient(circle at 65% 42%, #f04e75 0 11%, transparent 12%),
    linear-gradient(135deg, #fff4f7, #f8ced9 48%, #d74868);
}

.landing-recipe-grid article > div:last-child {
  padding: 20px;
}

.landing-recipe-grid h3 {
  color: #111827;
  font-size: 20px;
  margin: 0 0 8px;
}

.landing-recipe-grid p {
  color: #566176;
  font-weight: 800;
  margin: 0 0 12px;
}

.landing-recipe-grid span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.smart-list-panel {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 28px;
  box-shadow: 0 16px 44px rgba(18, 27, 43, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.landing-work-note {
  background: #fff7df;
  border: 1px solid #ffe2a6;
  border-radius: 14px;
  color: #7a4a00;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  margin: 12px 0 0;
  padding: 12px 14px;
}

.smart-list-items {
  display: grid;
  gap: 12px;
}

.smart-list-items div {
  align-items: center;
  background: #f8f9fc;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 13px;
}

.smart-list-items span {
  align-items: center;
  background: #eef0ff;
  border-radius: 999px;
  color: var(--primary);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.smart-list-items strong {
  color: #111827;
}

.smart-list-items em {
  color: #687487;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.savings-section {
  background: #111827;
  border-radius: 32px;
  color: #fff;
  padding: 34px;
}

.savings-section .landing-section-head h2,
.savings-section .landing-section-head p {
  color: #fff;
}

.savings-section .landing-section-head p {
  color: #cdd3df;
  font-size: 17px;
  line-height: 1.6;
  max-width: 780px;
}

.savings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.savings-grid article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.savings-grid span {
  color: #e1ddff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.savings-section .landing-kicker {
  color: #8db7ff;
  text-shadow: 0 0 20px rgba(141, 183, 255, 0.34);
}

.savings-grid strong {
  color: #fff;
  font-size: 30px;
  line-height: 1.1;
}

.savings-grid p {
  color: #cdd3df;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.price-history-chart {
  background:
    radial-gradient(circle at 12% 18%, rgba(108, 99, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(141, 183, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  padding: 12px;
}

.price-history-chart svg {
  display: block;
  height: auto;
  width: 100%;
}

.chart-grid path {
  fill: none;
  stroke: rgba(226, 232, 255, 0.18);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.chart-fill {
  fill: rgba(94, 178, 255, 0.12);
}

.chart-line {
  fill: none;
  filter: drop-shadow(0 0 12px rgba(91, 231, 255, 0.34));
  stroke: #5be7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.chart-points circle {
  fill: #111827;
  stroke: #8df2ff;
  stroke-width: 6;
}

.chart-labels text {
  fill: #dbe6ff;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
}

.spaces-section {
  align-items: center;
  display: grid;
  gap: 52px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  padding: 56px 0;
}

.spaces-section h2 {
  color: #111827;
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
}

.spaces-section p {
  color: #566176;
  font-size: 18px;
  line-height: 1.6;
  max-width: 650px;
}

.spaces-section ul {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.spaces-section li {
  color: #111827;
  font-weight: 900;
}

.spaces-section li::before {
  color: #006e2f;
  content: "✓";
  margin-right: 10px;
}

.space-preview-card {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 36px;
  box-shadow: 0 24px 70px rgba(54, 0, 224, 0.08);
  display: grid;
  gap: 14px;
  padding: 28px;
}

.space-avatars {
  display: flex;
}

.space-avatars span {
  align-items: center;
  background: #e1e0ff;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #2e2dbe;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  margin-right: -10px;
  width: 44px;
}

.space-preview-card > strong {
  color: #111827;
  font-size: 18px;
}

.space-preview-card > div:not(.space-avatars) {
  align-items: center;
  background: #f2f3f6;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  padding: 14px;
}

.space-preview-card em {
  color: #687487;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.pricing-section {
  margin-top: 34px;
}

.pricing-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-grid article {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 28px;
  box-shadow: 0 16px 44px rgba(18, 27, 43, 0.06);
  display: grid;
  gap: 16px;
  padding: 26px;
}

.pricing-grid .featured-plan {
  border-color: rgba(79, 57, 246, 0.35);
  box-shadow: 0 24px 70px rgba(54, 0, 224, 0.12);
}

.plan-name {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-grid strong {
  color: #111827;
  font-size: 36px;
  line-height: 1;
}

.pricing-grid p {
  color: #566176;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.pricing-grid ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing-grid li {
  color: #111827;
  font-weight: 800;
}

.pricing-grid li::before {
  color: #006e2f;
  content: "✓";
  margin-right: 10px;
}

.field-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.field {
  margin-bottom: 18px;
}

.label-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

label,
.label-line span {
  color: #2b3446;
  display: block;
  font-size: 14px;
  font-weight: 500;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  min-height: 52px;
  outline: none;
  padding: 13px 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

select {
  min-width: 210px;
  padding-right: 40px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.14), var(--shadow);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: -8px 0 16px;
}

.btn {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  line-height: 1.35;
  min-height: 42px;
  padding: 10px 16px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  box-shadow: var(--shadow);
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-danger {
  background: #fff;
  border: 1px solid #ffd2d2;
  box-shadow: var(--shadow);
  color: var(--red);
}

.btn-danger:hover {
  background: #fff1f1;
  border-color: #ffbbbb;
}

.btn-small {
  min-height: 36px;
  padding: 8px 12px;
  width: auto;
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: #596274;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.divider {
  align-items: center;
  color: #727b8d;
  display: flex;
  font-size: 14px;
  gap: 14px;
  margin: 26px 0 20px;
}

.divider::before,
.divider::after {
  background: var(--line);
  content: "";
  flex: 1;
  height: 1px;
}

.social-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.auth-footer {
  color: var(--muted);
  font-size: 14px;
  margin-top: 28px;
  text-align: center;
}

.check-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.check-row input {
  box-shadow: none;
  flex: 0 0 auto;
  height: 16px;
  margin-top: 2px;
  padding: 0;
  width: 16px;
}

.check-row label {
  color: #2f394b;
  font-size: 14px;
  line-height: 1.4;
}

.preference-title {
  color: #2f394b;
  font-size: 14px;
  font-weight: 500;
  margin: 22px 0 8px;
}

.app-layout {
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  transition: grid-template-columns 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar-restore-btn,
.sidebar-collapse-btn {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #4b5870;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-restore-btn svg,
.sidebar-collapse-btn svg {
  height: 16px;
  width: 16px;
}

.sidebar-restore-btn {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(38, 49, 66, 0.14);
  left: 18px;
  min-height: 34px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 18px;
  transform: translateY(-8px);
  z-index: 12;
}

.sidebar-collapsed .sidebar-restore-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sidebar-collapse-btn {
  background: #f8fafc;
  margin: 10px 4px 12px;
  width: calc(100% - 8px);
}

.sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar-restore-btn:hover,
.sidebar-collapse-btn:hover {
  background: #eef0ff;
  border-color: #cfd7ff;
  box-shadow: 0 12px 28px rgba(79, 57, 246, 0.12);
  color: var(--primary);
  transform: translateY(-1px);
}

.sidebar-collapsed .sidebar-restore-btn:hover {
  transform: translateY(-1px);
}

.sidebar-restore-btn:focus-visible,
.sidebar-collapse-btn:focus-visible {
  outline: 3px solid rgba(79, 57, 246, 0.22);
  outline-offset: 3px;
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  transition: opacity 240ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1), visibility 340ms ease;
  width: 264px;
  z-index: 10;
}

.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
  visibility: hidden;
}

.sidebar .brand {
  align-items: center;
  display: flex;
  justify-content: center;
  font-size: 22px;
  margin: 0 8px 24px;
  width: calc(100% - 16px);
}

.sidebar .brand img {
  display: block;
  height: 92px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: #404a5d;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  gap: 12px;
  min-height: 40px;
  padding: 9px 12px;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: #f0f2ff;
  color: var(--primary);
}

.nav svg,
.icon {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-ownership {
  color: #7a8392;
  font-size: 10px;
  line-height: 1.35;
  margin-top: 10px;
}

.plan-box {
  background: var(--panel-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.plan-box strong {
  display: block;
  font-size: 14px;
}

.plan-box span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
}

.main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px clamp(18px, 3vw, 34px);
  position: sticky;
  top: 0;
  z-index: 3;
}

.sidebar-collapsed .topbar {
  padding-left: max(178px, clamp(18px, 3vw, 34px));
}

.mobile-brand {
  display: none;
}

.mobile-brand .brand img {
  height: 42px;
}

.search-wrap {
  max-width: 520px;
  position: relative;
  width: 42vw;
}

.search-wrap input {
  height: 42px;
  padding-left: 40px;
}

.search-wrap svg {
  color: #8892a5;
  left: 14px;
  position: absolute;
  top: 12px;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.profile-menu-wrap {
  display: inline-flex;
  position: relative;
}

.profile-trigger {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  padding: 0;
}

.profile-trigger:focus-visible {
  outline: 3px solid rgba(79, 57, 246, 0.22);
  outline-offset: 3px;
}

.profile-dropdown {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
  min-width: 150px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
}

.profile-dropdown button {
  background: transparent;
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: 100%;
}

.profile-dropdown button:hover {
  background: #f4f2ff;
  color: var(--primary);
}

.mobile-nav {
  display: none;
}

.avatar {
  align-items: center;
  background: #1f2937;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  width: 38px;
}

.avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.content {
  margin: 0 auto;
  max-width: 1320px;
  padding: 28px clamp(18px, 3vw, 34px) 42px;
  width: 100%;
}

.page-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-head h1,
.section h2 {
  margin: 6px 0 6px;
}

.page-head h1 {
  font-size: 28px;
  line-height: 1.12;
}

.page-head p {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  max-width: 660px;
}

.inventory-back-btn {
  background: #fff;
  border-radius: 999px;
  color: #4b5567;
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 36px;
  padding: 8px 14px;
  width: auto;
}

.page-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.page-actions .btn-primary {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
}

.page-actions .btn-danger {
  flex: 0 0 auto;
  min-width: 126px;
}

.inventory-action-stack {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e3e9f3;
  border-radius: 10px;
  box-shadow: var(--shadow);
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
  padding: 5px;
  width: auto;
}

.inventory-action-stack .btn {
  border-radius: 7px;
  box-shadow: none;
  min-height: 40px;
  min-width: 126px;
  padding: 9px 14px;
  width: auto;
}

.inventory-action-stack .btn-secondary {
  background: transparent;
  border-color: transparent;
}

.inventory-action-stack .btn-secondary:hover {
  background: #f3f6fb;
  border-color: transparent;
}

.add-choice-dialog {
  max-width: 520px;
}

.add-choice-intro {
  background: #f7f8ff;
  border: 1px solid #e6e9f7;
  border-radius: 10px;
  margin-top: 16px;
  padding: 18px;
}

.add-choice-intro h3 {
  color: var(--ink);
  font-size: 20px;
  margin: 0 0 8px;
}

.add-choice-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.add-choice-intro span {
  color: var(--primary);
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  margin-top: 12px;
}

.add-choice-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.add-choice-actions .btn {
  min-height: 52px;
}

.scan-overlay {
  align-items: center;
  background: rgba(74, 83, 99, 0.72);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 28px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 40;
}

.scan-dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(18, 27, 43, 0.26);
  max-height: min(92vh, 940px);
  max-width: 760px;
  overflow-y: auto;
  padding: 20px 22px 22px;
  position: relative;
  width: min(780px, 92vw);
}

.scan-dialog h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

.scan-close {
  align-items: center;
  background: transparent;
  color: #9aa3b2;
  display: flex;
  font-size: 42px;
  font-weight: 300;
  height: 46px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 28px;
  top: 24px;
  width: 46px;
}

.scanner-window {
  background: #3d4755;
  border-radius: 8px;
  height: 370px;
  overflow: hidden;
  position: relative;
}

.scan-video {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 0;
}

.scanner-window::after {
  background: rgba(20, 25, 32, 0.38);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.scanner-scene {
  background: linear-gradient(145deg, #9aa5b5 0%, #717d8e 48%, #586373 100%);
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.scanner-window.is-live .scanner-scene {
  display: none;
}

.shelf-line {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  height: 12px;
  position: absolute;
}

.line-a {
  left: 8%;
  top: 42%;
  transform: rotate(-8deg);
  width: 62%;
}

.line-b {
  bottom: 24%;
  left: 0;
  width: 100%;
}

.line-c {
  right: 10%;
  top: 20%;
  transform: rotate(17deg);
  width: 28%;
}

.product-box {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  bottom: 23%;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
  display: block;
  height: 132px;
  position: absolute;
  width: 96px;
}

.box-a {
  left: 25%;
}

.box-b {
  right: 24%;
}

.product-box i {
  background: repeating-linear-gradient(90deg, #202938 0 3px, transparent 3px 7px);
  display: block;
  height: 34px;
  margin: 54px auto 0;
  width: 58px;
}

.barcode-card {
  background: #f5f6f8;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.2);
  height: 86px;
  left: 44%;
  position: absolute;
  top: 39%;
  transform: rotate(1deg);
  width: 154px;
}

.barcode-card::after {
  background: repeating-linear-gradient(90deg, #172033 0 3px, transparent 3px 8px, #172033 8px 10px, transparent 10px 14px);
  content: "";
  height: 42px;
  left: 24px;
  position: absolute;
  top: 22px;
  width: 106px;
}

.scan-frame {
  height: 190px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 330px;
  z-index: 2;
}

.scan-frame span {
  border-color: #fff;
  border-style: solid;
  height: 68px;
  position: absolute;
  width: 68px;
}

.scan-frame span:nth-child(1) {
  border-width: 8px 0 0 8px;
  left: 0;
  top: 0;
}

.scan-frame span:nth-child(2) {
  border-width: 8px 8px 0 0;
  right: 0;
  top: 0;
}

.scan-frame span:nth-child(3) {
  border-width: 0 0 8px 8px;
  bottom: 0;
  left: 0;
}

.scan-frame span:nth-child(4) {
  border-width: 0 8px 8px 0;
  bottom: 0;
  right: 0;
}

.scan-dialog h3 {
  color: #4b5567;
  font-size: 20px;
  margin: 28px 0 10px;
  text-align: center;
}

.scan-dialog p {
  color: #747d8e;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 auto 24px;
  max-width: 620px;
  text-align: center;
}

.location-dialog {
  max-width: 860px;
  padding: 28px;
  width: min(900px, 94vw);
}

.photo-capture-dialog {
  max-width: 880px;
  width: min(900px, 94vw);
}

.photo-capture-intro {
  margin: 0 0 16px;
  max-width: 680px;
  text-align: left;
}

.photo-capture-form {
  display: grid;
  gap: 14px;
}

.photo-capture-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-capture-card {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #253047;
  display: grid;
  gap: 7px;
  min-height: 172px;
  padding: 14px;
}

.photo-capture-card .btn {
  min-height: 40px;
}

.photo-preview-box {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  display: block;
  overflow: hidden;
}

.photo-preview-box[hidden] {
  display: none;
}

.photo-preview-box img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.photo-capture-icon {
  align-items: center;
  background: #eef0ff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.photo-capture-card strong {
  font-size: 16px;
}

.photo-capture-card small,
.photo-file-name,
.photo-capture-status {
  color: #687487;
  font-size: 13px;
  line-height: 1.4;
}

.photo-capture-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-top: 2px;
}

.photo-take-btn {
  padding-left: 12px;
  padding-right: 12px;
}

.photo-file-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-capture-status {
  background: #eef7f2;
  border-radius: 8px;
  color: #08794d;
  font-weight: 700;
  padding: 10px 12px;
}

.photo-camera-dialog {
  max-width: 980px;
  width: min(980px, 94vw);
}

.photo-camera-stage {
  background: #111827;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  color: #fff;
  overflow: hidden;
  padding: 12px;
}

.photo-camera-stage video {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  transform: none;
  width: 100%;
}

.photo-camera-footer {
  align-items: center;
  background: #111827;
  border-radius: 0 0 14px 14px;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: -12px;
  padding: 14px 16px 16px;
}

.photo-camera-footer span {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.photo-camera-footer .btn-primary {
  flex: 1 1 280px;
}

.location-modal-intro {
  margin: 18px 0 16px;
}

.location-modal-intro h3 {
  color: #44506a;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 8px;
  text-align: left;
}

.location-modal-intro p {
  margin: 0;
  max-width: none;
  text-align: left;
}

.location-modal-form {
  display: grid;
  gap: 12px;
}

.location-modal-form label {
  color: #4b5567;
  font-size: 13px;
  font-weight: 700;
}

.location-modal-form input {
  min-height: 54px;
}

.location-modal-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}

.location-modal-actions .btn {
  min-height: 52px;
}

.scan-cancel {
  width: 100%;
}

.scan-loading {
  margin-top: 8px;
}

.scan-loading-pill {
  align-items: center;
  background: #e8eef9;
  border-radius: 14px;
  color: #274ab7;
  display: flex;
  font-size: 18px;
  gap: 14px;
  min-height: 110px;
  padding: 20px 26px;
}

.scan-spinner {
  animation: spin 900ms linear infinite;
  border: 6px solid #b9d1f3;
  border-radius: 999px;
  border-top-color: #5ea4f6;
  display: inline-block;
  height: 44px;
  width: 44px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.scan-result {
  border-radius: 14px;
  margin-top: 8px;
  padding: 14px;
}

.scan-result-good {
  background: #e8f4ec;
}

.scan-result-head {
  align-items: center;
  color: #0a7b48;
  display: flex;
  font-size: 22px;
  font-weight: 700;
  gap: 10px;
}

.scan-result-icon {
  align-items: center;
  border: 3px solid #00c766;
  border-radius: 999px;
  display: inline-flex;
  font-size: 16px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.scan-result-image-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.scan-result-image {
  background: #fff;
  border-radius: 16px;
  height: 160px;
  object-fit: contain;
  padding: 10px;
  width: min(240px, 100%);
}

.scan-result-image-empty {
  align-items: center;
  color: #728099;
  display: flex;
  justify-content: center;
}

.scan-result h3 {
  color: #162238;
  font-size: 20px;
  line-height: 1.15;
  margin: 0 0 8px;
  text-align: left;
}

.scan-result-lines {
  color: #39475e;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  max-width: none;
  text-align: left;
}

.scan-confirm {
  border: 1px solid #d3d8e3;
  border-radius: 18px;
  margin-top: 18px;
  padding: 18px 18px 16px;
}

.scan-confirm h3 {
  color: #1a2437;
  font-size: 28px;
  margin: 0 0 12px;
}

.scan-confirm-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.scan-yes,
.scan-no {
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  min-height: 46px;
}

.scan-yes {
  background: #05a93e;
  color: #fff;
}

.scan-no {
  background: #fff;
  border: 1px solid #c6cfde;
  color: #384456;
}

.scan-adjust {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.scan-barcode-box {
  align-items: center;
  border: 1px solid #d3d8e3;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px;
}

.scan-barcode-box span {
  color: #687487;
  font-size: 14px;
}

.scan-barcode-box strong {
  color: #162238;
  font-size: 17px;
  letter-spacing: 1px;
}

.scan-field-label {
  color: #39475e;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.scan-adjust select {
  appearance: none;
  background: #fff;
  border: 1px solid #dbe2ee;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(22, 34, 56, 0.08);
  color: #162238;
  font: inherit;
  font-weight: 700;
  min-height: 46px;
  padding: 0 14px;
}

.scan-adjust-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.scan-remove {
  background: #f60013;
  color: #fff;
  font-size: 14px;
  min-height: 46px;
}

.scan-remove:hover {
  background: #d70011;
}

.scan-error {
  background: #fff2f2;
  border: 1px solid #ffd5d5;
  border-radius: 12px;
  margin-top: 8px;
  padding: 16px;
}

.scan-error h3 {
  color: #7a1f1f;
  margin: 0 0 6px;
  text-align: left;
}

.scan-error p {
  margin: 0;
  max-width: none;
  text-align: left;
}

.scan-error-barcode {
  background: #fff;
  border: 1px solid #ffcaca;
  border-radius: 12px;
  color: #293449;
  display: inline-flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
}

.scan-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.grid {
  display: grid;
  gap: 18px;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.item-card,
.recipe-card,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 16px 18px;
  position: relative;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.metric-card small {
  color: var(--green);
  display: block;
  font-size: 13px;
  margin-top: 8px;
}

.expiry-window-wrap {
  margin-top: 8px;
  position: relative;
}

.expiry-window-trigger {
  background: transparent;
  color: var(--green);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.expiry-window-trigger:hover {
  color: #128356;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.expiry-window-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.16);
  left: 0;
  min-width: 150px;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 20;
}

.expiry-window-menu button {
  background: transparent;
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.expiry-window-menu button:hover,
.expiry-window-menu button.active {
  background: #f1fbf6;
  color: var(--green);
}

.two-col {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  margin-top: 18px;
}

.dashboard-main {
  display: grid;
  margin-top: 18px;
}

.panel {
  padding: 18px 20px;
}

.panel-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head h2,
.panel-head h3 {
  font-size: 18px;
  margin: 0;
}

.table {
  border-collapse: collapse;
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid #edf1f7;
  font-size: 14px;
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: #6f7889;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-status {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 210px;
}

.item-name {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 700;
}

.food-dot {
  align-items: center;
  border-radius: 7px;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.product-thumb {
  background: #f4f6fb;
  border: 1px solid var(--line);
  border-radius: 7px;
  flex: 0 0 auto;
  height: 32px;
  object-fit: cover;
  width: 32px;
}

.item-card-thumb {
  border-radius: 8px;
  height: 42px;
  width: 42px;
}

.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.tag.good {
  background: #e9f8f1;
  color: #08794d;
}

.tag.warn {
  background: #fff3dc;
  color: #94610c;
}

.tag.low {
  background: #ffe9e9;
  color: #af3030;
}

.tag.neutral {
  background: #eef2f7;
  color: #4f5b6e;
}

.inventory-grid,
.recipe-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  justify-content: start;
}

.item-card,
.recipe-card {
  overflow: hidden;
}

.recipe-card {
  color: inherit;
  display: block;
  padding: 0;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  width: 100%;
}

.recipe-card:hover {
  border-color: #c9d2e3;
  box-shadow: 0 10px 24px rgba(18, 27, 43, 0.12);
  transform: translateY(-1px);
}

.item-card {
  position: relative;
  padding: 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.item-card:hover {
  border-color: #cfd7ff;
  box-shadow: 0 10px 24px rgba(18, 27, 43, 0.1);
  transform: translateY(-1px);
}

.item-card-head {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.item-card .item-name {
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.item-card .item-name > div {
  display: grid;
  min-width: 0;
}

.item-card .item-name h3 {
  font-size: 14px;
  line-height: 1.22;
}

.item-card-actions {
  align-items: flex-end;
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  justify-items: end;
}

.item-card-actions .tag {
  font-size: 11px;
  padding: 4px 8px;
}

.card-menu {
  height: 24px;
  position: relative;
  width: 24px;
}

.menu-trigger {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 6px;
  color: #697386;
  display: flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.menu-trigger:hover {
  background: #f0f3f8;
  color: var(--ink);
}

.menu-popover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.16);
  right: 0;
  min-width: 132px;
  padding: 6px;
  position: absolute;
  top: 34px;
  z-index: 5;
}

.menu-popover button {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  width: 100%;
}

.menu-edit {
  color: var(--primary);
}

.menu-delete {
  color: var(--red);
}

.menu-edit:hover {
  background: #eef0ff;
}

.menu-delete:hover {
  background: #fff1f1;
}

.edit-product-page {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.edit-product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.edit-product-editor {
  display: grid;
  gap: 18px;
}

.edit-product-hero {
  align-items: stretch;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.edit-product-hero > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.edit-product-dot {
  height: 58px;
  width: 58px;
}

.product-photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.product-photo-strip figure {
  display: grid;
  flex: 0 0 96px;
  gap: 6px;
  margin: 0;
}

.product-photo-strip img {
  aspect-ratio: 1;
  background: #f4f6fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-photo-strip figcaption {
  color: #6b7486;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-photo-strip {
  margin-bottom: 8px;
}

.summary-photo-strip figure {
  flex-basis: 78px;
}

.product-picture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-picture-actions .btn {
  min-height: 42px;
}

.edit-product-image,
.summary-product-image {
  background: #f4f6fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.edit-product-image {
  height: 64px;
  width: 64px;
}

.summary-product-image {
  aspect-ratio: 16 / 10;
  height: auto;
  margin-bottom: 4px;
  object-fit: contain;
  padding: 8px;
  width: 100%;
}

.edit-product-hero h2,
.edit-product-card h2 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.edit-product-hero p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.edit-hero-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edit-form-sections {
  display: grid;
  gap: 14px;
}

.edit-form-section {
  border-top: 1px solid #edf1f7;
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.edit-form-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.edit-section-head {
  display: grid;
  gap: 3px;
}

.edit-section-head h3 {
  font-size: 15px;
  margin: 0;
}

.edit-section-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.edit-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-form-grid label {
  color: #4b5567;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.edit-form-grid label.wide {
  grid-column: 1 / -1;
}

.edit-form-grid input,
.edit-form-grid select {
  box-shadow: none;
  min-height: 46px;
}

.barcode-field {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 86px;
}

.barcode-field .btn {
  min-height: 46px;
}

.edit-form-grid input[type="color"] {
  padding: 6px;
}

.edit-form-grid input.is-looking-up {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.14), var(--shadow);
}

.edit-done-btn {
  border-radius: 16px;
  font-size: 17px;
  justify-content: center;
  margin-top: 6px;
  min-height: 58px;
  width: 100%;
}

.summary-list {
  display: grid;
  gap: 0;
}

.summary-list > div:not(.product-photo-strip) {
  border-bottom: 1px solid #edf1f7;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
}

.summary-list > div:not(.product-photo-strip) span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-list > div:not(.product-photo-strip) strong {
  color: var(--ink);
  font-size: 13px;
  max-width: 58%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-product-summary {
  position: sticky;
  top: 88px;
}

.edit-product-summary .panel-head {
  margin-bottom: 12px;
}

.edit-product-summary .panel-head .tag {
  flex: 0 0 auto;
}

.item-card h3,
.recipe-card h3 {
  font-size: 17px;
  margin: 0;
}

.item-meta {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.item-meta strong {
  color: var(--ink);
}

.expiry-note {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-self: start;
  padding: 5px 9px;
}

.expiry-note.soon {
  background: #fff3dc;
  color: #94610c;
}

.expiry-note.expired {
  background: #ffe9e9;
  color: #af3030;
}

.quantity-line {
  align-items: center;
  background: #f7f9fd;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding: 8px 9px;
}

.quantity-line > span {
  display: grid;
  gap: 2px;
}

.quantity-line small,
.item-detail-row span {
  color: #758095;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.quantity-line strong {
  font-size: 15px;
  line-height: 1.1;
}

.stepper {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  overflow: hidden;
}

.stepper button {
  align-items: center;
  background: transparent;
  color: var(--primary);
  display: flex;
  height: 26px;
  justify-content: center;
  width: 28px;
}

.stepper button:hover {
  background: #eceeff;
}

.stepper .icon {
  height: 13px;
  width: 13px;
}

.stepper span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

.item-detail-row {
  background: #fbfcfe;
  border: 1px solid #edf1f7;
  border-radius: 7px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px;
}

.item-detail-row strong {
  color: #4b5567;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-detail-row.important strong {
  color: var(--ink);
  font-size: 12px;
}

.empty-state {
  align-items: center;
  background: #fff;
  border: 1px dashed #cfd7e5;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

.recipe-image {
  align-items: end;
  background: linear-gradient(135deg, #1a7f58, #f2be5c);
  color: #fff;
  display: flex;
  font-size: 42px;
  font-weight: 800;
  height: 140px;
  padding: 16px;
}

.recipe-image img {
  height: calc(100% + 32px);
  margin: -16px;
  object-fit: cover;
  width: calc(100% + 32px);
}

.recipe-card .body {
  padding: 16px;
}

.recipe-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.recipe-mode-row button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4b5567;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 16px;
}

.recipe-mode-row button.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

.recipe-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 8px 0 14px;
}

.recipe-uses {
  color: #3f4a5e;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.recipe-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-back-recipes] .icon {
  transform: rotate(180deg);
}

.recipe-detail {
  display: grid;
  gap: 18px;
}

.recipe-hero {
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  overflow: hidden;
}

.recipe-hero .recipe-image {
  height: 100%;
  min-height: 220px;
}

.recipe-hero > div:last-child {
  align-content: center;
  display: grid;
  gap: 12px;
  padding: 24px;
}

.recipe-hero .tag {
  justify-self: start;
}

.recipe-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-meta > span:not(.tag),
.source-link {
  background: #f3f6fb;
  border-radius: 999px;
  color: #4e596c;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  width: max-content;
}

a.source-link {
  color: var(--primary);
}

.recipe-hero h2 {
  font-size: 24px;
  margin: 0;
}

.recipe-hero p {
  color: var(--muted);
  margin: 0;
}

.recipe-detail-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.recipe-list,
.recipe-steps {
  margin: 0;
  padding: 0;
}

.recipe-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.recipe-list li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 0;
}

.recipe-list li:first-child {
  border-top: 0;
}

.recipe-list strong,
.recipe-list small {
  display: block;
}

.recipe-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
}

.recipe-steps {
  color: #344052;
  display: grid;
  gap: 14px;
  list-style: none;
}

.recipe-info-block {
  color: #344052;
  display: grid;
  gap: 12px;
}

.recipe-info-block h3 {
  font-size: 15px;
  margin: 4px 0 0;
}

.recipe-info-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.recipe-steps {
  counter-reset: recipe-step;
}

.recipe-steps li {
  background: #f8fafc;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  counter-increment: recipe-step;
  display: grid;
  gap: 6px;
  padding: 14px 16px 14px 52px;
  position: relative;
}

.recipe-steps li::before {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  content: counter(recipe-step);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  left: 14px;
  position: absolute;
  top: 14px;
  width: 28px;
}

.recipe-steps strong {
  color: var(--ink);
}

.recipe-steps span {
  color: #4f5b6e;
  line-height: 1.5;
}

.recipe-source-empty {
  background: #fff8ec;
  border: 1px solid #f7dca8;
  border-radius: 8px;
  color: #74521a;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.recipe-source-empty strong {
  color: #5b3b08;
}

.recipe-source-empty .source-link {
  justify-self: start;
}

.recipe-checks {
  display: grid;
  gap: 10px;
}

.recipe-checks span {
  background: #f8fafc;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  color: #344052;
  font-weight: 700;
  padding: 12px 14px;
}

.toolbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 230px) minmax(160px, 220px);
  margin-bottom: 16px;
  padding: 10px;
}

.toolbar input {
  background-color: #fff;
  border-color: #d8e0ec;
  border-radius: 9px;
  box-shadow: none;
  color: #20293a;
  font-size: 14px;
  font-weight: 500;
  min-height: 42px;
  min-width: 0;
  padding-bottom: 9px;
  padding-top: 9px;
  width: 100%;
}

.toolbar input::placeholder {
  color: #9aa3b2;
  font-weight: 500;
}

.filter-menu {
  min-width: 0;
  position: relative;
}

.filter-trigger {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e0ec;
  border-radius: 9px;
  color: #263244;
  display: flex;
  font-size: 14px;
  font-weight: 750;
  gap: 10px;
  height: 42px;
  justify-content: space-between;
  min-width: 0;
  padding: 9px 12px 9px 14px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

.filter-trigger:hover,
.filter-menu.open .filter-trigger {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.08);
}

.filter-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-trigger i {
  border-bottom: 2px solid #647084;
  border-right: 2px solid #647084;
  flex: 0 0 auto;
  height: 8px;
  transform: translateY(-2px) rotate(45deg);
  width: 8px;
}

.filter-popover {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(18, 27, 43, 0.18);
  display: grid;
  gap: 3px;
  left: 0;
  min-width: 100%;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 20;
}

.filter-popover button {
  align-items: center;
  background: transparent;
  border-radius: 7px;
  color: #3b4658;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.filter-popover button:hover {
  background: #f4f6fb;
}

.filter-popover button.selected {
  background: #eef0ff;
  color: var(--primary);
}

.filter-popover button.selected::after {
  color: var(--primary);
  content: "✓";
  font-size: 13px;
  font-weight: 900;
}

.inventory-lists-page {
  display: grid;
  gap: 14px;
}

.lists-hero {
  align-items: center;
  background: transparent;
  border-bottom: 0;
  display: flex;
  justify-content: space-between;
  min-height: 0;
  padding: 0 0 6px;
}

.lists-title {
  align-items: center;
  display: flex;
  gap: 14px;
}

.lists-title h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
}

.lists-title span {
  background: #eef2f7;
  border-radius: 999px;
  color: #7a8291;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
}

.upload-list-btn {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.upload-list-btn .icon {
  height: 20px;
  width: 20px;
}

.inventory-list-card {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  min-height: 86px;
  padding: 14px 16px;
}

.list-main {
  align-items: center;
  background: transparent;
  color: inherit;
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.list-icon {
  align-items: center;
  background: #e8ebff;
  border-radius: 8px;
  color: var(--primary);
  display: flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.list-icon .icon {
  height: 22px;
  width: 22px;
}

.list-copy {
  display: grid;
  gap: 4px;
}

.list-copy strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.list-copy span {
  color: #747c8d;
  font-size: 14px;
  line-height: 1.35;
}

.list-copy small {
  color: #687082;
  font-size: 13px;
  font-weight: 700;
}

.list-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.list-action {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e9eef6;
  border-radius: 6px;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.list-action .icon {
  height: 17px;
  width: 17px;
}

.list-action.green,
.list-action.favourite {
  color: #35a66d;
}

.list-action.favourite.active {
  background: #e9fbf2;
  border-color: #b8ebcf;
  color: #12975b;
}

.list-action.favourite.active .icon {
  fill: currentColor;
}

.list-action.purple {
  color: var(--primary);
}

.list-action.red {
  color: #ef2c2c;
}

.list-action.muted {
  color: #a0a7b4;
}

.location-manager {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
}

.sub-location-manager {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.sub-location-manager-head h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.sub-location-manager-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.sub-location-manager-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.empty-state.compact {
  grid-column: 1 / -1;
  min-height: 96px;
}

.sub-location-card {
  border: 1px solid #edf1f7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.sub-location-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sub-location-card-head strong {
  color: var(--ink);
  font-size: 15px;
}

.sub-actions {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.sub-actions button {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: #6f7889;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.sub-actions button:hover {
  background: #f4f6fb;
  color: var(--primary);
}

.sub-actions .icon {
  height: 15px;
  width: 15px;
}

.sub-actions button[data-delete-section]:hover {
  color: #c93535;
}

.location-manager h2 {
  font-size: 20px;
  margin: 4px 0 4px;
}

.location-manager p {
  color: var(--muted);
  margin: 0;
}

.location-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.sub-location-manager .location-form {
  grid-template-columns: minmax(220px, 1fr) 118px;
}

.location-form input {
  min-height: 52px;
}

.location-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.location-card {
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.location-card:hover {
  border-color: #cfd7ff;
  box-shadow: 0 8px 24px rgba(79, 57, 246, 0.1);
  transform: translateY(-1px);
}

.location-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.location-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.location-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-card span {
  background: #eef0ff;
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.location-contents {
  display: grid;
  gap: 18px;
}

.sub-location-section {
  display: grid;
  gap: 12px;
}

.sub-location-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.sub-location-head h2 {
  font-size: 18px;
  margin: 0;
}

.sub-location-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shopping-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.shopping-add {
  max-width: 280px;
}

.shopping-head {
  align-items: center;
}

.shopping-title-line {
  align-items: center;
  display: flex;
  gap: 10px;
}

.shopping-title-line h1 {
  margin-right: 0;
}

.shopping-rename {
  align-items: center;
  background: #eef0ff;
  border: 1px solid #d9ddff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.shopping-rename:hover {
  background: #e3e7ff;
  border-color: #c9ceff;
}

.shopping-rename .icon {
  height: 17px;
  width: 17px;
}

.shopping-panel {
  padding: 20px;
}

.shopping-panel-head {
  margin-bottom: 8px;
}

.shopping-panel-head > div {
  display: grid;
  gap: 4px;
}

.shopping-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shop-list {
  display: grid;
}

.shop-row {
  align-items: center;
  border-bottom: 1px solid #edf1f7;
  display: grid;
  gap: 14px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 76px;
  padding: 16px 0;
}

.shop-row:last-child {
  border-bottom: 0;
}

.shop-row input {
  accent-color: var(--primary);
  box-shadow: none;
  cursor: pointer;
  height: 20px;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

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

.shop-copy strong {
  color: #20293a;
  font-size: 15px;
  line-height: 1.25;
}

.shop-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.shop-row.done strong {
  color: #8c95a5;
  text-decoration: line-through;
}

.shop-row.done .shop-copy span {
  color: #9aa3b2;
}

.shopping-empty-state {
  align-items: center;
  border: 1px dashed #cfd7e5;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.shopping-empty-state strong {
  color: var(--ink);
  font-size: 16px;
}

.smart-shopping-lock {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  margin: 0 auto;
  max-width: 680px;
  min-height: 420px;
  padding: 44px 28px;
  text-align: center;
}

.smart-shopping-lock-icon {
  align-items: center;
  background: #eef0ff;
  border: 1px solid #d9ddff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.smart-shopping-lock-icon svg {
  height: 28px;
  width: 28px;
}

.smart-shopping-lock h1 {
  color: var(--ink);
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.smart-shopping-lock p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  max-width: 500px;
}

.smart-shopping-lock span {
  color: #4d5a6f;
  font-size: 13px;
  font-weight: 800;
}

.shopping-detail-page {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.shopping-detail-card,
.shopping-run-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.shopping-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shopping-form-grid label {
  color: #4b5567;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.shopping-notes {
  grid-column: 1 / -1;
}

.shopping-form-actions {
  border-top: 1px solid #edf1f7;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
}

.shopping-form-actions .btn {
  min-width: 150px;
}

.shopping-form-actions .btn-primary {
  width: auto;
}

.shopping-history {
  margin-top: 18px;
  padding: 20px;
}

.shopping-history .panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shopping-history-list {
  display: grid;
  gap: 12px;
}

.shopping-history-card {
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 14px;
}

.shopping-history-card > div {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.shopping-history-card strong {
  color: var(--ink);
  font-size: 15px;
}

.shopping-history-card span {
  color: var(--muted);
  font-size: 13px;
}

.shopping-history-card ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.shopping-history-card li {
  color: #2b3446;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 2px;
}

.shopping-history-card li span {
  font-weight: 500;
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.settings-tutorials-panel {
  grid-column: 1 / -1;
}

.settings-tutorials-panel .panel-head span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.tutorial-list {
  display: grid;
  gap: 10px;
}

.tutorial-card {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #e7edf7;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.tutorial-card strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.tutorial-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.tutorial-card.disabled {
  background: #f8fafc;
}

.tutorial-badge {
  background: #eef2ff;
  border-radius: 999px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.tutorial-welcome-overlay {
  align-items: center;
  background: rgba(23, 32, 51, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 35;
}

.tutorial-welcome-card {
  background: #fff;
  border: 1px solid #e7edf7;
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(23, 32, 51, 0.24);
  display: grid;
  gap: 14px;
  max-width: 480px;
  padding: 26px;
  position: relative;
  width: min(100%, 480px);
}

.tutorial-kicker {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.tutorial-welcome-card h2 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
  margin: 0;
}

.tutorial-welcome-card p,
.tutorial-welcome-card > span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.tutorial-welcome-card > span {
  font-size: 13px;
}

.tutorial-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tutorial-modal-overlay {
  align-items: center;
  background: rgba(23, 32, 51, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 40;
}

.tutorial-modal-card {
  background: #fff;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(23, 32, 51, 0.32);
  height: min(88vh, 920px);
  overflow: hidden;
  position: relative;
  width: min(94vw, 1280px);
}

.tutorial-modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe7f3;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.18);
  color: #6b7485;
  cursor: pointer;
  display: flex;
  font-size: 26px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  z-index: 2;
}

.tutorial-frame-wrap {
  background: #f7f9fe;
  height: 100%;
}

.tutorial-frame-wrap iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.spaces-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.space-list-panel {
  align-self: stretch;
}

.space-list {
  display: grid;
  gap: 8px;
}

.space-list button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: left;
}

.space-list button.active,
.space-list button:hover {
  background: #f0efff;
  border-color: #d9d5ff;
}

.space-list button span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.space-form {
  display: grid;
  gap: 12px;
}

.space-form label {
  display: grid;
  gap: 8px;
}

.space-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.space-form-actions .btn {
  width: auto;
}

.space-main {
  display: grid;
  gap: 18px;
}

.space-empty {
  display: grid;
  gap: 12px;
}

.space-empty h2 {
  font-size: 28px;
  margin: 0;
}

.space-empty p {
  color: var(--muted);
  margin: 0;
}

.setup-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.setup-note span {
  color: #9a3412;
  font-size: 13px;
}

.space-hero {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.space-hero h2 {
  font-size: 28px;
  line-height: 1.1;
  margin: 6px 0 8px;
}

.space-hero p {
  color: var(--muted);
  margin: 0;
}

.space-badge {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.space-badge.private {
  background: #eef4ff;
  border: 1px solid #cbdcff;
  color: #3152c9;
}

.space-badge.shared {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #087f52;
}

.space-hero-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.space-hero-actions .btn {
  width: auto;
}

.share-box {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px;
}

.share-box.optional {
  background: #fbfcff;
  border-color: #e3e9f3;
}

.share-box.shared {
  background: #f7fff9;
  border-color: #c8f5d8;
}

.share-box div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.share-box span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-info span,
.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.member-list {
  display: grid;
  gap: 10px;
}

.member-row {
  align-items: center;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) 150px 44px;
  padding: 12px;
}

.member-avatar {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: var(--primary);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.member-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.member-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-row select {
  min-height: 42px;
  min-width: 0;
}

.member-row .btn {
  height: 42px;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

.member-row .btn:disabled,
.member-row select:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.planning-summary-card {
  background: transparent;
  display: grid;
  gap: 16px;
  margin-top: 4px;
  width: 100%;
}

.planning-summary-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.planning-summary-card h2 {
  font-size: 26px;
  line-height: 1.12;
  margin: 6px 0 8px;
}

.planning-summary-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  max-width: 620px;
}

.planning-summary-empty {
  background: #fff;
  border: 1px solid #dfe5f1;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.planning-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planning-summary-item {
  background: #fff;
  border: 1px solid #e7edf7;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
}

.planning-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.planning-summary-item strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-setup-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.planning-setup-card {
  background: #fff;
  border: 1px solid #dfe5f1;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 10px;
  min-height: 150px;
  min-width: 0;
  padding: 18px;
  position: relative;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.planning-setup-card:hover,
.planning-setup-card.active {
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(79, 57, 246, 0.12);
  transform: translateY(-1px);
}

.planning-setup-card.active {
  background: #fbfaff;
  border-width: 2px;
}

.planning-card-status,
.planning-setup-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planning-setup-card.active .planning-card-status {
  color: var(--primary);
}

.planning-setup-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-card-meta {
  display: grid;
  gap: 6px;
}

.planning-setup-card small {
  color: #4d5a6f;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.planning-setup-card em {
  color: var(--muted);
  display: -webkit-box;
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.planning-card-check {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  position: absolute;
  right: 14px;
  top: 14px;
}

.planning-card-check .icon {
  height: 20px;
  width: 20px;
}

.planning-setup-new-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 2px dashed #c8c4de;
  border-radius: 8px;
  color: #4d5a6f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  min-height: 150px;
  padding: 18px;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.planning-setup-new-card:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.planning-setup-new-card:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.planning-setup-new-card span {
  align-items: center;
  display: inline-flex;
}

.planning-setup-new-card .icon {
  height: 24px;
  width: 24px;
}

.space-profile-panel {
  background: #fff;
  border: 1px solid #cfd4e6;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  overflow: hidden;
}

.space-profile-intro {
  align-items: center;
  background: #f3f6ff;
  border-bottom: 1px solid #cfd4e6;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 26px;
}

.space-profile-intro h2 {
  font-size: 25px;
  line-height: 1.15;
  margin: 0;
}

.space-profile-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 0;
  max-width: 720px;
}

.space-setup-hint {
  align-items: center;
  color: #047857;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
}

.space-setup-hint strong {
  color: inherit;
  font-size: 13px;
}

.space-setup-hint span {
  color: #4d5a6f;
  font-size: 13px;
  line-height: 1.4;
  max-width: 250px;
}

.space-profile-steps {
  display: grid;
  gap: 0;
  padding: 26px;
}

.profile-step-card {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  border-radius: 0;
  display: grid;
  gap: 14px;
  padding: 0 0 26px;
}

.profile-step-card + .profile-step-card {
  padding-top: 26px;
}

.profile-step-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-step-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.profile-step-head h3 {
  font-size: 20px;
  margin: 0 0 4px;
}

.profile-step-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.profile-step-number {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.storage-step-head {
  align-items: center;
}

.storage-step-head .btn {
  margin-left: auto;
}

.profile-step-card label,
.storage-profile-row label {
  color: var(--ink);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-step-card textarea,
.profile-step-card select,
.storage-profile-row input,
.storage-profile-row select {
  background: #fff;
  border: 1px solid #cfd4e6;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

.profile-step-card textarea:focus,
.profile-step-card select:focus,
.storage-profile-row input:focus,
.storage-profile-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.1);
}

.profile-step-card textarea {
  min-height: 104px;
  overflow-x: hidden;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
}

.space-profile-actions {
  align-items: center;
  background: #f3f6ff;
  border-top: 1px solid #cfd4e6;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  padding: 18px 26px;
}

.space-profile-actions.editing {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 190px) minmax(220px, 360px);
}

.space-profile-actions span {
  color: var(--muted);
  font-weight: 700;
}

.space-profile-actions .btn {
  width: 100%;
}

.storage-profile-list {
  display: grid;
  gap: 14px;
}

.storage-profile-row {
  align-items: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 14px;
  padding: 0;
}

.storage-profile-title {
  display: grid;
  gap: 4px;
}

.storage-profile-title strong {
  font-size: 17px;
  line-height: 1.2;
}

.storage-profile-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.storage-profile-fields {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storage-mode-choice {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storage-mode-choice label {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd4e6;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  gap: 9px;
  letter-spacing: 0;
  min-height: 64px;
  padding: 15px 16px;
  text-transform: none;
}

.storage-mode-choice label:has(input:checked) {
  background: #f4f1ff;
  border-color: #b9adff;
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.08);
}

.storage-mode-choice input {
  accent-color: var(--primary);
  box-shadow: none;
  min-height: auto;
  width: auto;
}

.storage-profile-new:has(input[value="existing"]:checked) .storage-new-field,
.storage-profile-new:has(input[value="new"]:checked) .storage-existing-field {
  display: none;
}

.storage-profile-list:has(input[value="new"]:checked) .storage-existing-row {
  display: none;
}

.switch-row {
  align-items: center;
  border-top: 1px solid #edf1f7;
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
}

.switch {
  background: #dbe2ed;
  border-radius: 999px;
  height: 24px;
  padding: 3px;
  width: 46px;
}

.switch.on {
  background: var(--primary);
}

.switch::after {
  background: #fff;
  border-radius: 999px;
  content: "";
  display: block;
  height: 18px;
  transform: translateX(0);
  transition: transform 150ms ease;
  width: 18px;
}

.switch.on::after {
  transform: translateX(22px);
}

.toast {
  background: #172033;
  border-radius: 8px;
  bottom: 22px;
  box-shadow: 0 12px 40px rgba(23, 32, 51, 0.22);
  color: #fff;
  font-size: 14px;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .landing-topbar {
    grid-template-columns: 1fr auto;
    top: 8px;
  }

  .landing-section-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
  }

  .stitch-hero,
  .recipe-shopping-section,
  .spaces-section {
    grid-template-columns: 1fr;
  }

  .stitch-dashboard {
    grid-template-columns: 1fr;
  }

  .stitch-dashboard-side {
    border-right: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-right: 0;
  }

  .expiry-card-grid,
  .pantry-grid,
  .landing-capability-grid,
  .savings-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-nav {
    margin-bottom: 30px;
  }

  .landing-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .landing-copy {
    max-width: none;
  }

  .landing-copy h1 {
    font-size: 44px;
    max-width: 720px;
  }

  .landing-product-preview {
    max-width: none;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
  }

  .landing-showcase {
    grid-template-columns: 1fr;
  }

  .inventory-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .app-layout {
    grid-template-columns: 1fr;
  }

  .planning-summary-card {
    grid-template-columns: 1fr;
  }

  .sidebar-restore-btn,
  .sidebar-collapse-btn {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .mobile-brand {
    display: inline-flex;
    font-size: 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding-left: clamp(18px, 3vw, 34px);
  }

  .top-actions {
    justify-content: space-between;
  }

  .content {
    padding-bottom: 96px;
  }

  .mobile-nav {
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(var(--nav-count, 5), 1fr);
    left: 0;
    position: fixed;
    right: 0;
    z-index: 6;
  }

  .mobile-nav button {
    align-items: center;
    background: transparent;
    color: #657084;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
    justify-content: center;
    min-height: 68px;
    padding: 8px 4px;
  }

  .mobile-nav button.active {
    color: var(--primary);
  }

  .mobile-nav svg {
    height: 20px;
    width: 20px;
  }

  .search-wrap {
    max-width: none;
    width: 100%;
  }

  .stats,
  .inventory-grid,
  .recipe-grid,
  .two-col,
  .shopping-layout,
  .shopping-detail-page,
  .spaces-layout,
  .settings-grid,
  .recipe-detail-grid,
  .edit-product-page,
  .location-list {
    grid-template-columns: 1fr;
  }

  .space-profile-actions {
    grid-template-columns: 1fr;
  }

  .space-profile-intro {
    grid-template-columns: 1fr;
  }

  .storage-step-head {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-step-head .btn {
    margin-left: 0;
  }

  .member-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .member-row select,
  .member-row .btn {
    grid-column: 2;
    width: 100%;
  }

  .storage-mode-choice {
    grid-template-columns: 1fr;
  }

  .recipe-hero {
    grid-template-columns: 1fr;
  }

  .recipe-hero .recipe-image {
    min-height: 150px;
  }

  .location-form {
    grid-template-columns: 1fr;
  }

  .inventory-lists-page {
    margin: 0;
  }

  .lists-hero,
  .inventory-list-card {
    padding-left: 0;
    padding-right: 0;
  }

  .lists-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .lists-title h1 {
    font-size: 30px;
  }

  .inventory-list-card {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-right: 0;
    padding: 14px;
  }

  .list-actions {
    justify-content: space-between;
    width: 100%;
  }

  .list-copy span {
    font-size: 15px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-page,
  .content {
    padding: 18px 14px;
  }

  .landing-topbar {
    align-items: flex-start;
    border-radius: 22px;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .landing-section-links,
  .landing-nav-actions {
    width: 100%;
  }

  .landing-section-links {
    gap: 10px;
  }

  .landing-section-links a,
  .landing-nav-actions a {
    flex: 1;
    text-align: center;
  }

  .stitch-hero {
    gap: 30px;
    padding: 42px 0 34px;
  }

  .stitch-hero-copy h1,
  .spaces-section h2 {
    font-size: 38px;
  }

  .stitch-hero-copy p,
  .spaces-section p {
    font-size: 16px;
  }

  .stitch-dashboard {
    border-radius: 22px;
    padding: 14px;
  }

  .stitch-dashboard-side {
    display: none;
  }

  .stitch-metrics,
  .stitch-mini-grid,
  .expiry-card-grid,
  .pantry-grid,
  .landing-capability-grid,
  .landing-recipe-grid,
  .savings-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .recipe-shopping-section,
  .landing-capability-section,
  .savings-section {
    border-radius: 22px;
    padding: 20px;
  }

  .smart-list-items div {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .shopping-mock-list div {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .smart-list-items em {
    grid-column: 2;
    text-align: left;
  }

  .shopping-mock-list em {
    grid-column: 2;
  }

  .space-preview-card > div:not(.space-avatars) {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .landing-nav .brand img {
    height: 48px;
  }

  .landing-nav-actions {
    width: 100%;
  }

  .landing-nav-actions a {
    flex: 1;
    text-align: center;
  }

  .landing-copy h1 {
    font-size: 34px;
    line-height: 1.04;
  }

  .landing-lede {
    font-size: 16px;
    line-height: 1.55;
  }

  .landing-cta-row,
  .landing-cta-row .btn {
    width: 100%;
  }

  .landing-auth-card {
    border-radius: 12px;
    padding: 14px;
  }

  .landing-hero {
    border-radius: 16px;
    padding: 22px 16px;
  }

  .preview-list div {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .preview-list em {
    max-width: none;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .inventory-preview-grid {
    grid-template-columns: 1fr;
  }

  .landing-bottom {
    border-radius: 12px;
    padding: 20px;
  }

  .landing-bottom h2 {
    font-size: 24px;
  }

  .landing-bottom .btn {
    width: 100%;
  }

  .content {
    padding-bottom: 96px;
  }

  .field-row,
  .social-grid,
  .shopping-form-grid,
  .edit-form-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    display: block;
  }

  .page-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 16px;
    min-width: 0;
  }

  .page-head .btn,
  .page-actions .btn-primary,
  .page-actions .btn-danger {
    margin-top: 16px;
    min-width: 0;
    width: 100%;
  }

  .page-actions .btn {
    margin-top: 0;
  }

  .inventory-action-stack {
    min-width: 0;
    width: 100%;
  }

  .shopping-form-actions {
    display: grid;
  }

  .shopping-form-actions .btn,
  .shopping-form-actions .btn-primary {
    width: 100%;
  }

  .toolbar input,
  .toolbar select,
  .filter-menu,
  .toolbar .btn {
    width: 100%;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .table {
    min-width: 680px;
  }

  .scan-dialog {
    max-height: 94vh;
    padding: 16px 14px;
  }

  .add-choice-actions {
    grid-template-columns: 1fr;
  }

  .location-dialog {
    padding: 20px 16px;
  }

  .photo-capture-grid {
    grid-template-columns: 1fr;
  }

  .photo-capture-card {
    min-height: 0;
  }

	  .photo-capture-actions,
	  .photo-camera-footer,
	  .product-picture-actions {
	    display: grid;
	    grid-template-columns: 1fr;
	  }

  .location-modal-intro h3 {
    font-size: 34px;
  }

  .location-modal-actions {
    grid-template-columns: 1fr;
  }

  .scan-result {
    padding: 12px;
  }

  .scan-result h3 {
    font-size: 18px;
  }

  .scan-result-lines {
    font-size: 12px;
  }

  .scan-confirm h3 {
    font-size: 24px;
  }

  .scan-confirm-actions {
    grid-template-columns: 1fr;
  }

  .scan-adjust-actions {
    grid-template-columns: 1fr;
  }
}
