*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: 'Minecraft';
  src: url('/fonts/MinecraftRegular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Minecraft';
  src: url('/fonts/MinecraftItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Minecraft';
  src: url('/fonts/MinecraftBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Minecraft';
  src: url('/fonts/MinecraftBoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

[hidden],
.is-hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f9f8f3;
  color: #1c1c1c;
  font-family: 'Minecraft', monospace;
  font-size: 12px;
  line-height: 1.6;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

body.modal-open {
  overflow: hidden;
}

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

/* ===== Home page wrapper ===== */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 80px;
}

/* ===== Home flow (3-step) ===== */
.home-flow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 12vh;
  transition: padding-top 400ms ease;
}

.home-flow.step-browse,
.home-flow.step-category {
  padding-top: 32px;
}

.home-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transition: all 400ms ease;
}

.home-flow.step-browse .home-header,
.home-flow.step-category .home-header {
  align-items: stretch;
}

/* Landing title */
.landing-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
  font-style: italic;
  color: #1a1a1a;
  text-align: center;
  letter-spacing: -0.01em;
  opacity: 1;
  max-height: 120px;
  overflow: hidden;
  transition: opacity 300ms ease, max-height 400ms ease, margin 400ms ease;
}

.home-flow.step-browse .landing-title,
.home-flow.step-category .landing-title {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.landing-title-rainbow {
  background: repeating-linear-gradient(
    90deg,
    #00cfff 0%,
    #00ff88 10%,
    #ffe600 20%,
    #ff8c00 30%,
    #ff3cac 40%,
    #7b2ff7 50%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chroma-slide 4s linear infinite;
}

@keyframes chroma-slide {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-title-rainbow {
    animation: none;
    background-size: 100% 100%;
  }
}

/* Search bar */
.search-bar-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  transition: max-width 400ms ease;
}

.home-flow.step-browse .search-bar-wrap,
.home-flow.step-category .search-bar-wrap {
  max-width: 100%;
}

.home-flow.step-category .search-bar-wrap {
  display: none;
}

.search-bar {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1rem;
  font-style: italic;
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition: box-shadow 200ms ease;
}

.search-bar::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

.search-bar:focus {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
}

/* Browse / category content */
.browse-content,
.category-content {
  width: 100%;
  margin-top: 28px;
}

.category-content {
  margin-top: 0;
}

/* Tile grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  width: 100%;
}

/* Shared tile */
.ui-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  padding: 18px 12px 14px;
  border: none;
  border-radius: 16px;
  background: #c4c4c4;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.ui-tile:hover,
.ui-tile:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  background: #b8b8b8;
}

.ui-tile-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  object-fit: contain;
  flex-shrink: 0;
}

.ui-tile-icon--photo {
  border-radius: 6px;
  object-fit: cover;
}

.ui-tile-icon--placeholder {
  display: block;
  background: #a8a8a8;
  border-radius: 6px;
}

.ui-tile-label {
  font-size: 0.82rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  color: #1a1a1a;
  line-height: 1.2;
  word-break: break-word;
}

.ui-tile-meta {
  font-size: 0.68rem;
  font-style: italic;
  color: #333;
  margin-top: -4px;
}

.ui-tile-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
}

.ui-tile-badge--beginner { background: #dcfce7; color: #166534; }
.ui-tile-badge--intermediate { background: #fef3c7; color: #92400e; }
.ui-tile-badge--advanced { background: #ede9fe; color: #5b21b6; }

.ui-tile--cat {
  min-height: 140px;
  padding: 18px 12px 14px;
  border-radius: 20px;
  background: #111;
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.ui-tile--cat:hover,
.ui-tile--cat:focus {
  background: #111;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
}

.ui-tile--cat .ui-tile-label {
  color: #fff;
}

.ui-tile--cat .ui-tile-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
}

.ui-tile--cat .ui-tile-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

/* ===== Farm cards (category view) ===== */
.farm-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.farm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px 12px 14px;
  border: none;
  border-radius: 20px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  outline: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.farm-card:hover,
.farm-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
}

.farm-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.rate-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-style: italic;
  color: #fff;
  line-height: 1.2;
}

.farm-card-rate-icon {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  flex-shrink: 0;
}

.farm-card-rate--empty {
  flex: 1;
}

.farm-card-diff {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.3;
}

.farm-card-diff--beginner {
  background: #4ade80;
  color: #111;
}

.farm-card-diff--intermediate {
  background: #fbbf24;
  color: #111;
}

.farm-card-diff--advanced {
  background: #c084fc;
  color: #111;
}

.farm-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #222;
}

.farm-card-img--empty {
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
}

/* ===== Farm detail sheet (modal) ===== */
.modal-dialog--sheet {
  width: min(960px, 100%);
}

.modal-close--dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ccc;
}

.modal-close--dark:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.farm-sheet {
  background: #0a0a0a;
  color: #fff;
  border-radius: 22px;
  padding: 22px 24px 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.farm-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.farm-sheet-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
}

.farm-sheet-title-rate .rate-with-icon {
  font-size: 0.95rem;
}

.farm-sheet-title-icon {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.farm-sheet-credit {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding-top: 2px;
}

.farm-sheet-credit:hover {
  color: #fff;
  text-decoration: underline;
}

.farm-sheet-body {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(140px, 200px) 1fr;
  gap: 24px;
  align-items: start;
}

.farm-sheet-col--media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.farm-sheet-hero {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #222;
}

.farm-sheet-hero--empty {
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
  min-height: 160px;
}

.farm-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.farm-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  transition: opacity 120ms ease, transform 120ms ease;
}

.farm-sheet-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.farm-sheet-btn--tutorial {
  background: #e53935;
}

.farm-sheet-btn--schematic {
  background: #1e88e5;
}

.farm-sheet-btn--wdl {
  background: #5e35b1;
}

.farm-sheet-col--stats {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.farm-sheet-stat-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.farm-sheet-stat-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  font-style: italic;
  text-transform: lowercase;
}

.farm-sheet-stat-label--produce {
  color: #4ade80;
}

.farm-sheet-stat-label--consume {
  color: #f87171;
}

.farm-sheet-stat-row--highlight {
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 6px;
  margin: 0 -6px;
}

.farm-sheet-stat-row .rate-with-icon {
  font-size: 0.78rem;
}

.farm-sheet-stat-icon {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.farm-sheet-col--guide {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.farm-sheet-section-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-style: italic;
  color: #a78bfa;
  text-transform: lowercase;
}

.farm-sheet-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.68rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.farm-sheet-list--bullets {
  list-style: disc;
}

.farm-sheet-notes {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.farm-sheet-notes p {
  margin: 0 0 10px;
}

.farm-sheet-notes--list {
  padding-left: 18px;
  list-style: disc;
}

@media (max-width: 820px) {
  .farm-sheet-body {
    grid-template-columns: 1fr 1fr;
  }

  .farm-sheet-col--guide {
    grid-column: 1 / -1;
  }

  .farm-sheet-col--stats {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
  }
}

@media (max-width: 540px) {
  .farm-sheet-body {
    grid-template-columns: 1fr;
  }

  .farm-sheet-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .farm-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* Category toolbar (step 3) */
.cat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 160px;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: box-shadow 150ms ease;
}

.cat-chip:hover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

.cat-chip-icon {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
  flex-shrink: 0;
}

.cat-chip-name {
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Filter dropdowns */
.filter-dd {
  position: relative;
  flex-shrink: 0;
}

.filter-dd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: #c4c4c4;
  color: #1a1a1a;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-style: italic;
  white-space: nowrap;
  transition: background 120ms ease;
}

.filter-dd-trigger:hover {
  background: #b8b8b8;
}

.filter-dd-trigger--icon {
  width: 48px;
  padding: 0;
  justify-content: center;
  gap: 2px;
}

.filter-dd-trigger--dim {
  width: 56px;
  padding: 0 10px;
  justify-content: space-between;
}

.filter-dd-icon,
.filter-sort-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.filter-dd-chevron {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Dimension portal icons (end frame + nether portal) */
.dim-portal-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  image-rendering: pixelated;
  border-radius: 3px;
}

.dim-portal-icon--frame {
  background: url('https://assets.mcasset.cloud/1.21.1/assets/minecraft/textures/block/end_portal_frame_side.png') center / contain no-repeat;
}

.dim-portal-icon--nether {
  box-sizing: border-box;
  border: 2px solid #2d2d3a;
  background-color: #14141c;
  background-image: url('https://assets.mcasset.cloud/1.21.1/assets/minecraft/textures/block/nether_portal.png');
  background-size: 100% 500%;
  background-position: center 30%;
}

.filter-dd-panel--dim {
  min-width: 72px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-dd-option--dim {
  justify-content: space-between;
  padding: 0;
  gap: 16px;
  min-height: 22px;
}

.filter-dd-option--dim::before {
  flex-shrink: 0;
}

.filter-dd-option--dim .dim-portal-icon {
  margin-left: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-dd-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 140px;
  max-height: 260px;
  overflow-y: auto;
  background: #c4c4c4;
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.filter-dd-panel--compact {
  min-width: 120px;
  max-height: none;
}

.filter-dd-heading {
  padding: 6px 14px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1px solid #b0b0b0;
  margin-bottom: 4px;
}

.filter-dd-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.76rem;
  font-style: italic;
  text-align: left;
  color: #1a1a1a;
  transition: background 100ms ease;
}

.filter-dd-option::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #888;
  flex-shrink: 0;
  transition: background 100ms ease, border-color 100ms ease;
}

.filter-dd-option.is-selected::before {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.filter-dd-option:hover {
  background: rgba(0, 0, 0, 0.06);
}

.filter-dd-option--dim:hover {
  background: none;
  opacity: 0.85;
}

/* Results messages */
.results-hint,
.results-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.88rem;
  font-style: italic;
  color: #999;
  padding: 24px 0;
}

/* ===== Legacy browse (kept for compat) ===== */
#browse-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ===== Category tiles grid (browse mode) ===== */
.cat-list {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.cat-tile {
  position: relative;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8e4dc;
  background: #f0ece4;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  outline: none;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.cat-tile:hover,
.cat-tile:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cat-tile:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.18), 0 6px 20px rgba(0, 0, 0, 0.08);
}

.cat-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58) 0%, transparent 65%);
  color: #fff;
}

.cat-tile:not(.cat-tile--has-img) .cat-tile-overlay {
  background: none;
  color: #1a1a1a;
  justify-content: center;
}

.cat-tile-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  text-transform: lowercase;
  line-height: 1.2;
}

.cat-tile-desc {
  display: block;
  font-size: 0.73rem;
  opacity: 0.88;
  margin-top: 4px;
  line-height: 1.35;
}

/* ===== Category mode ===== */
.category-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: min(900px, 100%);
  margin-bottom: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  flex: 1;
}

.filter-field label {
  font-size: 0.68rem;
  text-transform: lowercase;
  color: #6b6560;
}

.filter-select,
.form-select {
  width: 100%;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  background: #fff;
  font-family: inherit;
}

.form-select--multi {
  min-height: 140px;
}

.version-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-range-row .form-select {
  flex: 1;
  min-width: 0;
}

.version-range-sep {
  font-size: 0.75rem;
  color: #6b6560;
  flex-shrink: 0;
}

/* ===== Category chip ===== */
.category-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(900px, 100%);
  margin-bottom: 16px;
}

.chip-back {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid #e8e4dc;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  color: #666;
  transition: color 120ms, border-color 120ms, box-shadow 120ms;
}

.chip-back:hover {
  color: #1a1a1a;
  border-color: #b0a99f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.chip-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-name {
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: lowercase;
  color: #1a1a1a;
  line-height: 1;
}

.chip-desc {
  font-size: 0.85rem;
  color: #888;
}

/* ===== Search bar ===== */
.search-section {
  width: min(560px, 100%);
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 1px solid #e8e4dc;
  border-radius: 999px;
  background: #ffffff;
  font-size: 1rem;
  color: #1c1c1c;
  outline: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-input::placeholder { color: #a8a8a8; }

.search-input:focus {
  border-color: #c9c2b8;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

/* ===== Farm tiles grid ===== */
.farm-tiles {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.results-hint,
.results-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.9rem;
  color: #9a9a9a;
  padding: 16px 0;
}

/* ===== Farm tile ===== */
.farm-tile {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8e4dc;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 130ms ease, box-shadow 130ms ease;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.farm-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.farm-tile-image {
  height: 200px;
  background: #e8e4dc;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.farm-tile--has-img .farm-tile-image {
  background-color: #1a1a1a;
}

/* Top overlay bar with rates (left) and versions+difficulty (right) */
.farm-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.farm-tile-left,
.farm-tile-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.farm-tile-right {
  align-items: flex-end;
}

.farm-tile-rates {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

.farm-tile-versions {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-align: right;
  line-height: 1.3;
}

.farm-tile-diff {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: lowercase;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

.farm-tile-diff--beginner   { background: #dcfce7; color: #166534; }
.farm-tile-diff--intermediate { background: #fef3c7; color: #92400e; }
.farm-tile-diff--advanced   { background: #ede9fe; color: #5b21b6; }

/* No-image tile: show difficulty badge against the placeholder bg */
.farm-tile:not(.farm-tile--has-img) .farm-tile-top {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
}

.farm-tile:not(.farm-tile--has-img) .farm-tile-rates {
  color: #333;
  text-shadow: none;
}

.farm-tile:not(.farm-tile--has-img) .farm-tile-versions {
  color: #555;
  text-shadow: none;
}

.farm-tile-footer {
  padding: 12px 14px;
  background: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.farm-tile-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.cat-tile--item .cat-tile-overlay {
  background: none;
  color: #1a1a1a;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cat-tile-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin-bottom: 8px;
}

.chip-icon {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.mc-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 4px;
}

.mc-icon--sm { width: 24px; height: 24px; }
.mc-icon--xs { width: 18px; height: 18px; }

.farm-tile-rates-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.farm-rate-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.farm-rate-icon {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.farm-rate-value {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.farm-tile:not(.farm-tile--has-img) .farm-rate-value {
  color: #333;
  text-shadow: none;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin-top: 20px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: #666;
}

.modal-close:hover {
  color: #1a1a1a;
  border-color: #c9c2b8;
}

.detail-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.detail-rates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #faf9f5;
  border: 1px solid #f0ece4;
  border-radius: 8px;
  font-size: 0.72rem;
}

.detail-rate-row strong {
  margin-left: auto;
}

.detail-rate-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

/* ===== Dev rates builder ===== */
.rates-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.rates-row {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 8px;
  align-items: start;
}

.rates-item-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-picker .rates-item-picker {
  width: 100%;
}

.category-picker .rate-item-input,
.category-picker #farm-category-input {
  flex: 1;
}

.rate-item-input,
.rate-value-input {
  width: 100%;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
  background: #faf9f5;
}

.rate-item-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rate-item-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.68rem;
  text-align: left;
}

.rate-item-option:hover {
  background: #faf9f5;
}

.rates-add-btn {
  margin-top: 4px;
}

.dev-cat-filter {
  margin: 10px 0 14px;
  height: 42px;
  font-size: 0.72rem;
}

.dev-cat-list {
  max-height: 520px;
  overflow-y: auto;
}

.dev-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-rates-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.farm-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  background: #f3f0ea;
  border-radius: 6px;
  padding: 3px 6px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.farm-tile-desc {
  margin: 0;
  font-size: 0.62rem;
  color: #888;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Farm detail mode ===== */
.farm-detail-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.farm-detail {
  width: min(760px, 100%);
  background: #fff;
  border: 1px solid #ebe8e2;
  border-radius: 16px;
  padding: 24px 28px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0ece4;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.detail-versions,
.detail-dimension {
  font-size: 0.82rem;
  color: #666;
}

.detail-short-desc {
  margin: 0;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.5;
}

.detail-section {
  margin-top: 22px;
}

.detail-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
}

.detail-text {
  margin: 0;
  font-size: 0.92rem;
  color: #333;
  line-height: 1.6;
}

.detail-creator-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #ebe8e2;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.detail-gallery-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ebe8e2;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.55;
}

.detail-list--positive li { color: #166534; }
.detail-list--negative li { color: #b91c1c; }

.detail-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-rates-grid div {
  background: #faf9f5;
  border: 1px solid #f0ece4;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.detail-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaa;
  margin-bottom: 4px;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-link {
  display: inline-block;
  font-size: 0.88rem;
  color: #1a1a1a;
  background: #faf9f5;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  transition: border-color 120ms, box-shadow 120ms;
}

.detail-link:hover {
  border-color: #c9c2b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.detail-link--large {
  word-break: break-all;
}

/* ===== Dev farm details panel ===== */
.farm-details-panel {
  margin-top: 20px;
}

.farm-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-file-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.detail-file-item a {
  color: #333;
}

/* ===== Dev gear (bottom-right) ===== */
.dev-gear {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e8e4dc;
  color: #999;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0.55;
  transition: opacity 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.dev-gear:hover {
  opacity: 1;
  color: #555;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Dev page ===== */
.dev-page {
  min-height: 100vh;
  min-height: 100svh;
  padding: 36px 24px 80px;
  background: #f5f3ef;
}

.dev-dashboard {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Header ===== */
.dash-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.dev-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
}

.dev-note {
  margin: 0;
  font-size: 0.78rem;
  color: #aaa;
}

.dash-status {
  margin: 4px 0 0;
  padding: 9px 14px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #166534;
  font-size: 0.82rem;
  width: fit-content;
}

.dash-status--error {
  background: #fef2f2;
  color: #b91c1c;
}

/* ===== Layout ===== */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.dash-sidebar {
  position: sticky;
  top: 24px;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ===== Card ===== */
.dash-card {
  background: #ffffff;
  border: 1px solid #ebe8e2;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dash-card-header-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

.dash-card-subtitle {
  font-size: 0.82rem;
  color: #888;
}

.dash-card-hint {
  margin: -6px 0 14px;
  font-size: 0.74rem;
  color: #aaa;
  line-height: 1.5;
}

/* ===== Filter tabs ===== */
.dash-filter-tabs {
  display: flex;
  gap: 5px;
}

.filter-tab {
  background: none;
  border: 1px solid #e8e4dc;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-family: inherit;
  cursor: pointer;
  color: #777;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.filter-tab.is-active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.filter-tab:not(.is-active):hover {
  border-color: #c9c2b8;
  color: #333;
}

/* ===== Sidebar search ===== */
.dash-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  background: #faf9f5;
  font-size: 0.78rem;
  font-family: inherit;
  color: #1c1c1c;
  outline: none;
  margin-bottom: 12px;
  transition: border-color 130ms;
}

.dash-search:focus { border-color: #c9c2b8; }

.dev-cat-list {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

/* ===== Lists ===== */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-item {
  border: 1px solid #f0ece4;
  border-radius: 10px;
  padding: 12px 14px;
  background: #faf9f5;
  transition: border-color 120ms;
}

.dash-item--selected {
  border-color: #1a1a1a;
  background: #f4f2ed;
}

.dash-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-select-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  text-transform: lowercase;
  cursor: pointer;
  color: #1a1a1a;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-select-btn:hover { text-decoration: underline; }

.dash-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.dash-item-desc,
.dash-item-meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #999;
}

.dash-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.dash-thumb-wrap {
  position: relative;
  display: inline-block;
}

.dash-thumb-wrap .thumb {
  width: 52px;
  height: 52px;
}

.dash-thumb-wrap .btn-text {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.8rem;
  border: 1px solid #e8e4dc;
}

.dash-group {
  margin-bottom: 14px;
}

.dash-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #bbb;
  padding: 4px 0 8px;
  border-bottom: 1px solid #f0ece4;
  margin-bottom: 8px;
}

.dash-empty,
.dash-muted {
  font-size: 0.82rem;
  color: #ccc;
}

/* ===== Form — shared ===== */
.dash-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #555;
}

.form-label-note {
  font-weight: 400;
  color: #bbb;
  font-size: 0.72rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-family: inherit;
  color: #1c1c1c;
  background: #faf9f5;
  outline: none;
  transition: border-color 130ms;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #c0b8ae;
  background: #fff;
}

.form-field textarea {
  resize: vertical;
  min-height: 68px;
  line-height: 1.55;
}

.form-field input[type="file"] {
  padding: 5px 0;
  background: transparent;
  border: none;
  font-size: 0.8rem;
}

.form-hint {
  font-size: 0.72rem;
  color: #bbb;
}

.form-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.form-image-preview .thumb {
  width: 52px;
  height: 52px;
}

/* ===== Details panel ===== */
.farm-details-panel {
  margin-top: 4px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 8px;
}

.details-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.details-full-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid #f0ece4;
  margin-top: 8px;
}

.form-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bbb;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0ece4;
}

.details-section-sep {
  margin-top: 10px;
}

/* ===== Buttons ===== */
.btn-primary {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 140ms;
}

.btn-primary:hover { background: #333; }

.btn-secondary {
  background: transparent;
  color: #555;
  border: 1px solid #e0dcd5;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 140ms, color 140ms;
}

.btn-secondary:hover { border-color: #c9c2b8; color: #222; }

.btn-ghost {
  background: transparent;
  color: #888;
  border: 1px solid #e8e4dc;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 120ms, color 120ms;
}

.btn-ghost:hover { border-color: #c9c2b8; color: #333; }

.btn-sm {
  padding: 5px 12px;
  font-size: 0.76rem;
}

.btn-text {
  background: none;
  border: none;
  color: #666;
  font-size: 0.76rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 100ms, background 100ms;
}

.btn-text:hover { color: #1a1a1a; background: #f0ece4; }

.btn-danger { color: #b91c1c; }
.btn-danger:hover { color: #7f1d1d; background: #fef2f2; }

.btn-upload { cursor: pointer; }

/* ===== Misc ===== */
.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ebe8e2;
  background: #f5f5f5;
  display: block;
}

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
  margin-bottom: 8px;
}

.back-link:hover { color: #444; text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: static;
  }

  .dev-cat-list {
    max-height: 260px;
  }

  .form-row-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .home-flow {
    padding-top: 8vh;
  }

  .home-flow.step-browse,
  .home-flow.step-category {
    padding-top: 20px;
  }

  .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }

  .ui-tile {
    min-height: 120px;
    padding: 14px 10px 12px;
  }

  .ui-tile-icon {
    width: 40px;
    height: 40px;
  }

  .cat-toolbar {
    gap: 8px;
  }

  .cat-chip {
    flex: 1 1 100%;
    order: -1;
  }

  .filter-dd-trigger {
    height: 42px;
    font-size: 0.68rem;
  }

  .filter-dd-trigger--icon {
    width: 42px;
  }

  .cat-list,
  .farm-tiles {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .farm-detail {
    padding: 18px 16px 24px;
  }

  .detail-rates-grid {
    grid-template-columns: 1fr;
  }

  .form-row-2,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .form-row-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .page { padding: 36px 14px 60px; }
  .farm-tile-image { height: 160px; }
  .dev-page { padding: 20px 14px 48px; }

  .form-row-4 {
    grid-template-columns: 1fr 1fr;
  }
}
