:root {
  color-scheme: light;
  --background: #f6f5f0;
  --surface: #ffffff;
  --surface-muted: #f1f3ee;
  --text: #17231d;
  --text-muted: #59645e;
  --primary: #174f3a;
  --primary-strong: #103d2c;
  --border: #d9ded9;
  --focus: #bd6b18;
  --content-max: 880px;
  --nav-height: 70px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-strong);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid rgba(23, 79, 58, 0.1);
  background: var(--surface);
}

.header-inner,
.page-shell {
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
}

.header-inner {
  padding-block: 14px 16px;
}

.brand {
  margin: 0 0 11px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.date-block p,
.date-block h1 {
  margin: 0;
}

.current-date {
  min-height: 1.4em;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.greeting {
  margin-top: 1px !important;
  font-size: clamp(1.48rem, 6.2vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.page-shell {
  display: grid;
  gap: 22px;
  padding-block: 18px calc(var(--nav-height) + 40px + env(safe-area-inset-bottom));
}

.shipment-card,
.summary-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.shipment-card {
  padding: 20px;
  box-shadow: 0 2px 8px rgba(23, 35, 29, 0.04);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading-row.compact {
  align-items: end;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--primary);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.heading-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.shipment-list {
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.shipment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding-block: 14px;
  border-bottom: 1px solid var(--border);
}

.shipment-destination,
.shipment-spec,
.shipment-quantity,
.empty-message {
  margin: 0;
}

.shipment-destination {
  overflow-wrap: anywhere;
  font-size: 1.03rem;
  font-weight: 700;
}

.shipment-spec {
  grid-column: 1;
  color: var(--text-muted);
  font-size: 0.91rem;
}

.shipment-quantity {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}

.empty-message {
  padding: 28px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
}

.shipment-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}

.shipment-total {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-strong);
  font-weight: 700;
  text-underline-offset: 4px;
}

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

.app-card {
  position: relative;
  min-width: 0;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.app-card:hover {
  border-color: #a9b5ae;
  background: #fbfcfa;
  transform: translateY(-1px);
}

.app-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--icon-bg, #edf3ef);
  color: var(--icon-color, var(--primary));
}

.app-icon svg,
.bottom-nav svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-icon svg {
  width: 24px;
  height: 24px;
}

.app-name {
  max-width: calc(100% - 8px);
  font-size: clamp(0.94rem, 4.3vw, 1rem);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-description {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: clamp(0.78rem, 3.65vw, 0.82rem);
  line-height: 1.45;
}

.app-arrow {
  position: absolute;
  right: 13px;
  bottom: 13px;
  color: var(--icon-color, var(--primary));
  font-weight: 800;
}

.app-work {
  --icon-bg: #f1f0ea;
  --icon-color: #57533d;
}

.app-harvest {
  --icon-bg: #eef3e8;
  --icon-color: #43602c;
}

.app-pesticide {
  --icon-bg: #edf1f2;
  --icon-color: #315667;
}

.summary-section {
  padding: 18px 20px 8px;
}

.summary-list {
  margin: 0;
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
  border-top: 1px solid var(--border);
}

.summary-row dt {
  color: var(--text-muted);
  font-weight: 600;
}

.summary-row dd {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 750;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(10px);
}

.bottom-nav-inner {
  width: min(100%, var(--content-max));
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-inline: auto;
}

.nav-item {
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 2px 6px;
  border: 0;
  background: transparent;
  color: #69736e;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item.is-current {
  color: var(--primary);
  font-weight: 800;
}

.nav-item.is-current svg {
  fill: #e8f0eb;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 30;
  max-width: 420px;
  margin-inline: auto;
  padding: 11px 16px;
  border: 1px solid #3c5147;
  border-radius: 8px;
  background: #20362c;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 800px) {
  .header-inner,
  .page-shell {
    width: min(100% - 48px, var(--content-max));
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 13px 14px;
  }

  .brand {
    margin: 0;
  }

  .date-block {
    text-align: right;
  }

  .current-date {
    min-height: 1.3em;
    font-size: 0.82rem;
    font-weight: 600;
  }

  .greeting {
    margin-top: 0 !important;
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .page-shell {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: start;
    gap: 24px;
    padding-top: 24px;
  }

  .shipment-card,
  .launcher-section {
    grid-column: 1;
  }

  .summary-section {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 350px) {
  .header-inner,
  .page-shell {
    width: min(100% - 24px, var(--content-max));
  }

  .shipment-card {
    padding: 17px;
  }

  .app-card {
    min-height: 152px;
    padding: 13px;
  }

  .app-icon {
    margin-bottom: 10px;
  }

  .nav-item {
    font-size: 0.69rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
