:root {
  color-scheme: light;
  --bg: #f7e6d4;
  --card: #fffaf4;
  --ink: #1c1410;
  --muted: #6b5c52;
  --line: #eadfd3;
  --field: #e2d6c8;
  --accent: #9d2b1a;
  --accent-soft: #f6ddd6;
  --accent-deep: #7a1f13;
  --ok: #145c38;
  --ok-bg: #e7f5ee;
  --warn: #8a5a12;
  --bad: #8d2618;
  --bad-bg: #fdecea;
  --tabbar-h: 64px;
  --wrap: 720px;
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1.15);
  --md-sys-color-primary: #9d2b1a;
  --md-sys-color-on-primary: #fff8f2;
  --md-sys-color-primary-container: #f6ddd6;
  --md-sys-color-on-primary-container: #7a1f13;
  --md-sys-color-secondary: #7a4e3a;
  --md-sys-color-on-secondary: #fff8f2;
  --md-sys-color-secondary-container: #f6ddd6;
  --md-sys-color-on-secondary-container: #7a1f13;
  --md-sys-color-tertiary: #9d2b1a;
  --md-sys-color-on-tertiary: #fff8f2;
  --md-sys-color-tertiary-container: #f6ddd6;
  --md-sys-color-on-tertiary-container: #7a1f13;
  --md-sys-color-surface: #fffaf4;
  --md-sys-color-on-surface: #1c1410;
  --md-sys-color-on-surface-variant: #6b5c52;
  --md-sys-color-outline: #c9bba8;
  --md-sys-color-outline-variant: #eadfd3;
  --md-sys-color-background: #f7e6d4;
  --md-sys-color-on-background: #1c1410;
  --md-sys-color-surface-bright: #fffaf4;
  --md-sys-color-surface-dim: #eadfd3;
  --md-sys-color-surface-container-lowest: #fffaf4;
  --md-sys-color-surface-container-low: #fff6ee;
  --md-sys-color-surface-container: #fffaf4;
  --md-sys-color-surface-container-high: #fffaf4;
  --md-sys-color-surface-container-highest: #f7e6d4;
  --md-sys-color-inverse-surface: #3a2c24;
  --md-sys-color-inverse-on-surface: #fff8f2;
  --md-sys-color-inverse-primary: #f6ddd6;
  --md-sys-color-scrim: #1c1410;
  --md-sys-color-shadow: #1c1410;
  --md-sys-color-error: #8d2618;
  --md-sys-color-on-error: #fff8f2;
  --md-sys-color-error-container: #fdecea;
  --md-sys-color-on-error-container: #8d2618;
  --md-checkbox-outline-color: #6b5c52;
  --md-checkbox-selected-container-color: #9d2b1a;
  --md-checkbox-selected-icon-color: #fff8f2;
  --md-checkbox-container-shape: 8px;
  --md-checkbox-unselected-outline-color: #6b5c52;
  --md-checkbox-selected-outline-color: #9d2b1a;
  --md-outlined-text-field-outline-color: #c9bba8;
  --md-outlined-text-field-focus-outline-color: #9d2b1a;
  --md-outlined-text-field-input-text-color: #1c1410;
  --md-outlined-text-field-label-text-color: #6b5c52;
  --md-outlined-text-field-container-shape: 16px;
  --md-outlined-select-text-field-outline-color: #c9bba8;
  --md-outlined-select-text-field-focus-outline-color: #9d2b1a;
  --md-outlined-select-text-field-input-text-color: #1c1410;
  --md-ref-typeface-brand: ui-rounded, "Avenir Next", "Segoe UI", sans-serif;
  --md-ref-typeface-plain: ui-rounded, "Avenir Next", "Segoe UI", sans-serif;
  --md-filled-button-container-shape: 999px;
  --md-outlined-button-container-shape: 999px;
  --md-text-button-container-shape: 999px;
  --md-filled-tonal-button-container-shape: 999px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
}

button {
  margin: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "Avenir Next", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}

@view-transition {
  navigation: auto;
}

main.wrap {
  animation: page-in 0.34s var(--ease-out);
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

::view-transition-old(root) {
  animation: 0.22s var(--ease-out) both page-out;
}
::view-transition-new(root) {
  animation: 0.34s var(--ease-out) both page-in;
}
@keyframes page-out {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  main.wrap,
  .fold[open] .fold-panel,
  .sort-acc[open] .sort-acc-list,
  .sort-acc[open] .phone-alerts-body,
  .bell-panel,
  .bell-backdrop {
    animation: none !important;
    transition: none !important;
  }
}

body.has-tabs {
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

.wrap {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 16px 16px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--accent);
  color: #fff8f2;
  padding-top: env(safe-area-inset-top);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: 0 14px 32px rgba(157, 43, 26, 0.28);
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.bar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.title-text {
  min-width: 0;
  flex: 1 1 auto;
}
.back-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 24px;
  line-height: 1;
}
.bar-side {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 13px;
  opacity: 0.85;
}

h1, h2, h3 { font-weight: 700; overflow-wrap: anywhere; }
h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
h2 { margin: 0 0 8px; font-size: 1.12rem; letter-spacing: -0.02em; }
h3 { margin: 0; font-size: 1.08rem; }

.header-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-links a,
.linkish,
a.linkish {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 24px rgba(36, 28, 22, 0.04);
}
.add-card {
  background: #fff1e4;
  border-color: #e4b08a;
  box-shadow: inset 4px 0 0 var(--accent);
}
.add-card h2 {
  margin: 0;
  color: var(--accent);
}
.user-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
}
.user-row + .user-row { margin-top: 6px; }
.user-row span { min-width: 0; }
.user-delete { flex: 0 0 auto; margin: 0; }

.login-card { margin-top: 8px; }
.form-gap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack > * + * { margin-top: 10px; }
.locations-page .product-list {
  padding: 0;
}
.locations-page .stack > * + * { margin-top: 8px; }
.locations-page p { margin: 6px 0; }
.locations-page .field input { margin-top: 4px; height: 44px; }
.locations-page .btn-primary,
.locations-page .btn-secondary {
  height: 44px;
  margin-top: 8px;
}
.loc-actions {
  display: flex;
  gap: 8px;
}
.loc-actions form {
  flex: 1 1 0;
  min-width: 0;
}
.loc-actions .btn-small {
  width: 100%;
  height: 44px;
}
.product-card .row-actions { margin-top: 12px; }
.product-search { margin: 14px 0; }
.product-list {
  padding: 0;
  overflow: hidden;
}
.product-list:empty,
.product-list[hidden],
.product-section[hidden] { display: none; }
.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.product-row:not([hidden]) ~ .product-row:not([hidden]) {
  border-top: 1px solid var(--line);
}
.product-row .clip {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-meta {
  flex: 0 0 auto;
  max-width: 46%;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.product-row.is-off { color: var(--muted); }
.product-row.is-dragging {
  background: #fff;
  box-shadow: 0 10px 24px rgba(36, 28, 22, 0.18);
  position: relative;
  z-index: 2;
  pointer-events: none;
  border-radius: 12px;
  transform: scale(1.03);
}
body.is-sorting {
  user-select: none;
  -webkit-user-select: none;
}
.product-section { margin-top: 18px; }
.product-section h2 { margin-bottom: 8px; }
.product-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.product-edit-actions .btn-small,
.product-edit-actions .btn-secondary {
  width: 100%;
  height: 48px;
}
.product-row[hidden] { display: none !important; }
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--bad);
  font-size: 14px;
}
.day-pick,
.search-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 12px 0;
}
.day-pick .field,
.search-row .field {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.day-pick .field input,
.day-pick .field select,
.day-pick .btn-secondary,
.day-pick .btn-primary,
.search-row .field input,
.search-row .btn-secondary {
  height: 48px;
  border-radius: 12px;
}
.day-pick .btn-secondary,
.day-pick .btn-primary,
.search-row .btn-secondary {
  width: 100%;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .day-pick,
  .search-row {
    flex-direction: row;
    align-items: flex-end;
  }
  .day-pick .btn-secondary,
  .day-pick .btn-primary,
  .search-row .btn-secondary {
    width: auto;
  }
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.pager a {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  text-decoration: none;
}
.pager a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 14px;
}
.actions a.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
  padding: 0 12px;
}
.cook-card .btn-secondary,
.cook-card > md-filled-button,
.cook-card > md-outlined-button { margin-top: 12px; }
.cook-card form .btn-secondary,
.cook-card form md-filled-button,
.cook-card form md-outlined-button { margin-top: 0; }
.loc > a.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  text-decoration: none;
}
.check {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
}
.check > label {
  flex: 1 1 auto;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 0;
  border: 2px solid #c9bba8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.check input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.6 11.2 12.5 4.8'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.broadcast-who {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}
.broadcast-who legend {
  margin: 0 0 4px;
  padding: 0;
  font-weight: 700;
}
body.bell-open { overflow: hidden; }
.bell-wrap { position: relative; }
.bell {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 248, 242, 0.14);
  color: #fff8f2;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.bell svg { display: block; }
.bell.bell-hot svg {
  transform-box: fill-box;
  transform-origin: center;
  animation: bellshake 0.6s ease;
}
@keyframes bellshake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
}
.bell-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff8f2;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.bell-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.bell-layer[hidden] { display: none !important; }
.bell-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: color-mix(in srgb, var(--ink) 46%, transparent);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
}
.bell-layer.is-open .bell-backdrop {
  opacity: 1;
}
.bell-panel {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  left: 12px;
  right: 12px;
  top: calc(env(safe-area-inset-top) + 76px);
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 156px);
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(28, 20, 16, 0.28);
  padding: 0;
  transform: scaleY(0.28);
  transform-origin: top center;
  opacity: 0;
  transition:
    transform 0.36s var(--ease-spring),
    opacity 0.24s var(--ease-out);
}
.bell-layer.is-open .bell-panel {
  transform: none;
  opacity: 1;
}
.bell-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  padding: 12px 16px 8px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
#bell-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 16px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}
#bell-list::-webkit-scrollbar { width: 8px; }
#bell-list::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
  border: 2px solid var(--card);
}
.bell-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bell-head h2 { margin: 0; font-size: 1rem; }
.bell-read-all {
  margin: 0;
}
.bell-read-all[hidden] { display: none !important; }
.bell-read-all md-outlined-button,
.bell-read md-outlined-button {
  width: 100%;
}
.bell-read-all md-outlined-button:disabled {
  opacity: 0.65;
}
.bell-close {
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.bell-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.bell-item:first-child { border-top: 0; }
.bell-jump {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  cursor: pointer;
}
.bell-item.unread .bell-jump { font-weight: 700; }
.bell-read { flex: 0 0 auto; width: 100%; }
.bell-read button {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.bell-heading {
  display: block;
  margin: 0 0 6px;
  font-size: larger;
  font-weight: 700;
  text-align: left;
}
.bell-body {
  display: block;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}
.bell-time {
  display: block;
  margin-top: 6px;
  text-align: left;
  font-weight: 400;
}
@media (min-width: 720px) {
  .bell-panel {
    left: auto;
    width: min(400px, calc(100vw - 32px));
    right: max(16px, calc((100vw - var(--wrap)) / 2 + 16px));
  }
}
article.loc { scroll-margin-top: 96px; }
.loc-flash { animation: locflash 1.6s ease; }
@keyframes locflash {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 3px var(--accent); }
}
.note { margin: 8px 0; }
.note.unread { font-weight: 700; }
.dot {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  line-height: 18px;
}
.muted-card { opacity: 0.75; }

.field {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.field input,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--md-sys-color-outline);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input[type="date"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 0 12px;
  line-height: 48px;
  text-align: center;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: center;
  width: 100%;
  margin: 0;
  min-height: 48px;
  line-height: 48px;
}

input[type="date"]::-webkit-datetime-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  line-height: normal;
  text-align: center;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0;
}

.field input,
.field select { height: 48px; padding: 0 12px; }

.field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--md-sys-color-outline);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary,
.btn-secondary,
.btn-small {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  height: 52px;
  font-size: 17px;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(157, 43, 26, 0.28);
}
a.btn-secondary {
  text-decoration: none;
  box-sizing: border-box;
}
.seller-prices { margin: 4px 0 12px; }

.btn-secondary {
  border-radius: 999px;
}
.btn-secondary,
.btn-small {
  background: white;
  color: var(--ink);
  border: 1px solid var(--field);
}

.btn-small {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
}

.btn-small.danger { color: var(--bad); }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.row-actions .btn-small {
  width: auto;
  flex: 1 1 calc(50% - 8px);
}

.hint,
.status,
.empty {
  color: var(--muted);
  font-size: 14px;
}

.ok-text { color: var(--ok); }
.missing { color: var(--warn); margin: 6px 0 0; overflow-wrap: anywhere; }

.flash {
  overflow-wrap: anywhere;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 0 0 12px;
}

.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.message { background: #fff4df; color: #6d4a10; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chips a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}
.chips a.mwc-chip {
  border: 0;
  background: none;
  padding: 0;
}
.chips a.mwc-chip md-filter-chip {
  pointer-events: none;
}

.chips a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.sort-acc {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.sort-acc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
}
.sort-acc > summary::-webkit-details-marker { display: none; }
.sort-acc > summary::marker { content: ""; }
.sort-acc > summary strong {
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}
.sort-acc > summary::after {
  content: "▾";
  flex: 0 0 auto;
  color: var(--muted);
}
.sort-acc[open] > summary {
  border-bottom: 1px solid var(--line);
}
.sort-acc[open] > summary::after { content: "▴"; }
.sort-acc-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}
.sort-acc-list a {
  display: block;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}
.sort-acc-list a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.phone-alerts-body {
  padding: 12px 16px 16px;
}

.daynav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.daynav h2 {
  text-align: center;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.daynav a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
}

.hero {
  background: white;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin: 12px 0;
}

.hero p { margin: 0; }
.hero strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.hero.done { box-shadow: inset 4px 0 0 #1f7a4d; }
.hero.wait { box-shadow: inset 4px 0 0 #c4841d; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f0e9df;
  font-variant-numeric: tabular-nums;
}
.total-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.total-row strong,
.total-row > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.total-row strong { font-size: 1.15rem; }
.total-row.zero,
.zero { color: #a3988c; }

.fold { margin-top: 8px; }
.fold summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before {
  content: "▸";
  width: 1.2em;
  color: var(--muted);
}
.fold[open] summary::before { content: "▾"; }
.fold ul { margin: 0 0 4px; }
.fold-panel {
  transform-origin: top center;
}
.fold[open] .fold-panel {
  animation: unfold-in 0.38s var(--ease-spring);
}
.fold-instant .fold-panel { animation: none; }
.sort-acc[open] .sort-acc-list,
.sort-acc[open] .phone-alerts-body {
  transform-origin: top center;
  animation: unfold-in 0.36s var(--ease-spring);
}
@keyframes unfold-in {
  from {
    opacity: 0;
    transform: scaleY(0.32) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-title { margin: 18px 0 0; }

.loc header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.loc header h3 {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

li, p { overflow-wrap: anywhere; }

.loc ul {
  margin: 8px 0;
  padding-left: 18px;
  overflow-wrap: anywhere;
}

.clip-cut { cursor: pointer; }
.clip-tip {
  position: fixed;
  z-index: 60;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  background: #241c16;
  color: #fff8f2;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 24px rgba(36, 28, 22, 0.28);
  pointer-events: none;
}
.clip-tip[hidden] { display: none !important; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: #f6f1e8;
  padding: 1px 6px;
  border-radius: 6px;
}

.price-list { padding-top: 4px; padding-bottom: 4px; }
.price-row {
  scroll-margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  padding: 12px 0;
}
.price-row:not([hidden]) ~ .price-row:not([hidden]) {
  border-top: 1px solid var(--line);
}
.price-row[hidden] { display: none !important; }
.price-row .clip {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-top: 2px;
}
.price-amt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 6.5rem;
}
.price-amt strong,
.price-row > strong {
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.loc-price-row {
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  align-items: center;
}
.loc-price-row .price {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--field);
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qty-row[hidden],
.qty-group[hidden],
.price-list[hidden],
.product-card[hidden],
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--ink) 46%, transparent);
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 400px);
  max-height: min(88dvh, 720px);
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 24px 48px rgba(28, 20, 16, 0.28);
}

.modal-card > h2,
.modal-card > p:first-of-type {
  flex: 0 0 auto;
  margin: 0;
  padding: 20px 20px 8px;
  text-align: left;
  font-size: 1.2rem;
  color: var(--ink);
}

.modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 20px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}
.modal-scroll::-webkit-scrollbar { width: 8px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
  border: 2px solid var(--card);
}

.modal-card .hint,
.modal-scroll > p {
  margin: 0 0 12px;
  font-size: 16px;
  text-align: left;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary,
.modal-actions md-filled-button,
.modal-actions md-outlined-button {
  flex: none;
  width: 100%;
  height: auto;
}

.qty-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 0;
}
.qty-row:not([hidden]) ~ .qty-row:not([hidden]) {
  border-top: 1px solid #f0e9df;
}
.qty-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qty-row.unit-open {
  z-index: 8;
}
.unit-menu {
  position: relative;
  flex: 0 0 5.4rem;
  width: 5.4rem;
  height: 40px;
}
.unit-menu select.unit-pick {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.unit-menu-btn {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 20px 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%239d2b1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5 6 6 10.5 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
}
.unit-menu.is-open .unit-menu-btn {
  border-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%239d2b1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 6.5 6 2 10.5 6.5'/></svg>");
}
.unit-menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.unit-menu-list {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: 0 14px 28px rgba(28, 20, 16, 0.16);
  transform-origin: top center;
}
.unit-menu.is-open .unit-menu-list {
  animation: unfold-in 0.3s var(--ease-spring);
}
.unit-menu-list[hidden] {
  display: none;
}
.unit-menu-list button {
  display: block;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.unit-menu-list button:first-child {
  border-start-start-radius: calc(var(--radius-sm) - 1px);
  border-start-end-radius: calc(var(--radius-sm) - 1px);
}
.unit-menu-list button:last-child {
  border-end-start-radius: calc(var(--radius-sm) - 1px);
  border-end-end-radius: calc(var(--radius-sm) - 1px);
}
.unit-menu-list button:hover,
.unit-menu-list button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}
.unit-menu-list button.is-on {
  background: var(--accent);
  color: #fff8f2;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

textarea.comment {
  min-height: 88px;
  font-family: inherit;
  font-size: 16px;
}

.search-field { margin: 8px 0 4px; }
.fill-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}
.fill-row .btn-secondary {
  width: 100%;
}
.draft-bar {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 15px;
}
.qty-group { margin-top: 8px; }
.qty-group-title {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.search-empty { color: var(--muted); }

.qty-stepper {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 48px;
  border: 1px solid var(--field);
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
}

.qty-step {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 48px;
  padding: 0;
  border: 0;
  background: #f6f1e8;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qty-stepper input {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  border: 0;
  background: white;
  text-align: center;
  padding: 0;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.submit-bar {
  position: sticky;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  z-index: 4;
  margin: 8px -16px 0;
  width: calc(100% + 32px);
  padding: 0;
  background: transparent;
  border: 0;
}
.submit-bar md-filled-button {
  width: 100%;
  margin: 0;
  --md-filled-button-label-text-color: #fff8f2;
  --md-sys-color-on-primary: #fff8f2;
}

/* Sticky submit sits above the dialog scrim and leaves side gutters;
   hide it while any md-dialog is open. */
body:has(md-dialog[open]) .submit-bar {
  visibility: hidden;
  pointer-events: none;
}
body:has(md-dialog[open]) .topbar,
body:has(md-dialog[open]) .tabbar,
body:has(md-dialog[open]) .qty-row.unit-open {
  z-index: 0;
}

body.has-tabs .submit-bar {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #fffaf4;
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 5;
}

.tabbar a {
  text-align: center;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition:
    background-color 0.22s var(--ease-out),
    color 0.22s var(--ease-out),
    transform 0.22s var(--ease-spring);
}

.tabbar a.active {
  color: #fff;
  font-weight: 800;
  background: var(--accent);
}

.tabbar.tabs-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 960px) {
  :root { --wrap: 1120px; }

  body.has-tabs {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
  }
  body.has-tabs > .topbar { order: 0; }
  body.has-tabs > .tabbar { order: 1; }
  body.has-tabs > main.wrap { order: 2; flex: 1 1 auto; }
  .wrap { padding: 20px 24px 36px; }

  .tabbar {
    position: static;
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    background: #fffaf4;
  }
  .tabbar a {
    flex: 0 1 140px;
    min-height: 44px;
    padding: 10px 16px;
  }
  .tabbar a:hover { color: var(--ink); }
  .tabbar a.active {
    box-shadow: none;
  }

  .login-card {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-primary,
  .btn-secondary {
    width: auto;
    min-width: 160px;
    height: 44px;
    padding: 0 18px;
  }
  .actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .chips { justify-content: center; }
  .day-pick {
    justify-content: center;
  }
  .day-pick .field {
    flex: 0 0 auto;
    width: auto;
    max-width: 13.5rem;
  }
  .day-pick .field input,
  .day-pick .field select {
    width: 13.5rem;
    height: 40px;
  }
  .day-pick .btn-secondary,
  .day-pick .btn-primary {
    width: auto;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
  }
  .enter-order {
    align-items: flex-end;
    justify-content: flex-start;
  }
  .enter-order .field {
    flex: 0 0 14rem;
    width: 14rem;
    max-width: 14rem;
  }
  .enter-order .field input,
  .enter-order .field select {
    width: 14rem;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 16px;
    line-height: 40px;
  }
  .enter-order input[type="date"]::-webkit-date-and-time-value {
    min-height: 40px;
    line-height: 40px;
  }
  .enter-order .btn-primary {
    height: 40px;
    min-width: 0;
  }
  .actions a.btn-secondary { width: auto; }
  .loc > a.btn-secondary {
    width: auto;
    display: inline-flex;
  }
  .seller-prices { width: auto; }
  .fill-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fill-row .btn-secondary { width: auto; }
  .search-field { max-width: 420px; }
  .product-edit-actions {
    flex-direction: column;
  }
  .product-edit-actions .btn-small,
  .product-edit-actions .btn-secondary {
    width: 100%;
    height: 48px;
  }
  .loc-actions .btn-small { width: auto; }
  .row-actions .btn-small {
    flex: 0 0 auto;
    width: auto;
  }
  .cook-card .btn-secondary { width: auto; }

  .qty-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
  .qty-row:hover,
  .product-row:hover {
    background: #f6f1e8;
  }

  .desk-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 20px 28px;
    align-items: start;
  }
  .desk-split-side .section-title {
    margin-top: 0;
    text-align: center;
  }

  #product-list,
  #hidden-list {
    column-count: 2;
    column-gap: 0;
    column-rule: 1px solid var(--line);
    column-fill: balance;
  }
  #product-list .product-row,
  #hidden-list .product-row {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }

  .modal-card {
    width: min(100%, 400px);
    max-height: min(88dvh, 720px);
  }
  .modal-card md-filled-button,
  .modal-card md-outlined-button,
  .modal-card md-text-button,
  .modal-card .btn-primary,
  .modal-card .btn-secondary,
  .modal-card .btn-small,
  md-dialog md-filled-button,
  md-dialog md-outlined-button,
  md-dialog md-text-button {
    width: 100%;
    min-width: 0;
  }
  .modal-card .product-edit-actions {
    flex-direction: column;
  }

  .submit-bar {
    position: static;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
    background: none;
    max-width: 280px;
  }
  body.has-tabs .submit-bar { bottom: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn-primary,
  .btn-secondary,
  .btn-small,
  .chips a,
  .tabbar a,
  .pager a,
  .product-row,
  .qty-step {
    transition:
      transform 0.28s var(--ease-spring),
      background-color 0.2s var(--ease-out),
      color 0.2s var(--ease-out),
      box-shadow 0.28s var(--ease-out),
      border-color 0.2s var(--ease-out);
  }
  .btn-primary:active,
  .btn-secondary:active,
  .btn-small:active,
  .tabbar a:active {
    transform: scale(0.97);
  }
}

md-filled-button,
md-outlined-button,
md-filled-tonal-button {
  width: 100%;
  --md-filled-button-container-height: 52px;
  --md-outlined-button-container-height: 52px;
  --md-filled-tonal-button-container-height: 52px;
}
md-text-button.danger {
  --md-text-button-label-text-color: var(--md-sys-color-error);
}
.row-actions md-filled-button,
.row-actions md-outlined-button,
.row-actions md-text-button,
.modal-actions md-filled-button,
.modal-actions md-outlined-button,
.loc-actions md-filled-button,
.loc-actions md-outlined-button,
.loc-actions md-text-button {
  width: auto;
  flex: 1 1 0;
}
md-outlined-text-field,
md-filled-text-field,
md-outlined-select {
  width: 100%;
}
.mwc-btn {
  display: block;
  text-decoration: none;
  max-width: 100%;
}
.mwc-btn > * {
  width: 100%;
  pointer-events: none;
}
.actions .mwc-btn,
.fill-row .mwc-btn {
  display: block;
}
.chips md-assist-chip,
.chips md-filter-chip {
  --md-assist-chip-selected-container-color: var(--accent);
  --md-assist-chip-selected-label-text-color: #fff8f2;
  --md-filter-chip-selected-container-color: var(--accent);
  --md-filter-chip-selected-label-text-color: #fff8f2;
  --md-filter-chip-selected-outline-color: var(--accent);
  --md-filter-chip-selected-hover-state-layer-color: #fff8f2;
  --md-filter-chip-selected-pressed-state-layer-color: #fff8f2;
}
md-checkbox {
  --md-checkbox-container-shape: 8px;
  --md-checkbox-selected-container-color: var(--accent);
  --md-checkbox-selected-icon-color: #fff8f2;
}
label.check md-checkbox {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
}
.row-actions md-filled-button,
.row-actions md-outlined-button,
.row-actions md-text-button,
.loc-actions md-filled-button,
.loc-actions md-outlined-button,
.loc-actions md-text-button {
  width: auto;
  flex: 1 1 0;
}
md-dialog .product-edit-actions md-filled-button,
md-dialog .product-edit-actions md-outlined-button,
md-dialog .product-edit-actions md-text-button,
.modal-card .product-edit-actions md-filled-button,
.modal-card .product-edit-actions md-outlined-button,
.modal-card .product-edit-actions md-text-button {
  width: 100%;
  flex: none;
}
md-dialog {
  --md-dialog-container-color: var(--card);
  --md-dialog-headline-color: var(--ink);
  --md-dialog-supporting-text-color: var(--muted);
  --md-dialog-container-shape: 28px;
  min-width: min(calc(100% - 24px), 480px) !important;
  max-width: min(calc(100% - 24px), 640px) !important;
  max-height: min(88dvh, calc(100% - 32px)) !important;
  width: min(calc(100% - 24px), 560px);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}
md-dialog [slot="headline"] {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
md-dialog [slot="content"],
md-dialog form[slot="content"] {
  max-height: none;
  overflow: visible;
}
md-dialog [slot="actions"] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
md-dialog [slot="actions"] md-filled-button,
md-dialog [slot="actions"] md-outlined-button {
  width: 100%;
}
md-dialog md-filled-button,
md-dialog md-outlined-button,
md-dialog md-outlined-text-field,
md-dialog md-outlined-select {
  width: 100%;
}
.topbar md-text-button {
  --md-sys-color-primary: #fff8f2;
  --md-sys-color-on-primary: #9d2b1a;
  --md-text-button-label-text-color: #fff8f2;
  --md-text-button-hover-state-layer-color: #fff8f2;
  --md-text-button-hover-label-text-color: #fff8f2;
  --md-text-button-pressed-state-layer-color: #fff8f2;
  --md-text-button-focus-state-layer-color: #fff8f2;
  --md-text-button-hover-state-layer-opacity: 0.16;
  --md-text-button-pressed-state-layer-opacity: 0.22;
}
@media (min-width: 960px) {
  md-filled-button,
  md-outlined-button,
  md-filled-tonal-button {
    width: auto;
    min-width: 160px;
  }
  .form-gap md-filled-button,
  .form-gap md-outlined-button,
  .modal-card md-filled-button,
  .modal-card md-outlined-button,
  md-dialog md-filled-button,
  md-dialog md-outlined-button,
  .submit-bar md-filled-button {
    width: 100%;
    min-width: 0;
  }
  .mwc-btn {
    display: inline-block;
  }
}

@media print {
  .topbar, .tabbar, .submit-bar, .chips, .daynav a, .noprint { display: none !important; }
  body { background: white; }
  .card { break-inside: avoid; }
}
