:root {
  --page: #eef2f1;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --panel: #ffffff;
  --line: #dfe7e3;
  --line-strong: #c8d4ce;
  --ink: #17201d;
  --muted: #63726c;
  --green: #1c9f6b;
  --green-soft: #e0f4eb;
  --blue: #2f6df6;
  --blue-soft: #e6edff;
  --amber: #d99a18;
  --amber-soft: #fff4d7;
  --coral: #dd5d4a;
  --white: #fff;
  --shadow: 0 12px 36px rgba(22, 34, 29, 0.12);
  --shadow-soft: 0 6px 18px rgba(22, 34, 29, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(23, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 32, 29, 0.035) 1px, transparent 1px),
    var(--page);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

#divgeneraleperPosizione {
  width: min(1360px, calc(100% - 32px));
  margin: 24px auto;
}

#divgeneralePerIOS {
  position: relative;
  overflow: visible;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.site-header {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

#logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

div.titolo {
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.brand-kicker {
  color: var(--green);
  font-size: 32px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

#img-centro {
  display: none;
}

#titolo1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 780;
  line-height: 1.25;
}

#titolo2 {
  margin: 6px 0 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.45;
}

#titolo6 {
  margin: 0;
  color: var(--amber);
  text-align: center;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
}

.sup {
  position: relative;
  margin: 16px 0 14px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu > li {
  position: relative;
  min-width: 156px;
}

#menuStretto2 {
  min-width: 56px;
}

#menuStretto3 {
  min-width: 58px;
}

#languageMenu {
  min-width: 104px;
}

.menu-root,
.snap-button,
.sub-menu button,
.buttonli,
.language-button {
  width: 100%;
  border: 0;
  text-align: center;
}

.menu-root,
.language-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  line-height: 36px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.menu-root:hover,
.language-button:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.snap-button {
  display: grid;
  place-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.snap-button img {
  width: 42px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
}

.sub-menu {
  position: absolute;
  z-index: 30;
  top: 46px;
  right: 0;
  display: none;
  width: 250px;
  padding: 6px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  box-shadow: var(--shadow);
}

.sub-menu.open {
  display: block;
}

.sub-menu li {
  border-bottom: 0;
}

.sub-menu-label {
  padding: 10px 12px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.sub-menu button,
.sub-menu-link,
#info {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  display: block;
  text-decoration: none;
  text-align: left;
  line-height: 38px;
}

.sub-menu button:hover,
.sub-menu-link:hover {
  background: var(--surface-2);
}

#info {
  color: var(--muted);
  font-size: 12px;
}

.HR,
.HR1 {
  display: none;
}

.sxSUP {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.bottoni {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.el2,
.el3 {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.selector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.selector-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.lievito,
.tipoPizza,
.yeast-type {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.lievito,
.tipoPizza {
  height: 100%;
}

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

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

.yeast-type-wrap {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.selector-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.lievito button,
.tipoPizza button,
.yeast-type button {
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-weight: 780;
  line-height: 1.12;
  box-shadow: var(--shadow-soft);
}

.yeast-type button {
  min-height: 40px;
  padding: 8px 10px;
  border-color: var(--line-strong);
  background: var(--surface-2);
  font-size: 12px;
}

.lievito button:hover,
.tipoPizza button:hover,
.yeast-type button:hover {
  border-color: var(--green);
}

.lievito button.active,
.tipoPizza button.active,
.yeast-type button.active,
#impBase.active,
#impAvan.active,
#saleOlioLitro.active,
#saleOlioFarina.active,
#gradiC.active,
#gradiF.active,
#ldbF.active,
#ldbIN.active,
#ldbIST.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: #0d5e3f;
}

.ct {
  display: flex;
}

.go-button {
  display: grid;
  place-items: center;
  width: 118px;
  min-height: 74px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green);
  box-shadow: var(--shadow-soft);
}

.go-button::after {
  content: attr(data-label);
  color: var(--white);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
}

.go-button img {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 16px;
  align-items: start;
}

fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.fieldS {
  padding: 16px;
}

#fieldSTAB3,
#fieldSTAB2 {
  min-height: 0;
}

.legenda {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: auto;
  min-height: 38px;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  font-weight: 820;
  line-height: 38px;
}

.legenda::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--green);
}

#legendaTAB2::before {
  background: var(--blue);
}

.el {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(132px, 180px) 72px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2ef;
}

.el:last-child {
  border-bottom: 0;
}

.title,
.titleH {
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.25;
}

.titleB {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.mini-action-button {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(28, 159, 107, 0.28);
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
}

.mini-action-button:hover {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.number-stepper {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 4px;
  align-items: center;
  width: 100%;
}

.number-stepper input {
  width: 100%;
  min-width: 0;
}

.stepper-button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.stepper-button:hover {
  border-color: rgba(28, 159, 107, 0.5);
  background: var(--green-soft);
  color: var(--green);
}

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

.stepper-button:focus-visible {
  outline: 3px solid rgba(47, 109, 246, 0.16);
  outline-offset: 2px;
}

.formatocasella,
.formatocasellaW,
.formatocasellaT,
.SEL1,
.SEL2,
.SEL1H {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}

.formatocasella:focus,
.formatocasellaW:focus,
.formatocasellaT:focus,
select:focus {
  outline: 3px solid rgba(47, 109, 246, 0.16);
  border-color: var(--blue);
}

.formatocasella:disabled,
.formatocasellaW:disabled {
  background: #eef2ef;
  color: var(--muted);
}

.formatocasellaW {
  width: 100px;
}

.formatocasellaT {
  width: 58px;
}

.planner-field .number-stepper {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

.planner-field .stepper-button,
.planner-field .planner-input {
  min-height: 36px;
  height: 36px;
}

.TB1 .number-stepper,
.TB3 .number-stepper {
  grid-template-columns: 26px minmax(48px, 1fr) 26px;
  gap: 3px;
  min-width: 106px;
}

.TB1 .stepper-button,
.TB3 .stepper-button {
  min-height: 30px;
  font-size: 14px;
}

.TB1 .formatocasellaT,
.TB3 .formatocasellaW {
  min-height: 30px;
}

.hidden {
  display: none !important;
}

.dose-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(28, 159, 107, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fcfa 0%, var(--surface) 100%);
}

.dose-summary-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.dose-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dose-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.dose-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.dose-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 880;
  line-height: 1.1;
}

.dose-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.eldx {
  display: grid;
  grid-template-columns: minmax(162px, 1fr) 88px 88px 88px 32px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
}

.eldx > label,
.eldx > .labeldx2,
.eldx > .labeldx3,
.eldx > .labeldx4,
.eldx > .labeldx5 {
  min-height: 30px;
  border-bottom: 0;
  border-radius: 6px;
  line-height: 30px;
}

.labeldx1 {
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 720;
}

.labeldx2,
.labeldx3,
.labeldx4 {
  background: var(--surface-2);
  color: var(--ink);
  text-align: center;
  font-weight: 780;
}

.labeldx5 {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

#ris-5\.2,
#ris-6\.2,
#ris-7\.2,
#ris-9\.2,
#ris-10\.2,
#ris-11\.2,
#ris-12\.2 {
  background: var(--green-soft);
}

.btnW,
.btnH {
  width: 76px;
  min-height: 34px;
  border-radius: 6px;
  font-weight: 820;
}

.btnW {
  border: 1px solid rgba(28, 159, 107, 0.35);
  background: var(--green-soft);
  color: #0d5e3f;
}

.btnH {
  border: 1px solid rgba(47, 109, 246, 0.35);
  background: var(--blue-soft);
  color: #173f9d;
}

.img-mano {
  display: none;
}

.eldxB {
  margin-top: 8px;
  color: var(--muted);
  text-align: right;
  font-size: 12px;
}

body.base-mode .labeldx3,
body.base-mode .labeldx4,
body.base-mode #eldx0,
body.base-mode .split-row {
  display: none;
}

body.base-mode .eldx {
  grid-template-columns: minmax(160px, 1fr) 108px 32px;
}

body.base-mode .eldx .labeldx2 {
  grid-column: 2;
}

body.base-mode .eldx .labeldx5 {
  grid-column: 3;
}

.inf,
.sx-BIGA,
.centroW,
.centroH,
.centroInf {
  clear: both;
  margin-top: 16px;
}

#fieldSTAB1,
#fieldSTAB4 {
  padding: 14px;
  border-radius: var(--radius);
}

.calendar-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.calendar-button img {
  width: 18px;
  height: 18px;
}

.reverse-planner {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(28, 159, 107, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fcfa 0%, var(--surface) 100%);
  text-align: left;
}

.reverse-planner-copy {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
}

.reverse-planner-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.reverse-planner-copy span,
.planner-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.planner-field {
  display: grid;
  gap: 5px;
}

.planner-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.planner-input {
  height: 36px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.planner-button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.planner-button.secondary {
  border: 1px solid rgba(28, 159, 107, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.planner-button:hover {
  background: #167f56;
  color: var(--white);
}

.planner-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-summary {
  grid-column: 1 / -1;
  margin: 0;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

.TB1,
.TB3 {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.TB1 th,
.TB1 td,
.TB3 th,
.TB3 td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.TB1 th,
.TB3 th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}

.TB1 tbody tr:nth-child(odd),
.TB3 tbody tr:nth-child(odd) {
  background: #fbfcfb;
}

.SEL1 {
  width: 185px;
}

.SEL2 {
  width: 78px;
}

.SEL1H {
  width: min(260px, 100%);
}

#titolo3,
#titolo3w {
  margin: 0;
  color: var(--ink);
  text-align: left;
  font-size: 26px;
  font-weight: 850;
  line-height: 1.25;
}

#titolo4,
#titolo4w,
#titolo5,
#titolo5w {
  margin: 6px 0 12px;
  max-width: 980px;
  color: var(--muted);
  text-align: left;
  line-height: 1.5;
}

.centroW,
.centroH {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.centroW {
  background: var(--green-soft);
}

.centroH {
  background: var(--blue-soft);
}

.recipe-manager {
  clear: both;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.manager-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#recipeManagerTitle {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
}

#recipeManagerHelp {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.manager-close,
.manager-primary,
.saved-recipe-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 780;
}

.manager-close {
  padding: 0 14px;
}

.manager-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 220px;
  gap: 10px;
  margin-bottom: 12px;
}

.manager-primary {
  border-color: rgba(28, 159, 107, 0.35);
  background: var(--green);
  color: var(--white);
}

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

.saved-recipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.saved-recipe.active {
  border-color: rgba(28, 159, 107, 0.45);
  background: var(--green-soft);
}

.saved-recipe-main {
  min-width: 0;
}

.saved-recipe-main strong,
.saved-recipe-main span,
.saved-recipe-main small {
  display: block;
}

.saved-recipe-main strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.saved-recipe-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.saved-recipe-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.saved-recipe-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.saved-recipe-actions button {
  padding: 0 10px;
  font-size: 12px;
}

.saved-recipe-actions [data-recipe-action="delete"] {
  border-color: rgba(221, 93, 74, 0.35);
  color: #9e2f24;
}

.empty-recipes {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.W1 {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin: 0 auto;
  border: 1px solid rgba(28, 159, 107, 0.35);
  border-radius: var(--radius);
  background: var(--surface);
}

.labelW1 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 850;
}

.btnWsC {
  width: calc(50% - 8px);
  min-height: 42px;
  margin: 12px 4px 0;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: var(--white);
  font-weight: 820;
}

.centroH .btnWsC {
  background: var(--blue);
}

.titleH {
  grid-column: 1;
}

.titleH1 {
  grid-column: 1 / -1;
  color: #123f9f;
  text-align: center;
  font-size: 20px;
  font-weight: 850;
}

.titleH2 {
  min-height: 30px;
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
  font-weight: 800;
  line-height: 30px;
}

#myChart {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: 430px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fermentation-panel {
  display: grid;
  gap: 12px;
  max-width: 1200px;
  margin: 12px auto 0;
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.chart-stat {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.chart-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-transform: uppercase;
}

.chart-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
}

.timeline-bars {
  display: flex;
  min-height: 74px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-segment {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 92px;
  padding: 10px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.timeline-segment:last-child {
  border-right: 0;
}

.timeline-segment.room {
  background: var(--green-soft);
}

.timeline-segment.cold {
  background: var(--blue-soft);
}

.timeline-segment.preferment {
  background: var(--amber-soft);
}

.timeline-segment strong {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.timeline-segment span,
.timeline-segment small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.chart-notes {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-open-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(28, 159, 107, 0.28);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 850;
}

.guide-open-button:hover {
  background: #167f56;
}

.pizza-guide {
  clear: both;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(224, 244, 235, 0.65), rgba(255, 255, 255, 0.92) 210px),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.guide-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  max-width: 860px;
  margin-bottom: 16px;
}

.guide-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.pizza-guide h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.guide-heading p:last-child,
.guide-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.guide-close {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.guide-close:hover {
  border-color: var(--green);
  color: var(--green);
}

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

.guide-split {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  margin-top: 12px;
}

.guide-card,
.guide-panel,
.guide-process {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.guide-card {
  border-top: 4px solid var(--green);
}

.guide-card:nth-child(2) {
  border-top-color: var(--blue);
}

.guide-card:nth-child(3) {
  border-top-color: var(--coral);
}

.guide-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.guide-card:nth-child(2) .guide-tag {
  background: var(--blue-soft);
  color: var(--blue);
}

.guide-card:nth-child(3) .guide-tag {
  background: #ffe8e2;
  color: var(--coral);
}

.pizza-guide h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.guide-card p,
.guide-card li,
.guide-checklist li,
.guide-steps li,
.guide-callout {
  color: var(--muted);
  line-height: 1.55;
}

.guide-card p {
  margin: 0 0 10px;
}

.guide-card ul,
.guide-checklist,
.guide-steps {
  margin: 0;
  padding-left: 18px;
}

.guide-card li + li,
.guide-checklist li + li,
.guide-steps li + li {
  margin-top: 6px;
}

.guide-data {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.guide-data span {
  color: var(--muted);
}

.guide-data strong {
  color: var(--ink);
  white-space: nowrap;
}

.guide-process {
  margin-top: 12px;
}

.guide-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(217, 154, 24, 0.35);
  border-radius: var(--radius);
  background: var(--amber-soft);
}

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

.descrizione {
  clear: both;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

h3 {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 18px;
  line-height: 1.35;
}

.desc1 {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.footer {
  clear: both;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
}

.foot1,
.foot2 {
  margin: 4px 0;
  line-height: 1.45;
}

#divgeneralePerBannerV {
  display: none;
}

.friend-box {
  display: grid;
  place-items: center;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  color: #f2f2f2;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #17201d;
  color: #fff;
  box-shadow: var(--shadow);
  line-height: 1.35;
}

.toast.error {
  background: #9e2f24;
}

.calc-warning {
  color: #9e2f24;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .workspace,
  .sxSUP,
  .bottoni {
    grid-template-columns: 1fr;
  }

  .lievito,
  .tipoPizza {
    grid-template-columns: 1fr;
  }

  .go-button {
    width: 100%;
  }

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

  .dose-summary-grid {
    grid-template-columns: 1fr;
  }

  .timeline-bars {
    overflow-x: auto;
  }

  .saved-recipe,
  .manager-actions {
    grid-template-columns: 1fr;
  }

  .saved-recipe-actions {
    justify-content: flex-start;
  }

  .reverse-planner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .reverse-planner-copy,
  .planner-summary,
  .planner-actions {
    grid-column: 1 / -1;
  }

  .planner-field label {
    align-self: center;
  }

  .guide-grid,
  .guide-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #divgeneraleperPosizione {
    width: calc(100% - 12px);
    margin: 6px auto;
  }

  #divgeneralePerIOS {
    padding: 12px;
  }

  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #logo {
    margin: 0 auto;
  }

  .brand-lockup {
    justify-content: center;
    flex-wrap: wrap;
  }

  .brand-kicker {
    font-size: 30px;
  }

  #titolo1 {
    font-size: 18px;
  }

  .menu {
    justify-content: stretch;
  }

  .menu > li {
    flex: 1 1 160px;
  }

  .sub-menu {
    left: 0;
    right: auto;
    width: min(260px, calc(100vw - 40px));
  }

  .el {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .eldx,
  body.base-mode .eldx {
    grid-template-columns: minmax(126px, 1fr) 84px 30px;
    font-size: 12px;
  }

  .labeldx3,
  .labeldx4 {
    display: none;
  }

  .btnW,
  .btnH {
    width: 70px;
  }

  .btnWsC {
    width: 100%;
  }

  .manager-header {
    display: grid;
  }

  .saved-recipe-actions button {
    flex: 1 1 130px;
  }

  .TB1 {
    min-width: 780px;
  }

  #fieldSTAB1 {
    overflow-x: auto;
  }

  .chart-stats {
    grid-template-columns: 1fr;
  }

  .timeline-segment {
    min-width: 150px;
  }

  .reverse-planner {
    grid-template-columns: 1fr;
  }

  .planner-button {
    width: 100%;
  }

  .planner-actions {
    display: grid;
  }

  .pizza-guide {
    padding: 14px;
  }

  .pizza-guide h2 {
    font-size: 22px;
  }

  .guide-callout {
    grid-template-columns: 1fr;
  }

  .guide-heading {
    grid-template-columns: 1fr;
  }

  .guide-close {
    width: 100%;
  }

  .guide-open-button {
    width: 100%;
  }

  .guide-data {
    grid-template-columns: 1fr;
  }

  .guide-data strong {
    white-space: normal;
  }
}
