:root {
  color-scheme: dark;
  --bg: #121212;
  --panel: #1b1b1b;
  --panel2: #222;
  --line: #353535;
  --ink: #f3efe9;
  --muted: #a8a29b;
  --gold: #b48a59;
  --gold-light: #d3ae7d;
  --danger: #e18479;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.app-shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font:
    26px Georgia,
    serif;
  letter-spacing: -1px;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: var(--gold);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mode-badge {
  color: var(--gold-light);
  border: 1px solid #735a3d;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.icon-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
}
.menu-panel {
  position: absolute;
  z-index: 5;
  right: max(16px, calc((100vw - 820px) / 2));
  top: 57px;
  width: min(300px, calc(100vw - 32px));
  padding: 12px;
  background: #242424;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px #0009;
}
.menu-panel button,
.menu-panel a {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  text-align: left;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  font: inherit;
  border-radius: 7px;
  cursor: pointer;
}
.menu-panel button:hover,
.menu-panel a:hover {
  background: #333;
}
.account-label {
  padding: 4px 12px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.danger-text {
  color: var(--danger) !important;
}
.welcome-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 29px 2px 22px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.welcome-row h1,
.auth-card h1 {
  font:
    normal clamp(38px, 8vw, 56px) / 0.98 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 0;
}
.welcome-row h1 em,
.auth-card h1 em {
  color: var(--gold-light);
  font-weight: normal;
}
.bar-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 21px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}
.section-head h2 {
  font:
    normal 25px Georgia,
    serif;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head .eyebrow {
  margin-bottom: 3px;
}
.quiet-button {
  background: transparent;
  border: 0;
  color: var(--gold-light);
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
  border-radius: 7px;
}
.quiet-button:hover {
  background: #ffffff0c;
}
.ingredient-form {
  display: flex;
  gap: 9px;
}
.ingredient-submit {
  flex: 0 0 48px;
  width: 48px;
  padding: 10px;
}
.ingredient-entry-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.ingredient-entry-tools .outline-button {
  min-width: 0;
  gap: 4px;
  min-height: 44px;
  padding: 7px;
  font-size: 13px;
}
.ingredient-entry-tools .app-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.ingredient-submit .app-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
#typeDialog .dialog-head h2 { font-size: 24px; }
.ingredient-suggestion-summary {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.ingredient-suggestions {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #15120f;
  overscroll-behavior: contain;
}
.ingredient-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #ffffff14;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ingredient-suggestion:last-child { border-bottom: 0; }
.ingredient-suggestion:hover:not(:disabled) { background: #b48a591c; }
.ingredient-suggestion:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.ingredient-suggestion-label {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow-wrap: anywhere;
}
.ingredient-suggestion-label small {
  color: var(--muted);
  font-size: 11px;
}
.ingredient-suggestion-action {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  color: var(--gold);
}
.ingredient-suggestion-action .app-icon { width: 24px; height: 24px; }
.ingredient-suggestion:disabled { cursor: default; }
.ingredient-suggestion:disabled .ingredient-suggestion-action { color: #90c99a; }
.ingredient-form input,
.search-input,
input,
textarea,
select {
  font: inherit;
  color: var(--ink);
  min-width: 0;
  width: 100%;
  background: #111;
  border: 1px solid #48433d;
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 48px;
  outline: none;
}
.ingredient-form input:focus,
.search-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #b48a5933;
}
.gold-button,
.outline-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 17px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.gold-button {
  white-space: nowrap;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #17130f;
}
.outline-button,
.file-button {
  border: 1px solid #64523e;
  background: transparent;
  color: var(--gold-light);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #534536;
  background: #28231e;
  color: var(--ink);
  border-radius: 24px;
  padding: 8px 13px;
  font: inherit;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.chip .remove {
  color: var(--gold-light);
  font-size: 18px;
}
.status,
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.status {
  min-height: 0;
  margin: 8px 0 0;
}
.storage-notice {
  color: #9c2f24;
  font-weight: 650;
  padding: 9px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #fff1ed;
}
.tool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.tool-row details {
  border-top: 1px solid var(--line);
  min-width: 0;
}
.tool-row summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 13px;
}
.tool-row details p {
  margin: 0 0 10px;
}
.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.segmented button {
  flex: 1;
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
}
.segmented button.selected {
  background: #423629;
  color: #f1d4ae;
}
.file-button {
  position: relative;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
  margin: 4px 0;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-button:focus-within {
  outline: 2px solid var(--gold);
}
.stack {
  display: grid;
  gap: 8px;
}
.photo-result {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.photo-result img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #080808;
  border-radius: 6px;
  margin-bottom: 8px;
}
.photo-result label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}
.discovery {
  margin: 30px 0 20px;
}
.home-suggestion {
  min-height: 36px;
}
.suggestion-card {
  padding: 16px 18px;
  border: 1px solid #51422f;
  border-radius: 12px;
  background: linear-gradient(120deg, #292219, #1c1b19);
  cursor: pointer;
}
.suggestion-card h3 {
  font:
    normal 22px Georgia,
    serif;
  margin: 2px 0 4px;
}
.suggestion-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.tabs button {
  flex: none;
  min-height: 48px;
  padding: 9px 13px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.tabs button.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}
.recipe-section {
  padding-top: 23px;
}
.recipe-section > .section-head h2 {
  font-size: 23px;
}
.search-input {
  margin-bottom: 10px;
}
.filter-row {
  display: flex;
  gap: 10px;
}
.filter-row label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
}
.filter-row select {
  display: block;
  margin-top: 4px;
}
.recipe-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 13px 0;
}
.recipe-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.recipe-card:hover {
  border-color: #806545;
}
.recipe-card h3 {
  font:
    normal 22px/1.12 Georgia,
    serif;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.recipe-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
}
.recipe-card .card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: 13px;
}
.tag {
  color: var(--gold-light);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.missing {
  color: #c8b9a5;
  font-size: 11px;
}
.full-width {
  width: 100%;
  margin: 8px 0;
}
.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.footer-links a,
.footer-links button {
  color: var(--gold-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.auth-screen {
  min-height: calc(100vh - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: calc(100dvh - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(20px, 3vw, 32px) 20px;
}
.auth-card {
  max-width: 500px;
  width: 100%;
  min-width: 0;
  padding: 36px 36px 32px;
  text-align: center;
  background: linear-gradient(160deg, #2c211c, #1b1512);
  border: 1px solid #bda08c30;
  border-radius: 24px;
  box-shadow: 0 20px 60px #0006;
}
.auth-card h1 {
  font-size: clamp(44px, 10vw, 60px);
  line-height: 1.05;
  margin: 16px 0 28px;
}
.auth-card .eyebrow {
  color: #d5a084;
  line-height: 1.6;
  font-size: 10px;
  letter-spacing: 0.15em;
}
.auth-card > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 38ch;
  margin: 16px auto 22px;
}
.google-button {
  min-height: 44px;
  width: min(100%, 320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color-scheme: light;
}
.google-button iframe {
  display: block;
  border-radius: 24px;
}
.auth-steps {
  display: grid;
  gap: 20px;
  max-width: 360px;
  margin: 0 auto 30px;
  padding: 0;
  list-style: none;
}
.auth-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-align: left;
}
.auth-steps .app-icon {
  color: var(--gold-light);
  width: 24px;
  height: 24px;
}
.auth-steps strong,
.auth-steps small {
  display: block;
}
.auth-steps small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 5px;
}
.auth-steps strong {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}
.auth-card > p.auth-signin {
  border-top: 1px solid #bda08c26;
  max-width: 320px;
  padding-top: 24px;
  margin: 0 auto 16px;
  font-size: 13px;
}
.auth-card > #authStatus:empty { display: none; }
.auth-card > p.auth-privacy {
  font-size: 12px;
  line-height: 1.6;
  margin: 16px auto 0;
}
.auth-privacy a { color: var(--gold-light); text-decoration: underline; }
.loading-screen {
  padding: 48px 4px;
  color: var(--muted);
}
.dialog {
  width: min(600px, calc(100% - 24px));
  max-height: min(90dvh, 900px);
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  overflow: auto;
}
/* viewport.js supplies these bounds while a form dialog has the mobile keyboard. */
.dialog.vv-keyboard-dialog {
  left: 50%;
  top: var(--vv-top, 50%);
  max-height: min(var(--vv-height, 90dvh), 900px);
  margin: 0;
  transform: translateX(-50%);
}
.dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}
#purchasePreviewDialog {
  width: min(600px, calc(100% - 32px));
  height: min(90dvh, 850px);
  padding: 16px;
  overflow: hidden;
  background: #1a1a1a;
}
#purchasePreviewDialog[open] {
  display: flex;
  flex-direction: column;
}
#purchasePreviewDialog .dialog-head {
  position: relative;
  flex: 0 0 auto;
  align-items: start;
}
#purchasePreviewDialog .dialog-head > div {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 12px 46px 0;
}
#purchasePreviewDialog .dialog-head > .icon-button {
  position: absolute;
  top: 0;
  right: 0;
}
#purchasePreviewTitle {
  margin: 0;
  font: 700 20px/1.2 Arial, sans-serif;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}
#purchasePreviewCount {
  margin: 6px 0 0;
  color: #b49185;
  font-size: 13px;
}
#purchasePreviewList {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
#purchasePreviewList .recipe-card {
  position: relative;
  flex: 0 0 min(280px, 100%);
  width: min(280px, 100%);
  height: 100%;
  overflow-y: auto;
  scroll-snap-align: start;
}
.preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}
.preview-actions .preview-find {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 48px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: #26c6da;
  color: #000;
  font: 700 11px/1.2 Arial, sans-serif;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.preview-find small {
  flex-basis: 100%;
  text-align: center;
  font-size: 10px;
}
.preview-find .app-icon {
  width: 18px;
  height: 18px;
}
#purchasePreviewAdd {
  width: 48px;
  height: 48px;
  background: #422f29;
}
#purchasePreviewAdd .app-icon {
  width: 20px;
  height: 20px;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dialog-head h2 {
  font:
    normal 27px Georgia,
    serif;
  margin: 0;
}
.dialog-head .icon-button {
  flex: none;
}
.dialog form > label,
.dialog > label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--gold-light);
  font-size: 12px;
}
.dialog textarea {
  resize: vertical;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.detail-title {
  font:
    normal 34px/1.05 Georgia,
    serif;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 18px;
}
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 9px;
  color: var(--gold-light);
  font-size: 11px;
}
.detail-section {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.detail-section h3 {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.detail-section li,
.detail-section p {
  color: #ded9d2;
  line-height: 1.65;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.detail-actions button {
  flex: 1;
  min-width: 110px;
}
.toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #302a22;
  border: 1px solid #64523e;
  border-radius: 10px;
  padding: 11px 16px;
  color: #f1e1c9;
  max-width: calc(100% - 30px);
  transition: 0.2s;
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.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;
}
[hidden] {
  display: none !important;
}
@media (max-width: 620px) {
  .app-shell {
    width: calc(100% - 28px);
  }
  .topbar {
    height: 58px;
  }
  .welcome-row {
    padding: 23px 2px 18px;
  }
  .welcome-row h1 {
    font-size: 43px;
  }
  .bar-panel {
    padding: 16px;
  }
  .tool-row {
    grid-template-columns: 1fr;
  }
  .recipe-list {
    grid-template-columns: 1fr;
  }
  .recipe-card {
    padding: 15px;
  }
  .filter-row {
    gap: 7px;
  }
  .filter-row select {
    font-size: 14px;
    padding: 10px 8px;
  }
  .auth-card {
    padding: 30px 22px 28px;
    border-radius: 20px;
  }
  .dialog {
    padding: 17px;
  }
  .detail-title {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


.product-link {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ingredient-text .product-link > small {
  display: block;
  margin-top: 2px;
  color: #d7c5bb;
  font-size: 11px;
  line-height: 1.3;
}
#ingredientEdit {
  flex: none;
  padding-left: 12px;
  padding-right: 12px;
}
.ingredient-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}
.ingredient-group .eyebrow {
  flex-basis: 100%;
  margin: 3px 0;
}
.qr-dialog {
  text-align: center;
}
.qr-dialog .dialog-head {
  text-align: left;
}
.qr-dialog img {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  margin: 12px auto;
}
.qr-dialog .full-width {
  display: flex;
  text-decoration: none;
}
.qr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.qr-actions > * {
  min-height: 46px;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
}
#qrPrintTitle, #qrPrintCaption { display: none; }
@media print {
  body { background: #fff !important; }
  body > main.app-shell { display: block !important; }
  main.app-shell > * { display: none !important; }
  #qrDialog[open], #qrDialog[open] * { display: block !important; visibility: visible !important; }
  #qrDialog[open] .dialog-head, #qrDialog[open] #qrActions { display: none !important; }
  #qrDialog[open] {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-shadow: none;
  }
  #qrDialog[open]::backdrop, #qrStatus {
    display: none !important;
  }
  #qrPrintTitle, #qrPrintCaption { display: block; color: #000; }
  #qrPrintTitle { margin: 0 0 16px; font-size: 20pt; }
  #qrPrintCaption { margin: 16px 0 0; font-size: 11pt; }
  #qrPrintSheet { padding: 12mm; text-align: center; }
  .qr-dialog img {
    width: min(150mm, 90vw);
    max-width: 150mm;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    image-rendering: pixelated;
  }
}
.recipe-art {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -2px 0 8px;
  background: radial-gradient(ellipse at 50% 100%, #b48a5925, transparent 70%);
  border-radius: 8px;
}
.recipe-art svg {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 5px 9px #0008);
}
.recipe-art[data-shape="stem"] svg {
  width: 70px;
  height: 70px;
}
.starter-label {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.chip-row {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid #534536;
  background: #28231e;
  border-radius: 24px;
  padding: 0 4px 0 12px;
}
.chip-label {
  max-width: min(260px, 55vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.chip-edit,
.chip-remove {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--gold-light);
  font: inherit;
  cursor: pointer;
}
.chip-remove {
  font-size: 20px;
}
.chip-edit:hover,
.chip-remove:hover {
  background: #ffffff12;
}
.staple-chip {
  font-size: 12px;
}
.qr-dialog img {
  image-rendering: pixelated;
}
.filters-panel {
  margin: 7px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 0 11px;
}
.filters-panel summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold-light);
  font-size: 13px;
  cursor: pointer;
}
.filter-group {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.filter-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip,
.filter-chips [data-glass] {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #514330;
  border-radius: 22px;
  background: #22201d;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.filter-chip.selected,
.filter-chips [data-glass].selected {
  background: #493a29;
  border-color: var(--gold);
  color: #f1d8b5;
}

/* Android-inspired full-screen bar workspace */
:root {
  --bg: #17110e;
  --panel: #211a16;
  --panel2: #30251f;
  --line: #493a32;
  --ink: #f5eee8;
  --muted: #c2b5ad;
  --gold: #a8461d;
  --gold-light: #df8152;
  --rust: #8e3710;
  --taupe: #4e342e;
  --teal: #26c6da;
  font-family: Arial, Helvetica, sans-serif;
}
html,
body {
  min-height: 100%;
  width: 100%;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 12%), rgb(0 0 0 / 20%)),
    url("/barsight/app/web/assets/background.webp") center center / cover fixed,
    #17110e;
}
.app-shell {
  position: relative;
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 0 env(safe-area-inset-bottom);
  overflow-x: clip;
  background: transparent;
  box-shadow: 0 0 50px #0007;
}
.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  /* Keep cutout clearance inside the header instead of a blank strip above it. */
  height: calc(58px + env(safe-area-inset-top));
  gap: 9px;
  justify-content: initial;
  padding: env(safe-area-inset-top) 12px 0;
  border: 0;
  background: var(--taupe);
  box-shadow: 0 2px 8px #0006;
}
#menuButton,
#accountButton {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff8f2;
}
#menuButton svg,
#accountButton svg {
  width: 24px;
  height: 24px;
  display: block;
  margin: auto;
}
.brand,
.top-actions,
.mode-badge {
  display: none;
}
.toolbar-search {
  flex: 1 1 auto;
  min-width: 0;
}
#recipeSearch {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #ffffff2b;
  border-radius: 22px;
  background: #ffffff17;
  color: white;
  font: inherit;
}
#recipeSearch::placeholder {
  color: #f2e7e1c9;
}
.menu-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: min(340px, 88vw);
  overflow-y: auto;
  padding: calc(6px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: #18110c;
  z-index: 31;
}
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  background: #0009;
}
.resources-heading { display: flex; align-items: center; border-bottom: 1px solid #555; }
.resources-heading h2 { font-size: 20px; flex: 1; }
.resources-heading #menuClose { width: 40px; padding: 8px; }
.menu-panel h3, .menu-panel summary { color: #bc6339; font-size: 14px; font-weight: bold; padding: 16px 12px 8px; }
.menu-panel h3 { border-top: 1px solid #444; margin-top: 16px; }
.menu-panel details { padding: 0; border: 0; }
.menu-panel p { padding: 0 12px; }
.menu-panel [data-resource], .menu-panel a { gap: 16px; font-size: 16px; }
.menu-panel .app-icon { flex: 0 0 24px; width: 24px; height: 24px; }
.web-account { margin-top: 20px; border-top: 1px solid #444 !important; }
#workspace {
  min-height: calc(100dvh - 58px - env(safe-area-inset-top));
}
.bar-screen {
  min-height: calc(100dvh - 58px - env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3vw, 24px) clamp(12px, 4vw, 24px)
    calc(24px + env(safe-area-inset-bottom));
}
.bar-panel {
  width: 100%;
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.lane-heading,
.purchase-heading {
  margin: 19px 0 10px;
  color: #f7ede7;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}
.lane-chips,
.purchase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.chip-row {
  min-width: 0;
  min-height: 42px;
  gap: 0;
  border: 1px solid #b3532d;
  background: #8e3710;
  color: white;
  padding: 0 2px 0 11px;
}
.chip-label {
  min-height: 40px;
  max-width: min(230px, 57vw);
  color: white;
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-overflow: ellipsis;
}
.chip-edit,
.chip-remove {
  min-width: 36px;
  min-height: 40px;
  color: #fff5ee;
}
.chip-remove {
  font-size: 18px;
}
.chip-row:has(.chip-label:only-child) {
  padding-right: 11px;
}
.purchase-panel {
  margin-top: 27px;
  padding: 17px 15px 15px;
  border: 1px solid #ffffff25;
  border-radius: 14px;
  background: rgb(23 19 17 / 66%);
}
.purchase-panel .purchase-heading {
  margin: 0 0 12px;
}
.purchase-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.purchase-row {
  flex: 0 0 118px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 11px 8px 8px;
  border: 1px solid #ffffff20;
  border-radius: 11px;
  background: #ffffff09;
}
.purchase-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.purchase-name,
.purchase-add {
  min-width: 0;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.purchase-name {
  min-height: 52px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.purchase-add {
  align-self: flex-end;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  background: #493b35;
  color: var(--teal);
  font-size: 24px;
  text-align: center;
}
.bar-actions {
  container-type: inline-size;
  position: static;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
}
.bar-actions .ingredient-entry-hint {
  margin: 0 0 16px;
  color: #dfd0c7;
  font-size: 14px;
  line-height: 1.5;
}
.bar-actions #micStatus { margin: 8px 0 0; }
.bar-actions #micStatus:empty { display: none; }
.action-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(15px, 6vw, 36px);
}
.capture-action,
.recipes-action {
  display: flex;
  min-width: 58px;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #f4e8e0;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.capture-action svg {
  width: 46px;
  height: 46px;
  padding: 11px;
  border-radius: 50%;
  background: var(--taupe);
  color: white;
}
.capture-action.is-recording > span {
  background: #b3261e;
}
.recipes-action {
  min-width: 100px;
  min-height: 54px;
  flex-direction: row;
  gap: 7px;
  padding: 0 15px;
  border-radius: 28px;
  background: var(--rust);
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.possible-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff24;
  font-size: 11px;
}
body[data-screen="recipes"] .bar-screen,
body[data-screen="bar"] #recipeScreen,
body[data-screen="auth"] #workspace {
  display: none !important;
}
body[data-screen="recipes"] #recipeScreen {
  display: block;
  padding: 0 12px 30px;
}
body[data-screen="recipes"] .app-shell {
  padding-bottom: env(safe-area-inset-bottom);
}
body[data-screen="recipes"] .bar-actions {
  display: none;
}
.recipe-section {
  margin: 0;
  padding-top: 15px;
}
.recipe-list {
  grid-template-columns: minmax(0, 1fr);
}
.suggestion-card {
  border: 1px solid var(--teal);
  background: rgb(20 40 41 / 35%);
  box-shadow: inset 0 0 0 1px #26c6da20;
}
.suggestion-card h3 {
  font-family: Arial, Helvetica, sans-serif;
}
.suggestion-card .tag,
.suggestion-card .missing {
  color: var(--teal);
}
.recipe-card h3,
.detail-title,
.dialog-head h2,
.section-head h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}
.photo-result label,
.review-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
    [type="hidden"]
  ),
textarea,
select {
  min-width: 0;
  max-width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
  box-shadow: none;
}
input[type="file"] {
  max-width: 100%;
}
.review-row input[type="checkbox"] {
  flex: 0 0 22px;
}
.review-row label {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
}
@media (max-width: 430px) {
  .app-shell {
    width: 100%;
  }
  .bar-screen {
    padding-left: 12px;
    padding-right: 12px;
  }
  .purchase-panel {
    margin-left: 0;
    margin-right: 0;
    padding: 14px 11px;
  }
  .purchase-row {
    flex-basis: 108px;
  }
  .dialog {
    width: calc(100% - 16px);
    padding: 15px;
  }
  .action-controls {
    gap: clamp(10px, 5vw, 22px);
  }
}

/* Final component alignment for the grouped bar and horizontal suggestions. */
.topbar .toolbar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ffffff2b;
  border-radius: 24px;
  background: #ffffff17;
  color: #f5eae4;
}
.toolbar-search > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
#recipeSearch {
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#recipeSearch:focus {
  border: 0;
  box-shadow: none;
}
body[data-screen="auth"] .toolbar-search,
body[data-screen="auth"] #menuButton,
body[data-screen="auth"] #accountButton {
  display: none;
}
body[data-screen="auth"] .topbar {
  justify-content: center;
}
body[data-screen="auth"] .topbar::before {
  content: "Barsight";
  color: #fff8f2;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.mode-badge {
  display: block;
}
.bar-heading {
  display: none;
}
.lane-heading-row {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.lane-heading-row .lane-heading {
  margin: 0;
}
.lane-heading-row .quiet-button {
  min-height: 36px;
  padding: 5px 10px;
  color: #f1ded5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.ingredient-lane {
  min-width: 0;
  margin: 10px 0 17px;
}
.lane-heading {
  margin: 0 0 8px;
  color: #eee;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.lane-chips {
  align-items: center;
  gap: 8px;
}
.empty-lane {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid #ffffff40;
  border-radius: 20px;
  background: #18110c99;
  color: #ddd;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
body[data-screen="bar"] .toast {
  bottom: calc(120px + env(safe-area-inset-bottom));
}
#captureDialog .tool-row {
  margin-top: 0;
  border-top: 0;
}
.camera-dialog .tool-row {
  display: block;
}
#captureDialog details {
  padding-top: 0;
  border-top: 0;
}
#captureDialog details > summary {
  display: none;
}
#captureDialog.camera-dialog {
  width: var(--camera-width, 100%);
  max-width: 600px;
  height: var(--camera-height, 100dvh);
  max-height: var(--camera-height, 100dvh);
  top: var(--camera-top, 0px);
  left: var(--camera-left, 0px);
  right: auto;
  bottom: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  overflow-y: auto;
  container-name: camera;
  container-type: inline-size;
}
.camera-dialog .dialog-head {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(#000b, #0000);
}
.camera-dialog .dialog-head h2 {
  font-size: 18px;
}
#cameraStage {
  position: relative;
  height: var(--camera-height, 100dvh);
  overflow: hidden;
}
#cameraViewport {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  touch-action: none;
}
#cameraPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#cameraFallback {
  position: absolute;
  top: 30%;
  left: 20px;
  right: 20px;
  text-align: center;
}
#cameraFallback button {
  margin: 4px;
}
.camera-controls {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: #000b;
}
.camera-modes {
  display: flex;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.camera-modes button {
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 8px 3px;
  background: transparent;
  border: 0;
  color: #aaa;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}
.camera-modes button.selected {
  background: transparent;
  color: #fbf6a7;
}
#cameraHint {
  text-align: center;
  font-size: 12px;
  color: #eee;
  margin: 4px 0 12px;
}
#cameraShots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}
.camera-shot {
  position: relative;
  flex: 0 0 64px;
  height: 64px;
}
.camera-shot img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid white;
  border-radius: 8px;
}
.camera-shot button {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: #000b;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 22px;
}
.camera-buttons {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
}
.camera-buttons button {
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
}
.camera-secondary {
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  color: white;
  font-size: 13px;
}
.camera-shutter {
  width: 72px;
  height: 72px;
  background: #fbf6a7;
  color: #000;
  font-size: 40px;
}
.camera-confirm {
  width: 60px;
  height: 60px;
  background: #4caf50;
  color: white;
  font-size: 32px;
}
.camera-buttons button:disabled {
  opacity: 0.35;
}
.camera-confirm[aria-busy="true"] {
  background: #666;
  opacity: 1;
}
.camera-dialog #photoStatus {
  position: absolute;
  top: calc(62px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 2;
  color: white;
  text-shadow: 0 1px 3px #000;
}
.camera-dialog #photoResults:not(:empty) {
  padding: calc(104px + env(safe-area-inset-top)) 16px
    calc(24px + env(safe-area-inset-bottom));
}
.chip-row {
  min-height: 44px;
  gap: 2px;
  border: 1.5px solid #b14b20;
  border-radius: 24px;
  padding: 0 4px 0 12px;
  background: var(--rust);
}
.chip-label {
  min-width: 0;
  min-height: 42px;
  max-width: min(240px, 57vw);
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.chip-edit,
.chip-remove {
  min-width: 34px;
  min-height: 40px;
  color: #ffe9de;
}
.chip-remove {
  font-size: 22px;
}
.purchase-panel {
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.purchase-panel .purchase-heading {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 9px;
  border-radius: 5px;
  background: #17110e;
  color: #f0e5df;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.purchase-heading svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: var(--teal);
}
.purchase-chips {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.purchase-row {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: visible;
  overscroll-behavior-inline: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-width: none;
}
.purchase-row::-webkit-scrollbar {
  display: none;
}
.purchase-chip {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  max-width: 100%;
  padding: 2px 6px 2px 13px;
  border: 1.5px solid var(--teal);
  border-radius: 24px;
  background: rgb(19 28 28 / 57%);
  white-space: nowrap;
}
.purchase-name {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 32px;
  max-width: min(225px, 58vw);
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: var(--teal);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.purchase-add {
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--teal);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}
.bar-actions h2 {
  margin: 0 0 6px;
  color: #f7ede7;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.2;
  font-weight: 700;
}
.bar-actions .action-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(100px, .8fr);
  gap: 8px;
  align-items: stretch;
}
.bar-actions .capture-action {
  min-width: 0;
  min-height: 56px;
  flex-direction: row;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #ffffff40;
  border-radius: 28px;
  background: #18110c99;
  color: #f7ede7;
}
.bar-actions .capture-action > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  background: transparent;
}
.bar-actions .capture-action svg {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.bar-actions .capture-action small {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.bar-actions .ingredient-add-action { justify-content: space-between; }
.bar-actions #micAction { flex-direction: column; padding: 6px 2px; gap: 2px; }
.bar-actions #micAction small { font-size: 11px; }
.bar-actions #micAction.is-recording { background: #b3261e; }
.bar-actions .camera-primary {
  background: var(--rust);
  border-color: #f2b084;
  box-shadow: 0 3px 12px #17110e66;
  color: white;
}
.bar-actions .camera-primary > span,
.bar-actions .camera-primary svg { width: 30px; height: 30px; }
.bar-actions .camera-primary > span { flex-basis: 30px; }
.bar-actions .capture-action:hover { filter: brightness(1.15); }
.bar-recipe-actions { margin: 18px 0 0; }
.bar-recipe-actions .recipe-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.recipes-action {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  gap: 6px;
  padding: 0 8px;
  border-radius: 26px;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.2;
}
.recipes-action svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
}
.possible-count {
  display: block;
  min-width: 0;
  min-height: 18px;
  margin-top: 2px;
  border-radius: 0;
  background: transparent;
  color: #e5d8d0;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 350px) {
  .topbar {
    gap: 5px;
    padding-inline: 7px;
  }
  #menuButton,
  #accountButton {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .action-controls {
    grid-template-columns: repeat(3, minmax(44px, 1fr)) minmax(136px, 1.5fr);
    gap: 3px;
  }
  .capture-action > span {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .recipes-action {
    padding-inline: 8px;
  }
}

/* The recipe library uses the native cocktail-card presentation. */
body[data-screen="recipes"] {
  background: #1b120d;
}
body[data-screen="recipes"] .app-shell {
  background: #1b120d;
  box-shadow: none;
}
body[data-screen="recipes"] #recipeScreen {
  position: relative;
  display: block;
  min-height: calc(100dvh - 58px - env(safe-area-inset-top));
  padding: 0 12px calc(92px + env(safe-area-inset-bottom));
}
body[data-screen="recipes"] #backToBar {
  position: absolute;
  top: 0;
  left: 8px;
  z-index: 2;
  min-height: 48px;
  padding-inline: 10px;
  color: #f3e4dc;
  font-size: 14px;
}
body[data-screen="recipes"] .discovery {
  display: none;
}
body[data-screen="recipes"] .tabs {
  position: sticky;
  z-index: 5;
  top: calc(58px + env(safe-area-inset-top));
  display: flex;
  gap: 0;
  height: 49px;
  margin: 0 -12px;
  padding-left: 0;
  overflow-x: auto;
  border: 0;
  background: #4e342e;
  scrollbar-width: none;
}
body[data-screen="recipes"] .tabs::-webkit-scrollbar {
  display: none;
}
body[data-screen="recipes"] .tabs button {
  flex: 0 0 auto;
  min-height: 49px;
  padding: 7px 15px 5px;
  border: 0;
  border-bottom: 4px solid transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
body[data-screen="recipes"] .tabs button.active {
  border-bottom-color: #fbf6a7;
  color: #fff;
  font-weight: 700;
}
body[data-screen="recipes"] .recipe-section {
  padding-top: 9px;
}
body[data-screen="recipes"] .recipe-section > .section-head {
  min-height: 42px;
  margin: 0 0 5px;
}
body[data-screen="recipes"] #listTitle {
  color: #fff;
  font:
    700 18px/1.25 Arial,
    Helvetica,
    sans-serif;
}
body[data-screen="recipes"] #importButton,
body[data-screen="recipes"] .footer-links {
  display: none;
}
body[data-screen="recipes"] .filters-panel {
  display: none;
}
body[data-screen="recipes"] .filter-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  margin: 3px 0 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
body[data-screen="recipes"] .filter-strip::-webkit-scrollbar {
  display: none;
}
body[data-screen="recipes"] #allFilters,
body[data-screen="recipes"] #tagFilter button,
body[data-screen="recipes"] #glassFilter button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 5px 13px;
  border: 1px solid #765749;
  border-radius: 20px;
  background: #38251e;
  color: #f5eae4;
  font:
    600 12px/1 Arial,
    Helvetica,
    sans-serif;
  white-space: nowrap;
}
body[data-screen="recipes"] #allFilters[aria-pressed="true"],
body[data-screen="recipes"] #tagFilter button[aria-pressed="true"],
body[data-screen="recipes"] #glassFilter button[aria-pressed="true"] {
  border-color: #fbf6a7;
  color: #fbf6a7;
}
body[data-screen="recipes"] #tagFilter,
body[data-screen="recipes"] #glassFilter {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  width: max-content;
}
body[data-screen="recipes"] #filtersSummary {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
body[data-screen="recipes"] .library-count,
body[data-screen="recipes"] .recipe-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 27px;
  color: #d7c5bb;
  font-size: 12px;
}
body[data-screen="recipes"] #recipeStatus {
  min-height: 20px;
  margin: 0;
  color: #d7c5bb;
  font-size: 12px;
}
body[data-screen="recipes"] .recipe-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  margin: 5px 0 14px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card {
  width: min(100%, 300px);
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #000;
  color: #fff;
  box-shadow: 0 2px 5px #0007;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-art {
  height: 150px;
  margin: 0 0 9px;
  overflow: hidden;
  border-radius: 7px;
  background: transparent;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-art svg,
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card > .tag {
  display: none;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card h3 {
  margin: 4px 0 9px;
  color: #fff;
  font:
    700 18px/1.2 Arial,
    Helvetica,
    sans-serif;
  text-transform: uppercase;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card .riff {
  color: #f3883b;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-ingredients {
  margin: 0 0 10px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-ingredients h4,
:is(body[data-screen="recipes"], .native-recipe-preview) .card-method h4 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-ingredients ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-ingredients li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  color: #f1ece8;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator {
  color: #4caf50;
  font-size: 15px;
  text-align: center;
  display: grid;
  place-items: center;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator.riff {
  color: #f3883b;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator.optional {
  color: #aaa;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator.missing {
  color: var(--teal);
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-method {
  margin-top: 8px;
  color: #eee8e4;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-method p {
  margin: 0;
  color: #e2dad4;
  font-size: 14px;
  line-height: 1.4;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags span {
  padding: 3px 8px;
  border: 1px solid #604b3d;
  border-radius: 15px;
  background: #30231c;
  color: #ead0a7;
  font-size: 10px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions button {
  flex: 0 0 40px;
  width: 40px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #455a64;
  color: #fff;
  font-size: 18px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions button.edit,
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions button.delete {
  background: #60453e;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions .availability-action {
  flex: 1 1 auto;
  width: auto;
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-size: 12px;
}
body[data-screen="recipes"] #showMore {
  width: min(100%, 300px);
  margin-inline: auto;
}
body[data-screen="recipes"] .library-fab {
  position: fixed;
  z-index: 9;
  right: max(14px, calc((100vw - 760px) / 2 + 14px));
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
body[data-screen="recipes"] .library-fab button {
  display: grid;
  width: 50px;
  height: 50px;
  min-height: 50px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #455a64;
  color: white;
  box-shadow: 0 3px 8px #0008;
}
body[data-screen="recipes"] .library-fab button.create {
  background: #8a3c19;
}
body[data-screen="recipes"] .library-fab button.qr {
  background: #60453e;
}
body[data-screen="recipes"] .library-fab svg {
  width: 22px;
  height: 22px;
}
body[data-screen="recipes"] .dialog {
  border-color: #3d3029;
  border-radius: 12px;
  background: #1b120d;
}
body[data-screen="recipes"] #detailContent .recipe-art {
  height: 150px;
  margin-bottom: 12px;
}
body[data-screen="recipes"] #detailContent .detail-title {
  font:
    700 20px/1.2 Arial,
    Helvetica,
    sans-serif;
  text-transform: uppercase;
}
body[data-screen="recipes"] #detailContent .detail-section h3 {
  color: #fff;
  font:
    700 14px/1.3 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
body[data-screen="recipes"] #detailContent .detail-section li,
body[data-screen="recipes"] #detailContent .detail-section p {
  color: #eee8e4;
  font-size: 14px;
}

/* Native library toolbar, filters, tag badges and card actions. */
#backToBar {
  display: none;
}
body[data-screen="recipes"] #menuButton {
  display: none;
}
body[data-screen="recipes"] #backToBar {
  position: static;
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
#backToBar svg {
  width: 24px;
  height: 24px;
}
body[data-screen="recipes"] .filter-strip {
  margin: 0 -12px;
  width: calc(100% + 24px);
  padding: 8px 16px;
  background: #121212;
}
body[data-screen="recipes"] #tagFilter button,
body[data-screen="recipes"] #glassFilter button {
  border-color: #888;
  background: #2d2d2d;
  color: var(--tag-color, #fff);
  font-size: 13px;
}
body[data-screen="recipes"] #tagFilter button[aria-pressed="true"],
body[data-screen="recipes"] #glassFilter button[aria-pressed="true"] {
  border-color: var(--tag-color, #fff);
  background: var(--tag-color, #fff);
  color: #000;
  font-weight: 700;
}
body[data-screen="recipes"] #allFilters[aria-pressed="true"] {
  background: #fff;
  color: #000;
  border-color: #fff;
}
body[data-screen="recipes"] #allFilters {
  background: #2d2d2d;
  border-color: #888;
  color: #fff;
}
body[data-screen="recipes"] #tagFilter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#tagFilter svg {
  width: 16px;
  height: 16px;
}
body[data-screen="recipes"] .library-count {
  min-height: 22px;
  margin: 4px 0;
}
body[data-screen="recipes"] #listTitle {
  margin: 0;
  font-size: 14px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card {
  position: relative;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .recipe-card h3 {
  padding-right: 26px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator {
  width: 18px;
  height: 1.35em;
  font-size: inherit;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-indicator svg {
  width: 16px;
  height: 16px;
}
body[data-screen="recipes"] .ingredient-text small {
  display: block;
  color: #aaa;
  font-size: 11px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-text .riff {
  color: #ffa726;
}
.camera-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto 8px;
  font-size: 12px;
}
.camera-zoom input {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  padding: 0;
  accent-color: #fbf6a7;
}
.camera-zoom output {
  min-width: 35px;
}
@container camera (max-width: 300px) {
  .camera-controls { padding-inline: 8px; }
  .camera-buttons { gap: 6px; }
  .camera-secondary, .camera-confirm { min-width: 48px; width: 48px; min-height: 48px; height: 48px; }
  .camera-shutter { width: 60px; height: 60px; }
  .camera-modes { gap: 6px; }
}
@container camera (max-width: 200px) {
  .camera-controls { padding-inline: 6px; }
  .camera-buttons { gap: 4px; }
  .camera-secondary, .camera-confirm { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  .camera-shutter { width: 48px; height: 48px; }
  .camera-modes { flex-direction: column; gap: 0; }
  .camera-modes button { min-height: 28px; padding: 4px 0; overflow-wrap: normal; }
}
@container (max-width: 300px) {
  .action-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
  .capture-action { min-width: 44px; }
  .recipe-action-wrap { grid-column: 1 / -1; }
  .recipes-action { white-space: normal; padding-inline: 6px; }
}
@container (max-width: 130px) {
  .action-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 500px) {
  .camera-controls { padding-block: 6px; }
  #cameraHint { display: none; }
  #cameraShots { margin-bottom: 4px; }
  .camera-shot, .camera-shot img { width: 44px; height: 44px; }
  .camera-shot { flex-basis: 44px; }
}
.camera-short .camera-controls { padding-block: 6px; }
.camera-short #cameraHint { display: none; }
.camera-short #cameraShots { margin-bottom: 4px; }
.camera-short .camera-shot, .camera-short .camera-shot img { width: 44px; height: 44px; }
.camera-short .camera-shot { flex-basis: 44px; }
.camera-dialog.camera-short #photoStatus {
  top: calc(12px + env(safe-area-inset-top));
  right: 76px;
  margin: 0;
  max-height: 46px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 16px;
}
.camera-dialog.camera-short:has(#photoStatus:not(:empty)) #captureTitle {
  visibility: hidden;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .ingredient-text.missing .product-link {
  color: var(--teal);
  font-weight: 700;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  flex-direction: column;
  gap: 0;
  margin: 0;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags .card-tag {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--tag-color);
  cursor: pointer;
}
.card-tag svg {
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 20%, #000);
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions {
  justify-content: space-evenly;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions button,
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions button.edit {
  flex: 0 0 44px;
  width: 44px;
  background: transparent;
  color: #fff;
}
.card-actions svg {
  width: 22px;
  height: 22px;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-actions .favorite {
  color: #ffeb3b;
}
.favorite[aria-pressed="true"] svg {
  fill: currentColor;
}
body[data-screen="recipes"] .library-fab {
  flex-direction: column;
  gap: 12px;
}
body[data-screen="recipes"] .library-fab #importButton {
  display: grid;
}
body[data-screen="recipes"] #recipeScreen {
  padding-bottom: calc(190px + env(safe-area-inset-bottom));
}
button:focus-visible,
.recipe-card:focus-visible {
  outline: 2px solid #fbf6a7;
  outline-offset: 3px;
}
body[data-screen="recipes"][data-recipe-view="results"] {
  background: #100d08;
}
body[data-screen="recipes"][data-recipe-view="results"] .app-shell {
  background:
    linear-gradient(#0007, #0009),
    url("assets/background.webp") center / cover fixed;
}
body[data-recipe-view="results"] #recipeScreen {
  padding: 0 0 calc(32px + env(safe-area-inset-bottom));
}
body[data-recipe-view="results"] .filter-strip {
  width: 100%;
  margin: 0;
}
body[data-recipe-view="results"] .library-count {
  padding: 0 16px;
}
body[data-recipe-view="results"] .recipe-list {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 12px 32px 26px;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 32px;
  scrollbar-width: none;
}
body[data-recipe-view="results"] .recipe-list::-webkit-scrollbar {
  display: none;
}
body[data-recipe-view="results"] .recipe-card {
  flex: 0 0 min(80vw, 300px);
  width: min(80vw, 300px);
  scroll-snap-align: center;
}
body[data-recipe-view="results"] #showMore {
  width: calc(100% - 32px);
  margin: 0 16px;
}
#oneMoreButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 10px 16px;
  padding: 16px 12px;
  border: 2px solid transparent;
  border-radius: 36px;
  background:
    linear-gradient(#171421ef, #171421ef) padding-box,
    linear-gradient(115deg, #429cff, #8b62ff, #66ddff, #429cff) border-box;
  background-size: auto, 220% 100%;
  box-shadow: 0 0 12px #548fff55, 0 0 24px #905bff35;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  animation: one-more-glow 3s ease-in-out infinite;
}
#oneMoreButton > .app-icon { flex-shrink: 0; }
#oneMoreCount {
  color: inherit;
  font-size: inherit;
  line-height: 1.4;
  text-align: center;
}
@keyframes one-more-glow {
  0%, 100% { background-position: 0 0, 0% 50%; box-shadow: 0 0 10px #548fff44, 0 0 18px #905bff2e; }
  50% { background-position: 0 0, 100% 50%; box-shadow: 0 0 16px #548fff77, 0 0 28px #905bff55; }
}
#savedRecipesButton .app-icon {
  color: #ffd700;
}
#savedRecipesButton {
  gap: 16px;
  font-size: 16px;
}
#oneMoreRecipeList {
  scroll-margin-top: calc(112px + env(safe-area-inset-top));
}
.app-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
.chip-remove,
.purchase-add,
.camera-shot button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.staple-chip,
.empty-lane,
.detail-actions button,
#voiceButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.staple-chip .app-icon {
  width: 18px;
  height: 18px;
}
.empty-lane .app-icon {
  width: 28px;
  height: 28px;
}
.camera-buttons .app-icon {
  width: 32px;
  height: 32px;
}
.camera-shot .app-icon {
  width: 20px;
  height: 20px;
}
[data-icon="loading"] {
  animation: icon-spin 1s linear infinite;
}
@keyframes icon-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  [data-icon="loading"] { animation: none; }
}

/* Tighter bar lanes keep the first ingredient group close to the toolbar. */
body[data-screen="bar"] .bar-screen {
  padding-top: clamp(16px, 3vw, 24px);
}
body[data-screen="bar"] .ingredient-lane {
  margin: 6px 0 12px;
}
body[data-screen="bar"] .lane-heading {
  margin-bottom: 5px;
}
body[data-screen="bar"] .lane-heading-row .lane-heading {
  margin: 0;
}
body[data-screen="bar"] .lane-chips {
  gap: 5px;
}
body[data-screen="bar"] .chip-row {
  min-height: 36px;
  padding-inline: 10px 3px;
}
/* Ingredient controls behave as buttons, including on a touch long press. */
.chip-row,
.chip-row *,
.purchase-chip,
.purchase-chip * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body[data-screen="bar"] .chip-label {
  min-height: 34px;
  max-width: min(190px, 49vw);
  font-size: 13px;
}
body[data-screen="bar"] .chip-edit,
body[data-screen="bar"] .chip-remove {
  min-width: 32px;
  min-height: 34px;
}
body[data-screen="bar"] .chip-remove svg {
  width: 16px;
  height: 16px;
}

/* Category badges expand in place to reveal their accessible text label. */
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags .card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 3px;
  width: 36px;
  max-width: min(240px, calc(100vw - 36px));
  min-height: 36px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 20px;
  background: #17110ee8;
  transition: width 180ms ease, border-color 180ms ease, padding 180ms ease;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags .card-tag[aria-expanded="true"] {
  width: max-content;
  padding: 3px 10px 3px 5px;
  border-color: color-mix(in srgb, var(--tag-color) 60%, transparent);
  box-shadow: 0 4px 14px #0008;
}
.card-tag .card-tag-label {
  display: none;
  color: var(--tag-color);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.card-tag[aria-expanded="true"] .card-tag-label {
  display: inline;
}

/* Quiet, focused sign-in handoff while authentication is in progress. */
body[data-screen="signing-in"] #authScreen,
body[data-screen="signing-in"] #loadingScreen,
body[data-screen="signing-in"] #workspace {
  display: none !important;
}
body[data-screen="signing-in"] #signingInScreen {
  min-height: calc(100dvh - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: 28px;
  color: #f0ded4;
  background: radial-gradient(ellipse at center, #5a382790 0, #261a1491 36%, transparent 74%);
  animation: signin-arrive 450ms ease-out both;
}
.signin-orbit {
  position: relative;
  width: 104px;
  height: 104px;
  border: 1px solid #df815270;
  border-radius: 50%;
  box-shadow: 0 0 34px #b3532d35, inset 0 0 24px #b3532d1f;
  animation: signin-orbit 2.8s ease-in-out infinite;
}
.signin-orbit::before,
.signin-orbit::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #df815230;
  border-radius: 50%;
}
.signin-orbit::after {
  inset: 31px;
  background: radial-gradient(circle, #df8152a8, #a8461d 55%, #4e342e 100%);
  box-shadow: 0 0 22px #df815266;
}
#signingInScreen p {
  margin: 0;
  color: #f1ded2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
@keyframes signin-orbit {
  50% { transform: scale(1.07); box-shadow: 0 0 44px #b3532d50, inset 0 0 27px #b3532d2e; }
}
@keyframes signin-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Compact onboarding dialog with a clear current-step indicator. */
.tutorial-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 26px;
  border-color: #765749;
  border-radius: 20px;
  background: linear-gradient(155deg, #302019, #19120f 72%);
  box-shadow: 0 24px 80px #000a;
}
.tutorial-dialog::backdrop {
  background: #080503d9;
  backdrop-filter: blur(7px);
}
.tutorial-step {
  color: #f3e9e1;
  font-size: 15px;
  line-height: 1.6;
}
.tutorial-progress {
  display: flex;
  gap: 7px;
  margin: 18px 0 4px;
}
.tutorial-progress > * {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80695d;
}
.tutorial-progress > .active,
.tutorial-progress > [aria-current="step"] {
  width: 22px;
  border-radius: 5px;
  background: var(--gold-light);
}

/* Small header utilities remain discoverable without competing with navigation. */
.resources-admin-button {
  color: #dfb68a;
  font-size: 12px;
  font-weight: 600;
}
#tutorialButton {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin-left: auto;
  border: 1px solid #ffffff3d;
  border-radius: 50%;
  background: #fff1;
  color: #fff4ec;
  font-size: 15px;
}
.admin-preview-dialog {
  width: min(560px, calc(100% - 28px));
  border-color: #765749;
  border-radius: 16px;
  background: #1c1511;
}
.admin-preview-dialog form > label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #e2c6ad;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .signin-orbit,
  body[data-screen="signing-in"] #signingInScreen {
    animation: none;
  }
  :is(body[data-screen="recipes"], .native-recipe-preview) .card-tags .card-tag {
    transition: none;
  }
}

body[data-screen="auth"] #tutorialButton,
body[data-screen="auth"] #favoritesButton,
body[data-screen="signing-in"] .topbar {
  display: none;
}
body[data-screen="signing-in"] #signingInScreen {
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags {
  align-items: flex-end;
}
:is(body[data-screen="recipes"], .native-recipe-preview) .card-tags .card-tag-label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--tag-color);
  font-size: 13px;
}
.card-tag svg { flex: 0 0 28px; }
#tutorialButton svg { width: 20px; height: 20px; }
#favoritesButton {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffd54f;
}
#favoritesButton svg { width: 24px; height: 24px; }
@media (max-width: 350px) {
  #favoritesButton { flex-basis: 40px; width: 40px; height: 40px; }
}
#clearBar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 44px;
  padding: 0 10px;
}
#clearBar[hidden] { display: none; }
#clearBar .app-icon { width: 22px; height: 22px; }
.tutorial-symbol svg { width: 48px; height: 48px; color: var(--gold-light); }
.tutorial-step h2 { font: normal 28px/1.2 Georgia, serif; }
.tutorial-step p { color: var(--muted); }
.tutorial-progress { margin-bottom: 20px; }
.resources-heading .resources-admin-button {
  padding: 0;
  min-height: 44px;
  font: inherit;
  color: var(--ink);
}
.menu-panel[hidden] { display: none; }
.resources-heading h2 {
  margin: 0;
  padding-left: 52px;
}
.resources-heading {
  min-height: 46px;
}
#menuButton[aria-expanded="true"] {
  position: fixed;
  z-index: 32;
  top: calc(6px + env(safe-area-inset-top));
  left: max(14px, calc((100vw - 760px) / 2 + 12px));
  background: #ffffff12;
  pointer-events: auto;
}
body:has(#menuPanel:not([hidden])) .topbar {
  z-index: 32;
  pointer-events: none;
  background: transparent;
}
body:has(#menuPanel:not([hidden])) .topbar > :not(#menuButton) {
  visibility: hidden;
}
.menu-panel #currentLocation > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 5px 8px 5px 12px;
}
.menu-panel .location-edit {
  flex: 0 0 36px;
  width: 36px;
  min-height: 36px;
  justify-content: center;
  padding: 5px;
  color: #e4ad77;
}
.menu-panel .location-edit .app-icon {
  width: 20px;
  height: 20px;
}
.menu-panel .location-row p {
  margin: 0;
  padding: 0 12px 12px;
}
.popular-ingredients {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.store-suggestions {
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.store-suggestions .store-lookup-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 12px;
  gap: 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #241d17;
  color: #f4ede7;
  text-align: left;
  overflow-wrap: anywhere;
}
.store-suggestions .store-lookup-option span,
.store-suggestions .store-lookup-note {
  font-size: 12px;
  color: #bcb1aa;
}
.store-suggestions .store-lookup-note { padding: 0 12px; }
.store-suggestions .store-lookup-attribution {
  padding: 8px 12px;
  text-align: right;
  font-size: 12px;
  color: #f4ede7;
}
.popular-ingredient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 5px 0;
  text-align: left;
}
:is(body[data-screen="recipes"], body[data-screen="bar"]) .ingredient-text .ingredient-original {
  display: block;
  margin-top: 2px;
  color: #bcb1aa;
  font-size: 11px;
  line-height: 1.25;
}
:is(body[data-screen="recipes"], body[data-screen="bar"]) .ingredient-text .paid-disclosure {
  display: block;
  margin-top: 2px;
  color: #bcb1aa;
  font-size: 10px;
}
:is(body[data-screen="recipes"], body[data-screen="bar"]) .ingredient-text .availability-label {
  display: block;
}
.admin-preview-dialog input[type="checkbox"] { width: 20px; height: 20px; }
.admin-preview-dialog label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
}
body[data-screen="signing-in"] { background: #14100e; }
body[data-screen="bar"] .purchase-chips { gap: 6px; }
body[data-screen="bar"] .purchase-row { gap: 5px; }
body[data-screen="bar"] .purchase-chip {
  min-height: 36px;
  gap: 4px;
  padding: 0 3px 0 10px;
}
body[data-screen="bar"] .purchase-name {
  min-height: 32px;
  font-size: 13px;
}
body[data-screen="bar"] .purchase-add {
  flex-basis: 32px;
  width: 32px;
  min-width: 32px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
}
body[data-screen="bar"] .purchase-add .app-icon {
  width: 20px;
  height: 20px;
}
body[data-screen="bar"] .purchase-chip {
  align-items: center;
  min-height: 36px;
  height: auto;
  padding-block: 0;
}
body[data-screen="bar"] .purchase-name {
  flex: 1 1 auto;
  max-width: min(260px, calc(100vw - 100px));
  height: auto;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
  padding-block: 4px;
}
body[data-screen="bar"] .chip-row {
  align-items: center;
  height: auto;
  min-height: 36px;
}
body[data-screen="bar"] .chip-label {
  flex: 1 1 auto;
  max-width: min(260px, calc(100vw - 100px));
  height: auto;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
}
.recipe-count-label {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
body[data-screen="bar"] .recipes-action[aria-busy="true"] {
  opacity: .82;
}

.card-tag[aria-expanded="true"] .card-tag-label { animation: signin-arrive 180ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .card-tag[aria-expanded="true"] .card-tag-label { animation: none; }
}
.chip-transfer {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .8rem;
  border: 1px solid #e58536;
  border-radius: 999px;
  background: #a84408;
  color: #fff;
  font: inherit;
  pointer-events: none;
  transform-origin: top left;
  box-shadow: 0 4px 16px #0005;
}

/* The results view renders every match; keep pagination for the full library. */
body[data-recipe-view="results"] #showMore {
  display: none !important;
}

.magic-border {
  --magic-fill: #211812;
  border: 2px solid transparent !important;
  background:
    linear-gradient(var(--magic-fill), var(--magic-fill)) padding-box,
    linear-gradient(115deg, #4a9cff, #f05b70, #4a9cff) border-box !important;
  background-size: auto, 220% 100%;
  animation: recipes-available-pulse 2.8s ease-in-out infinite;
}
.bar-actions .camera-primary.magic-border { --magic-fill: var(--rust); }
.bar-actions #micAction.is-recording.magic-border { --magic-fill: #b3261e; }
.recipes-action.magic-border { --magic-fill: var(--rust); }
.bar-actions .action-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bar-actions .capture-action.magic-border {
  scroll-margin-top: 80px;
  scroll-margin-bottom: 112px;
  min-height: 72px;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
}
.bar-actions .capture-action > .capture-action-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  background: transparent;
}
.bar-actions .capture-action > .capture-action-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  background: transparent;
  text-align: left;
}
.bar-actions .capture-action-copy small { font-size: 13px; }
.bar-actions .capture-action-description {
  display: block;
  color: #e1d2c8;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}
.bar-actions #micAction { flex-direction: row; padding: 7px 8px; gap: 6px; }
.bar-actions #micAction .capture-action-copy { align-items: flex-start; }
.bar-actions .camera-primary > .capture-action-icon,
.bar-actions .camera-primary svg { width: 28px; height: 28px; }
.bar-actions .camera-primary > .capture-action-icon { flex-basis: 28px; }
.bar-recipe-actions {
  pointer-events: none;
  position: fixed;
  z-index: 7;
  left: 50%;
  bottom: 0;
  width: min(100%, 760px);
  margin: 0;
  padding: 10px clamp(8px, 4vw, 24px) calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: linear-gradient(180deg, #17110e00, #17110eed 25%);
}
.bar-recipe-actions .recipe-action-wrap { width: 100%; }
.bar-recipe-actions .recipes-action {
  pointer-events: auto;
  min-height: 56px;
  justify-content: center;
  border-radius: 30px;
  font-size: 16px;
}
.recipe-action-label { font-weight: 750; white-space: normal; }
.recipe-action-description { margin: 6px 0 0; color: #dfd0c7; font-size: 12px; line-height: 1.3; text-align: center; }
.recipe-count-label {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  padding: 0 7px;
  border-radius: 18px;
  background: #ffffff24;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
body[data-screen="bar"] .bar-screen { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

@keyframes recipes-available-pulse {
  0%, 100% { background-position: 0 0, 0% 50%; box-shadow: 0 0 6px #4a9cff30, 0 0 6px #f05b7030; }
  50% { background-position: 0 0, 100% 50%; box-shadow: -3px 0 12px #4a9cff66, 3px 0 12px #f05b7066; }
}

.share-dialog {
  width: min(460px, calc(100vw - 32px));
}
.share-dialog h2, .share-dialog .status { overflow-wrap: anywhere; }
.share-preview {
  display: block;
  width: 100%;
  max-height: min(48vh, 420px);
  margin: 4px auto 14px;
  object-fit: contain;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #17110e;
}
.share-preview[hidden] { display: none; }
.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.share-actions > :only-child {
  grid-column: 1 / -1;
}
.share-actions button,
.share-actions a {
  min-width: 0;
  min-height: 46px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .magic-border {
    animation: none;
    background-position: 0 0, 50% 50% !important;
  }
  #oneMoreButton { animation: none; background-position: 0 0, 50% 50%; }
}

@media (max-width: 360px) {
  .share-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
