:root {
  color-scheme: light;
  --page-width: 1180px;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #edf2f7;
  --ink: #162033;
  --muted: #62708a;
  --line: #d9e0ea;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d8f3ef;
  --error: #b42318;
  --shadow: 0 18px 45px rgba(24, 35, 54, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  border-bottom: 1px solid rgba(217, 224, 234, 0.85);
  background: rgba(246, 248, 251, 0.9);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 20px;
  width: min(var(--page-width), calc(100% - 24px));
  min-height: 68px;
  margin-left: max(12px, calc((100% - var(--page-width)) / 2 - 8px));
  margin-right: auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.brand-page-title {
  display: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.top-nav a,
.nav-menu-button {
  color: inherit;
  font: inherit;
  font-weight: inherit;
}

.top-nav a:hover,
.top-nav a.is-active,
.nav-menu-button:hover,
.nav-menu-button.is-active {
  color: var(--ink);
}

.nav-menu {
  position: static;
  display: inline-flex;
}

.nav-menu-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-menu-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  display: grid;
  gap: 0;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(24, 35, 54, 0.1);
  z-index: 20;
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-menu-dropdown a {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 0;
  text-align: center;
  white-space: nowrap;
}

.nav-menu-action {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.nav-menu-dropdown.is-open {
  transform: scaleY(1);
  opacity: 1;
}

.nav-menu-dropdown a:hover,
.nav-menu-dropdown a.is-active,
.nav-menu-action:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-menu-status {
  margin: 0;
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

main {
  flex: 1;
  width: min(var(--page-width), calc(100% - 24px));
  margin-left: max(12px, calc((100% - var(--page-width)) / 2 - 8px));
  margin-right: auto;
}

.page-view {
  display: none;
}

.page-view.is-active {
  display: block;
}

#view-login.is-active,
#view-register.is-active {
  display: grid;
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  place-items: center;
  padding: 12px 0;
}

#view-home.is-active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px);
  height: calc(100svh - 68px);
  padding: 18px 0 28px;
  overflow: hidden;
}

.auth-shell {
  display: grid;
  width: 100%;
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 20px;
  width: min(100%, 560px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card-login {
  width: min(100%, 1020px);
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 24px;
}

.auth-hero-image {
  width: 100%;
  max-width: none;
  height: min(48vh, 420px);
  justify-self: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #eaf7f0;
  object-fit: cover;
}

.auth-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.auth-field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

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

.auth-actions-stacked {
  grid-template-columns: 1fr;
}

.auth-button,
.auth-link-button,
.account-action-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.auth-button.is-secondary {
  background: var(--surface);
  color: var(--ink);
}

.auth-link-button {
  background: transparent;
  color: var(--muted);
}

.auth-button:hover,
.auth-link-button:hover,
.account-action-card:hover {
  border-color: var(--accent);
}

.account-section,
.data-section {
  border-bottom: none;
}

.account-actions {
  display: grid;
  gap: 12px;
  max-width: 280px;
}

.data-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.data-panel pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.eyebrow,
.tool-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 12px;
  max-width: 840px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.tool-directory,
.info-section,
.info-grid {
  margin-bottom: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading h2,
.manual-section h2,
.info-grid h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(24, 35, 54, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.tool-card-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
}

.tool-card-body {
  display: grid;
  gap: 4px;
}

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

.manual-hero {
  flex: 0 0 18px;
  padding: 0;
}

.subtool-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  flex: 1;
  gap: 20px 24px;
  min-height: 0;
  height: auto;
  margin-bottom: 0;
  padding-bottom: 24px;
  align-content: stretch;
}

.subtool-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(24, 35, 54, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  height: 100%;
}

.subtool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.subtool-card-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
}

.subtool-card-body {
  display: grid;
  gap: 6px;
}

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

.subtool-card-body small {
  color: var(--muted);
  font-size: 14px;
}

.tool-page-hero {
  padding-bottom: 22px;
}

.standalone-tool-section {
  margin-bottom: 42px;
}

#view-crop-prices .standalone-tool-section:first-child,
#view-steal-strategy .standalone-tool-section:first-child,
#view-crop-growth .standalone-tool-section:first-child,
#view-more-tools .standalone-tool-section:first-child {
  margin-top: 30px;
}

.manual-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 42px;
}

.manual-layout > * {
  min-width: 0;
}

.manual-nav {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.manual-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.manual-nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.manual-section {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  scroll-margin-top: 96px;
  min-width: 0;
}

.manual-section p {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 20px;
}

.check-list li {
  padding-left: 4px;
}

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

.season-grid article {
  min-height: 138px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.season-grid h3 {
  margin-bottom: 8px;
}

.season-grid p {
  margin-bottom: 0;
}

.note-box {
  margin-top: 16px;
  padding: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.calculator-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.calculator-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow-x: visible;
}

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

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

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

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

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

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.framed-input-grid .field {
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.field-action-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.field-action-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.standalone-tool-section[aria-labelledby="custom-multiplier-title"] {
  margin-top: 30px;
}

.field span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  min-width: 0;
}

.field input,
.field select {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  outline: none;
  justify-self: stretch;
  text-align: center;
  text-align-last: center;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.price-summary {
  max-width: 820px;
}

.summary-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.summary-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.summary-card strong {
  font-size: 18px;
  line-height: 1.3;
}

.basis-price {
  display: block;
  margin-top: 4px;
}

.status-text {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

#crop-price-status {
  margin-bottom: 12px;
}

.status-text.is-error {
  color: var(--error);
}

.price-table-wrap {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-table-group {
  display: grid;
  gap: 22px;
}

.price-category-block {
  display: grid;
  gap: 12px;
}

.price-category-heading h2,
.manual-section .price-subsection-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.price-table-scroll-wrap {
  max-height: 316px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.price-table-scroll-wrap .price-table thead th {
  position: sticky;
  z-index: 1;
}

.price-table-scroll-wrap .price-table thead tr:first-child th {
  top: 0;
}

.price-table-scroll-wrap .price-table thead tr:last-child th {
  top: 38px;
}

.custom-query-grid,
.cultivation-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow-x: auto;
}

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

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

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

.cultivation-table-wrap {
  margin-top: 0;
}

.price-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
}

.price-table th,
.price-table td {
  min-width: 0;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.price-table th {
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.2;
}

.price-table td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: center;
}

.price-table tbody th {
  text-align: center;
}

.table-level-select {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: center;
  text-align-last: center;
}

.price-table tbody td,
.strategy-matrix tbody td,
.strategy-matrix tbody th {
  text-align: center;
}

.price-table th:first-child,
.strategy-matrix th:first-child {
  width: 104px;
}

.price-table-scroll-wrap .price-table {
  border-bottom: 1px solid var(--line);
}

.strategy-layout {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.strategy-group {
  display: grid;
  gap: 12px;
}

.strategy-heading {
  display: grid;
  gap: 4px;
}

.strategy-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.strategy-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.strategy-heading h3,
.strategy-heading p {
  margin: 0;
}

.strategy-heading p {
  color: var(--muted);
}

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

.strategy-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

#first-stage-table-wrap,
#second-stage-table-wrap,
.strategy-list-block .strategy-table-wrap {
  max-height: 316px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.strategy-table-wrap.is-expanded-all {
  max-height: none !important;
  overflow-y: visible;
}

.strategy-matrix {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
}

.strategy-matrix th,
.strategy-matrix td {
  min-width: 0;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  word-break: break-word;
  vertical-align: middle;
}

.strategy-matrix th {
  background: var(--surface-soft);
  font-size: 13px;
}

.strategy-matrix tbody th {
  text-align: center;
}

.matrix-cell {
  display: grid;
  gap: 4px;
  min-height: 0;
  padding: 6px 4px;
  border-radius: 8px;
  background: #fbfcfe;
}

.matrix-cell.is-basis {
  background: #fff5d9;
  box-shadow: inset 0 0 0 1px rgba(180, 131, 5, 0.22);
}

.matrix-cell.is-target {
  background: #dbfaf2;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
  animation: strategy-pulse 1.8s ease-in-out infinite;
}

.matrix-price {
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.matrix-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.matrix-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.matrix-badge.is-basis {
  background: #ffe59f;
  color: #7a5400;
}

.matrix-badge.is-target {
  background: #bff3e6;
  color: #0b5f59;
}

.strategy-list-block {
  display: grid;
  gap: 10px;
}

.strategy-list-block h4 {
  margin: 0;
  font-size: 15px;
}

.strategy-list-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.strategy-list-table th,
.strategy-list-table td {
  min-width: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.strategy-list-table th {
  background: var(--surface-soft);
  font-size: 13px;
}

.strategy-list-table td {
  word-break: break-word;
}

.section-toggle {
  align-self: flex-start;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.section-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.section-toggle-expand {
  display: inline-flex;
}

.strategy-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strategy-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.strategy-chip.is-muted {
  color: var(--muted);
}

@keyframes strategy-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22), 0 0 0 rgba(15, 118, 110, 0);
  }

  50% {
    transform: scale(1.02);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22), 0 0 0 6px rgba(15, 118, 110, 0.08);
  }
}

.record-table {
  display: grid;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.record-table div {
  display: grid;
  grid-template-columns: 130px 120px minmax(150px, 1fr) minmax(180px, 1fr);
}

.record-table div + div {
  border-top: 1px solid var(--line);
}

.record-table strong,
.record-table span {
  min-width: 0;
  padding: 12px;
  word-break: break-word;
}

.record-table strong {
  background: var(--surface-soft);
}

.info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 54px 0 32px;
  border-bottom: 1px solid var(--line);
}

.info-section p,
.info-grid p {
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-top: 24px;
}

.info-grid article {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.info-grid h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

@media (max-width: 900px) {
  .result-summary,
  .custom-query-summary,
  .cultivation-summary,
  .strategy-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header-inner {
    width: calc(100% - 24px);
    margin-left: 12px;
  }

  main {
    width: calc(100% - 24px);
    margin-left: 12px;
  }

  .price-table {
    font-size: 13px;
  }

  .record-table div {
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .auth-card-login {
    grid-template-columns: 1fr;
  }

  .auth-hero-image {
    height: auto;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-card,
  .auth-card-login {
    width: 100%;
    padding: 18px;
  }

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

  .subtool-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 0;
  }

  .subtool-card {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 12px;
    min-height: 148px;
    padding: 18px 12px;
  }

  .subtool-card-body {
    justify-items: center;
    text-align: center;
  }

  .subtool-card-body small {
    text-align: center;
  }

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

  .result-summary,
  .custom-query-summary,
  .strategy-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .calculator-grid-4,
  .calculator-grid-3,
  .custom-query-grid,
  .strategy-grid,
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-table-wrap,
  .strategy-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .price-table,
  .strategy-matrix {
    min-width: 760px;
  }

  .strategy-list-table {
    min-width: 0;
    width: 100%;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .field span {
    justify-content: center;
    min-height: auto;
    text-align: center;
  }

  .strategy-list-block .strategy-table-wrap,
  .cultivation-table-wrap {
    overflow-x: hidden;
  }

  .cultivation-table-wrap .price-table,
  .strategy-list-table {
    min-width: 0;
  }

  #first-stage-table-wrap,
  #second-stage-table-wrap {
    max-height: 316px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .strategy-heading-actions {
    gap: 8px;
  }

  .section-toggle-expand {
    display: none;
  }

  .price-table th,
  .strategy-matrix th {
    font-size: 12px;
    white-space: nowrap;
    word-break: keep-all;
  }

  .price-table-scroll-wrap {
    max-height: 316px;
    overflow-x: auto;
    overflow-y: auto;
  }

  .price-table-scroll-wrap .price-table {
    min-width: 760px;
  }

  .strategy-list-block .strategy-table-wrap {
    max-height: none;
    overflow: visible;
  }

  #view-crop-growth .calculator-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  #view-crop-growth .cultivation-grid,
  #view-crop-growth .cultivation-summary {
    display: contents;
  }

  #view-crop-growth .cultivation-grid .field:nth-child(1) {
    order: 1;
  }

  #view-crop-growth .cultivation-summary .summary-card:nth-child(1) {
    order: 2;
  }

  #view-crop-growth .cultivation-grid .field:nth-child(2) {
    order: 3;
  }

  #view-crop-growth .cultivation-grid .field:nth-child(3) {
    order: 4;
  }

  #view-crop-growth .cultivation-grid .field:nth-child(4) {
    order: 5;
  }

  #view-crop-growth .cultivation-grid .field:nth-child(5) {
    order: 6;
  }

  #view-crop-growth .cultivation-summary .summary-card:nth-child(2) {
    order: 7;
  }

  #view-crop-growth .cultivation-summary .summary-card:nth-child(3) {
    order: 8;
  }

  #view-crop-growth .cultivation-summary .summary-card:nth-child(4) {
    order: 9;
  }

  #view-crop-growth .cultivation-summary .summary-card:nth-child(5) {
    order: 10;
  }

  #cultivation-status {
    grid-column: 1 / -1;
    order: 11;
  }

  #view-crop-growth .cultivation-table-wrap {
    grid-column: 1 / -1;
    order: 12;
  }

  #view-crop-growth .cultivation-table-wrap .price-table {
    min-width: 0;
  }
}

@media (max-height: 760px) and (min-width: 700px) {
  #view-home.is-active {
    padding: 18px 0 12px;
  }

  #view-home h1 {
    font-size: clamp(32px, 5vw, 48px);
  }
}

@media (min-width: 701px) {
  #view-home.is-active {
    overflow: hidden;
  }
}
