:root {
  color-scheme: dark;
  --bg: #100d18;
  --panel: #191423;
  --panel-raised: #211a2d;
  --line: #392e4b;
  --purple: #9b73ff;
  --lilac: #c8b8ff;
  --mint: #74e3b7;
  --white: #f8f6fc;
  --muted: #aaa3b7;
  --faint: #81798f;
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--white);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .25;
}
.ambient-a { width: 360px; height: 360px; left: -170px; top: 20%; background: #714aba; }
.ambient-b { width: 430px; height: 430px; right: -190px; top: -170px; background: #6245a4; }

.topbar {
  position: relative;
  z-index: 2;
  height: 76px;
  padding: 0 max(34px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(230, 219, 255, .08);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Manrope, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .7px; }
.brand img { width: 35px; height: 35px; border-radius: 11px; }
.brand b { color: var(--lilac); }
.portal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(29, 23, 39, .58);
  color: #b9b0c9;
  font-size: 11px;
  transition: .2s;
}
.portal-link:hover { border-color: #8067b8; color: white; }
.portal-link span { color: var(--mint); font-size: 14px; }

main { max-width: 1180px; margin: auto; padding: 0 32px; }
.intro {
  position: relative;
  min-height: 355px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(230, 219, 255, .08);
}
.intro-copy { position: relative; z-index: 1; padding: 46px 0 48px; }
.eyebrow, .section-label { color: #aaa0bc; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px rgba(116, 227, 183, .7); animation: pulse 2.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 4px rgba(116, 227, 183, .35); opacity: .65; } }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 23px 0 16px; font-family: Manrope, sans-serif; font-size: clamp(40px, 6vw, 67px); line-height: 1.02; letter-spacing: -3px; }
.intro h1 span { color: var(--purple); }
.intro-copy > p { max-width: 410px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.feature-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.feature-row span { display: flex; align-items: center; gap: 6px; color: #a49caf; font-size: 9px; }
.feature-row i { color: var(--mint); font-size: 11px; font-style: normal; }

.brand-art { position: relative; height: 300px; display: grid; place-items: center; isolation: isolate; }
.glow { position: absolute; width: 155px; height: 155px; border-radius: 50%; background: #805bd1; filter: blur(65px); opacity: .42; }
.orbit { position: absolute; border: 1px solid rgba(196, 171, 255, .17); border-radius: 50%; animation: float 7s ease-in-out infinite; }
.orbit-one { width: 290px; height: 150px; transform: rotate(-27deg); }
.orbit-two { width: 245px; height: 230px; transform: rotate(33deg); animation-delay: -3s; }
.brand-art > img { z-index: 1; width: 115px; height: 115px; border-radius: 31px; object-fit: cover; box-shadow: 0 20px 70px rgba(0, 0, 0, .28); }
@keyframes float { 50% { translate: 0 -5px; rotate: 2deg; } }
.floating-note { position: absolute; z-index: 2; padding: 10px 13px; border: 1px solid rgba(202, 184, 255, .17); border-radius: 10px; background: rgba(27, 22, 37, .88); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); color: #d8d1e2; font-size: 9px; backdrop-filter: blur(12px); }
.note-one { top: 46px; left: 5%; color: var(--mint); }
.note-one span { display: inline-block; width: 45px; height: 3px; margin-left: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--mint), transparent); vertical-align: middle; }
.note-two { right: 5%; bottom: 44px; display: flex; align-items: center; gap: 7px; }
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }

.access-card {
  width: min(100%, 560px);
  margin: 40px auto 20px;
  padding: 28px 31px 22px;
  border: 1px solid rgba(185, 154, 255, .2);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(31, 25, 42, .97), rgba(22, 18, 30, .98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .2);
}
.access-heading { display: flex; align-items: center; gap: 12px; }
.access-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #6d52a0, #3f305a); color: #e6dcff; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 800; }
.section-label { color: var(--mint); font-size: 8px; }
.access-heading h2 { margin: 4px 0 0; font-family: Manrope, sans-serif; font-size: 19px; letter-spacing: -.4px; }
.access-intro { margin: 17px 0 19px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 19px; padding: 4px; border-radius: 9px; background: #120f19; }
.tabs:has(#setup-tab:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab { height: 34px; border: 0; border-radius: 7px; background: transparent; color: #90889b; font-size: 10px; cursor: pointer; }
.tab:hover { color: white; }
.tab.active { background: #302541; color: #e8defc; box-shadow: inset 0 0 0 1px rgba(196, 171, 255, .12); }
.access-form { display: grid; gap: 8px; }
.access-form label { margin-top: 5px; color: #d0c9d8; font-size: 9px; }
.access-form input { width: 100%; height: 41px; padding: 0 12px; border: 1px solid rgba(226, 216, 245, .12); border-radius: 8px; outline: none; background: #120f19; color: white; font-size: 11px; }
.access-form input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(155, 115, 255, .13); }
.access-form select { width: 100%; height: 41px; padding: 0 12px; border: 1px solid rgba(226, 216, 245, .12); border-radius: 8px; outline: none; background: #120f19; color: white; font-size: 11px; }
.access-form select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(155, 115, 255, .13); }
.access-form input::placeholder { color: #70697b; }
.primary-button { height: 43px; margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(200, 184, 255, .2); border-radius: 9px; background: linear-gradient(100deg, #8964de, #6845bf); color: white; font-size: 10px; font-weight: 700; cursor: pointer; transition: transform .18s, filter .18s; }
.primary-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.primary-button span { font-size: 15px; }
.prototype-note { display: flex; gap: 9px; margin-top: 19px; padding: 12px; border: 1px solid rgba(116, 227, 183, .1); border-radius: 9px; background: rgba(116, 227, 183, .055); }
.prototype-note > span { flex: none; width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid rgba(116, 227, 183, .55); border-radius: 50%; color: var(--mint); font-size: 9px; }
.prototype-note p { margin: 0; color: #a29baa; font-size: 8.5px; line-height: 1.55; }
.form-message { margin: 12px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 155, 155, .22); border-radius: 8px; background: rgba(255, 155, 155, .055); color: #ffd1d1; font-size: 9px; line-height: 1.5; }
.form-message.is-success { border-color: rgba(116, 227, 183, .2); background: rgba(116, 227, 183, .06); color: #b7f1d8; }
.form-message.is-error, .invite-result.is-error { border-color: rgba(255, 155, 155, .22); background: rgba(255, 155, 155, .055); color: #ffd1d1; }
.access-form button:disabled { cursor: wait; opacity: .7; }
.secondary-button { width: 100%; min-height: 36px; margin-top: 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #c8b8ff; font-size: 10px; cursor: pointer; }
.secondary-button:hover { border-color: #8067b8; color: white; }
.account-panel { width: min(100%, 560px); margin: 40px auto 20px; padding: 28px 31px 24px; border: 1px solid rgba(185, 154, 255, .2); border-radius: 19px; background: linear-gradient(145deg, rgba(31, 25, 42, .97), rgba(22, 18, 30, .98)); box-shadow: 0 24px 70px rgba(0, 0, 0, .2); }
.admin-tools { margin-top: 21px; padding-top: 20px; border-top: 1px solid rgba(230, 219, 255, .1); }
.household-panel { margin-top: 21px; padding-top: 20px; border-top: 1px solid rgba(230, 219, 255, .1); }
.household-panel h3 { margin: 0 0 8px; font-family: Manrope, sans-serif; font-size: 14px; }
.household-form { margin-top: 14px; }
.household-form + .household-form { padding-top: 14px; border-top: 1px solid rgba(230, 219, 255, .08); }
.consent-line { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0 13px !important; color: #b9b2c3 !important; font-size: 10px !important; line-height: 1.55; }
.consent-line input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  appearance: auto;
  background: none;
  accent-color: #9870f3;
}
.household-summary { margin: 12px 0; padding: 12px; border: 1px solid rgba(116, 227, 183, .18); border-radius: 8px; background: rgba(116, 227, 183, .045); color: #d8f5e9; font-size: 12px; }
.household-message { margin: 10px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 155, 155, .22); border-radius: 8px; background: rgba(255, 155, 155, .055); color: #ffd1d1; font-size: 10px; line-height: 1.5; }
.inventory-panel { margin-top: 20px; padding-top: 19px; border-top: 1px solid rgba(230, 219, 255, .08); }
.inventory-panel h4 { margin: 0 0 7px; font-family: Manrope, sans-serif; font-size: 13px; }
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inventory-grid > div { display: grid; gap: 8px; }
.approximation-note { margin: 4px 0; color: #91899a; font-size: 9px; line-height: 1.5; }
.loss-summary { margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(245, 192, 122, .18); border-radius: 8px; background: rgba(245, 192, 122, .05); color: #e5cba9; font-size: 9px; line-height: 1.5; }
.inventory-list { display: grid; gap: 10px; margin-top: 14px; }
.inventory-item { padding: 12px; border: 1px solid rgba(230, 219, 255, .1); border-radius: 10px; background: rgba(18, 15, 25, .65); }
.inventory-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inventory-item h5 { margin: 0; font-family: Manrope, sans-serif; font-size: 12px; }
.inventory-badge { flex: none; padding: 4px 7px; border-radius: 999px; font-size: 8px; }
.inventory-badge.food { background: rgba(116, 227, 183, .1); color: #9ce6c7; }
.inventory-badge.non-food { background: rgba(155, 115, 255, .14); color: #d2c0ff; }
.inventory-meta { margin: 7px 0 0; color: #a59dad; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.inventory-item-actions { display: grid; grid-template-columns: minmax(70px, 1fr) 1fr 1fr; align-items: center; gap: 7px; margin-top: 12px; }
.inventory-remove-quantity { width: 100%; height: 34px; padding: 0 8px; border: 1px solid rgba(226, 216, 245, .12); border-radius: 7px; outline: none; background: #120f19; color: white; font-size: 10px; }
.consume-button, .discard-button { min-height: 34px; padding: 6px 8px; border-radius: 7px; font-size: 9px; cursor: pointer; }
.consume-button { border: 1px solid rgba(116, 227, 183, .24); background: rgba(116, 227, 183, .07); color: #b7f1d8; }
.discard-button { border: 1px solid rgba(255, 155, 155, .2); background: rgba(255, 155, 155, .055); color: #ffc7c7; }
.consume-button:disabled, .discard-button:disabled { opacity: .65; cursor: wait; }
.inventory-empty { margin: 0; padding: 14px; border: 1px dashed rgba(230, 219, 255, .15); border-radius: 8px; color: #a59dad; font-size: 10px; text-align: center; }
.shopping-panel { margin-top: 20px; padding-top: 19px; border-top: 1px solid rgba(230, 219, 255, .08); }
.shopping-panel h4 { margin: 0 0 7px; font-family: Manrope, sans-serif; font-size: 13px; }
.shopping-form { margin-top: 12px; }
.price-suggestion { margin: 0; color: #aaa3b7; font-size: 9px; line-height: 1.5; }
.shopping-summary { margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(155, 115, 255, .18); border-radius: 8px; background: rgba(155, 115, 255, .055); color: #d2c0ff; font-size: 9px; line-height: 1.5; }
.shopping-list { display: grid; gap: 9px; margin-top: 13px; }
.shopping-item { padding: 11px 12px; border: 1px solid rgba(230, 219, 255, .1); border-radius: 9px; background: rgba(18, 15, 25, .6); }
.shopping-item.is-purchased { opacity: .72; }
.shopping-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shopping-item h5 { margin: 0; font-family: Manrope, sans-serif; font-size: 11px; }
.shopping-price { margin: 7px 0 0; color: #d5c5ff; font-size: 9px; }
.shopping-status { margin: 5px 0 0; color: #9ce6c7; font-size: 9px; }
.shopping-item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.shopping-item-actions button { min-height: 32px; padding: 5px 8px; border-radius: 7px; font-size: 9px; cursor: pointer; }
.shopping-item-actions button:disabled { opacity: .65; cursor: wait; }
.reminder-panel { margin-top: 20px; padding-top: 19px; border-top: 1px solid rgba(230, 219, 255, .08); }
.reminder-panel h4 { margin: 0 0 7px; font-family: Manrope, sans-serif; font-size: 13px; }
.reminder-form { margin-top: 12px; }
.reminder-form > div { display: grid; gap: 8px; }
.reminder-toggle { display: flex; align-items: flex-start; gap: 9px; margin: 5px 0 !important; color: #d0c9d8 !important; font-size: 10px !important; line-height: 1.5; }
.reminder-toggle input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: #9870f3; }
.reminder-list { display: grid; gap: 8px; margin-top: 12px; }
.reminder-item { padding: 10px 12px; border: 1px solid rgba(245, 192, 122, .18); border-radius: 8px; background: rgba(245, 192, 122, .045); }
.reminder-item.is-overdue { border-color: rgba(255, 155, 155, .2); background: rgba(255, 155, 155, .045); }
.reminder-item h5 { margin: 0; font-family: Manrope, sans-serif; font-size: 11px; }
.reminder-item .inventory-meta { color: #d7c2a1; }
.reminder-item.is-overdue .inventory-meta { color: #e6b1b1; }
.admin-tools h3 { margin: 0 0 14px; font-family: Manrope, sans-serif; font-size: 14px; }
.invite-result { overflow-wrap: anywhere; margin: 12px 0 0; padding: 12px; border: 1px solid rgba(116, 227, 183, .18); border-radius: 8px; background: rgba(116, 227, 183, .06); color: #b7f1d8; font-size: 12px; line-height: 1.5; }
.logout-button { display: block; margin: 18px 0 0 auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #c8b8ff; font-size: 10px; cursor: pointer; }
.logout-button:hover { border-color: #8067b8; color: white; }
.footer-note { padding: 16px 0 25px; color: #716a7e; font-size: 8px; letter-spacing: .45px; text-align: center; }
.footer-note span { margin: 0 5px; color: #a787ff; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

@media (max-width: 700px) {
  .topbar { height: 65px; padding: 0 20px; }
  main { padding: 0 20px; }
  .intro { min-height: 0; grid-template-columns: 1fr; padding-top: 38px; }
  .intro-copy { padding: 0 0 12px; }
  .intro h1 { font-size: clamp(42px, 12vw, 61px); }
  .intro-copy > p { max-width: 350px; font-size: 12px; }
  .feature-row { gap: 12px; margin-top: 16px; }
  .brand-art { position: absolute; top: 28px; right: -45px; width: 185px; height: 190px; opacity: .43; pointer-events: none; }
  .brand-art > img { width: 77px; height: 77px; border-radius: 22px; }
  .orbit-one { width: 190px; height: 104px; }
  .orbit-two { width: 160px; height: 145px; }
  .floating-note { display: none; }
  .access-card { margin: 18px auto 15px; padding: 23px 21px 18px; }
  .account-panel { margin: 18px auto 15px; padding: 23px 21px 18px; }
  .access-heading h2 { font-size: 17px; }
}
@media (max-width: 390px) {
  .topbar { padding: 0 15px; }
  main { padding: 0 14px; }
  .brand { font-size: 12px; }
  .brand img { width: 31px; height: 31px; }
  .portal-link { padding: 8px 10px; font-size: 9px; }
  .access-card { padding: 20px 16px 16px; }
  .account-panel { padding: 20px 16px 16px; }
  .feature-row { gap: 8px; }
  .feature-row span { font-size: 8px; }
}
@media (max-width: 420px) {
  .inventory-grid { grid-template-columns: 1fr; gap: 4px; }
  .inventory-item-actions { grid-template-columns: 1fr 1fr; }
  .inventory-remove-quantity { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

