:root{
  --bg:#f2f0ea;
  --surface:#fbf8f2;
  --surface-2:#f0ece4;
  --panel:#ffffff;
  --ink:#0b0b0b;
  --muted:#5e5a54;
  --line:#d7d0c5;
  --line-strong:#171717;
  --green:#5f7f4c;
  --green-deep:#405735;
  --green-soft:#dfe8d9;
  --red:#b84337;
  --red-soft:#f8e7e3;
  --blue:#335d87;
  --blue-soft:#e7eff7;
  --brown:#8e5f2b;
  --radius:24px;
  --radius-sm:16px;
  --shadow:0 22px 60px rgba(11,11,11,.08);
}

*{box-sizing:border-box;margin:0;padding:0}
html{
  scroll-behavior:smooth;
  min-height:100%;
  background:#050505;
  -webkit-text-size-adjust:100%;
}
body{
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  background:
    radial-gradient(circle at top left, rgba(95,127,76,.14), transparent 28%),
    radial-gradient(circle at top right, rgba(11,11,11,.08), transparent 24%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 55%, #ece7df 100%);
  color:var(--ink);
  font-family:"Space Mono", monospace;
  font-size:13px;
  line-height:1.6;
  padding-bottom:env(safe-area-inset-bottom, 0);
  overflow-x:hidden;
}

button,input,select,textarea{font:inherit}
button{cursor:pointer}
img{max-width:100%;display:block}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

.logo-mark{
  display:block;
  width:132px;
  height:auto;
  background:transparent;
  border:none;
  box-shadow:none;
}

.logo-mark-hero{
  width:min(170px, 42vw);
}

.logo-mark-black{
  filter:invert(1);
}

.logo-mark-topbar{
  width:92px;
}

.login-screen{
  position:fixed;
  inset:0;
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  padding-top:max(24px, env(safe-area-inset-top, 0px));
  padding-bottom:max(24px, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 20% 10%, rgba(95,127,76,.18), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,.08), transparent 18%),
    linear-gradient(135deg, #050505 0%, #111 52%, #1a2415 100%);
  z-index:30;
}

.login-card{
  width:min(420px, 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:40px 28px 28px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(17,17,17,.72);
  border-radius:32px;
  box-shadow:0 30px 90px rgba(0,0,0,.35);
  backdrop-filter:blur(14px);
}

.brand-lockup{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#fff;
}

.login-title{
  color:#ddd7cd;
  font-size:12px;
  letter-spacing:.22em;
  text-transform:uppercase;
}

.eyebrow{
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.login-status{
  color:#dbd5cb;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  text-align:center;
}

.login-form{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:0;
  border-radius:0;
  background:transparent;
}

.login-input,
.search-input,
.field-select,
.modal input,
.modal textarea,
.modal select,
td input,
td select{
  width:100%;
  border:none;
  outline:none;
  color:var(--ink);
  background:var(--surface);
  border-radius:16px;
  padding:14px 16px;
  font-size:16px;
  box-shadow:inset 0 0 0 1px var(--line);
}

.login-input:focus,
.search-input:focus,
.field-select:focus,
.modal input:focus,
.modal textarea:focus,
.modal select:focus,
td input:focus,
td select:focus{
  box-shadow:inset 0 0 0 2px var(--green);
}

.login-error{min-height:18px;color:var(--red);font-size:12px}

.login-form .primary-btn{
  width:100%;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:16px;
  min-height:44px;
  padding:12px 16px;
  font-family:"Space Mono", monospace;
  letter-spacing:.04em;
  transition:transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.primary-btn,
.btn-g{
  background:linear-gradient(180deg, #6c9056 0%, var(--green) 100%);
  color:#fff;
  box-shadow:0 16px 30px rgba(64,87,53,.26);
}
.primary-btn:hover,
.btn-g:hover{
  transform:translateY(-1px);
  background:linear-gradient(180deg, #577543 0%, var(--green-deep) 100%);
}

.secondary-btn,
.btn-o{
  color:var(--ink);
  background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--line);
}
.secondary-btn:hover,
.btn-o:hover{
  background:#ebe5da;
}

.ghost-btn,
.btn{
  background:#111;
  color:#fff;
}
.ghost-btn-sm{
  min-height:34px;
  padding:7px 12px;
  border-radius:12px;
  font-size:11px;
}
.ghost-btn:hover,
.btn:hover{
  transform:translateY(-1px);
  background:#262626;
}

.btn-s{
  min-height:auto;
  padding:8px 12px;
  border-radius:12px;
  font-size:11px;
}
.btn-d{
  background:var(--red);
  color:#fff;
}

.app-shell{
  display:none;
  min-height:100vh;
  min-height:100svh;
}
.app-shell.visible{
  display:block;
  min-height:100vh;
  min-height:100svh;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 24px;
  padding-top:max(18px, calc(env(safe-area-inset-top, 0px) + 10px));
  background:rgba(250,246,239,.82);
  border-bottom:1px solid rgba(23,23,23,.06);
  backdrop-filter:blur(18px);
}

.topbar-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.topbar-date{color:var(--muted);font-size:12px}
.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

.main-nav{
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:10px;
  padding:14px 24px 0;
}
.mobile-nav-toggle{
  display:none;
}

.nav-btn{
  min-height:46px;
  padding:12px 10px;
  border:none;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  color:#3c3a36;
  box-shadow:inset 0 0 0 1px rgba(23,23,23,.08);
}

.nav-btn.active{
  color:#fff;
  background:#111;
  box-shadow:0 18px 28px rgba(11,11,11,.14);
}

.nav-btn-ai{color:var(--green-deep)}
.nav-btn-ai.active{background:linear-gradient(180deg, #2e3d26 0%, #111 100%)}

.page{padding:22px 24px 32px}
.panel{display:none}
.panel.active{display:block}

.page-hero,
.section-head-lg{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.page-hero h1,
.section-head h1,
.section-head h2{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  letter-spacing:-.03em;
  line-height:1;
}

.page-hero h1{font-size:clamp(2rem, 5vw, 3.4rem);max-width:12ch}
.page-hero p,
.section-head p{color:var(--muted)}

.eyebrow{
  color:var(--green-deep);
  background:var(--green-soft);
  margin-bottom:12px;
}

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

.install-card{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
  padding:18px 20px;
  border-radius:24px;
  background:linear-gradient(120deg, #111 0%, #1c2518 100%);
  color:#fff;
}
.install-card-copy{
  padding-right:8px;
}
.install-card p{color:#d0d0cc}
.install-card-close{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  width:34px;
  height:34px;
  border:none;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:22px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
}
.install-card-close:hover{
  background:rgba(255,255,255,.18);
}

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

.stat-card,
.shortcut-card,
.info-card,
.pc,
.notice,
.pb,
.table-shell,
.calendar-list .notice{
  border-radius:24px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(23,23,23,.06);
  box-shadow:var(--shadow);
}

.stat-card{
  padding:20px;
}
.stat-card strong{
  display:block;
  margin-top:10px;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:2rem;
  line-height:1;
}
.stat-card span{color:var(--muted)}

.home-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr .95fr;
  gap:14px;
}

.home-column{display:flex;flex-direction:column;gap:12px}

.section-head{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.section-head h2{font-size:1.15rem}
.section-head-lg h1{font-size:2rem}

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

.shortcut-card{
  text-align:left;
  padding:18px;
}
.shortcut-card strong{
  display:block;
  margin-bottom:6px;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:.9rem;
}
.shortcut-card span{color:var(--muted);font-size:12px}

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

.card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:220px;
  padding:20px;
  border-radius:24px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(23,23,23,.06);
  box-shadow:var(--shadow);
}
.card h3{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:.98rem;
}
.card p{color:var(--muted)}
.card .ca{margin-top:auto}

.ctag,
.badge,
.ps{
  display:inline-flex;
  align-items:center;
  width:max-content;
  border-radius:999px;
  padding:5px 10px;
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.ctag{background:#111;color:#fff}
.badge,.ps{border:1px solid}

.toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.toolbar .search-input{flex:1;min-width:220px}
.toolbar .field-select{min-width:220px}

.segmented-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}

.segment-btn{
  min-height:44px;
  padding:10px 14px;
  border:none;
  border-radius:16px;
  background:var(--surface);
  color:var(--ink);
  box-shadow:inset 0 0 0 1px var(--line);
}
.segment-btn.active{
  background:#111;
  color:#fff;
}
.sort-btn{margin-left:auto}

.table-shell,
.tw{
  overflow:auto;
  padding:8px;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
  min-width:640px;
}
thead th{
  padding:0 12px 6px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  text-align:left;
}
tbody tr{
  background:var(--surface);
}
tbody td{
  padding:12px;
  vertical-align:top;
}
tbody td:first-child{
  border-top-left-radius:14px;
  border-bottom-left-radius:14px;
}
tbody td:last-child{
  border-top-right-radius:14px;
  border-bottom-right-radius:14px;
}

.notice{
  padding:18px;
  border-left:5px solid var(--green);
}
.notice.urgent{
  background:var(--red-soft);
  border-left-color:var(--red);
}
.nd{color:var(--muted);font-size:11px;margin-top:8px}

.cmeta{color:var(--muted);font-size:11px}
.ca{display:flex;gap:8px;flex-wrap:wrap}

.detail-drawer{
  display:none;
  position:fixed;
  inset:0;
  z-index:25;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding-bottom:24px;
  background:rgba(8,8,8,.62);
  backdrop-filter:blur(10px);
}
.detail-drawer.open{display:block}

.drawer-head,
.drawer-body{
  width:min(860px, calc(100vw - 20px));
  margin:0 auto;
}

.drawer-head{
  position:sticky;
  top:12px;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-top:12px;
  padding:18px 20px;
  border-radius:24px;
  background:#111;
  color:#fff;
}

.drawer-head h2{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:1.2rem;
}

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

.drawer-body{
  margin-top:12px;
  margin-bottom:20px;
  padding:24px;
  border-radius:28px;
  background:#fbf8f2;
}

.rs{margin-bottom:24px}
.rs h4{
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px solid var(--line);
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
}

.ig{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px 14px;
}
.ih{
  color:var(--muted);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.sl{list-style:none}
.sl li{
  display:flex;
  gap:12px;
  padding:12px 14px;
  margin-bottom:10px;
  border-radius:18px;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(23,23,23,.06);
}

.sn{
  min-width:24px;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  color:var(--green-deep);
}

.recipe-brand{
  display:flex;
  justify-content:flex-end;
  margin-bottom:18px;
}

.recipe-brand .logo-mark{
  width:104px;
  filter:invert(1);
}

.modal-bg{
  display:none;
  position:fixed;
  inset:0;
  z-index:40;
  padding:16px;
  background:rgba(8,8,8,.55);
  backdrop-filter:blur(10px);
}
.modal-bg.open{display:flex;align-items:center;justify-content:center}

.modal{
  width:min(760px, 100%);
  max-height:92vh;
  overflow:auto;
  padding:26px;
  border-radius:28px;
  background:#fbf8f2;
  box-shadow:0 30px 80px rgba(0,0,0,.28);
}
.modal h3{
  margin-bottom:18px;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:1.2rem;
}
.fr{margin-bottom:14px}
.fr label{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.fr textarea{min-height:110px;resize:vertical}
.allergen-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
}
.allergen-option{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--line);
  text-transform:none;
  letter-spacing:0;
  font-size:12px;
  line-height:1.4;
}
.allergen-option input{
  width:16px;
  min-width:16px;
  height:16px;
  margin-top:1px;
}
.ingredient-editor{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ingredient-items{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ingredient-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  background:#fff;
  box-shadow:inset 0 0 0 1px var(--line);
}
.ingredient-item-main{
  min-width:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.ingredient-item-main strong{
  font-size:13px;
  line-height:1.3;
}
.ingredient-item-main span{
  color:var(--muted);
  font-size:11px;
}
.ingredient-item-sep{
  color:#b7aea1;
}
.ingredient-item-remove{
  min-width:24px;
  width:24px;
  height:24px;
  padding:0;
  border:none;
  border-radius:999px;
  background:transparent;
  color:var(--red);
  font-size:16px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.ingredient-item-remove:hover{
  background:rgba(184,67,55,.1);
}
.ingredient-empty{
  padding:12px 14px;
  border-radius:16px;
  background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--line);
  color:var(--muted);
  font-size:12px;
}
.ingredient-composer{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ingredient-composer-labels{
  display:grid;
  grid-template-columns:minmax(0,1.8fr) minmax(90px,.7fr) minmax(80px,.55fr) auto;
  gap:8px;
  padding:0 2px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.ingredient-composer-row{
  display:grid;
  grid-template-columns:minmax(0,1.8fr) minmax(90px,.7fr) minmax(80px,.55fr) auto;
  gap:8px;
  align-items:center;
}
.ingredient-item-remove{
  min-width:42px;
  padding-inline:0;
}
.ingredient-add-btn{
  min-width:92px;
}
.sub-block{
  padding:12px;
  border-radius:18px;
  background:#fff;
  margin-bottom:10px;
  box-shadow:inset 0 0 0 1px #d7d0c5;
}
.sub-block-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.mf{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
}

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

.calendar-title{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:1rem;
  text-align:center;
}

.legend-row{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:10px;
  color:var(--muted);
  font-size:11px;
}

.legend-dot{
  display:inline-block;
  width:10px;
  height:10px;
  margin-right:6px;
  border-radius:999px;
}
.dot-event{background:var(--green)}
.dot-special{background:var(--brown)}
.dot-urgent{background:var(--red)}
.dot-prac{background:var(--blue)}

.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
}
.calendar-grid.heads{margin-bottom:8px}

.ch{
  text-align:center;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.cd{
  min-height:104px;
  padding:10px;
  border-radius:18px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(23,23,23,.08);
  box-shadow:var(--shadow);
}
.cd.today{box-shadow:inset 0 0 0 2px var(--green)}
.cd.om{opacity:.32}
.cdn{font-weight:700;margin-bottom:6px}

.ce,.ce-prac,.ce-esp,.ce-urg{
  margin-bottom:4px;
  padding:2px 6px;
  border-radius:999px;
  color:#fff;
  font-size:10px;
  line-height:1.4;
}
.ce{background:var(--green)}
.ce-prac{background:var(--blue)}
.ce-esp{background:var(--brown)}
.ce-urg{background:var(--red)}

.pb{
  overflow:hidden;
  margin-bottom:18px;
}
.pbh{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  background:#111;
  color:#fff;
}
.pbh span{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:.95rem;
}
.pi{padding:10px}
.pr{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface);
  margin-bottom:8px;
}
.pr:last-child{margin-bottom:0}

.pc{padding:18px 20px;margin-bottom:12px}
.pt{
  font-family:Arial, Helvetica, sans-serif;
  font-weight:700;
  font-size:1rem;
  margin-bottom:6px;
}

strong,
h1,
h2,
h3,
h4,
th,
.eyebrow,
.nav-btn,
.segment-btn,
.ps,
.ctag,
.badge{
  font-family:Arial, Helvetica, sans-serif;
}

.b-bosque,.s-activo{border-color:var(--green-deep);color:var(--green-deep)}
.b-fluvial{border-color:var(--blue);color:var(--blue)}
.b-corral{border-color:var(--brown);color:var(--brown)}
.b-caza{border-color:#7e3a2c;color:#7e3a2c}
.b-postre{border-color:#6f4a72;color:#6f4a72}
.b-huerta{border-color:var(--green);color:var(--green)}
.b-base,.s-pausado,.s-finalizado{border-color:var(--muted);color:var(--muted)}
.s-testeo,.s-pendiente{border-color:#bd7a26;color:#bd7a26}
.s-listo{border-color:#2a7a5a;color:#2a7a5a}

.skb{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#ddd6ca;
}
.skbf{
  height:100%;
  background:linear-gradient(90deg, var(--green) 0%, #8aae74 100%);
}

.ia-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px,1fr));
  gap:10px;
  margin-bottom:14px;
}
.ia-sug{
  min-height:70px;
  padding:14px;
  text-align:left;
  border:none;
  border-radius:18px;
  background:#fff;
  box-shadow:inset 0 0 0 1px var(--line);
}
.ia-sug:hover{background:#f1ece3}

.chat-box{
  min-height:320px;
  max-height:52vh;
  overflow:auto;
  padding:18px;
  margin-bottom:14px;
  border-radius:24px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(23,23,23,.06);
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ia-msg{
  max-width:82%;
  padding:12px 14px;
  border-radius:18px;
}
.ia-msg.user{
  align-self:flex-end;
  background:#111;
  color:#fff;
}
.ia-msg.bot{
  align-self:flex-start;
  background:var(--green-soft);
  border-left:4px solid var(--green);
}
.ia-msg.loading{
  align-self:flex-start;
  color:var(--muted);
  background:var(--surface);
}
.chat-compose{
  display:flex;
  gap:10px;
}

@media (max-width: 1120px){
  .main-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-grid{grid-template-columns:1fr}
  .page-hero,
  .section-head-lg,
  .topbar{flex-direction:column;align-items:flex-start}
  .topbar-actions{
    width:auto;
    align-self:flex-end;
  }
}

@media (max-width: 720px){
  .login-screen{
    padding:0;
    min-height:100vh;
    min-height:100svh;
    min-height:100dvh;
  }
  .login-card{
    width:100%;
    min-height:100vh;
    min-height:100svh;
    min-height:100dvh;
    padding:32px 22px calc(28px + env(safe-area-inset-bottom, 0px));
    border:none;
    border-radius:0;
    box-shadow:none;
    background:transparent;
    backdrop-filter:none;
  }
  .logo-mark-hero{
    width:min(148px, 48vw);
  }
  .page{padding:14px 14px 120px}
  .page{padding-bottom:calc(120px + env(safe-area-inset-bottom, 0px))}
  .topbar{
    flex-direction:row;
    align-items:flex-end;
    justify-content:space-between;
    padding:16px 14px 14px;
    padding-top:max(28px, calc(env(safe-area-inset-top, 0px) + 18px));
  }
  .topbar-brand{
    width:auto;
    flex:1;
    align-items:flex-end;
  }
  .topbar-date{
    font-size:11px;
  }
  .topbar-actions{
    width:auto;
    align-self:flex-end;
    margin-left:12px;
  }
  .main-nav{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px));
    z-index:22;
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:10px;
    border-radius:24px;
    background:rgba(17,17,17,.9);
    backdrop-filter:blur(12px);
    transition:transform .28s ease, opacity .22s ease;
    will-change:transform, opacity;
  }
  .main-nav.nav-hidden{
    transform:translateY(calc(100% + 24px + env(safe-area-inset-bottom, 0px)));
    opacity:.01;
    pointer-events:none;
  }
  .mobile-nav-toggle{
    position:fixed;
    left:50%;
    bottom:calc(18px + env(safe-area-inset-bottom, 0px));
    z-index:23;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:66px;
    height:28px;
    transform:translateX(-50%);
    border:none;
    border-radius:999px;
    background:rgba(17,17,17,.82);
    backdrop-filter:blur(12px);
    box-shadow:0 10px 24px rgba(0,0,0,.18);
    transition:transform .28s ease, opacity .22s ease, bottom .28s ease;
  }
  .mobile-nav-toggle-pill{
    display:block;
    width:26px;
    height:4px;
    border-radius:999px;
    background:rgba(255,255,255,.82);
  }
  .main-nav:not(.nav-hidden) + .mobile-nav-toggle{
    bottom:calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .main-nav.nav-hidden + .mobile-nav-toggle{
    opacity:.96;
  }
  .nav-btn{
    min-height:40px;
    background:transparent;
    color:#d8d2c8;
    box-shadow:none;
  }
  .nav-btn.active{
    background:#fff;
    color:#111;
  }
  .page-hero,
  .section-head-lg{
    align-items:stretch;
    gap:14px;
  }
  .page-hero h1,
  .section-head h1,
  .section-head h2{
    max-width:none;
    font-size:clamp(1.65rem, 8vw, 2.4rem);
  }
  .hero-actions,
  .section-head-lg > .primary-btn{
    width:100%;
  }
  .hero-actions .primary-btn,
  .hero-actions .secondary-btn,
  .section-head-lg .primary-btn{
    flex:1;
    justify-content:center;
  }
  .install-card{
    flex-direction:column;
    align-items:stretch;
    padding:20px 16px 16px;
  }
  .install-card-copy{
    padding-right:24px;
  }
  .install-card .primary-btn{
    width:100%;
  }
  .allergen-grid,
  .ingredient-composer-labels,
  .ingredient-composer-row{
    grid-template-columns:1fr;
  }
  .ingredient-item{
    align-items:flex-start;
  }
  .ingredient-item-main{
    gap:4px 6px;
  }
  .ingredient-add-btn{
    width:100%;
  }
  .sub-block-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .stats-grid,
  .shortcut-grid{
    grid-template-columns:1fr;
  }
  .calendar-grid{gap:6px}
  .cd{min-height:72px;padding:8px}
  .ce,.ce-prac,.ce-esp,.ce-urg{display:none}
  .chat-compose{flex-direction:column}
  .drawer-head,
  .drawer-body{width:calc(100vw - 16px)}
  .drawer-body{padding:18px}
  .modal{padding:20px}
}
