:root {
  color-scheme: light;
  --ink: #1e2320;
  --muted: #64706a;
  --line: #d9ded8;
  --surface: #ffffff;
  --soft: #f4f6f1;
  --accent: #2f6f55;
  --accent-strong: #173f33;
  --gold: #b7802a;
  --rose: #b65252;
  --shadow: 0 18px 60px rgba(27, 39, 32, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef1ec;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

button {
  cursor: pointer;
  min-height: 38px;
  padding: 0 12px;
}

button:hover,
select:hover {
  border-color: #aab6ae;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 26px 22px;
  background: #fbfcf9;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

.brand p,
.eyebrow,
label,
.empty {
  color: var(--muted);
}

.search,
.control-group,
.pantry {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label,
.section-title {
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  padding: 0 12px;
}

input,
select {
  min-height: 42px;
}

textarea {
  min-height: 110px;
  padding-block: 10px;
  resize: vertical;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--ink);
  font-size: 14px;
}

.toggle input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.pantry {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pantry summary.section-title {
  cursor: pointer;
  list-style: none;
}

.pantry summary.section-title::-webkit-details-marker {
  display: none;
}

.pantry-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 15px;
}

.section-title button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--muted);
}

.chips,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pantry .chips {
  padding: 2px 0;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

.card .meta,
.card .tags {
  row-gap: 8px;
}

.chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: #edf0eb;
}

.ingredient-browser {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.ingredient-category {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ingredient-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.ingredient-category summary::-webkit-details-marker {
  display: none;
}

.ingredient-category summary::after {
  content: "+";
  color: var(--muted);
  font-size: 17px;
}

.ingredient-category[open] summary::after {
  content: "-";
}

.ingredient-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 10px 12px;
}

.ingredient-option {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: #34433b;
  font-size: 12px;
  font-weight: 750;
}

.ingredient-option.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ingredient-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-drawer {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.filter-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.filter-drawer summary::-webkit-details-marker {
  display: none;
}

.filter-drawer summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
}

.filter-drawer[open] summary::after {
  content: "-";
}

.filter-panel {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.content {
  padding: 32px;
}

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

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.toolbar h2 {
  margin-top: 4px;
  font-size: 32px;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.stat strong {
  display: block;
  font-size: 24px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: grid;
  gap: 14px;
  min-height: 245px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(34, 45, 38, 0.06);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.card h3 {
  font-size: 20px;
  line-height: 1.2;
}

.favorite {
  min-width: 38px;
  padding: 0;
  color: var(--gold);
  font-size: 20px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: #46514b;
  font-size: 12px;
  font-weight: 700;
}

.ingredients {
  margin: 0;
  padding-left: 18px;
  color: #3d4641;
}

.ingredients li {
  margin: 4px 0;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.rating {
  color: var(--gold);
  white-space: nowrap;
}

.missing {
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
}

.empty {
  margin-top: 40px;
  text-align: center;
  font-weight: 700;
}

.mobile-tabbar {
  display: none;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wide-dialog {
  width: min(1120px, calc(100vw - 28px));
}

dialog::backdrop {
  background: rgba(8, 7, 6, 0.78);
}

.detail {
  position: relative;
  padding: 28px;
  background: #fff;
}

.icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 46px;
  align-items: start;
  margin-bottom: 14px;
}

.detail-head h2 {
  margin-top: 4px;
  font-size: 34px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  margin-top: 24px;
}

.detail h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.detail ul {
  margin: 0;
  padding-left: 20px;
}

.detail li {
  margin: 8px 0;
}

dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 14px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.builder-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.builder-panel,
.ingredient-editor {
  display: grid;
  gap: 12px;
}

.menu-selected {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.menu-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.menu-row button {
  min-height: 28px;
  padding: 0 8px;
}

.menu-preview {
  min-height: 620px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: #201f1b;
}

.backup-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.backup-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.backup-actions {
  display: grid;
  gap: 8px;
}

.menu-preview-inner {
  min-height: 552px;
  padding: 24px;
  border-radius: 8px;
}

.submission-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-sections {
  display: grid;
  gap: 24px;
}

.admin-subsection {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.admin-subsection h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.submission-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.submission-card.compact {
  gap: 8px;
  padding: 12px;
}

.submission-card.is-archived {
  opacity: 0.72;
}

.submission-card h3 {
  font-size: 20px;
}

.submission-card.compact h3 {
  font-size: 17px;
}

.submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.submission-actions button {
  min-height: 34px;
}

.danger-button {
  border-color: rgba(182, 82, 82, 0.45);
  color: var(--rose);
}

.card-tags {
  margin-top: 4px;
}

.menu-preview h2 {
  font-size: 40px;
  text-align: center;
}

.menu-preview .menu-subtitle {
  margin-top: 6px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.menu-intro {
  max-width: 580px;
  margin: 12px auto 0;
  text-align: center;
  color: inherit;
  opacity: 0.82;
}

.menu-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 26px;
  margin-top: 30px;
}

.menu-item {
  break-inside: avoid;
  border-bottom: 1px solid #ddd7c9;
  padding-bottom: 14px;
}

.menu-item h3 {
  font-size: 20px;
}

.menu-item p {
  margin-top: 5px;
  color: #56534b;
  font-size: 13px;
  line-height: 1.45;
}

.menu-item .menu-meta {
  color: var(--accent-strong);
  font-weight: 800;
}

.menu-tags {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.menu-style-speakeasy {
  background: #211811;
  color: #fff2d7;
}

.menu-style-speakeasy .menu-item {
  border-color: rgba(240, 189, 91, 0.35);
}

.menu-style-tropical {
  background: #fff3dc;
  color: #163f37;
}

.menu-style-tropical .menu-item {
  border-color: #f2a65a;
}

.menu-style-minimal {
  background: #ffffff;
  color: #1d1d1b;
}

.menu-style-wedding {
  background: #fffaf2;
  color: #38291d;
}

.menu-style-house {
  background: #f7f0dd;
  color: #252018;
}

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

.form-grid label,
.builder-panel label {
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.wide-field {
  grid-column: 1 / -1;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 1fr 150px 40px;
  gap: 8px;
  margin-bottom: 8px;
}

.ingredient-row button {
  min-height: 42px;
  padding: 0;
}

.print-only {
  display: none;
}

/* Phase 1 redesign: speakeasy dashboard while preserving the existing app structure. */
:root {
  color-scheme: dark;
  --ink: #fff3df;
  --muted: #d5c2a4;
  --line: rgba(244, 206, 143, 0.26);
  --surface: #2a2119;
  --soft: #382b20;
  --accent: #d8a84f;
  --accent-strong: #f1c46a;
  --gold: #f0bd5b;
  --rose: #e27a61;
  --green: #7fc49b;
  --shadow: 0 18px 48px rgba(47, 30, 17, 0.28);
}

body {
  background:
    radial-gradient(circle at 22% 0%, rgba(246, 205, 130, 0.24), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(127, 196, 155, 0.12), transparent 28rem),
    linear-gradient(135deg, #2b2119 0%, #3a291d 48%, #26382d 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button,
select,
input,
textarea {
  border-color: var(--line);
  background: rgba(255, 248, 232, 0.06);
  color: var(--ink);
}

button {
  background: linear-gradient(180deg, rgba(216, 168, 79, 0.18), rgba(216, 168, 79, 0.08));
  font-weight: 700;
}

button:hover,
select:hover,
input:focus,
textarea:focus {
  border-color: rgba(240, 189, 91, 0.8);
  outline: none;
}

.shell {
  grid-template-columns: 360px 1fr;
}

.sidebar {
  background: rgba(43, 33, 25, 0.88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-mark {
  background: linear-gradient(145deg, #f1c46a, #8e5d25);
  color: #17100b;
}

h1,
h2,
h3,
.toolbar h2,
.detail-head h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
label,
.empty {
  color: var(--muted);
}

.main-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 22px;
}

.mobile-primary-actions {
  display: none;
}

.main-nav a,
.main-nav button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.search,
.control-group,
.pantry {
  gap: 9px;
}

.pantry {
  border-top-color: var(--line);
}

.chip,
.tag,
.pill {
  border-color: rgba(240, 189, 91, 0.22);
  background: rgba(240, 189, 91, 0.12);
  color: #ffe7b3;
}

.chip button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.ingredient-category,
.filter-drawer,
.stat,
.card,
.menu-row,
.submission-card,
.detail {
  border-color: var(--line);
  background: rgba(58, 44, 32, 0.76);
}

.ingredient-option {
  border-color: rgba(240, 189, 91, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.ingredient-option.is-selected {
  background: var(--accent);
  color: #17100b;
}

.pantry,
.pantry .ingredient-category {
  background: transparent;
}

.pantry .ingredient-option {
  background: rgba(255, 248, 232, 0.08);
}

.pantry .ingredient-option.is-selected {
  background: var(--accent);
  color: #17100b;
}

.content {
  padding: 28px clamp(18px, 3vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  min-height: 190px;
  margin-bottom: 14px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(55, 39, 27, 0.92), rgba(77, 55, 35, 0.72)),
    radial-gradient(circle at 85% 20%, rgba(240, 189, 91, 0.24), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 820px;
  font-size: clamp(42px, 5.8vw, 86px);
  line-height: 1;
}

.hero-copy {
  max-width: 600px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.hero-actions,
.toolbar-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.home-strip button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  text-align: left;
}

.home-strip span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #17100b;
  font-weight: 900;
}

.home-strip strong {
  font-size: 15px;
}

.home-strip small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  min-height: 86px;
  padding: 12px;
}

.stat strong {
  margin-top: 5px;
  color: #fff7e8;
  font-size: clamp(20px, 2vw, 28px);
  overflow-wrap: anywhere;
}

.stat em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.bar-dashboard {
  margin-bottom: 18px;
}

.bar-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bar-lane {
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bar-lane summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 6px;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.bar-lane summary::-webkit-details-marker {
  display: none;
}

.bar-lane summary::after {
  content: "+";
  color: var(--muted);
}

.bar-lane[open] summary::after {
  content: "-";
}

.bar-lane summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.bar-lanes button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 10px;
  text-align: left;
}

.bar-lanes button span,
.bar-lanes button small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-lanes button small {
  color: var(--muted);
}

.toolbar {
  padding-top: 8px;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.card-visual {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  min-height: 72px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 72% 22%, rgba(240, 189, 91, 0.3), transparent 7rem),
    linear-gradient(135deg, #5a3b20, #254134);
}

.card-visual small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.card-head,
.card .ingredients,
.card-footer,
.card-tags {
  padding-inline: 16px;
}

.card-head {
  padding-top: 14px;
}

.card h3 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.card-tags {
  padding-top: 2px;
}

.ingredients {
  color: #ddcfb8;
  font-size: 13px;
}

.card-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding-bottom: 16px;
}

.card-footer > * {
  min-width: 0;
}

.card-footer .rating {
  align-self: center;
  font-size: 13px;
}

.card-footer button,
.card-footer .make-status {
  width: 100%;
}

.card .pill,
.card .tag,
.card-footer button,
.card-footer .make-status {
  justify-content: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

.make-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.make-status.ready {
  background: rgba(127, 196, 155, 0.18);
  color: #a9efc5;
}

.make-status.almost {
  background: rgba(240, 189, 91, 0.17);
  color: #ffd98c;
}

.make-status.missing,
.make-status.neutral {
  background: rgba(226, 122, 97, 0.16);
  color: #ffb4a3;
}

.strength.low {
  border-color: rgba(127, 196, 155, 0.38);
  background: rgba(127, 196, 155, 0.16);
  color: #bff3cf;
}

.strength.medium {
  border-color: rgba(240, 189, 91, 0.38);
  background: rgba(240, 189, 91, 0.16);
  color: #ffd98c;
}

.strength.strong {
  border-color: rgba(226, 122, 97, 0.42);
  background: rgba(226, 122, 97, 0.16);
  color: #ffb4a3;
}

.strength.unknown {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.party-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: start;
}

.party-panel,
.party-results,
.party-selected,
.shopping-list {
  display: grid;
  gap: 12px;
}

.party-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.08);
}

.party-spotlight {
  margin-bottom: 14px;
}

.party-hero-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(240, 189, 91, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 18%, rgba(240, 189, 91, 0.26), transparent 11rem),
    linear-gradient(135deg, rgba(38, 27, 18, 0.98), rgba(10, 22, 17, 0.94));
}

.party-hero-card h3 {
  font-size: clamp(30px, 4vw, 54px);
}

.party-hero-card button {
  justify-self: start;
}

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

.party-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.party-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.party-results button,
.party-selected button {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  text-align: left;
}

.party-result > button:last-child {
  min-width: 88px;
  place-items: center;
  text-align: center;
}

.party-results small,
.party-selected small {
  color: var(--muted);
}

.party-shopping {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.party-selected {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
}

.shopping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.08);
}

.shopping-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shopping-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.shopping-row.in-bar {
  opacity: 0.72;
}

.form-note {
  margin: -4px 0 18px;
  color: var(--muted);
}

.submission-card.has-warning {
  border-color: rgba(226, 122, 97, 0.55);
}

.pill.warning {
  border-color: rgba(226, 122, 97, 0.55);
  background: rgba(226, 122, 97, 0.16);
  color: #ffb4a3;
}

dialog {
  background: transparent;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.detail {
  color: var(--ink);
  background: #3a2b20;
}

.detail-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 220px;
  margin: -28px -28px 24px;
  padding: 28px;
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(240, 189, 91, 0.28), transparent 12rem),
    linear-gradient(135deg, #4f321d, #60462f 55%, #244034);
}

.detail-hero p {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.detail-status,
.detail-actions {
  margin-top: 14px;
}

.detail-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detailMissing button,
#detailMissing button {
  min-height: 28px;
  margin-left: 8px;
  padding: 0 8px;
}

.steps-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: stretch;
}

.steps-ingredients,
.step-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.08);
}

.steps-ingredients {
  padding: 18px;
}

.steps-ingredients ul {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.steps-ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.steps-ingredients span {
  color: var(--muted);
  text-align: right;
}

.step-card {
  display: grid;
  align-content: space-between;
  min-height: 390px;
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 80% 15%, rgba(240, 189, 91, 0.18), transparent 12rem),
    rgba(255, 250, 238, 0.08);
}

.step-card h3 {
  margin: 10px 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

.step-card p:not(.eyebrow) {
  max-width: 760px;
  color: #f2dfbf;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.3;
}

.step-counter {
  display: grid;
  place-items: center;
  min-width: 72px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  font-weight: 900;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.step-actions button {
  min-width: 130px;
}

.menu-preview {
  background: #fff8e8;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    order: 2;
    padding: 22px;
  }

  .toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero,
  .bar-dashboard,
  .bar-lanes,
  .steps-layout,
  .party-grid,
  .party-results,
  .party-selected {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    margin-bottom: 12px;
  }

  .hero h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .hero-actions button {
    flex: 1 1 140px;
  }

  .home-strip {
    grid-template-columns: 1fr;
  }

  .stats,
  .detail-grid,
  .builder-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .ingredient-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 0;
    background: #f4f1ea;
  }

  .content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 10px 18px;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px;
    background: #fffaf0;
    color: #241d17;
  }

  .brand {
    align-items: start;
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.05;
  }

  .brand p {
    margin-top: 2px;
    font-size: 12px;
  }

  #syncStatus {
    display: none;
  }

  .search {
    order: 2;
    gap: 7px;
    margin: 0;
    padding: 12px;
    border: 1px solid #ddd3c3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(35, 28, 20, 0.08);
  }

  .search span {
    color: #2f6f55;
    font-size: 14px;
  }

  .search input {
    min-height: 50px;
    border-color: #d7cbbb;
    font-size: 16px;
  }

  .mobile-primary-actions {
    order: 3;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 8px;
  }

  .mobile-primary-actions button {
    min-height: 48px;
    background: #2f6f55;
    color: #fff;
    border-color: #2f6f55;
    font-size: 14px;
  }

  .mobile-primary-actions button:last-child {
    background: #fff;
    color: #2f6f55;
    border-color: #b8c9bf;
  }

  .pantry {
    order: 5;
    margin: 10px 0 0;
    padding: 12px;
    background: #fff;
    color: #241d17;
    box-shadow: 0 8px 28px rgba(35, 28, 20, 0.08);
  }

  .pantry .section-title h2 {
    font-size: 18px;
  }

  .pantry summary.section-title {
    min-height: 34px;
  }

  .pantry summary.section-title::after {
    content: "+";
    color: #75695f;
    font-size: 18px;
    font-weight: 900;
  }

  .pantry[open] summary.section-title::after {
    content: "-";
  }

  .pantry summary.section-title span {
    display: none;
  }

  .pantry-tools {
    margin-top: 8px;
  }

  .pantry-tools button {
    min-height: 34px;
    background: #fffaf0;
    color: #5f554b;
    border-color: #ddd3c3;
    font-size: 12px;
  }

  .pantry input,
  .search input,
  .filter-drawer,
  .filter-panel select {
    background: #fff;
    color: #241d17;
    border-color: #ddd3c3;
  }

  .filter-drawer {
    order: 4;
    margin-top: 0;
  }

  .ingredient-browser {
    max-height: 360px;
    gap: 8px;
    padding-right: 0;
  }

  .ingredient-category {
    background: #fbf7ef;
    border-color: #e0d5c4;
  }

  .ingredient-category summary {
    min-height: 44px;
    color: #2e251d;
  }

  .ingredient-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0 9px 10px;
  }

  .ingredient-option {
    min-height: 36px;
    padding: 0 8px;
    background: #fff;
    color: #2e251d;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .search,
  .control-group {
    margin-bottom: 8px;
  }

  .dashboard {
    display: none;
  }

  .main-nav {
    order: 6;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 0;
  }

  .main-nav a,
  .main-nav button {
    min-height: 34px;
    padding: 0 6px;
    background: #fff;
    color: #2e251d;
    border-color: #ddd3c3;
    font-size: 11px;
  }

  #navMenuBuilder,
  #navAdmin {
    display: none;
  }

  .hero {
    display: none;
  }

  .hero > div:first-child {
    display: none;
  }

  .hero h2 {
    font-size: 34px;
  }

  .hero-copy {
    display: none;
  }

  .hero-actions {
    margin-top: 10px;
    gap: 8px;
  }

  .hero-actions button {
    flex: 1 1 calc(50% - 8px);
    min-height: 42px;
    padding: 0 8px;
    background: #2f6f55;
    color: #fff;
    border-color: #2f6f55;
  }

  .home-strip {
    display: none;
  }

  .home-strip button {
    min-height: 54px;
    background: #fff;
    color: #241d17;
    border-color: #ddd3c3;
  }

  .stats {
    display: none;
  }

  .stat {
    flex: 0 0 132px;
    min-height: 76px;
  }

  .bar-dashboard {
    order: 3;
    margin-bottom: 0;
  }

  .bar-lanes {
    gap: 8px;
  }

  .bar-lane {
    max-height: 220px;
    padding: 10px;
    background: #fff;
    color: #241d17;
    border-color: #ddd3c3;
    box-shadow: 0 8px 28px rgba(35, 28, 20, 0.06);
  }

  .bar-lane summary {
    color: #2f6f55;
  }

  .bar-lanes button {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 40px;
    background: #f8f4ec;
    color: #241d17;
    border-color: #e3d8c7;
  }

  .bar-lanes button small {
    font-size: 11px;
    text-align: right;
  }

  .toolbar {
    order: 4;
    gap: 10px;
    padding: 12px;
    background: #fff;
    color: #241d17;
    border: 1px solid #ddd3c3;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(35, 28, 20, 0.06);
  }

  .toolbar .eyebrow {
    display: none;
  }

  .toolbar h2 {
    margin: 0;
    font-size: 22px;
  }

  .toolbar-actions button,
  .toolbar-actions select {
    min-height: 40px;
    background: #fffaf0;
    color: #241d17;
    border-color: #ddd3c3;
  }

  #openAdmin {
    display: none;
  }

  #addCocktail,
  #openMenuBuilder {
    display: none;
  }

  .cards {
    order: 5;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card {
    min-height: auto;
    padding: 0;
    background: #fff;
    color: #241d17;
    border-color: #ddd3c3;
    box-shadow: 0 8px 28px rgba(35, 28, 20, 0.08);
  }

  .card-visual {
    display: none;
  }

  .card-head {
    padding: 16px 16px 0;
  }

  .card h3 {
    font-size: 19px;
  }

  .card .ingredients {
    padding-inline: 16px;
    color: #5f554b;
  }

  .card-tags {
    display: none;
  }

  .card .pill,
  .card .tag {
    background: #f4eee4;
    color: #3a3027;
    border-color: #e3d8c7;
  }

  .card .meta {
    gap: 7px;
  }

  .card-footer {
    grid-template-columns: 1fr 1fr;
    padding: 0 16px 16px;
  }

  .card-footer .rating {
    display: none;
  }

  .detail {
    padding: 22px;
  }

  dialog,
  .wide-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  dialog .detail {
    min-height: 100dvh;
    padding-bottom: 92px;
  }

  .detail-hero {
    min-height: 190px;
    margin: -22px -22px 20px;
    padding: 22px;
  }

  .detail-head {
    gap: 18px;
  }

  .detail-head h2 {
    font-size: 30px;
  }

  .card-footer {
    align-items: stretch;
  }

  .admin-sections,
  .submission-list {
    gap: 10px;
  }

  .submission-card {
    padding: 12px;
  }

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

  .submission-actions button {
    width: 100%;
    padding: 0 8px;
  }

  .mobile-tabbar {
    display: none;
  }
}

/* Editorial warm palette: calm beige, walnut and sage without texture noise. */
:root {
  color-scheme: light;
  --ink: #2b2721;
  --muted: #74695d;
  --line: #ddd2c3;
  --surface: #fffdf8;
  --soft: #f3eee6;
  --accent: #5f7f62;
  --accent-strong: #354f3b;
  --gold: #a9783d;
  --rose: #a85d52;
  --green: #668866;
  --walnut: #6f5139;
  --sand: #eee4d5;
  --cream: #fbf7ef;
  --shadow: 0 18px 48px rgba(76, 61, 44, 0.12);
}

body {
  background: linear-gradient(135deg, #f4eadc 0%, #eee2d0 44%, #f8f4ec 100%);
  color: var(--ink);
}

button,
select,
input,
textarea {
  border-color: var(--line);
  background: #fffdf8;
  color: var(--ink);
}

button {
  background: #fffaf1;
}

.sidebar {
  background: rgba(255, 250, 241, 0.92);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}

.brand-mark {
  background: linear-gradient(145deg, #354f3b, #8b9a76);
  color: #fff;
}

.brand p,
.eyebrow,
label,
.empty,
.home-strip small,
.bar-lanes button small,
.ingredients,
.party-results small,
.party-selected small,
.shopping-row em {
  color: var(--muted);
}

.main-nav a,
.main-nav button,
.filter-drawer,
.ingredient-category,
.stat,
.card,
.menu-row,
.submission-card,
.party-panel,
.shopping-row,
.steps-ingredients,
.step-card {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
}

.hero {
  background: linear-gradient(120deg, #fffaf2 0%, #eadcc7 58%, #d9e0d1 100%);
  color: var(--ink);
}

.hero-copy {
  color: var(--muted);
}

.chip,
.tag,
.pill {
  border-color: #dfd1bb;
  background: #f4eee6;
  color: #3a3027;
}

.ingredient-option {
  border-color: #e3d6c2;
  background: #fffaf2;
  color: var(--ink);
}

.ingredient-option.is-selected {
  background: var(--accent);
  color: #fff;
}

.home-strip button,
.bar-lane,
.detail,
dialog .detail {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
}

.home-strip span {
  background: var(--accent);
  color: #fff;
}

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

.bar-lane summary {
  color: var(--accent-strong);
}

.card {
  box-shadow: 0 14px 34px rgba(76, 61, 44, 0.1);
}

.card-visual {
  background: linear-gradient(135deg, #5f7f62, #9d835f);
}

.card-visual small {
  color: rgba(255, 255, 255, 0.88);
}

.make-status.ready {
  background: rgba(47, 111, 85, 0.13);
  color: #1f6247;
}

.make-status.almost {
  background: rgba(183, 122, 43, 0.14);
  color: #8b5b1e;
}

.make-status.missing,
.make-status.neutral {
  background: rgba(185, 90, 79, 0.12);
  color: #94443b;
}

.strength.low,
.strength.medium,
.strength.strong,
.strength.unknown {
  color: #3a3027;
}

.detail-hero,
.party-hero-card,
.step-card {
  background: linear-gradient(135deg, #fffaf2 0%, #eadcc7 56%, #d9e0d1 100%);
  color: var(--ink);
}

.detail-hero p,
.step-card p:not(.eyebrow) {
  color: var(--muted);
}

.menu-preview {
  background: #fffaf2;
}

@media (max-width: 560px) {
  body {
    background: #f2e7d8;
    color: var(--ink);
  }

  .sidebar,
  .hero,
  .toolbar,
  .card,
  .pantry,
  .bar-lane,
  .search,
  .home-strip button {
    background: rgba(255, 253, 248, 0.96);
    color: var(--ink);
    border-color: #dfd1bb;
  }

  .search span,
  .bar-lane summary,
  .pantry .section-title h2 {
    color: var(--accent-strong);
  }

  .mobile-primary-actions button,
  .hero-actions button {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }

  .mobile-primary-actions button:last-child {
    background: #fffdf8;
    color: var(--accent-strong);
    border-color: #b8c9bf;
  }

  .main-nav a,
  .main-nav button,
  .toolbar-actions button,
  .toolbar-actions select,
  .pantry-tools button,
  .ingredient-option,
  .bar-lanes button {
    background: #fffaf2;
    color: var(--ink);
    border-color: #dfd1bb;
  }

  .filter-drawer,
  .filter-panel select,
  .pantry input,
  .search input {
    background: #fffdf8;
    color: var(--ink);
    border-color: #dfd1bb;
  }

  .ingredient-category {
    background: #f8efe1;
    border-color: #e2d2ba;
  }

  .ingredient-category summary {
    color: var(--ink);
  }

  .card .ingredients {
    color: var(--muted);
  }
}

/* Final card spacing pass: keep chips and ingredient bullets away from card edges. */
.card-head,
.card-tags,
.card .ingredients,
.card-footer {
  padding-left: 22px;
  padding-right: 22px;
}

.card-tags,
.card .meta {
  gap: 9px;
}

.card .ingredients {
  list-style-position: inside;
  padding-left: 22px;
  padding-right: 22px;
}

.card .ingredients li {
  padding-left: 2px;
}

@media (max-width: 560px) {
  .card-head,
  .card .ingredients,
  .card-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card .ingredients {
    list-style-position: inside;
  }
}

@media print {
  body.printing-menu > *:not(#printSurface) {
    display: none !important;
  }

  #printSurface {
    display: block;
  }

  .print-only {
    display: block;
  }

  body {
    background: #fff;
  }

  .menu-preview {
    border: 0;
    min-height: auto;
    padding: 0;
  }
}
