:root {
  color-scheme: light;
  --blue: #005b93;
  --blue-deep: #004873;
  --ink: #0b1620;
  --muted: #4d5f6d;
  --line: #c8d3dc;
  --panel: #ffffff;
  --soft: #eef3f7;
  --danger: #c8192b;
  --ok: #157f45;
  --main-food-name-width: 190px;
  --picker-food-name-width: 150px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-soft: 0 1px 2px rgba(18, 37, 51, 0.06);
  font-family: "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f7fa;
  color: var(--ink);
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(46px + env(safe-area-inset-bottom));
  padding-top: calc(46px + env(safe-area-inset-top));
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 3px 12px calc(3px + env(safe-area-inset-bottom));
  background: var(--blue);
  color: #fff;
  box-shadow: 0 -2px 12px rgba(18, 37, 51, 0.22);
  max-width: 100%;
  overflow: hidden;
}

.topbar-top {
  top: 0;
  bottom: auto;
  box-shadow: 0 2px 12px rgba(18, 37, 51, 0.22);
  padding: 3px 12px calc(3px + env(safe-area-inset-top));
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

.nav-button,
.ghost-button,
.icon-button,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
}

.nav-button {
  padding: 5px 9px;
  color: #eef9ff;
  background: transparent;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-button.active,
.nav-button:hover {
  background: #003f66;
  color: #fff;
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 9px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-weight: 400;
}

.secondary-button {
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-weight: 400;
}

.icon-button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--blue);
  font-size: 18px;
  line-height: 1;
}

main {
  width: min(820px, calc(100% - 18px));
  margin: 14px auto 14px;
  overflow: visible;
}

canvas {
  max-width: 100%;
  height: auto;
}

.hidden {
  display: none !important;
}

.login-panel {
  min-height: 65vh;
  display: grid;
  place-items: center;
}

.login-box,
.tool-panel,
.target-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.login-box {
  width: min(420px, 100%);
  padding: 22px;
}

.login-box h1 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 26px;
  font-weight: 500;
}

.login-box p {
  margin: 0 0 24px;
  color: var(--muted);
}

label {
  display: grid;
  gap: 4px;
  color: #334754;
  font-weight: 400;
}

input,
select {
  min-height: 30px;
  border: 1px solid #b9c8d2;
  border-radius: var(--radius-sm);
  padding: 5px 7px;
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 91, 147, 0.12);
  outline: 0;
}

.error-text {
  color: var(--danger);
  min-height: 20px;
}

.warning {
  margin-bottom: 8px;
  padding: 4px 8px;
  border: 1px solid #efd49a;
  border-left: 4px solid #d7a33c;
  background: #fff8e9;
  border-radius: var(--radius-sm);
  color: #7a5a16;
  font-size: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  overflow: visible;
}

.app-shell {
  overflow: visible;
}

.date-strip {
  display: grid;
  grid-template-columns: 34px minmax(190px, 240px) 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.date-strip-hidden {
  display: none;
}

.date-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  min-width: 0;
  padding: 0 30px 0 12px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.date-control::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #001824;
  border-top-width: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}

.date-control input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.date-control span {
  line-height: 1;
  pointer-events: none;
}

.diary-title {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 700;
}

.training-toggle {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-left: 4px;
  gap: 5px;
  font-weight: 400;
}

.training-toggle input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.meal-sections {
  display: grid;
  gap: 12px;
}

.meal-section {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius);
  box-shadow: 0 7px 18px rgba(18, 37, 51, 0.24);
  overflow: hidden;
}

.meal-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px 6px;
  color: var(--blue);
  border-bottom: 0;
  background: #fff;
}

.meal-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.add-food-button,
.copy-meal-button,
.reset-meal-button {
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.copy-meal-button {
  background: #0b1620;
}

.reset-meal-button {
  padding: 3px 7px;
  border: 1px solid #d6a3aa;
  border-radius: 999px;
  color: var(--danger);
  background: #fff6f7;
  font-size: 12px;
  font-weight: 400;
}

.copy-meal-button:disabled,
.reset-meal-button:disabled {
  color: #a3b0b8;
  cursor: default;
}

.reset-meal-button:disabled {
  border-color: var(--line);
  background: #f6f8fa;
}

.food-table,
.totals-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.meal-table-wrap,
.totals-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.meal-section .meal-table-wrap {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.food-table col.food-col {
  width: auto;
}

.food-table .name-col {
  width: auto;
}

.totals-table col.label-col {
  width: 28%;
}

.food-table col.amount-col {
  width: 92px;
}

.totals-table col.spacer-col {
  width: 24%;
}

.food-table col.macro-col {
  width: 74px;
}

.totals-table col.macro-col {
  width: 12%;
}

.food-table col.kcal-col {
  width: 74px;
}

.totals-table col.kcal-col {
  width: 12%;
}

.food-table col.delete-col {
  width: 34px;
}

.totals-table col.delete-col {
  width: 8%;
}

.food-table th,
.food-table td,
.totals-table th,
.totals-table td {
  border-bottom: 1px solid #cfd8df;
  padding: 4px 7px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-table tr:last-child td,
.totals-table tr:last-child td {
  border-bottom: 0;
}

.food-table th:first-child,
.food-table td:first-child,
.totals-table th:first-child,
.totals-table td:first-child {
  text-align: left;
}

.food-table th {
  position: relative;
  background: #edf2f5;
  color: #243643;
  font-size: 13px;
  font-weight: 400;
}

.sticky-date-cell {
  background: #dce8f0 !important;
  color: #003f66;
  font-weight: 800 !important;
  text-align: left !important;
  padding: 2px 4px !important;
}

.sticky-date-nav {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.sticky-date-arrow {
  width: 24px;
  height: 24px;
  min-height: 0;
  border: 0;
  border-radius: 5px;
  background: #005b93;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  padding: 0 0 2px;
}

.sticky-date-control {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.sticky-date-control span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 3px;
  border-radius: 4px;
  background: #005b93;
  color: #fff;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
}

.sticky-date-control input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.food-table th:nth-child(n+3):not(:last-child),
.totals-table th:nth-child(n+2) {
  background: var(--blue-deep);
  color: #fff;
  font-weight: 700;
}

.food-table .kcal-heading,
.totals-table .kcal-heading {
  border-right: 1px solid rgba(255, 255, 255, 0.45);
}

.entry-kcal,
.meal-total-kcal,
.totals-table .metric-calories {
  border-right: 1px solid #b8c7d2;
}

.food-table td {
  background: #fff;
}

.food-table td,
.food-result-summary,
.food-card-fields,
.food-inline-fields {
  font-weight: 500;
}

.food-table tr:nth-child(even) td {
  background: #f7f9fb;
}

.food-name-cell {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.food-name {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.food-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-weight: 600;
}

.drag-handle {
  width: 18px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #8a9aa5;
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  touch-action: none;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.dragging-entry td {
  background: #eaf5fb !important;
  box-shadow: inset 0 2px 0 var(--blue), inset 0 -2px 0 var(--blue);
}

.dragging-entry-active {
  user-select: none;
  cursor: grabbing;
}

.serving-label {
  color: var(--muted);
}

.entry-amount-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
}

.entry-serving-display {
  min-width: 30px;
  text-align: right;
}

.entry-amount-input {
  width: 58px;
  min-height: 26px;
  padding: 1px 6px;
  border: 1px solid #b9cbd8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  appearance: textfield;
  -moz-appearance: textfield;
}

.entry-amount-input::-webkit-outer-spin-button,
.entry-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.entry-amount-input:focus {
  outline: 2px solid rgba(0, 91, 147, 0.24);
  border-color: var(--blue);
}

.entry-serving-unit {
  min-width: 14px;
  text-align: left;
}

.delete-button {
  width: 18px;
  height: 22px;
  border: 1px solid #e2a7ae;
  border-radius: 5px;
  background: #fff7f8;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.delete-button:hover {
  background: #ffecef;
  border-color: var(--danger);
}

.meal-total td {
  color: var(--blue);
  font-weight: 700;
  background: #fff !important;
}

.meal-link-row td {
  padding: 5px 8px;
  text-align: left !important;
  background: #fff !important;
}

.meal-link-row span {
  color: #9aa8b0;
  margin: 0 8px;
}

.target-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.top-target-summary {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 12px;
  padding: 2px 0 7px;
  background: #f3f7fa;
  border-bottom: 1px solid rgba(200, 211, 220, 0.75);
}

.top-target-summary .totals-table-wrap {
  padding: 5px;
  border: 1px solid #b8ccd9;
  border-radius: var(--radius-sm);
  background: #eaf2f7;
}

.top-target-summary .totals-table {
  border-collapse: separate;
  border-spacing: 0 4px;
}

.top-target-summary .totals-table col.label-col {
  width: 12%;
}

.top-target-summary .totals-table col.spacer-col {
  width: 18%;
}

.top-target-summary .totals-table col.kcal-col {
  width: 20%;
}

.top-target-summary .totals-table col.macro-col {
  width: 16.66%;
}

.top-target-summary .totals-table thead {
  display: table-header-group;
}

.top-target-summary .totals-table th {
  border-bottom: 0;
  padding: 1px 5px 2px;
  background: transparent;
  color: #486171;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.top-target-summary .totals-table th:first-child,
.top-target-summary .totals-table th:nth-child(2) {
  color: transparent;
}

.top-target-summary .totals-table td {
  border-bottom: 0;
  padding: 4px 5px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.top-target-summary .pfc-row-remaining td {
  background: #dff1e9;
  border-top: 1px solid #91c8ae;
  border-bottom: 1px solid #91c8ae;
}

.top-target-summary .pfc-row-target td {
  background: #eef6fc;
  border-top: 1px solid #94bfd8;
  border-bottom: 1px solid #94bfd8;
}

.top-target-summary .pfc-row td:first-child {
  border-left: 1px solid currentColor;
  border-radius: 6px 0 0 6px;
  color: #123447;
  font-size: 12px;
}

.top-target-summary .pfc-row td:last-child {
  border-right: 1px solid currentColor;
  border-radius: 0 6px 6px 0;
}

.top-target-summary .pfc-row-remaining td:first-child,
.top-target-summary .pfc-row-remaining td:last-child {
  border-color: #91c8ae;
}

.top-target-summary .pfc-row-target td:first-child,
.top-target-summary .pfc-row-target td:last-child {
  border-color: #94bfd8;
}

.top-target-summary .totals-table .metric-calories {
  border-right: 0;
}

.negative {
  color: var(--danger);
}

.positive {
  color: var(--ok);
}

.tool-panel {
  padding: 12px;
  margin-bottom: 10px;
}

.tool-panel h2,
.dialog-form h2 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 500;
}

.inline-form,
.settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.body-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.body-form label {
  min-width: 0;
}

.body-form input {
  width: 100%;
  min-width: 0;
}

.body-form .body-save-button {
  grid-column: 1 / -1;
  justify-self: end;
  width: auto;
  min-width: 116px;
  min-height: 34px;
  padding-inline: 22px;
}

.body-entry-panel {
  padding: 10px 12px 12px;
}

.body-entry-panel .body-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: flex-end;
}

#bodyDateInput {
  width: 118px;
}

#weightInput,
#bodyFatInput {
  width: 58px;
}

#stepsInput {
  width: 76px;
}

.body-entry-panel .body-form label {
  gap: 3px;
  font-size: 13px;
}

.body-entry-panel .body-form input {
  min-height: 32px;
  padding: 4px 8px;
}

.body-entry-panel .body-form .body-save-button {
  grid-column: auto;
  align-self: end;
  min-width: 78px;
  min-height: 32px;
  padding: 5px 12px;
  white-space: nowrap;
}

.settings-form {
  grid-template-columns: 1fr;
}

/* 目標設定 C/F/P グリッド */
.macro-grid {
  display: grid;
  grid-template-columns: 4.5em repeat(3, 1fr);
  gap: 6px 8px;
  align-items: center;
}

.macro-grid-head {
  display: contents;
}

.macro-grid-head span {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 2px solid var(--line);
}

.macro-grid-head span:first-child {
  border-bottom-color: transparent;
}

.macro-grid-row {
  display: contents;
}

.macro-row-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.macro-grid-row--training .macro-row-label {
  color: var(--blue);
}

.macro-grid input {
  width: 100%;
  min-width: 0;
  text-align: right;
}

.macro-grid-row--training input {
  background: #eef3f7;
  border-color: #a8c0d0;
}

.meal-settings-rows {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
}

.meal-setting-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.4fr) 74px 28px;
  gap: 6px;
  align-items: center;
}

.meal-setting-visible {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.meal-setting-visible input {
  width: 14px;
  height: 14px;
  min-height: auto;
  padding: 0;
}

.meal-settings-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.body-chart-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.body-chart-range {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.body-chart-range input {
  min-height: auto;
  padding: 0;
}

.body-chart-grid {
  display: grid;
  gap: 14px;
}

.body-chart-card h3 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 500;
}

.body-chart-wrap {
  position: relative;
}

.body-chart-wrap canvas {
  width: 100%;
  max-width: 760px;
  height: auto;
}

.body-chart-tooltip {
  position: absolute;
  z-index: 2;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(11, 22, 32, 0.92);
  color: #ffffff;
  font-size: 13px;
  pointer-events: none;
  white-space: nowrap;
}

.workout-header,
.workout-template-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.workout-header h2,
.workout-template-head h2 {
  margin: 0;
}

.workout-template-head h2:empty {
  display: none;
}

.workout-week-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.workout-week-nav:disabled {
  border-color: #c7d3dc;
  color: #95a3ad;
  cursor: default;
}

.workout-range-label {
  min-width: 96px;
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}

.workout-weeks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.workout-week-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #d4e1e9;
  border-radius: var(--radius);
  background: #fff;
}

.workout-week-card.current {
  padding: 4px;
  border: 1px solid #8fb3ca;
  border-radius: var(--radius);
  background: #f0f8fc;
}

.workout-week-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 22px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.workout-week-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.workout-week-head,
.workout-day-row {
  display: grid;
  grid-template-columns: 44px minmax(36px, 0.7fr) minmax(48px, 0.9fr) minmax(34px, 0.6fr);
  gap: 2px;
  align-items: center;
}

.workout-week-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workout-day-row {
  padding: 3px;
  border: 1px solid #d5e0e7;
  border-radius: var(--radius-sm);
  background: #fff;
  min-height: 34px;
}

.workout-day-row.today {
  border: 2px solid #005b93;
  background: #d5ecf8;
  box-shadow: 0 0 0 2px rgba(0, 91, 147, 0.24);
}

.workout-day-row.rest-day {
  border-color: #c7cdd3;
  background: #eef1f3;
  color: #6b7280;
}

.workout-day-row.today.rest-day {
  border-color: #005b93;
  background: #dbeff8;
}

.workout-day-row.rest-day .workout-date-label,
.workout-day-row.rest-day select {
  color: #6b7280;
}

.workout-day-row.rest-day select {
  border-color: #c4cbd2;
  background: #e5e8eb;
}

.workout-date-label {
  font-weight: 700;
  color: #21313d;
  white-space: nowrap;
  font-size: 11px;
}

.workout-day-row select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 27px;
  height: 27px;
  padding: 2px;
  border: 1px solid #b9c8d2;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #0b1620;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-align-last: center;
}

.workout-tabs,
.workout-block-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.workout-tab-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin: 0 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.workout-tab-strip::-webkit-scrollbar {
  display: none;
}

.workout-tabs,
.workout-block-tabs {
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 4px;
}

.workout-block-tabs {
  background: transparent;
}

.workout-tab-group {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.workout-tab-frame,
.workout-tabs {
  padding: 4px;
  border: 2px solid #b8cad8;
  border-radius: var(--radius);
}

.workout-tab-group-warmup {
  background: #f8fbfd;
  box-shadow: inset 0 0 0 1px #edf3f7;
}

.workout-tab-group-main {
  background: #fffaf5;
  border-color: #d2b899;
}

.workout-tabs {
  position: relative;
  background: #dfeef7;
  border-color: #86aec8;
}

.workout-tab,
.workout-block-tab {
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue);
  min-width: 34px;
  padding: 5px 8px;
  font-weight: 700;
  cursor: pointer;
}

.workout-tab {
  min-width: 44px;
}

.workout-tab.active,
.workout-block-tab.active {
  background: var(--blue);
  color: #fff;
}

.workout-block-tab.workout-block-wu {
  border-color: #64748b;
  color: #334155;
}

.workout-block-tab.workout-block-a {
  border-color: #0f766e;
  color: #0f766e;
}

.workout-block-tab.workout-block-b {
  border-color: #b45309;
  color: #92400e;
}

.workout-block-tab.workout-block-c {
  border-color: #6d28d9;
  color: #5b21b6;
}

.workout-block-tab.active {
  color: #fff;
}

.workout-block-tab.workout-block-wu.active {
  background: #64748b;
}

.workout-block-tab.workout-block-a.active {
  background: #0f766e;
}

.workout-block-tab.workout-block-b.active {
  background: #b45309;
}

.workout-block-tab.workout-block-c.active {
  background: #6d28d9;
}

.workout-exercise-list {
  display: grid;
  gap: 7px;
}

.workout-exercise-card {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid #d5e0e7;
  border-left: 4px solid #94a3b8;
  border-radius: var(--radius-sm);
  background: #fff;
}

.workout-exercise-top {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  gap: 5px;
  align-items: center;
}

.workout-drag-handle,
.workout-delete-card {
  width: 24px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.workout-drag-handle {
  background: #e9f1f7;
  color: var(--blue);
  cursor: grab;
  touch-action: none;
}

.workout-delete-card {
  width: 28px;
  background: #fff1f3;
  color: var(--danger);
  cursor: pointer;
}

.workout-add-card {
  min-height: 34px;
  border: 1px dashed #85a9c1;
  border-radius: var(--radius-sm);
  background: #f5fbfe;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.dragging-workout {
  opacity: 0.82;
  background: #eaf5fb;
  box-shadow: inset 0 2px 0 var(--blue), inset 0 -2px 0 var(--blue);
}

.dragging-workout-active {
  user-select: none;
  cursor: grabbing;
}

.workout-exercise-card.workout-block-a {
  border-left-color: #0f766e;
}

.workout-exercise-card.workout-block-b {
  border-left-color: #b45309;
}

.workout-exercise-card.workout-block-c {
  border-left-color: #6d28d9;
}

.workout-exercise-name,
.workout-exercise-metrics input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d3dde5;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.workout-exercise-name {
  min-height: 32px;
  padding: 5px 7px;
  font-weight: 700;
}

.workout-exercise-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-left: 12px;
}

.workout-exercise-metrics label {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workout-exercise-metrics input {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 700;
}

.workout-exercise-name:focus,
.workout-exercise-metrics input:focus {
  border-color: var(--blue);
  outline: 0;
}

dialog {
  width: min(760px, calc(100vw - 18px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

dialog::backdrop {
  background: rgba(14, 30, 42, 0.38);
}

.dialog-form {
  padding: 14px;
  display: grid;
  gap: 9px;
  font-size: 13px;
}

.dialog-form header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dialog-form header .icon-button {
  background: #edf3f7;
  color: var(--ink);
}

.dialog-pfc-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 5px;
  border: 1px solid #b8ccd9;
  border-radius: var(--radius-sm);
  background: #eaf2f7;
}

.dialog-pfc-row {
  display: grid;
  grid-template-columns: 42px repeat(4, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 6px;
}

.dialog-pfc-row:first-child {
  background: #dff1e9;
  border: 1px solid #91c8ae;
}

.dialog-pfc-row:last-child {
  background: #eef6fc;
  border: 1px solid #94bfd8;
}

.dialog-pfc-row b {
  color: #123447;
  font-size: 12px;
}

.dialog-pfc-row span {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.dialog-pfc-row span.positive {
  color: var(--ok);
}

.dialog-pfc-row span.negative {
  color: var(--danger);
}

.dialog-pfc-row small {
  margin-right: 2px;
  color: #486171;
  font-size: 10px;
  font-weight: 700;
}

.food-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.compact-dialog {
  gap: 10px;
}

.copy-source {
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--radius-sm);
}

.copy-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.food-results {
  max-height: min(64vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 0;
  border-radius: 0;
  padding-right: 2px;
}

.food-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.food-search-row label {
  min-width: 0;
}

.food-search-row .secondary-button {
  min-width: 62px;
  min-height: 32px;
  padding: 5px 14px;
}

.food-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.food-picker-toolbar .food-selection-active {
  background: #16823b;
  box-shadow: 0 2px 0 #0f612c;
}

.food-picker-toolbar .food-selection-active:hover {
  background: #116d31;
}

.food-card-list {
  display: grid;
  gap: 6px;
}

.food-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid #cfdae2;
  border-left: 3px solid #7aa9c9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 37, 51, 0.06);
  overflow: hidden;
}

.food-result:nth-child(even) {
  background: #f8fbfd;
}

.food-result.selected {
  border-color: #16823b;
  border-left-color: #16823b;
  background: #f0fbf4;
}

.food-result-main {
  display: grid;
  gap: 3px;
  padding: 6px 7px;
  min-width: 0;
}

.food-result-header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
}

.food-result-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.food-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef4f8;
  color: #314653;
  font-weight: 700;
}

.food-stat small {
  font-size: 10px;
  font-weight: 700;
}

.food-stat-kcal {
  background: #e6f2fa;
  color: var(--blue);
}

.food-stat-serving {
  color: #415563;
  background: #f3f7fa;
  border: 1px solid #d4e0e8;
  font-weight: 700;
}

.food-stat-serving small {
  color: #6a7b86;
}

.food-stat-carb {
  background: #e7f4ff;
  color: #005b93;
}

.food-stat-fat {
  background: #fff2d9;
  color: #7a4b00;
}

.food-stat-protein {
  background: #ecf8ee;
  color: #157f45;
}

.food-select {
  width: 22px;
  height: 22px;
  min-height: auto;
  margin: 0;
  padding: 0;
  accent-color: #16823b;
  cursor: pointer;
}

.food-add-button {
  width: 32px;
  height: 32px;
  border: 2px solid #003a5c;
  border-radius: 50%;
  background: #006fb3;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  padding: 0 0 3px;
  box-shadow: 0 2px 0 #003a5c, 0 2px 6px rgba(0, 91, 147, 0.24);
}

.food-add-button:hover,
.food-add-button:focus-visible {
  background: #005182;
  border-color: #002f4a;
  color: #fff;
}

.food-inline-fields {
  display: none;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.food-result.selected .food-stat {
  display: none;
}

.food-result.selected .food-inline-fields {
  display: flex;
}

.food-inline-fields label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 5px;
  background: #eef4f8;
  color: #506370;
  font-size: 10px;
  font-weight: 700;
}

.food-inline-fields input {
  min-width: 0;
  width: 36px;
  min-height: 20px;
  border: 0;
  border-radius: 3px;
  padding: 1px 2px;
  background: #fff;
  text-align: right;
  font-size: 12px;
}

.food-inline-fields label:nth-child(2) input:first-child {
  width: 42px;
}

.food-inline-fields label:nth-child(2) .food-serving-unit {
  width: 20px;
  text-align: center;
}

.new-food-button {
  border: 0;
  border-radius: var(--radius-sm);
  min-width: 108px;
  padding: 7px 14px;
  background: #16823b;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.food-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.food-tab {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px 10px;
  background: #edf2f5;
  color: #243643;
  cursor: pointer;
  font-weight: 400;
}

.food-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.food-category-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.food-category-tabs::-webkit-scrollbar {
  display: none;
}

.food-category-tab {
  flex: 0 0 auto;
  border: 1px solid #c5d3dd;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #334754;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.food-category-tab.active {
  border-color: var(--blue);
  background: #e6f2fa;
  color: var(--blue);
}

.food-picker-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.food-picker-table col.check-col {
  width: 28px;
}

.food-picker-table col.picker-name-col {
  width: max(var(--picker-food-name-width), calc(100% - 468px));
}

.food-picker-table col.amount-col {
  width: 54px;
}

.food-picker-table col.serving-col {
  width: 104px;
}

.food-picker-table col.macro-col {
  width: 78px;
}

.food-picker-table col.picker-kcal-col {
  width: 48px;
}

.food-picker-table th,
.food-picker-table td {
  border-bottom: 1px solid #d3dde5;
  padding: 3px 3px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.food-picker-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8f0f5;
  color: #243643;
  font-size: 12px;
  font-weight: 400;
}

.food-picker-table td {
  background: #fff;
}

.food-picker-table tr:nth-child(even) td {
  background: #f7f9fb;
}

.food-picker-table tbody tr:hover td {
  background: #eaf4fa;
}

.food-picker-table th:nth-child(2),
.food-picker-table td:nth-child(2) {
  text-align: left;
}

.food-picker-table .check-col {
  text-align: center;
}

.food-picker-table .food-amount {
  width: 44px;
  min-height: 22px;
  padding: 1px 2px;
  text-align: right;
}

.food-serving-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: 100%;
}

.food-serving-value {
  width: 48px;
  min-height: 22px;
  padding: 1px 2px;
  text-align: right;
}

.food-serving-unit {
  width: 38px;
  min-height: 22px;
  padding: 1px 2px;
  text-align: center;
}

.food-inline-fields .food-serving-value {
  width: 100%;
  min-width: 0;
}

.food-inline-fields .food-serving-unit {
  flex: none;
  width: 30px;
}

.food-inline-fields .food-serving-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.food-picker-table .food-result-name {
  width: 100%;
  min-height: 22px;
  padding: 1px 4px;
}

.food-name-edit {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.food-name-edit .food-result-name {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid rgba(0, 91, 147, 0.28);
  background: transparent;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 700;
  min-height: 24px;
  padding: 0 2px 1px;
}

.food-name-save {
  flex: 0 0 52px;
  width: 52px;
  min-height: 24px;
  border: 1px solid #9ca9b3;
  border-bottom-color: #6f7d87;
  border-radius: 5px;
  padding: 2px 8px;
  background: linear-gradient(#f7f9fb, #d6dde3);
  color: #243643;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #8b99a3;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.food-name-save:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 0 #8b99a3;
}

.food-picker-table .food-macro-input {
  width: 62px;
  min-height: 22px;
  padding: 1px 3px;
  text-align: right;
}

.food-picker-table .food-kcal {
  padding-inline: 2px;
  text-align: right;
  overflow: visible;
  text-overflow: clip;
}

.food-picker-table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.food-inline-fields input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.food-picker-table input[type="number"]::-webkit-inner-spin-button,
.food-picker-table input[type="number"]::-webkit-outer-spin-button,
.food-inline-fields input[type="number"]::-webkit-inner-spin-button,
.food-inline-fields input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.food-picker-table .food-select {
  width: 13px;
  height: 13px;
  min-height: auto;
  padding: 0;
}

.new-food-fields {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
  margin: 9px 0;
}

.voice-input-area {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.voice-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.voice-textarea {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid #b9c8d2;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.voice-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.voice-parse-button {
  justify-self: start;
  font-size: 13px;
  padding: 5px 10px;
}

.voice-error {
  margin: 0;
  font-size: 13px;
  min-height: 0;
}

.readonly-kcal {
  display: flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #b9c8d2;
  border-radius: var(--radius-sm);
  padding: 5px 7px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
}

.training-toggle-cell {
  text-align: center !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.training-toggle-cell .training-toggle {
  width: fit-content;
  margin: 0 auto;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #334754;
  white-space: nowrap;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 3px;
  width: 1px;
  height: 60%;
  background: rgba(0, 72, 115, 0.45);
}

.macro-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 760px) {
  .topbar {
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
    min-height: 36px;
    padding: 3px 6px calc(3px + env(safe-area-inset-bottom));
  }

  .topbar-top {
    padding: 3px 6px calc(3px + env(safe-area-inset-top));
  }

  nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    padding-bottom: 0;
  }

  .nav-button,
  .ghost-button {
    padding: 4px 7px;
    font-size: 14px;
  }

  main {
    width: min(760px, calc(100% - 8px));
    margin-top: 8px;
  }

  .meal-heading {
    flex-wrap: wrap;
  }

  .date-strip {
    grid-template-columns: 30px minmax(170px, 1fr) 30px;
    max-width: 300px;
    margin-inline: auto;
  }

  .date-strip-hidden {
    display: none;
  }

  .inline-form,
  .settings-form,
  .macro-inputs {
    grid-template-columns: 1fr;
  }

  .body-chart-controls,
  .body-chart-range {
    grid-template-columns: 1fr;
  }

  .workout-weeks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .workout-week-head,
  .workout-day-row {
    grid-template-columns: 43px minmax(30px, 0.58fr) minmax(42px, 0.9fr) minmax(30px, 0.58fr);
    gap: 2px;
  }

  .workout-date-label,
  .workout-day-row select {
    font-size: 11px;
  }

  .workout-day-row select {
    padding: 2px 1px;
  }

  .workout-week-card.current {
    padding: 3px;
  }

  .workout-week-title {
    display: block;
    min-height: 20px;
    font-size: 12px;
  }

  .workout-week-title small {
    display: none;
  }

  .workout-exercise-metrics {
    padding-left: 10px;
    gap: 5px;
  }

  .workout-tab-strip {
    gap: 4px;
    margin-bottom: 6px;
  }

  .workout-tabs,
  .workout-block-tabs {
    gap: 2px;
  }

  .workout-tab-frame,
  .workout-tabs {
    padding: 2px;
    border-width: 1px;
    border-radius: 6px;
  }

  .workout-tab-group {
    gap: 2px;
  }

  .workout-tab-group-main {
    padding-left: 4px;
    border-left-width: 1px;
  }

  .workout-tab,
  .workout-block-tab {
    min-width: 30px;
    min-height: 30px;
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 13px;
  }

  .workout-tab {
    min-width: 38px;
  }

  .meal-setting-row {
    grid-template-columns: 1fr 1fr 64px 28px;
  }

  .meal-table-wrap,
  .totals-table-wrap {
    overflow-x: hidden;
  }

  .food-table th,
  .food-table td,
  .totals-table th,
  .totals-table td {
    padding: 3px 3px;
    font-size: 12px;
  }

  .food-table td {
    font-size: 13px;
  }

  .food-table th {
    font-size: 12px;
  }

  .food-name span:first-child {
    font-weight: 700;
  }

  .serving-label {
    font-weight: 600;
  }

  .food-table col.food-col {
    width: auto;
  }

  .food-table col.amount-col {
    width: 70px;
  }

  .food-table col.kcal-col {
    width: 48px;
  }

  .food-table col.macro-col {
    width: 34px;
  }

  .food-table col.delete-col {
    width: 25px;
  }

  .totals-table col.delete-col {
    width: 6%;
  }

  .food-table td:last-child,
  .food-table th:last-child {
    padding-inline: 2px;
    text-align: center;
  }

  .delete-button {
    width: 17px;
    height: 20px;
    font-size: 14px;
  }

  .totals-table td {
    padding-block: 6px;
    font-size: 15px;
  }

  .totals-table td:first-child {
    font-size: 14px;
  }

  .serving-label {
    font-size: 12px;
  }

  .entry-amount-input {
    width: 48px;
    min-height: 23px;
    padding-inline: 3px;
    font-size: 13px;
  }

  .entry-amount-control {
    gap: 3px;
  }

  .food-name-cell {
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 3px;
  }

  .drag-handle {
    width: 15px;
    font-size: 14px;
  }

  .food-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }

  .dialog-pfc-summary {
    gap: 4px;
    padding: 5px;
  }

  .dialog-pfc-row {
    grid-template-columns: 34px repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 3px 4px;
  }

  .dialog-pfc-row span {
    padding-inline: 2px;
    font-size: 11px;
  }

  .food-search-row {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 6px;
  }

  .food-tabs {
    gap: 3px;
  }

  .food-tab {
    flex: 1 1 0;
    padding: 5px 4px;
    font-size: 12px;
  }

  .food-picker-table th,
  .food-picker-table td {
    padding: 3px 1px;
    font-size: 11px;
  }

  .food-picker-table {
    min-width: 600px;
  }

  .food-picker-table col.check-col {
    width: 24px;
  }

  .food-picker-table col.picker-name-col {
    width: max(var(--picker-food-name-width), calc(100% - 438px));
  }

  .food-picker-table col.amount-col {
    width: 50px;
  }

  .food-picker-table col.serving-col {
    width: 94px;
  }

  .food-picker-table col.macro-col {
    width: 68px;
  }

  .food-picker-table col.picker-kcal-col {
    width: 42px;
  }

  .food-picker-table .food-amount {
    width: 40px;
  }

  .food-serving-value {
    width: 44px;
  }

  .food-serving-unit {
    width: 34px;
  }

  .food-picker-table .food-macro-input {
    width: 54px;
    padding-inline: 2px;
  }

  .new-food-fields {
    grid-template-columns: 1fr;
  }

  .copy-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .body-entry-panel .body-form {
    grid-template-columns: auto auto auto auto auto auto;
  }

  .body-entry-panel .body-form .body-save-button {
    min-width: 64px;
    padding-inline: 8px;
  }
}
