:root {
  color-scheme: light;
  --ink: #24201d;
  --muted: #6b625b;
  --paper: #f5efe5;
  --card: #fffdf9;
  --line: #ddd2c4;
  --line-strong: #c9b9a6;
  --tomato: #8f2625;
  --tomato-dark: #641a1c;
  --tomato-soft: #f7dfd9;
  --gold: #dda93d;
  --gold-soft: #fff2ce;
  --sage: #48654a;
  --charcoal: #292521;
  --danger: #a12a2a;
  --shadow: 0 14px 36px rgba(71, 43, 25, 0.09);
  --shadow-strong: 0 22px 60px rgba(37, 25, 18, 0.18);
  --radius: 20px;
  --header-height: calc(76px + env(safe-area-inset-top));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background:
    radial-gradient(circle at 96% 2%, rgba(221, 169, 61, 0.2), transparent 21rem),
    linear-gradient(180deg, #f8f3eb 0, var(--paper) 28rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.48;
}

button,
input,
select {
  font: inherit;
}

button,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(221, 169, 61, 0.72);
  outline-offset: 2px;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  height: var(--header-height);
  padding: env(safe-area-inset-top) max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  background: rgba(41, 37, 33, 0.97);
  color: #fff;
  box-shadow: 0 4px 22px rgba(28, 19, 14, 0.22);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.78rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  background: #fff8e9;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.16);
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-color: rgba(239, 191, 88, 0.72);
  background: #000;
}

.brand p {
  margin: 0 0 0.08rem;
  overflow: hidden;
  color: #e9d9c1;
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.52rem;
}

.brand h1 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(1rem, 4.3vw, 1.35rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-title span {
  display: inline-grid;
  min-height: 25px;
  padding: 0.23rem 0.48rem;
  place-items: center;
  border: 1px solid rgba(255, 226, 152, 0.5);
  border-radius: 999px;
  background: linear-gradient(145deg, #efbf58, #c98d24);
  color: #35240e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.install-button {
  min-height: 42px;
  padding: 0.62rem 0.82rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.app-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 25;
  padding: 0.58rem max(0.75rem, env(safe-area-inset-right)) 0.62rem max(0.75rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(99, 71, 53, 0.11);
  background: rgba(245, 239, 229, 0.94);
  backdrop-filter: blur(14px);
}

.tab-shell {
  display: grid;
  width: min(100%, 930px);
  margin: 0 auto;
  padding: 0.24rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.93);
  box-shadow: 0 5px 18px rgba(62, 39, 24, 0.05);
}

.tab-shell button {
  min-width: 0;
  min-height: 42px;
  padding: 0.55rem 0.35rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(0.78rem, 3.3vw, 0.9rem);
  font-weight: 800;
  cursor: pointer;
}

.tab-shell button.active {
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 5px 14px rgba(143, 38, 37, 0.23);
}

main {
  width: min(calc(100% - 1.5rem), 930px);
  margin: 1rem auto 0;
}

.app-screen {
  animation: screen-in 180ms ease-out;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.overview-card,
.panel,
.result-section,
.metric-card,
.flyer-card,
.danger-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.97);
  box-shadow: var(--shadow);
}

.overview-card {
  display: grid;
  margin-bottom: 1rem;
  padding: 1.1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1rem;
  overflow: hidden;
  border-color: #6d2a26;
  background:
    radial-gradient(circle at 92% -30%, rgba(235, 180, 69, 0.32), transparent 16rem),
    linear-gradient(135deg, #762020, #411d1e);
  color: #fff;
}

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

.overview-copy p {
  margin: 0 0 0.18rem;
  color: #ead1bf;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.overview-copy strong {
  display: block;
  font-size: clamp(1.55rem, 7vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.overview-copy > span {
  display: block;
  margin-top: 0.38rem;
  color: #f4e3d5;
  font-size: 0.88rem;
}

.overview-metrics {
  display: grid;
  min-width: 125px;
  align-content: center;
  gap: 0.52rem;
}

.overview-metrics div {
  display: grid;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.23);
}

.overview-metrics span {
  color: #ddc4b5;
  font-size: 0.74rem;
  font-weight: 700;
}

.overview-metrics strong {
  font-size: 1rem;
}

.panel,
.result-section {
  margin-bottom: 1rem;
  padding: clamp(1rem, 3.8vw, 1.5rem);
}

.compact-panel {
  padding-bottom: 1.15rem;
}

.page-heading,
.section-heading,
.subheading,
.recipe-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-heading {
  margin: 0.35rem 0 1rem;
  padding: 0 0.2rem;
  align-items: center;
}

.section-heading {
  margin-bottom: 1rem;
  align-items: center;
}

.section-heading.compact {
  margin-bottom: 0.82rem;
}

.management-section-heading {
  align-items: flex-end;
  flex-wrap: wrap;
}

.management-heading-actions {
  display: flex;
  margin-left: auto;
  align-items: flex-end;
  gap: 0.55rem;
}

.management-toggle-heading {
  align-items: center;
}

.management-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.list-count {
  display: inline-grid;
  min-width: 29px;
  min-height: 27px;
  padding: 0.2rem 0.5rem;
  place-items: center;
  border-radius: 999px;
  background: #eee8df;
  color: #5e554e;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.collapse-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.72rem;
  color: var(--tomato-dark);
  font-size: 0.875rem;
}

.collapse-button::after {
  content: "⌃";
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.collapse-button[aria-expanded="false"]::after {
  transform: rotate(180deg);
}

.management-panel.is-collapsed .management-toggle-heading {
  margin-bottom: 0;
}

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

.screen-collapse-toolbar {
  display: flex;
  min-height: 48px;
  margin: -0.15rem 0 1rem;
  padding: 0.42rem 0.5rem 0.42rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 5px 16px rgba(70, 45, 22, 0.06);
}

.screen-collapse-toolbar > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.screen-collapse-toolbar > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
}

.screen-collapse-toolbar button {
  min-height: 40px;
  padding: 0.45rem 0.58rem;
  font-size: 0.875rem;
}

.collapsible-section {
  position: relative;
}

.collapsible-section-header {
  position: relative;
  min-width: 0;
  padding-right: 3.15rem;
  cursor: pointer;
}

.section-collapse-control {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid #d8cbbd;
  border-radius: 12px;
  background: #fff;
  color: var(--tomato-dark);
  box-shadow: 0 3px 10px rgba(77, 48, 23, 0.08);
}

.section-collapse-control:hover {
  border-color: #cdb9a6;
  background: #fffaf3;
}

.section-collapse-control:focus-visible {
  outline: 3px solid rgba(221, 169, 61, 0.58);
  outline-offset: 2px;
}

.section-collapse-chevron {
  width: 11px;
  height: 11px;
  transform: translateY(2px) rotate(45deg);
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transition: transform 160ms ease;
}

.section-collapse-control[aria-expanded="false"] .section-collapse-chevron {
  transform: translateY(-2px) rotate(225deg);
}

.collapsed-section-summary {
  display: none;
  max-width: min(100%, 540px);
  margin-top: 0.24rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collapsible-section.is-collapsed .collapsed-section-summary {
  display: block;
}

.collapsible-section.is-collapsed .collapsible-section-header,
.collapsible-section.is-collapsed > .section-heading {
  margin-bottom: 0;
}

.collapsible-section.is-collapsed .collapse-secondary-copy {
  display: none;
}

.section-collapse-content[hidden] {
  display: none !important;
}

.management-toggle-heading,
.variety-toggle-heading {
  cursor: pointer;
}

.affiliate-access-panel > .section-collapse-content,
.inventory-panel > .section-collapse-content,
.danger-panel > .section-collapse-content,
.calendar-sync-panel > .section-collapse-content {
  flex: 0 0 auto;
}

.calendar-connect-panel.collapsible-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
}

.calendar-connect-panel > .section-collapse-content {
  align-self: center;
}

.management-toolbar {
  display: grid;
  margin-bottom: 0.85rem;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 0.7rem;
}

.management-toolbar .management-heading-actions {
  margin-left: 0;
}

.search-control {
  display: grid;
  min-width: 0;
  gap: 0.28rem;
}

.search-control > span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 800;
}

.search-control input {
  min-height: 42px;
  padding-block: 0.5rem;
}

.sort-control {
  display: grid;
  width: 180px;
  gap: 0.28rem;
}

.sort-control > span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 800;
}

.sort-control select {
  min-height: 42px;
  padding-block: 0.5rem;
  font-size: 0.86rem;
  font-weight: 720;
}

.eyebrow {
  margin: 0 0 0.15rem;
  color: var(--tomato);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-heading h2,
.section-heading h2,
.danger-panel h2,
.dialog-header h2 {
  margin: 0;
  font-size: clamp(1.24rem, 5vw, 1.65rem);
  line-height: 1.17;
  letter-spacing: -0.025em;
}

.subheading h3,
.recipe-heading h3,
.shopping-group h3 {
  margin: 0;
  font-size: 1.02rem;
}

.subheading p,
.recipe-heading p {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-intro {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.primary-button,
.secondary-button,
.text-button,
.row-actions button,
#resetAllButton,
.remove-line-button,
.close-button {
  min-height: 42px;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  padding: 0.66rem 0.9rem;
  border: 1px solid var(--tomato-dark);
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 5px 13px rgba(143, 38, 37, 0.18);
}

.secondary-button {
  padding: 0.66rem 0.9rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.text-button {
  min-height: 36px;
  padding: 0.35rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--tomato);
  font-size: 0.86rem;
}

.full-button {
  width: 100%;
}

.mode-switch {
  display: grid;
  margin-bottom: 1rem;
  padding: 0.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 13px;
  background: #eee5d9;
}

.mode-switch button {
  min-height: 43px;
  padding: 0.55rem 0.5rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 820;
  cursor: pointer;
}

.mode-switch button.active {
  background: #fff;
  color: var(--tomato-dark);
  box-shadow: 0 4px 13px rgba(65, 44, 28, 0.1);
}

.primary-count {
  margin-bottom: 1rem;
  padding: 0.95rem;
  border: 1px solid #ead7bd;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8e9, #fffdf9);
}

.primary-count > label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  font-weight: 830;
}

.primary-count > p {
  margin: 0.62rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.stepper {
  display: grid;
  align-items: stretch;
  grid-template-columns: 44px minmax(52px, 1fr) 44px;
  gap: 0.35rem;
}

.stepper button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--tomato-dark);
  font-size: 1.3rem;
  font-weight: 850;
  cursor: pointer;
}

.stepper input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  text-align: center;
  font-weight: 850;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.large-stepper {
  grid-template-columns: 52px minmax(80px, 150px) 52px;
}

.large-stepper button,
.large-stepper input {
  min-height: 52px;
}

.large-stepper input {
  font-size: 1.2rem;
}

.small-stepper {
  width: 176px;
  flex: 0 0 auto;
}

.settings-grid,
.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.82rem;
}

.field,
.recipe-editor-row > label {
  display: grid;
  min-width: 0;
  gap: 0.36rem;
}

.field > span:first-child,
.recipe-editor-row label > span:first-child,
.field-label {
  color: #4e4640;
  font-size: 0.82rem;
  font-weight: 820;
}

.field small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

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

.input-unit {
  display: flex;
  min-width: 0;
  min-height: 47px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input-unit:focus-within {
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px rgba(143, 38, 37, 0.1);
}

.input-unit input {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 0.68rem 0.2rem 0.68rem 0.75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 730;
}

.input-unit b {
  min-width: 38px;
  padding: 0 0.7rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.text-input,
select {
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 0.68rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}

select:disabled,
input:disabled {
  background: #eee9e2;
  color: #6e665f;
  opacity: 1;
}

.variety-picker {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.subheading {
  margin-bottom: 0.7rem;
  align-items: center;
}

.subheading > strong {
  flex: 0 0 auto;
  color: var(--tomato-dark);
  font-size: 0.88rem;
}

.variety-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.variety-heading-actions > strong {
  color: var(--tomato-dark);
  font-size: 0.88rem;
  white-space: nowrap;
}

.plan-pizza-search {
  margin-bottom: 0.75rem;
}

.selected-pizza-overview {
  display: grid;
  margin-bottom: 0.75rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d9cabb;
  border-radius: 13px;
  background: linear-gradient(145deg, #faf6f0, #f2e9dc);
  gap: 0.45rem;
}

.variety-picker.is-collapsed .selected-pizza-overview {
  margin-bottom: 0;
}

.selected-pizza-overview > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.selected-pizza-chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.selected-pizza-chip {
  display: flex;
  min-width: 0;
  max-width: 100%;
  padding: 0.25rem;
  flex: 1 1 15rem;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e2c8c2;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.selected-pizza-chip-copy {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.selected-pizza-step {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  flex: 0 0 2.75rem;
  border: 1px solid #e2c8c2;
  border-radius: 10px;
  background: #fff6f4;
  color: var(--tomato-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

.selected-pizza-chip strong {
  margin-right: 0.28rem;
  color: var(--tomato-dark);
  white-space: nowrap;
}

.selected-pizza-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.pizza-picker-list,
.management-list,
.shopping-list,
.recipe-editor-list {
  display: grid;
  gap: 0.65rem;
}

.pizza-picker-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.pizza-picker-copy,
.management-copy,
.shopping-name {
  min-width: 0;
}

.pizza-picker-copy strong,
.pizza-picker-copy span,
.management-copy > strong,
.management-copy > span,
.shopping-name strong,
.shopping-name span {
  display: block;
}

.pizza-picker-copy strong,
.management-copy > strong,
.shopping-name strong {
  line-height: 1.3;
}

.pizza-picker-copy span,
.management-copy > span,
.shopping-name span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.management-copy > .created-meta {
  margin-top: 0.28rem;
  color: #8e8176;
  font-size: 0.75rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.result-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.result-row {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid #eee7de;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.result-row span small {
  color: #9b8979;
}

.result-row strong {
  flex: 0 0 auto;
  text-align: right;
}

.result-row.primary {
  background: var(--gold-soft);
}

.result-row.primary span,
.result-row.primary strong {
  color: #5b3c0c;
  font-weight: 850;
}

.dark-card {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.dark-card .result-row {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.dark-card .result-row span {
  color: #d9cec5;
}

.dark-card .result-row.primary {
  background: rgba(221, 169, 61, 0.17);
}

.dark-card .result-row.primary span,
.dark-card .result-row.primary strong {
  color: #ffe2a0;
}

.ratio-badge,
.fixed-badge,
.reserve-badge,
.category-chip,
.locked-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.local-badge,
.metro-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #e5efe4;
  color: #315034;
  font-size: 0.69rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.metro-chip {
  min-height: 23px;
  background: #eaf0f7;
  color: #38536d;
  font-size: 0.65rem;
}

.ratio-badge,
.reserve-badge {
  background: var(--gold-soft);
  color: #694710;
}

.fixed-badge {
  background: #e5efe4;
  color: #315034;
}

.summary-strip {
  display: grid;
  margin-bottom: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.summary-strip div {
  display: grid;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  gap: 0.12rem;
}

.summary-strip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.summary-strip strong {
  font-size: 1.18rem;
}

.details-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.details-card summary,
.flyer-card summary {
  padding: 0.9rem 1rem;
  color: var(--tomato-dark);
  font-weight: 850;
  cursor: pointer;
}

.details-card[open] summary,
.flyer-card[open] summary {
  border-bottom: 1px solid var(--line);
}

.flat-card {
  border: 0;
  border-radius: 0;
}

.metric-grid {
  display: grid;
  margin-bottom: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric-card {
  display: grid;
  min-width: 0;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.metric-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.metric-card > strong {
  margin: 0.25rem 0 0.12rem;
  color: var(--tomato-dark);
  font-size: clamp(1.25rem, 4.8vw, 1.75rem);
  line-height: 1.15;
}

.metric-card > small {
  color: #8a7f76;
  font-size: 0.73rem;
}

.metric-card.accent {
  border-color: #dab96f;
  background: linear-gradient(145deg, #fff8df, #fffdf9);
}

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

.margin-summary {
  display: grid;
  margin-top: 1rem;
  padding-top: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  border-top: 1px solid var(--line);
}

.margin-summary div {
  display: grid;
  padding: 0.78rem;
  border-radius: 12px;
  background: #f4eee6;
  gap: 0.15rem;
}

.margin-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.margin-summary strong {
  font-size: 1.08rem;
}

.negative {
  color: var(--danger) !important;
}

.shopping-groups {
  display: grid;
  gap: 1rem;
}

.shopping-group h3 {
  margin-bottom: 0.48rem;
  color: var(--tomato-dark);
}

.shopping-row {
  display: grid;
  padding: 0.82rem;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 0.72fr);
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.shopping-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  text-align: right;
}

.shopping-meta > span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.shopping-price-button {
  display: grid;
  min-width: 78px;
  min-height: 46px;
  padding: 0.35rem 0.58rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b7c6b4;
  border-radius: 11px;
  background: #f2f7f0;
  color: var(--sage);
  line-height: 1.1;
  cursor: pointer;
}

.shopping-price-button strong {
  font-size: 0.85rem;
}

.shopping-price-button span {
  margin-top: 0.14rem;
  font-size: 0.68rem;
  font-weight: 750;
}

.shopping-price-button:active {
  transform: translateY(1px);
}

.shopping-price-button.price-missing {
  border-color: #e4c58b;
  background: #fff8e8;
  color: #8b5b13;
}

.shopping-edit-note {
  margin: 0 0 0.85rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #e2c57d;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #624714;
  font-size: 0.82rem;
}

.footnote,
.field-help {
  color: var(--muted);
  font-size: 0.77rem;
}

.footnote {
  margin: 0.9rem 0 0;
}

.field-help {
  margin: 0.4rem 0 0;
}

.help-badge {
  display: inline-grid;
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  place-items: center;
  border: 1px solid #dbc995;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #6f4c0e;
  font-size: 0.78rem;
  font-weight: 850;
}

.help-intro-card {
  display: grid;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(143, 38, 37, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fffdf9 0%, #fff7e6 100%);
  box-shadow: var(--shadow);
  gap: 0.9rem;
}

.help-intro-copy {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.help-intro-copy h3,
.help-intro-copy p {
  margin: 0;
}

.help-intro-copy h3 {
  font-size: 1.08rem;
}

.help-intro-copy p {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.help-question {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--tomato);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(143, 38, 37, 0.2);
}

.help-search {
  max-width: none;
}

.help-search-status {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.help-sections {
  display: grid;
  gap: 0.75rem;
}

.help-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 7px 22px rgba(71, 43, 25, 0.055);
}

.help-card summary {
  display: grid;
  min-height: 72px;
  padding: 0.85rem;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.help-card summary::-webkit-details-marker {
  display: none;
}

.help-card[open] summary {
  border-bottom: 1px solid #e9dfd3;
  background: #fffaf2;
}

.help-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--tomato-soft);
  color: var(--tomato-dark);
  font-weight: 900;
}

.help-title {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.help-title strong {
  font-size: 1rem;
}

.help-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #f0e9df;
  color: var(--tomato-dark);
  font-size: 1.2rem;
  font-weight: 800;
}

.help-toggle::before {
  content: "+";
}

.help-card[open] .help-toggle::before {
  content: "−";
}

.help-content {
  padding: 0.9rem 1rem 1rem;
}

.help-content ul,
.help-step-list {
  display: grid;
  margin: 0;
  padding-left: 1.25rem;
  gap: 0.65rem;
}

.help-content li {
  padding-left: 0.1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.help-content li::marker {
  color: var(--tomato);
  font-weight: 900;
}

.help-empty {
  display: grid;
  padding: 1.3rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.7);
  place-items: center;
  gap: 0.25rem;
  text-align: center;
}

.help-empty span {
  color: var(--muted);
  font-size: 0.88rem;
}

.help-warning {
  display: flex;
  margin-top: 1rem;
  padding: 1rem;
  align-items: flex-start;
  gap: 0.8rem;
  border: 1px solid #dfbd64;
  border-radius: 16px;
  background: var(--gold-soft);
  color: #61430e;
}

.help-warning-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #8a5e0e;
  color: #fff;
  font-weight: 900;
}

.help-warning strong {
  display: block;
  font-size: 0.96rem;
}

.help-warning p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  line-height: 1.48;
}

.management-list {
  gap: 0.72rem;
}

.management-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.management-copy {
  flex: 1 1 auto;
}

.name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.category-chip {
  min-height: 23px;
  background: #eee8df;
  color: #5e554e;
  font-size: 0.65rem;
}

.locked-chip {
  min-height: 23px;
  background: #e5efe4;
  color: #315034;
  font-size: 0.65rem;
}

.row-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.row-actions button {
  min-height: 37px;
  padding: 0.46rem 0.65rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 0.76rem;
}

.row-actions .danger-link {
  border-color: #ecc6c3;
  color: var(--danger);
}

.save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.profile-list {
  margin-top: 0.9rem;
}

.action-stack {
  display: grid;
  gap: 0.55rem;
}

.affiliate-access-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  border-color: #d9bd78;
  background:
    radial-gradient(circle at 96% -20%, rgba(221, 169, 61, 0.25), transparent 13rem),
    linear-gradient(145deg, #fffaf0, #fffdf9);
}

.affiliate-access-lead {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
}

.affiliate-access-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--tomato), var(--tomato-dark));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(143, 38, 37, 0.2);
}

.affiliate-access-copy h2,
.affiliate-access-copy p {
  margin: 0;
}

.affiliate-access-copy h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.affiliate-access-copy > p:last-child {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.affiliate-access-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.file-button {
  display: grid;
  place-items: center;
  text-align: center;
}

.share-whatsapp-link {
  text-decoration: none;
}

.step-share-button {
  width: 100%;
  margin-top: 0.65rem;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.metro-panel {
  border-color: #cfdcc9;
  background: linear-gradient(145deg, #fbfdf9, #fffdf9);
}

.privacy-note {
  display: grid;
  margin-bottom: 0.85rem;
  padding: 0.78rem;
  border: 1px solid #d3dfce;
  border-radius: 12px;
  background: #f0f6ed;
  gap: 0.16rem;
}

.privacy-note strong {
  color: #315034;
  font-size: 0.82rem;
}

.privacy-note span {
  color: #536a55;
  font-size: 0.78rem;
  line-height: 1.4;
}

.metro-file-button {
  min-height: 48px;
}

.metro-file-button.is-loading {
  cursor: wait;
  opacity: 0.72;
}

.metro-status {
  margin-bottom: 0;
  text-align: center;
}

.metro-status.success {
  color: #315034;
  font-weight: 760;
}

.flyer-card {
  margin-bottom: 1rem;
  overflow: hidden;
}

.flyer-card img {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 0 auto;
  background: #eee5d9;
}

.danger-panel {
  display: flex;
  margin-bottom: 1rem;
  padding: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: #e2b9b5;
  background: #fff9f8;
}

.danger-panel h2 {
  color: #79201f;
  font-size: 1.1rem;
}

.danger-panel p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.danger-panel #resetAllButton {
  flex: 0 0 auto;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d89a96;
  background: #fff;
  color: var(--danger);
}

.empty-state {
  padding: 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: #faf7f1;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.editor-dialog {
  width: min(calc(100% - 1.25rem), 720px);
  max-height: min(88vh, 840px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-strong);
}

.editor-dialog::backdrop {
  background: rgba(28, 22, 18, 0.68);
  backdrop-filter: blur(3px);
}

.editor-dialog form {
  display: grid;
  max-height: min(88vh, 840px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  background: #fff;
}

.dialog-header {
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.dialog-body {
  padding: 1rem;
  overflow-y: auto;
}

.dialog-body > .text-input {
  margin-top: 0.35rem;
}

.dough-batch-switch-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.dough-batch-switch-card > div {
  flex: 1 1 12rem;
  min-width: 0;
}

.dough-batch-switch-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dough-batch-switch-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dough-batch-content:not([hidden]),
.dough-batch-settings,
.dough-batch-group-list {
  display: grid;
  gap: 0.85rem;
}

.dough-batch-content {
  margin-bottom: 1rem;
}

.dough-batch-settings {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dough-batch-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr));
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--paper);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dough-batch-overview > div {
  min-width: 0;
}

.dough-batch-overview > div > span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.dough-batch-overview strong {
  display: block;
  font-size: 1.2rem;
}

.dough-batch-overview strong > span {
  display: block;
}

.dough-batch-overview > p {
  grid-column: 1 / -1;
  margin: 0;
}

.dough-recipe {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.dough-poolish-recipe {
  border-color: #dccbaf;
  background: #fffaf0;
}

.dough-recipe > summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
  padding: 0.85rem 1rem;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
  line-height: 1.5;
}

.dough-recipe > summary::-webkit-details-marker {
  display: none;
}

.dough-recipe > summary::marker {
  content: "";
}

.dough-recipe > summary::after {
  content: "";
  flex: 0 0 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--tomato-dark);
  border-bottom: 2px solid var(--tomato-dark);
  transform: rotate(45deg);
}

.dough-recipe[open] > summary::after {
  transform: rotate(225deg);
}

.dough-recipe > summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.dough-recipe > summary > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dough-recipe > summary strong {
  display: block;
  font-size: 1.05rem;
}

.dough-recipe > summary > span > span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dough-recipe-body {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--line);
}

.dough-poolish-group + .dough-poolish-group {
  margin-top: 0.85rem;
}

.dough-poolish-group h4 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.dough-extra-settings > summary strong {
  font-size: 1rem;
}

.dough-extra-settings .dough-recipe-body {
  padding: 1rem;
}

.dough-extra-settings .field-help {
  margin: 0.6rem 0 0;
}

.dough-batch-amounts {
  margin: 0;
}

.dough-batch-amounts > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.dough-batch-amounts > div:last-child {
  border-bottom: 0;
}

.dough-batch-amounts dt {
  flex: 1 1 11rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dough-batch-amounts dd {
  margin: 0 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.dough-batch-error {
  margin: 0;
  color: var(--tomato-dark);
  font-size: 1rem;
  line-height: 1.5;
}

.dough-totals > summary {
  min-height: 44px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--tomato-dark);
  background: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.dough-totals > summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.dough-totals[open] > summary {
  margin-bottom: 0.85rem;
}

.sauce-edit-button {
  margin-top: 0.85rem;
}

#sauceRecipeDialog .dialog-header > div {
  min-width: 0;
}

#sauceRecipeDialog .dialog-header h2 {
  overflow-wrap: anywhere;
}

#sauceRecipeDialog .close-button {
  flex-shrink: 0;
}

#sauceRecipeDialog .dialog-actions {
  flex-wrap: wrap;
}

#sauceRecipeDialog .dialog-actions > button {
  flex: 1 1 10rem;
}

.sauce-recipe-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.sauce-recipe-summary,
.sauce-recipe-rows {
  display: grid;
  gap: 0.75rem;
}

.sauce-recipe-summary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  margin-bottom: 1rem;
}

.sauce-recipe-summary > div,
.sauce-recipe-row {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.sauce-recipe-summary span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.sauce-recipe-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.sauce-recipe-label label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sauce-recipe-label output {
  color: var(--tomato-dark);
  white-space: nowrap;
}

.sauce-recipe-validation {
  color: var(--tomato-dark);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pizza-editor-fields,
.recipe-ingredient-picker-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pizza-editor-fields > .text-input {
  margin-top: 0.35rem;
}

.recipe-ingredient-picker-fields,
.recipe-ingredient-quantity,
.recipe-ingredient-choices {
  display: grid;
  gap: 0.75rem;
}

.recipe-ingredient-choice {
  display: flex;
  min-width: 0;
  min-height: 3rem;
  padding: 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  text-align: left;
}

.recipe-ingredient-choice > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recipe-ingredient-choice > small {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.recipe-ingredient-choice[aria-pressed="true"] {
  border-color: var(--tomato-dark);
  background: #fff6f4;
  box-shadow: inset 0 0 0 1px var(--tomato-dark);
}

.install-dialog {
  width: min(calc(100% - 1.25rem), 560px);
}

.metro-dialog {
  width: min(calc(100% - 1.25rem), 900px);
}

.import-summary {
  display: grid;
  margin-bottom: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.import-summary div {
  display: grid;
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  gap: 0.1rem;
}

.import-summary span {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 730;
}

.import-summary strong {
  overflow: hidden;
  color: var(--tomato-dark);
  font-size: 0.93rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-help {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.metro-import-list {
  display: grid;
  gap: 0.72rem;
}

.metro-import-row {
  display: grid;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  gap: 0.72rem;
}

.metro-product-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.metro-product-copy {
  min-width: 0;
}

.metro-product-copy strong,
.metro-product-copy span {
  display: block;
}

.metro-product-copy strong {
  line-height: 1.28;
}

.metro-product-copy span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.invoice-price {
  flex: 0 0 auto;
  color: var(--tomato-dark);
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
}

.invoice-price small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.metro-import-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.65fr) minmax(125px, 0.6fr);
  gap: 0.6rem;
}

.metro-import-fields .field > span:first-child {
  font-size: 0.74rem;
}

.metro-row-note {
  margin: -0.15rem 0 0;
  color: #7d6f64;
  font-size: 0.72rem;
  line-height: 1.35;
}

.metro-row-note.remembered {
  color: #315034;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.history-current {
  display: grid;
  margin-bottom: 0.8rem;
  padding: 0.85rem;
  border: 1px solid #ead7bd;
  border-radius: 13px;
  background: var(--gold-soft);
  gap: 0.12rem;
}

.history-current span {
  color: #76551c;
  font-size: 0.76rem;
}

.history-current strong {
  color: #563807;
  font-size: 1.08rem;
}

.price-history-list {
  display: grid;
  gap: 0.55rem;
}

.price-history-row {
  display: grid;
  padding: 0.78rem;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  gap: 0.65rem;
}

.price-history-copy strong,
.price-history-copy span {
  display: block;
}

.price-history-copy span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.price-history-value {
  color: var(--tomato-dark);
  font-weight: 900;
  text-align: right;
}

button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.install-intro {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.install-steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0.65rem;
  list-style: none;
}

.install-steps li {
  display: grid;
  padding: 0.8rem;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.install-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--tomato);
  color: #fff;
  font-weight: 900;
}

.install-steps strong {
  display: block;
  margin-bottom: 0.1rem;
}

.install-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.install-note {
  margin: 0.85rem 0 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #5b3c0c;
  font-size: 0.82rem;
}

.close-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 1.45rem;
}

.recipe-heading {
  margin: 1rem 0 0.7rem;
  align-items: center;
}

.recipe-editor-row {
  display: grid;
  padding: 0.82rem;
  grid-template-columns: minmax(0, 1.3fr) minmax(130px, 0.7fr);
  gap: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.scale-toggle {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  gap: 0.55rem !important;
  color: var(--muted);
  font-size: 0.78rem;
}

.scale-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--tomato);
}

.remove-line-button {
  align-self: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid #ecc6c3;
  background: #fff8f7;
  color: var(--danger);
  font-size: 0.77rem;
}

.locked-note {
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid #d3dfce;
  border-radius: 12px;
  background: #f0f6ed;
  color: #38533b;
  font-size: 0.8rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  max-width: min(calc(100% - 2rem), 460px);
  padding: 0.78rem 1rem;
  transform: translate(50%, 24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(41, 37, 33, 0.96);
  color: #fff;
  box-shadow: var(--shadow-strong);
  font-size: 0.88rem;
  font-weight: 720;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.visible {
  transform: translate(50%, 0);
  opacity: 1;
}

@media (min-width: 760px) {
  main {
    margin-top: 1.35rem;
  }

  .overview-card {
    padding: 1.35rem 1.5rem;
  }

  .wide-field {
    grid-column: auto;
  }

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

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

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

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

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

@media (max-width: 650px) {
  :root {
    --header-height: calc(70px + env(safe-area-inset-top));
  }

  .app-header {
    gap: 0.55rem;
  }

  .brand {
    gap: 0.58rem;
  }

  .brand-mark {
    width: 41px;
    height: 41px;
    border-radius: 12px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand p {
    font-size: 0.67rem;
  }

  .brand-title {
    gap: 0.34rem;
  }

  .brand-title span {
    min-height: 22px;
    padding: 0.2rem 0.38rem;
    font-size: 0.59rem;
  }

  .install-button {
    max-width: 84px;
    min-height: 38px;
    padding: 0.5rem 0.62rem;
    line-height: 1.15;
    font-size: 0.74rem;
  }

  .app-tabs {
    padding-block: 0.48rem;
  }

  main {
    width: min(calc(100% - 1rem), 930px);
    margin-top: 0.75rem;
  }

  .overview-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

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

  .overview-metrics div {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
  }

  .page-heading,
  .section-heading,
  .subheading,
  .recipe-heading {
    gap: 0.55rem;
  }

  .variety-toggle-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .variety-heading-actions {
    justify-content: space-between;
  }

  .management-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .management-heading-actions {
    width: 100%;
    margin-left: 0;
  }

  .management-toolbar {
    grid-template-columns: 1fr;
  }

  .sort-control {
    width: auto;
    flex: 1 1 auto;
  }

  .management-heading-actions .primary-button {
    flex: 0 0 auto;
  }

  .settings-grid,
  .two-columns,
  .dialog-grid,
  .result-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .import-summary div:last-child {
    grid-column: 1 / -1;
  }

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

  .metro-import-fields .metro-mapping-field {
    grid-column: 1 / -1;
  }

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

  .pizza-picker-row,
  .management-row,
  .danger-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .small-stepper {
    width: 100%;
    grid-template-columns: 50px minmax(70px, 1fr) 50px;
  }

  .row-actions {
    justify-content: stretch;
  }

  .row-actions button {
    flex: 1 1 auto;
  }

  .shopping-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .shopping-meta {
    padding-top: 0.55rem;
    border-top: 1px solid #eee7de;
    text-align: left;
  }

  .danger-panel #resetAllButton {
    width: 100%;
  }

  .metro-panel .collapsible-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .metro-panel .collapsible-section-header > div {
    min-width: 0;
  }

  .metro-panel .collapsible-section-header .local-badge {
    max-width: 100%;
    margin-top: 0.48rem;
    justify-self: start;
  }

  .standard-values-panel .collapsible-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .standard-values-panel .collapsible-section-header .local-badge {
    max-width: 100%;
    margin-top: 0.48rem;
    justify-self: start;
  }

  .affiliate-access-panel {
    grid-template-columns: 1fr;
  }

  .affiliate-access-button {
    width: 100%;
  }

  .editor-dialog {
    width: calc(100% - 0.7rem);
    max-height: 92vh;
    border-radius: 18px;
  }

  .editor-dialog form {
    max-height: 92vh;
  }

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

  .remove-line-button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand p,
  .brand-title span {
    display: none;
  }

  .brand h1 {
    max-width: 102px;
    font-size: 0.92rem;
  }

  .install-button {
    max-width: 82px;
    padding-inline: 0.45rem;
    font-size: 0.7rem;
  }

  .tab-shell button {
    padding-inline: 0.18rem;
    font-size: 0.68rem;
  }

  .help-card summary {
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    gap: 0.6rem;
  }

  .help-number {
    width: 38px;
    height: 38px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading > button,
  .recipe-heading > button {
    flex: 0 0 auto;
    padding-inline: 0.62rem;
    font-size: 0.75rem;
  }

  .summary-strip,
  .margin-summary {
    grid-template-columns: 1fr;
  }

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

  .management-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .management-heading-actions .primary-button {
    width: 100%;
  }
}

.pizza-variety-warning {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.95rem;
  border: 1px solid #b98328;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--ink);
}

.pizza-variety-warning strong { font-size: 1rem; }
.pizza-variety-warning p { margin: 0; }
.pizza-variety-warning button { min-height: 44px; justify-self: start; }

@media (max-width: 600px) {
  .pizza-variety-warning button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Version 15.5: Gästeempfehlung und Puffer zwischen Ofenrunden */
.experience-mode-card {
  display: flex;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #d8c8b5;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 7px 22px rgba(71, 43, 25, 0.055);
}

.experience-mode-card h2,
.inventory-panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.experience-mode-card p:last-child,
.inventory-panel p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.switch-control {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.switch-control > span {
  position: relative;
  width: 50px;
  height: 29px;
  border: 1px solid #b9aea2;
  border-radius: 999px;
  background: #ddd6cd;
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-control > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(36, 32, 29, 0.24);
  transition: transform 160ms ease;
}

.switch-control input:checked + span {
  border-color: var(--tomato-dark);
  background: var(--tomato);
}

.switch-control input:checked + span::after {
  transform: translateX(21px);
}

.switch-control input:focus-visible + span {
  outline: 3px solid rgba(221, 169, 61, 0.72);
  outline-offset: 2px;
}

.switch-control b {
  min-width: 22px;
  color: var(--tomato-dark);
  font-size: 0.82rem;
}

.advanced-panel {
  border-color: #d7bd7e;
  background: linear-gradient(145deg, #fffbf2, #fffdf9);
}

.guide-badge {
  display: inline-flex;
  min-height: 28px;
  padding: 0.3rem 0.55rem;
  align-items: center;
  border-radius: 999px;
  background: #ede7df;
  color: #5f554d;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.event-settings-grid {
  margin-bottom: 1rem;
}

.guest-recommendation {
  display: flex;
  margin: 0.2rem 0 0.75rem;
  padding: 0.85rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #dfd3c5;
  border-radius: 13px;
  background: var(--gold-soft);
}

.guest-recommendation-copy {
  display: grid;
  gap: 0.12rem;
}

.guest-recommendation-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.guest-recommendation-copy strong {
  color: var(--tomato-dark);
  font-size: 1.12rem;
}

.guest-recommendation-copy small {
  color: var(--muted);
  line-height: 1.4;
}

.guest-recommendation .primary-button {
  flex: 0 0 auto;
}

.production-summary {
  display: grid;
  margin: 0.2rem 0 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.production-summary div {
  display: grid;
  padding: 0.75rem;
  border: 1px solid #dfd3c5;
  border-radius: 12px;
  background: #fff;
  gap: 0.12rem;
}

.production-summary span,
.timeline-row span {
  color: var(--muted);
  font-size: 0.76rem;
}

.production-summary strong {
  color: var(--tomato-dark);
  font-size: 1.05rem;
}

.production-summary small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.timeline-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.timeline-row {
  display: flex;
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-bottom: 1px solid #eee7de;
}

.timeline-row:last-child {
  border-bottom: 0;
  background: var(--gold-soft);
}

.timeline-row strong {
  flex: 0 0 auto;
  color: #5b3c0c;
  font-size: 0.82rem;
  text-align: right;
}

.price-warning {
  display: flex;
  margin: -0.15rem 0 1rem;
  padding: 0.8rem 0.9rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid #e2bd6b;
  border-radius: 13px;
  background: #fff5d9;
  color: #704b0d;
}

.price-warning.complete {
  border-color: #bed3bd;
  background: #eef6ec;
  color: #315034;
}

.price-warning strong,
.price-warning span {
  display: block;
}

.price-warning span {
  font-size: 0.8rem;
  text-align: right;
}

.advanced-finance {
  display: grid;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  border-top: 1px solid var(--line);
}

.advanced-finance > div {
  display: grid;
  padding: 0.75rem;
  border: 1px solid #dfd5c8;
  border-radius: 12px;
  background: #fff;
  gap: 0.1rem;
}

.advanced-finance span,
.advanced-finance small {
  color: var(--muted);
  font-size: 0.75rem;
}

.advanced-finance strong {
  color: var(--tomato-dark);
  font-size: 1.05rem;
}

.inventory-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: #cbdac7;
  background: linear-gradient(145deg, #f7fbf5, #fffdf9);
}

.inventory-panel.collapsible-section {
  display: block;
}

.inventory-panel .collapsible-section-header {
  margin-bottom: 0.9rem;
}

.inventory-panel > .section-collapse-content {
  display: grid;
  gap: 0.9rem;
}

.inventory-panel > .section-collapse-content > .switch-control {
  justify-self: end;
}

.stock-editor {
  padding-top: 0.95rem;
  border-top: 1px solid #cbdac7;
}

.stock-editor-heading {
  display: flex;
  margin-bottom: 0.85rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.stock-editor-heading h3,
.stock-editor-heading p {
  margin: 0;
}

.stock-editor-heading h3 {
  color: var(--ink);
  font-size: 1.12rem;
}

.stock-editor-heading p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.stock-saved-note {
  display: inline-flex;
  min-height: 30px;
  padding: 0.35rem 0.58rem;
  align-items: center;
  border-radius: 999px;
  background: #e8f2e5;
  color: #315034;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.stock-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.7rem;
}

.stock-show-all {
  min-height: 48px;
  font-size: 0.875rem;
}

.stock-filter-note {
  margin: 0.55rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.stock-groups {
  display: grid;
  gap: 0.65rem;
}

.stock-group {
  overflow: hidden;
  border: 1px solid #d7e0d3;
  border-radius: 14px;
  background: #fff;
}

.stock-group-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 0;
  border-radius: 0;
  background: #f4f8f1;
  color: #2f4632;
  text-align: left;
}

.stock-group-toggle span {
  display: grid;
  gap: 0.08rem;
}

.stock-group-toggle strong {
  font-size: 0.94rem;
}

.stock-group-toggle small {
  color: #637365;
  font-size: 0.76rem;
}

.stock-group-toggle b {
  font-size: 1rem;
  transition: transform 160ms ease;
}

.stock-group-toggle[aria-expanded="false"] b {
  transform: rotate(180deg);
}

.stock-group-content {
  display: grid;
}

.stock-row {
  display: grid;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  grid-template-columns: minmax(0, 1fr) minmax(142px, 180px);
  align-items: center;
  gap: 0.8rem;
  border-top: 1px solid #e7ede3;
}

.stock-row.has-stock {
  background: #fbfdf9;
}

.stock-row-copy {
  display: grid;
  min-width: 0;
  gap: 0.13rem;
}

.stock-row-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.stock-row-copy span {
  color: var(--muted);
  font-size: 0.75rem;
}

.stock-amount-control {
  display: grid;
  gap: 0.25rem;
}

.stock-amount-control > span:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.stock-amount-control input {
  min-width: 0;
}

.shopping-toolbar {
  display: flex;
  margin-bottom: 0.85rem;
  padding: 0.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8f4ee;
}

.shopping-toolbar > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.check-control {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.5rem;
  color: #4e4640;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.check-control input {
  width: 21px;
  height: 21px;
  accent-color: var(--tomato);
}

.shopping-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.shopping-group-toggle {
  display: flex;
  width: 100%;
  min-height: 50px;
  padding: 0.65rem 0.8rem;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: #f7f1e9;
  color: var(--tomato-dark);
  text-align: left;
  cursor: pointer;
}

.shopping-group-toggle span,
.shopping-group-toggle strong,
.shopping-group-toggle small {
  display: block;
}

.shopping-group-toggle small {
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.shopping-group-toggle b {
  transition: transform 160ms ease;
}

.shopping-group-toggle[aria-expanded="false"] b {
  transform: rotate(180deg);
}

.shopping-group .shopping-list {
  padding: 0.65rem;
}

.shopping-row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(155px, 0.72fr);
  align-items: center;
}

.shopping-check {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  cursor: pointer;
}

.shopping-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.shopping-check span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #c4b8aa;
  border-radius: 9px;
  background: #fff;
  color: transparent;
  font-weight: 900;
}

.shopping-check input:checked + span {
  border-color: #48654a;
  background: #48654a;
  color: #fff;
}

.shopping-check input:focus-visible + span {
  outline: 3px solid rgba(221, 169, 61, 0.72);
  outline-offset: 2px;
}

.shopping-row.is-checked .shopping-name {
  opacity: 0.58;
  text-decoration: line-through;
}

.advanced-meta {
  color: #315034 !important;
  font-weight: 750;
}

.pizza-cost-list {
  display: grid;
  gap: 0.6rem;
}

.pizza-cost-row {
  display: grid;
  padding: 0.78rem;
  grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(80px, 0.6fr));
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.pizza-cost-row > div {
  display: grid;
  gap: 0.08rem;
}

.pizza-cost-row > div:not(:first-child) {
  text-align: right;
}

.pizza-cost-row span {
  color: var(--muted);
  font-size: 0.72rem;
}

.pizza-cost-row > div:first-child > strong {
  line-height: 1.25;
}

.profile-toolbar {
  margin-top: 0.9rem;
  grid-template-columns: minmax(200px, 1fr) auto;
}

.standard-values-panel {
  overflow: hidden;
  border-color: #dcc38b;
  background:
    radial-gradient(circle at 100% 0, rgba(221, 169, 61, 0.18), transparent 14rem),
    linear-gradient(145deg, #fffaf1, #fffdf9);
}

.standard-values-status {
  display: flex;
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #dfd4c7;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

.standard-values-status-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: #eee7de;
  color: var(--tomato-dark);
  font-weight: 900;
}

.standard-values-status > div {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.standard-values-status strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.3;
}

.standard-values-status span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.standard-values-status.success {
  border-color: #cadbc6;
  background: #f2f7ef;
}

.standard-values-status.success .standard-values-status-icon {
  background: #dcebd8;
  color: #315034;
}

.standard-values-actions {
  margin-bottom: 0.8rem;
}

.standard-values-scope-note {
  display: grid;
  padding: 0.75rem;
  border-left: 4px solid #d7a93c;
  border-radius: 0 11px 11px 0;
  background: rgba(255, 247, 225, 0.88);
  gap: 0.16rem;
}

.standard-values-scope-note strong {
  color: #68470f;
  font-size: 0.8rem;
}

.standard-values-scope-note span {
  color: #725c35;
  font-size: 0.76rem;
  line-height: 1.45;
}

.standard-values-more {
  margin-top: 0.8rem;
  border-top: 1px solid rgba(133, 100, 54, 0.18);
}

.standard-values-more summary {
  padding: 0.75rem 0 0;
  color: var(--tomato-dark);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.standard-values-more p {
  margin: 0.6rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.danger-outline {
  border-color: #e2b9b5;
  color: var(--danger);
}

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

.standard-preview div:last-child {
  grid-column: 1 / -1;
}

.standard-preview strong {
  overflow: visible;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

.standard-preview small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.backup-status {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 11px;
  background: #f2eee8;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

.backup-status.success {
  background: #edf5eb;
  color: #315034;
}

.advanced-dialog-field {
  margin-top: 0.8rem;
}

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

@media (max-width: 650px) {
  .experience-mode-card,
  .inventory-panel,
  .shopping-toolbar,
  .price-warning {
    align-items: stretch;
    flex-direction: column;
  }

  .switch-control {
    align-self: flex-end;
  }

  .stock-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .stock-editor-toolbar,
  .stock-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stock-show-all {
    min-height: 44px;
  }

  .stock-amount-control .input-unit {
    width: 100%;
  }

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

  .production-summary div {
    padding: 0.6rem;
  }

  .guest-recommendation {
    align-items: stretch;
    flex-direction: column;
  }

  .guest-recommendation .primary-button {
    width: 100%;
  }

  .price-warning span {
    text-align: left;
  }

  .shopping-toolbar > div {
    align-items: stretch;
    flex-direction: column;
  }

  .shopping-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .shopping-meta {
    grid-column: 2;
  }

  .pizza-cost-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(62px, 0.5fr));
  }

  .pizza-cost-row > div:first-child {
    grid-column: 1 / -1;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #eee7de;
  }

  .pizza-cost-row > div:not(:first-child) {
    text-align: left;
  }

  .profile-toolbar {
    grid-template-columns: 1fr;
  }

  .standard-preview {
    grid-template-columns: 1fr;
  }

  .standard-preview div:last-child {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .production-summary {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-row strong {
    text-align: left;
  }

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

  .pizza-cost-row > div:first-child {
    grid-column: auto;
  }
}

/* Version 15.6: verbundener Buchungskalender */
body.advanced-mode .tab-shell {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.calendar-page-heading {
  flex-wrap: wrap;
}

.calendar-connection-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0.32rem 0.62rem;
  align-items: center;
  border-radius: 999px;
  background: #eee8df;
  color: #665c53;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.calendar-connection-badge.connected {
  background: #e6f2e5;
  color: #315b37;
}

.calendar-connection-badge.error {
  background: #f8e5e1;
  color: #8f2625;
}

.calendar-connect-panel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-color: #d9bd78;
  background:
    radial-gradient(circle at 96% -20%, rgba(221, 169, 61, 0.25), transparent 14rem),
    linear-gradient(145deg, #fffaf0, #fffdf9);
}

.calendar-connect-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--tomato), var(--tomato-dark));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(143, 38, 37, 0.2);
}

.calendar-connect-panel h3,
.calendar-sync-panel h3,
.calendar-toolbar h3,
.calendar-agenda-heading h3,
.calendar-unscheduled h3 {
  margin: 0;
}

.calendar-connect-panel p {
  margin: 0.3rem 0 0.9rem;
  color: var(--muted);
}

.calendar-affiliate-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  text-decoration: none;
}

.calendar-sync-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: #bad2b9;
  background: linear-gradient(145deg, #f2f8ef, #fffdf9);
}

.calendar-sync-panel p:last-child {
  margin: 0.22rem 0 0;
  color: #52654f;
  font-size: 0.84rem;
}

.calendar-sync-actions,
.calendar-navigation,
.calendar-booking-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-sync-actions {
  flex: 0 0 auto;
}

.calendar-panel {
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  margin-bottom: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-toolbar h3 {
  color: var(--ink);
  font-size: clamp(1.3rem, 5vw, 1.65rem);
  line-height: 1.15;
  text-transform: capitalize;
}

.calendar-toolbar p:last-child {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-navigation {
  flex: 0 0 auto;
}

.calendar-nav-arrow {
  width: 44px;
  padding-inline: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.calendar-grid-shell {
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9f6f0;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  padding: 0.45rem 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.calendar-days {
  gap: 0.25rem;
}

.calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 0.42rem 0.18rem;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.calendar-day:hover {
  border-color: var(--line-strong);
}

.calendar-day.other-month {
  opacity: 0.42;
}

.calendar-day.today {
  border-color: #d5aa4c;
  background: #fff7dc;
  color: #5b3c0c;
}

.calendar-day.selected {
  border-color: var(--tomato);
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 5px 13px rgba(143, 38, 37, 0.18);
}

.calendar-day-number {
  font-size: 0.9rem;
  font-weight: 900;
}

.calendar-day-dots {
  display: flex;
  max-width: 100%;
  margin-top: 0.38rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.calendar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b47a21;
}

.calendar-dot.booked { background: #4f72a0; }
.calendar-dot.planned { background: #b47a21; }
.calendar-dot.active { background: #982c2c; }
.calendar-dot.completed { background: #7c5b99; }
.calendar-dot.invoice_paid { background: #c58c1b; }
.calendar-dot.bonus_paid { background: #2f7d55; }
.calendar-dot.cancelled { background: #b64545; }
.calendar-day.selected .calendar-dot { background: #fff; }

.calendar-more-dots {
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.calendar-agenda-heading {
  display: flex;
  margin: 1rem 0 0.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.calendar-agenda-heading h3 {
  font-size: 1.02rem;
}

.calendar-booking-list {
  display: grid;
  gap: 0.65rem;
}

.calendar-booking-card {
  padding: 0.85rem;
  border: 1px solid #e1d6c9;
  border-radius: 14px;
  background: #fff;
}

.calendar-booking-top,
.calendar-booking-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.calendar-booking-main {
  display: grid;
  gap: 0.12rem;
}

.calendar-booking-main strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.calendar-booking-main span {
  color: var(--muted);
  font-size: 0.8rem;
}

.calendar-status {
  display: inline-flex;
  min-height: 27px;
  padding: 0.28rem 0.52rem;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 999px;
  background: #f5e7d2;
  color: #7a541b;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.calendar-status.booked { background: #e8edf8; color: #31527a; }
.calendar-status.planned { background: #f7ead5; color: #73501b; }
.calendar-status.active { background: #f6dfdc; color: #8f2625; }
.calendar-status.completed { background: #eee8f5; color: #624581; }
.calendar-status.invoice_paid { background: #fff0c8; color: #74520b; }
.calendar-status.bonus_paid { background: #e5f3e9; color: #17613f; }
.calendar-status.cancelled, .calendar-status.rejected { background: #f5e5e5; color: #872c2c; }

.calendar-booking-meta {
  display: grid;
  margin: 0.65rem 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.calendar-booking-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-booking-note {
  margin: -0.1rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.calendar-booking-actions {
  padding-top: 0.65rem;
  justify-content: flex-end;
  border-top: 1px solid #eee7de;
}

.calendar-edit-link {
  display: inline-flex;
  min-height: 42px;
  padding: 0.66rem 0.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.calendar-unscheduled {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e1bd67;
  border-radius: var(--radius);
  background: #fff7dc;
  box-shadow: var(--shadow);
}

.calendar-unscheduled > p {
  margin: 0.22rem 0 0.8rem;
  color: #745b25;
  font-size: 0.84rem;
}

.calendar-unscheduled .section-collapse-content > p {
  margin: 0.3rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.calendar-unscheduled .calendar-booking-card {
  border-color: #ead9b6;
}

.calendar-privacy-note {
  display: grid;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid #cbdac7;
  border-radius: 14px;
  background: #f0f7ef;
  gap: 0.16rem;
}

.calendar-privacy-note strong {
  color: #315034;
}

.calendar-privacy-note span {
  color: #52654f;
  font-size: 0.8rem;
}

@media (max-width: 650px) {
  .screen-collapse-toolbar > span {
    display: none;
  }

  .screen-collapse-toolbar > div {
    width: 100%;
  }

  .screen-collapse-toolbar button {
    min-height: 44px;
    flex: 1 1 50%;
    font-size: 0.875rem;
  }

  .calendar-connect-panel.collapsible-section {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .calendar-connect-panel > .section-collapse-content {
    width: 100%;
    grid-column: 1 / -1;
  }

  .affiliate-access-panel > .section-collapse-content,
  .inventory-panel > .section-collapse-content,
  .danger-panel > .section-collapse-content,
  .calendar-sync-panel > .section-collapse-content {
    width: 100%;
  }

  body.advanced-mode .tab-shell button {
    padding-inline: 0.18rem;
    font-size: clamp(0.68rem, 2.9vw, 0.78rem);
  }

  .calendar-connect-panel,
  .calendar-sync-panel,
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-connect-icon {
    width: 46px;
    height: 46px;
  }

  .calendar-affiliate-button,
  .calendar-sync-actions,
  .calendar-sync-actions button {
    width: 100%;
  }

  .calendar-sync-actions button {
    flex: 1 1 0;
  }

  .calendar-navigation {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .calendar-day {
    min-height: 56px;
    border-radius: 9px;
  }

  .calendar-booking-meta {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .calendar-booking-meta span {
    white-space: normal;
  }

  .calendar-booking-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-booking-actions .primary-button,
  .calendar-edit-link {
    width: 100%;
  }
}

@media (max-width: 390px) {
  body.advanced-mode .tab-shell button {
    font-size: 0.6rem;
  }

  .calendar-day {
    min-height: 50px;
    padding-inline: 0.08rem;
  }

  .calendar-dot {
    width: 6px;
    height: 6px;
  }

  .calendar-agenda-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
