:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --bg: #edf1ed;
  --card: #ffffffb5;
  --text: #24332d;
  --muted: #69766e;
  --line: #ffffffb8;
  --green: #245c4d;
  --pale: #e2ebe5;
  --shadow: 0 12px 38px #243d2910;
  color: var(--text);
  background: var(--bg);
}
html[data-theme="dark"] {
  --bg: #151b19;
  --card: #242d29bd;
  --text: #f1f4f2;
  --muted: #acb8b0;
  --line: #b7c8bd20;
  --green: #9cc8ae;
  --pale: #32453b;
  --shadow: 0 12px 38px #0003;
}
body {
  background:
    radial-gradient(ellipse at 90% 10%, #a4bea340, transparent 60%),
    radial-gradient(ellipse at 0 100%, #f6e6cf40, transparent 65%), var(--bg);
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 70px 0 0;
  pointer-events: none;
  background: url("/still-outline.svg") 95% 25% / min(580px, 60vw) auto
    no-repeat;
  opacity: 0.07;
  filter: blur(9px);
  z-index: 0;
}
body[data-page="home"]:before {
  opacity: 0.33;
  filter: none;
  background-position: 94% 12%;
  background-size: min(530px, 58vw);
}
html[data-theme="dark"] body:before {
  opacity: 0.1;
  filter: invert(1) blur(9px);
}
html[data-theme="dark"] body[data-page="home"]:before {
  opacity: 0.35;
  filter: invert(1);
}
header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(28px);
  box-shadow: none;
  position: relative;
  z-index: 2;
}
.shell,
.bottom-nav {
  position: relative;
  z-index: 1;
}
main {
  max-width: 1120px;
  padding-top: 34px;
}
h1 {
  font-weight: 600;
  letter-spacing: -0.04em;
}
h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
}
.card,
.metric-card,
.quick-actions button,
.drink-row {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  border-radius: 22px;
}
.metric-card {
  text-align: left;
  min-height: 142px;
  padding: 22px;
}
.metric-card strong {
  font-weight: 550;
  letter-spacing: -0.04em;
}
.metric-card > svg {
  opacity: 0.65;
}
.greeting {
  min-height: 100px;
}
.greeting .still-art {
  display: none;
}
.greeting p {
  color: var(--muted);
}
.quick-actions button {
  min-height: 82px;
  gap: 12px;
  color: var(--text);
}
.bottom-nav {
  background: var(--card);
  backdrop-filter: blur(28px);
  border-top: 1px solid var(--line);
  position: fixed;
}
button {
  transition:
    background 0.16s,
    box-shadow 0.16s;
}
button:hover:not(:disabled) {
  box-shadow: 0 4px 18px #1b35291a;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}
html[data-theme="dark"]
  button:not(.secondary):not(.icon-button):not(.link-button):not(
    .metric-card
  ):not(.card):not([data-tab]):not([data-dialog]) {
  color: #17211c;
}
dialog {
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px #0004;
  border-radius: 26px;
  width: min(660px, calc(100vw - 28px));
  max-height: 90dvh;
  color: var(--text);
}
dialog::backdrop {
  background: #14251c66;
  backdrop-filter: blur(7px);
}
dialog form > .page-title {
  background: var(--bg);
  z-index: 2;
}
input,
textarea,
select {
  background: var(--card);
  border-color: #879c8d45;
  border-radius: 11px;
  color: var(--text);
}
fieldset {
  border: 1px solid #879c8d38;
  border-radius: 16px;
  padding: 16px;
  margin: 14px 0;
}
legend {
  font-weight: 600;
  padding: 0 6px;
}
.production-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.production-summary span {
  color: var(--muted);
}
.production-summary b {
  display: block;
  color: var(--text);
  margin-top: 6px;
}
.production-card .actions {
  margin-top: 18px;
}
.recipe-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 22px;
}
.recipe-card > .drink-photo {
  width: 128px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
}
.recipe-card .actions {
  margin-top: 18px;
}
.recipe-card p {
  line-height: 1.6;
}
.energy-fields > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
[hidden] {
  display: none !important;
}
.production-source,
.ingredient-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.production-source > label:first-child,
.ingredient-edit > label:first-child {
  grid-column: 1/-1;
}
.production-source label,
.ingredient-edit label {
  min-width: 0;
}
.production-source select {
  max-width: 100%;
}
.badge {
  border: 1px solid #8ba39126;
}
.pre-line {
  white-space: pre-line;
}
#drawer {
  background: var(--bg);
  border-right: 1px solid var(--line);
  z-index: 5;
}
@media (max-width: 600px) {
  main {
    padding: 22px 18px 110px;
  }
  .greeting {
    min-height: 88px;
  }
  .greeting h1 {
    font-size: 29px;
  }
  .metrics {
    gap: 12px;
  }
  .metric-card {
    padding: 15px;
    min-height: 125px;
  }
  .metric-card strong {
    font-size: 23px;
  }
  .metric-card span {
    font-size: 12px;
  }
  .card {
    padding: 18px;
    border-radius: 20px;
  }
  .events .event {
    padding: 12px 0;
  }
  .quick-actions {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .quick-actions button {
    min-height: 76px;
    font-size: 13px;
  }
  .recipe-card {
    grid-template-columns: 84px 1fr;
    gap: 14px;
  }
  .recipe-card > .drink-photo {
    width: 84px;
    height: 108px;
  }
  .recipe-card h2 {
    font-size: 21px;
  }
  .recipe-card details,
  .recipe-card .actions {
    grid-column: 1/-1;
  }
  .production-summary {
    gap: 12px;
    font-size: 13px;
  }
  body[data-page="home"]:before {
    background-size: 370px;
    background-position: 160px 35px;
    opacity: 0.25;
  }
  .production-source,
  .ingredient-edit {
    grid-template-columns: 1fr;
  }
  .production-source > label:first-child,
  .ingredient-edit > label:first-child {
    grid-column: auto;
  }
  .page-title {
    gap: 12px;
    flex-wrap: wrap;
  }
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
header {
  color: var(--text);
}
header .icon-button {
  color: var(--text);
}
@media (min-width: 850px) {
  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}
