:root {
  color-scheme: light;
  --bg: #f4f8fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: #eef5f5;
  --line: #dce8e7;
  --line-strong: #bfd4d0;
  --text: #173b39;
  --muted: #6e8583;
  --primary: #087d62;
  --primary-dark: #05614e;
  --primary-soft: #dff3eb;
  --accent: #f2b56d;
  --danger: #b65b5f;
  --shadow: 0 22px 70px rgba(29, 78, 75, 0.11);
  --shadow-soft: 0 10px 28px rgba(29, 78, 75, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1d1d;
  --surface: rgba(22, 43, 42, 0.9);
  --surface-solid: #162b2a;
  --surface-muted: #1d3835;
  --line: #294a47;
  --line-strong: #3b625d;
  --text: #e7f4ef;
  --muted: #9bb2ad;
  --primary: #55c7a2;
  --primary-dark: #8ce2c3;
  --primary-soft: #20453e;
  --accent: #f6c88c;
  --danger: #ef9a9b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 6% -2%, rgba(117, 208, 177, 0.2), transparent 27rem),
    radial-gradient(circle at 100% 14%, rgba(244, 186, 112, 0.15), transparent 24rem),
    var(--bg);
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  opacity: 0.4;
}

.ambient-one {
  top: 24%;
  left: -13rem;
  background: rgba(102, 211, 174, 0.22);
}

.ambient-two {
  right: -13rem;
  bottom: 4%;
  background: rgba(241, 181, 109, 0.14);
}

.auth-view {
  min-height: 100vh;
  padding: 32px 20px;
}

.auth-shell {
  width: min(1120px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: clamp(48px, 9vw, 130px);
}

.auth-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.auth-brand {
  align-self: start;
  grid-column: 1 / -1;
  margin-bottom: -135px;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 18px color-mix(in srgb, var(--primary) 26%, transparent);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand strong,
.brand strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.16em;
}

.auth-brand small,
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.25em;
}

.auth-intro {
  align-self: center;
  padding: 0 0 48px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-intro h1,
.page-heading h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h1 em,
h2 em {
  color: var(--primary);
  font-style: normal;
}

.auth-intro > p:last-child,
.page-heading > div > p:last-child {
  max-width: 580px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.auth-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 27px;
  padding: 5px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.auth-tab {
  padding: 11px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.form-field {
  margin: 0 0 17px;
}

.form-field label,
.list-picker-wrap label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-field input,
.custom-item-form input,
.search-box input,
.list-picker-wrap select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  background: var(--surface-solid);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input {
  padding: 0 15px;
}

.form-field input::placeholder,
.custom-item-form input::placeholder,
.search-box input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.form-field input:focus,
.custom-item-form input:focus,
.search-box input:focus,
.list-picker-wrap select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.primary-button,
.secondary-button,
.icon-button,
.text-button {
  border: 0;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 16px color-mix(in srgb, var(--primary) 22%, transparent);
}

:root[data-theme="dark"] .primary-button {
  color: #10231f;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

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

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-solid);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.full-width {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.form-message:empty {
  display: none;
}

.auth-footnote {
  grid-column: 1 / -1;
  align-self: end;
  margin: -125px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.app-view {
  min-height: 100vh;
  padding-bottom: 56px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1440px, calc(100% - 48px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.user-chip {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-solid);
  font-size: 18px;
}

.theme-button {
  font-size: 20px;
}

.page-container {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(48px, 7vw, 94px) 0 38px;
}

.page-heading h1 {
  max-width: 850px;
  font-size: clamp(2.25rem, 4.5vw, 4.4rem);
}

.save-status-card {
  display: flex;
  min-width: 235px;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.save-status-card strong,
.save-status-card small {
  display: block;
}

.save-status-card strong {
  font-size: 13px;
}

.save-status-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.save-status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 13%, transparent);
}

.save-status-card.is-dirty .save-status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

.save-status-card.is-dirty strong {
  color: #a56a29;
}

:root[data-theme="dark"] .save-status-card.is-dirty strong {
  color: var(--accent);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.list-toolbar {
  display: flex;
  align-items: end;
  gap: 11px;
  padding: 16px;
}

.list-picker-wrap {
  width: min(310px, 100%);
  margin-right: auto;
}

.list-picker-wrap select {
  min-height: 42px;
  padding: 0 37px 0 13px;
  appearance: none;
  background-color: var(--surface-solid);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.catalog-panel,
.list-panel {
  min-width: 0;
  padding: 24px;
}

.list-panel {
  position: sticky;
  top: 94px;
}

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

.panel-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.panel-kicker {
  margin-bottom: 7px;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.count-badge {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  place-items: center;
  border-radius: 20px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.search-box input {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-box input:focus {
  box-shadow: none;
}

.search-symbol {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-symbol::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.category-row {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-solid);
  font-size: 11px;
  font-weight: 700;
}

.category-button:hover,
.category-button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

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

.product-card {
  position: relative;
  min-height: 128px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-solid);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.product-icon {
  display: block;
  margin-bottom: 10px;
  font-size: 25px;
  line-height: 1;
}

.product-name {
  display: block;
  max-width: calc(100% - 22px);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.product-category {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-add {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  font-size: 20px;
  line-height: 1;
}

:root[data-theme="dark"] .product-add {
  color: #10231f;
}

.product-favorite {
  position: absolute;
  top: 8px;
  right: 9px;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  color: var(--line-strong);
  background: transparent;
  font-size: 18px;
}

.product-favorite.is-favorite {
  color: #e49b55;
}

.list-heading {
  margin-bottom: 9px;
}

.list-meta {
  min-height: 39px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 12px;
}

.custom-item-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.custom-item-form input {
  min-height: 42px;
  padding: 0 12px;
}

.custom-item-form .secondary-button {
  min-height: 42px;
}

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

.list-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-solid);
}

.list-item.is-checked {
  opacity: 0.58;
}

.item-check {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--primary);
}

.item-copy {
  min-width: 0;
}

.item-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-checked .item-name {
  text-decoration: line-through;
}

.item-category {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.quantity-control button {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font-weight: 800;
}

.quantity-control button:hover {
  background: var(--surface-solid);
}

.quantity-value {
  min-width: 22px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.remove-item {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
}

.remove-item:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.empty-list {
  padding: 36px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

.empty-list > span {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
}

.empty-list strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.empty-list p {
  margin: 5px 0 0;
  font-size: 12px;
}

.list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 4px 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.dialog-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 28, 27, 0.46);
  backdrop-filter: blur(7px);
}

.dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 31px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.dialog h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.045em;
}

.dialog > p:not(.panel-kicker):not(.form-message) {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 23px;
  line-height: 1;
}

.share-preview {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
}

.share-preview strong {
  color: var(--text);
  font-size: 14px;
}

.share-preview small {
  color: var(--muted);
  font-size: 11px;
}

.share-preview-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.share-preview-item:last-child {
  border-bottom: 0;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-actions .primary-button,
.share-actions .secondary-button {
  flex: 1 1 160px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.muted-empty {
  grid-column: 1 / -1;
  padding: 24px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.section-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.section-nav-card {
  display: flex;
  min-width: 165px;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.section-nav-card:hover {
  border-color: var(--primary);
  /* The navigation row scrolls horizontally; moving the card upward would clip its top border. */
  transform: none;
}

.section-nav-card.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.section-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.section-nav-title {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 800;
}

.section-nav-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.workspace-grid.is-single .list-panel {
  position: static;
}

.top-products-panel {
  min-width: 0;
  padding: 24px;
}

.panel-description {
  margin: -7px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 9px;
  overflow: visible;
}

.catalog-group-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-solid);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.catalog-group-card:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.catalog-group-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  font-size: 21px;
}

.catalog-group-copy {
  min-width: 0;
}

.catalog-group-copy strong,
.catalog-group-copy small {
  display: block;
}

.catalog-group-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-group-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-back-button {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 750;
}

.group-search-note,
.catalog-instruction {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .section-nav {
    margin-top: 14px;
  }

  .section-nav-card {
    min-width: 142px;
    padding: 12px;
  }

  .catalog-panel,
  .list-panel,
  .top-products-panel {
    padding: 18px;
    border-radius: 19px;
  }

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

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(650px, 100%);
    gap: 24px;
  }

  .auth-brand {
    grid-column: auto;
    margin-bottom: 0;
  }

  .auth-intro {
    padding: 22px 0 0;
  }

  .auth-intro h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .auth-footnote {
    grid-column: auto;
    margin: 0;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .list-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .auth-view {
    padding: 20px 15px;
  }

  .auth-shell {
    min-height: calc(100vh - 40px);
  }

  .auth-card,
  .catalog-panel,
  .list-panel {
    padding: 18px;
    border-radius: 19px;
  }

  .topbar-inner,
  .page-container {
    width: min(100% - 28px, 1440px);
  }

  .topbar-inner {
    min-height: 64px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .user-chip {
    display: none;
  }

  .secondary-button {
    padding: 0 12px;
  }

  .page-heading {
    display: block;
    padding: 40px 0 25px;
  }

  .page-heading h1 {
    font-size: clamp(2.2rem, 12vw, 3.3rem);
  }

  .page-heading > div > p:last-child {
    margin-top: 18px;
    font-size: 14px;
  }

  .save-status-card {
    min-width: 0;
    margin-top: 22px;
  }

  .list-toolbar {
    flex-wrap: wrap;
    padding: 12px;
  }

  .list-picker-wrap {
    width: 100%;
    margin-right: 0;
  }

  .list-toolbar > button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 0 8px;
  }

  .list-toolbar > #saveButton {
    flex-basis: 100%;
  }

  .workspace-grid {
    gap: 14px;
    margin-top: 14px;
  }

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

  .product-card {
    min-height: 120px;
  }

  .custom-item-form {
    align-items: stretch;
  }

  .custom-item-form .secondary-button {
    padding: 0 11px;
  }

  .list-item {
    grid-template-columns: 23px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .quantity-control {
    grid-column: 2 / 3;
    grid-row: 2;
    justify-self: start;
    margin-top: -5px;
  }

  .remove-item {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .list-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dialog {
    padding: 24px 18px;
  }
}

@media (max-width: 390px) {
  .brand small,
  .auth-brand small {
    display: none;
  }

  .topbar-actions .secondary-button {
    font-size: 12px;
  }
}
