:root {
  --bg: #f5f6f0;
  --surface: #ffffff;
  --surface-soft: #f9fbf8;
  --text: #1f2937;
  --muted: #667085;
  --border: #dbe3d3;
  --primary: #2f6b44;
  --primary-soft: #dcefe1;
  --danger: #b42318;
  --warn: #b45309;
  --info: #1d4ed8;
  --shadow: 0 18px 40px rgba(31, 41, 55, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(47, 107, 68, 0.14), transparent 30%),
    linear-gradient(180deg, #eef4ec 0%, #f6f7f3 48%, #edf1ea 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 88px;
}

.page-shell,
.stack-lg,
.stack-md,
.stack-sm {
  display: grid;
}

.page-shell,
.stack-lg {
  gap: 20px;
}

.stack-md {
  gap: 14px;
}

.stack-sm {
  gap: 10px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.surface,
.summary-card,
.menu-card,
.login-card {
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 211, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.surface,
.login-card {
  padding: 20px;
}

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

.surface__head h2,
.surface__head h3 {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.summary-grid,
.grid,
.section-actions,
.metric-grid,
.history-grid,
.menu-grid,
.gallery {
  display: grid;
  gap: 12px;
}

.summary-grid > *,
.grid > *,
.section-actions > *,
.metric-grid > *,
.history-grid > *,
.menu-grid > *,
.gallery > *,
.toolbar > *,
.surface__head > *,
.topbar__meta > *,
.info-list > * {
  min-width: 0;
}

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

.summary-card {
  padding: 16px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

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

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

.grid-span-2 {
  grid-column: span 2;
}

.section-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field--hint {
  align-content: end;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.button--ghost {
  background: transparent;
  border-color: var(--border);
}

.button--danger {
  background: #fee4e2;
  color: var(--danger);
}

.button--block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge--planned {
  background: #fff4d6;
  color: #9a6700;
}

.badge--raising {
  background: #dbf5e4;
  color: #15603c;
}

.badge--cleaning {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge--closed {
  background: #eceff4;
  color: #475467;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.metric,
.history-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 18px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 12px;
}

.info-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-list strong {
  font-size: 14px;
}

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

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.data-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  min-width: 640px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.view-panel {
  display: none;
}

.view-panel.is-visible {
  display: block;
}

.gallery {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 16px;
}

.gallery img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
}

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

.accordion {
  padding: 14px 0;
}

.accordion summary {
  cursor: pointer;
  font-weight: 700;
}

.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.menu-card {
  padding: 26px 20px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.lots-mobile-list {
  display: none;
  gap: 10px;
}

.lot-mini-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.lot-mini-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.lot-mini-card__head h3 {
  margin: 0;
  font-size: 15px;
}

.lot-mini-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.lot-mini-card__meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.lot-mini-card__meta strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.flash--success {
  background: #dcfce7;
  color: #166534;
}

.flash--error {
  background: #fee4e2;
  color: var(--danger);
}

.flash--warn {
  background: #fef3c7;
  color: var(--warn);
}

.flash--info {
  background: #dbeafe;
  color: var(--info);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: calc(100vw - 16px);
  width: min(560px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.bottom-nav__item {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.bottom-nav__item.is-active {
  background: var(--primary);
  color: #fff;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  max-width: 100%;
  width: min(560px, 100%);
}

.install-shell {
  max-width: 100%;
  width: min(860px, 100%);
}

.login-brand h1 {
  margin: 8px 0;
}

.login-brand__eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
}

.js-medication-other {
  display: none;
}

.js-medication-other.is-visible {
  display: grid;
}

canvas {
  width: 100%;
  background: var(--surface-soft);
  border-radius: 18px;
}

@media (max-width: 768px) {
  .app-shell {
    padding: 0 12px 94px;
  }

  .summary-grid,
  .metric-grid,
  .grid--2,
  .grid--3,
  .history-grid--2,
  .info-list {
    grid-template-columns: 1fr;
  }

  .grid-span-2 {
    grid-column: span 1;
  }

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

  .topbar__meta {
    width: 100%;
    justify-content: space-between;
  }

  .field input[type="date"],
  .field input[type="month"],
  .field input[type="time"],
  .field input[type="datetime-local"] {
    min-width: 0;
    max-width: 100%;
    padding-inline: 10px;
    font-size: 16px;
    overflow: hidden;
  }

  .field input[type="date"]::-webkit-date-and-time-value,
  .field input[type="month"]::-webkit-date-and-time-value,
  .field input[type="time"]::-webkit-date-and-time-value,
  .field input[type="datetime-local"]::-webkit-date-and-time-value {
    text-align: left;
  }

  .field input[type="date"]::-webkit-datetime-edit,
  .field input[type="month"]::-webkit-datetime-edit,
  .field input[type="time"]::-webkit-datetime-edit,
  .field input[type="datetime-local"]::-webkit-datetime-edit {
    min-width: 0;
    padding: 0;
  }

  .field input[type="date"]::-webkit-calendar-picker-indicator,
  .field input[type="month"]::-webkit-calendar-picker-indicator,
  .field input[type="time"]::-webkit-calendar-picker-indicator,
  .field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    margin: 0;
  }
}

@media (max-width: 430px) {
  :root {
    --radius: 16px;
  }

  body {
    font-size: 14px;
  }

  .app-shell {
    padding: 0 8px 82px;
  }

  .page-shell,
  .stack-lg {
    gap: 14px;
  }

  .stack-md {
    gap: 10px;
  }

  .stack-sm {
    gap: 8px;
  }

  .topbar {
    gap: 10px;
    padding: 10px 0 6px;
  }

  .topbar h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  .topbar__eyebrow {
    font-size: 11px;
  }

  .surface,
  .login-card {
    padding: 14px;
  }

  .surface__head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .surface__head .button {
    width: 100%;
  }

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

  .summary-card {
    padding: 12px;
  }

  .summary-card span {
    font-size: 12px;
  }

  .summary-card strong {
    margin-top: 6px;
    font-size: 20px;
  }

  .section-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

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

  .metric,
  .history-card {
    padding: 10px;
    border-radius: 14px;
  }

  .metric span,
  .info-list span,
  .field span,
  .muted {
    font-size: 12px;
    line-height: 1.4;
  }

  .metric strong {
    font-size: 16px;
    line-height: 1.25;
  }

  .info-list {
    gap: 8px 10px;
    margin-bottom: 10px;
  }

  .info-list strong {
    font-size: 13px;
    line-height: 1.35;
  }

  .field {
    gap: 6px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 16px;
  }

  .field textarea {
    min-height: 88px;
  }

  .button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
  }

  .badge {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .toolbar .button {
    width: 100%;
  }

  .table-wrap {
    margin-inline: -2px;
    padding-bottom: 2px;
  }

  .data-table {
    min-width: 480px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 7px;
    font-size: 11px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

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

  .menu-card {
    padding: 18px 12px;
    font-size: 15px;
  }

  .flash {
    padding: 10px 12px;
    font-size: 13px;
  }

  .lots-table {
    display: none;
  }

  .lots-mobile-list {
    display: grid;
  }

  .bottom-nav {
    bottom: 8px;
    width: calc(100vw - 12px);
    gap: 6px;
    padding: 5px;
  }

  .bottom-nav__item {
    min-height: 34px;
    padding: 0 2px;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
  }

  .login-body {
    padding: 12px;
  }

  .login-shell,
  .install-shell {
    width: 100%;
  }

  canvas {
    border-radius: 14px;
  }
}

@media (max-width: 360px) {
  .summary-grid,
  .metric-grid,
  .section-actions,
  .section-actions--2,
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .lot-mini-card__head,
  .lot-mini-card__meta {
    grid-template-columns: 1fr;
  }

  .lot-mini-card__head {
    display: grid;
  }

  .data-table {
    min-width: 440px;
  }

  .bottom-nav__item {
    font-size: 9px;
  }
}

/* V1 Alignment */

body.app-body {
  font-family: "Noto Sans JP", "Inter", system-ui, sans-serif;
  color: #17301f;
  background:
    radial-gradient(circle at top left, rgba(47, 107, 68, 0.12), transparent 28%),
    linear-gradient(180deg, #f0f4ee 0%, #f8f8f5 46%, #edf2eb 100%);
}

.app-shell {
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px 94px;
}

.page-shell {
  gap: 14px;
}

.surface,
.summary-card,
.menu-card,
.login-card {
  border-radius: 24px;
  border: 1px solid rgba(219, 227, 211, 0.92);
  box-shadow: 0 20px 44px rgba(31, 41, 55, 0.08);
}

.surface,
.login-card {
  padding: 16px;
}

.surface__head {
  gap: 12px;
  margin-bottom: 12px;
}

.surface__head h2,
.surface__head h3 {
  font-size: 18px;
  line-height: 1.25;
}

.surface__title,
.section-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.muted {
  color: #607066;
  font-size: 12px;
  line-height: 1.55;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 0 8px;
  background: linear-gradient(180deg, rgba(240, 244, 238, 0.97), rgba(240, 244, 238, 0.82));
  backdrop-filter: blur(14px);
}

.top-bar--dashboard {
  grid-template-columns: 1fr;
}

.top-bar__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.top-bar__title-wrap {
  min-width: 0;
}

.top-bar__eyebrow {
  margin: 0 0 4px;
  color: #66756d;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.top-bar--dashboard h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.top-bar__title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.top-bar__btn,
.top-bar__icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(219, 227, 211, 0.92);
  box-shadow: 0 10px 20px rgba(31, 41, 55, 0.06);
  color: #17301f;
  font-size: 18px;
  text-decoration: none;
}

.top-bar__btn--text {
  width: auto;
  min-width: 40px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.top-bar__btn--placeholder {
  visibility: hidden;
}

.top-bar__icon {
  font-size: 25px;
  font-weight: 700;
}

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

.summary-card {
  padding: 14px;
}

.summary-card span {
  font-size: 12px;
}

.summary-card strong {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.05;
}

.button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 13px;
}

.button--primary {
  background: linear-gradient(135deg, #2f6b44 0%, #255537 100%);
}

.button--soft {
  background: #edf5ef;
  color: #235638;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.74);
}

.button--danger {
  background: #ffe4e0;
  color: #b42318;
}

.section-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.field span {
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f9fbf8;
  font-size: 16px;
}

.field textarea {
  min-height: 104px;
}

.badge {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

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

.metric,
.history-card {
  padding: 12px;
  border-radius: 18px;
}

.metric strong {
  font-size: 17px;
}

.info-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.table-wrap {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(219, 227, 211, 0.92);
  padding-bottom: 2px;
}

.data-table {
  min-width: 560px;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  font-size: 12px;
}

.accordion {
  padding: 0;
  border-radius: 18px;
  background: rgba(249, 251, 248, 0.92);
  border: 1px solid rgba(219, 227, 211, 0.92);
}

.accordion summary {
  list-style: none;
  padding: 14px 16px;
}

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

.view-panel {
  display: none;
}

.view-panel.is-visible {
  display: block;
}

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

.menu-card {
  padding: 20px 14px;
  text-align: left;
  font-size: 16px;
  line-height: 1.4;
}

.lot-card {
  padding: 18px 16px;
  scroll-margin-top: 84px;
}

.lot-card__lot {
  margin-top: 4px;
  font-size: 12px;
}

.lot-card:target {
  box-shadow: 0 0 0 2px rgba(47, 107, 68, 0.22), 0 20px 44px rgba(31, 41, 55, 0.08);
}

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

.house-glance-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(219, 227, 211, 0.92);
  background: rgba(249, 251, 248, 0.96);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.05);
  justify-items: center;
}

.house-donut {
  width: 100%;
  display: grid;
  place-items: center;
}

.house-donut__chart {
  width: min(100%, 146px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      #2f6b44 0 var(--donut-progress),
      #dce8df var(--donut-progress) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.house-donut__inner {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(249, 251, 248, 0.98);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(219, 227, 211, 0.92);
}

.house-donut__inner strong {
  font-size: 12px;
  line-height: 1.2;
}

.house-donut__inner span {
  color: #607066;
  font-size: 10px;
  line-height: 1.2;
}

.house-glance-card__foot {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.house-glance-card__foot span {
  display: block;
  color: #607066;
  font-size: 11px;
  text-align: center;
}

.house-glance-card__foot strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
}

.house-glance-card__status {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.house-glance-card__lot {
  color: #607066;
  font-size: 11px;
}

.card-actions-grid {
  margin-top: 12px;
}

.mobile-only-report-list {
  display: grid;
}

.report-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(219, 227, 211, 0.92);
  border-radius: 20px;
  background: rgba(249, 251, 248, 0.94);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.05);
}

.report-row__top,
.report-row__values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.report-row__values > div {
  flex: 1;
}

.report-row__date {
  font-size: 13px;
  font-weight: 700;
}

.report-row__lot {
  margin-top: 4px;
  color: #607066;
  font-size: 12px;
}

.report-row__values span {
  display: block;
  color: #607066;
  font-size: 11px;
}

.report-row__values strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.lots-mobile-list {
  gap: 12px;
}

.lot-mini-card {
  padding: 14px;
  border-radius: 20px;
}

.lot-mini-card__meta {
  gap: 10px;
}

.app-body--modal-open {
  overflow: hidden;
}

.lot-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 8px calc(14px + env(safe-area-inset-bottom));
}

.lot-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}

.lot-overlay__panel {
  position: relative;
  width: min(100%, 760px);
  max-height: min(100vh - 24px, 920px);
  overflow: auto;
  border-radius: 24px 24px 22px 22px;
  padding: 18px 16px 16px;
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
}

.lot-overlay__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.lot-overlay__head h2 {
  margin: 0;
  font-size: 20px;
}

.lot-overlay__close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f2f6f1;
  border: 1px solid rgba(219, 227, 211, 0.92);
  font-size: 15px;
  font-weight: 700;
  color: #5c695f;
  flex-shrink: 0;
}

.lot-overlay__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(calc(100vw - 16px), 430px);
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(219, 227, 211, 0.92);
  box-shadow: 0 18px 40px rgba(31, 41, 55, 0.12);
}

.nav-item {
  flex: 1;
  min-height: 48px;
  padding: 5px 6px;
  border-radius: 16px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  color: #6a786f;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.nav-item span:first-child {
  font-size: 17px;
  line-height: 1;
}

.nav-item--active {
  background: #e4f0e7;
  color: #2f6b44;
}

.flash {
  border-radius: 16px;
  padding: 11px 13px;
  font-size: 13px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(47, 107, 68, 0.16), transparent 34%),
    linear-gradient(180deg, #f0f4ee 0%, #f8f8f5 46%, #edf2eb 100%);
}

.login-shell,
.install-shell {
  width: min(100%, 430px);
}

.install-shell {
  width: min(100%, 620px);
}

.login-card {
  padding: 20px;
}

.login-brand {
  margin-bottom: 6px;
}

.login-brand h1 {
  margin: 8px 0 6px;
  font-family: "Space Grotesk", "IBM Plex Sans JP", sans-serif;
  font-size: 28px;
  line-height: 1.08;
}

.login-brand__eyebrow {
  font-family: "IBM Plex Sans JP", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.app-body--login .field span,
.app-body--install .field span {
  font-size: 12px;
}

@media (min-width: 980px) {
  .app-shell {
    width: min(100%, 1120px);
    max-width: 1120px;
    padding-inline: 18px;
    padding-bottom: 40px;
  }

  .page-shell {
    gap: 18px;
  }

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

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

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

  .mobile-only-report-list {
    display: none;
  }

  .bottom-nav {
    width: min(100%, 520px);
  }

  .lot-overlay {
    align-items: center;
    padding: 28px;
  }

  .lot-overlay__panel {
    width: min(100%, 820px);
    border-radius: 28px;
    padding: 22px 22px 20px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-inline: 8px;
    padding-bottom: 86px;
  }

  .surface,
  .login-card {
    padding: 14px;
  }

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

  .button {
    font-size: 12px;
  }

  .summary-card strong {
    font-size: 20px;
  }

  .field input[type="date"],
  .field input[type="month"],
  .field input[type="time"],
  .field input[type="datetime-local"] {
    min-height: 42px;
    padding-inline: 8px;
    font-size: 15px;
  }

  .app-body--report .table-wrap {
    display: none;
  }

  .lot-overlay {
    padding-inline: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .lot-overlay__panel {
    width: 100%;
    max-height: min(100vh - 8px, 1000px);
    border-radius: 24px 24px 0 0;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }

  .lot-overlay__head h2 {
    font-size: 18px;
  }

  .lot-overlay__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.app-body form .grid--2,
  body.app-body form .grid--3 {
    grid-template-columns: 1fr !important;
  }

  body.app-body form .field,
  body.app-body form .field input,
  body.app-body form .field select,
  body.app-body form .field textarea {
    min-width: 0;
    max-width: 100%;
  }

  body.app-body form .field input[type="date"],
  body.app-body form .field input[type="month"],
  body.app-body form .field input[type="time"],
  body.app-body form .field input[type="datetime-local"],
  body.app-body form .field input[type="number"],
  body.app-body form .field input[type="text"],
  body.app-body form .field input[type="password"],
  body.app-body form .field select {
    width: 100%;
  }

  body.app-body .surface,
  body.app-body .lot-overlay__panel {
    overflow-x: clip;
  }
}

@media (max-width: 430px) {
  body.app-body form .field input,
  body.app-body form .field select,
  body.app-body form .field textarea {
    font-size: 16px;
  }

  body.app-body form .field input[type="date"],
  body.app-body form .field input[type="month"],
  body.app-body form .field input[type="time"],
  body.app-body form .field input[type="datetime-local"] {
    padding-inline: 8px;
  }
}
