/* Farm UI uses existing application cards and typography. Pixel art stays in canvas. */
#farm { min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.app[data-route="farm"] .header { position: relative; margin-bottom: 4px; padding-bottom: 0; border: 0; background: transparent; backdrop-filter: none; }
.app[data-route="farm"] .header h1::before { content: '🌱'; display: inline-block; margin-right: 14px; font-size: .85em; vertical-align: 3px; }
#farm[hidden] { display: none !important; }
.farm-heading, .farm-scene-heading, .farm-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.farm-heading { margin-bottom: 22px; flex-wrap: wrap; }
.farm-heading p { margin: 0; color: var(--muted, #64748b); }
.farm-year-label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.farm-year-label select { min-width: 78px; min-height: 36px; }
.farm-top-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0; grid-column: 1; grid-row: 1; }
.farm-top-stats .stat-card { min-width: 0; }
.farm-top-stats strong { font-size: 26px; }
.farm-top-stats p { margin: 6px 0 0; color: var(--muted, #64748b); font-size: 13px; }
.farm-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(285px, 3fr); gap: 18px; align-items: start; }
.farm-scene-card { min-width: 0; border: 1px solid #dbe4d8; border-radius: 16px; overflow: hidden; background: #f6faef; }
.farm-scene-heading { padding: 12px 16px; color: #48643a; font-size: 13px; font-weight: 600; }
.farm-scene-heading .button { min-height: 36px; font-size: 12px; }
.farm-canvas-wrap { position: relative; line-height: 0; }
#farmCanvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; image-rendering: pixelated; }
.farm-gain { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #fffbed; color: #48643a; font-size: 18px; font-weight: 700; line-height: 1.4; padding: 8px 14px; border-radius: 12px; box-shadow: 0 3px 12px #354b3220; white-space: nowrap; }
.farm-gain:empty { display: none; }
.farm-empty { margin: 0; padding: 16px 20px 4px; font-size: 14px; color: #48643a; text-align: center; line-height: 1.5; }
.farm-plot-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; padding: 14px; color: #48643a; font-size: 12px; }
.farm-harvest { padding: 22px 18px; grid-column: 2; grid-row: 1 / span 2; }
.farm-harvest h2, .farm-activity h2 { margin: 0; font-size: 16px; }
.farm-crops { display: grid; gap: 10px; margin-top: 18px; }
.farm-crop { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: #f6f8f5; font-size: 13px; }
.farm-crop-icon { font-size: 24px; }
.farm-crop strong { font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.farm-crop-tomatoes { background: #fff2ed; }
.farm-crop-corn { background: #fff9df; }
.farm-crop-potatoes { background: #f5efe6; }
.farm-crop-pumpkins { background: #fff0df; }
.farm-season-stats { margin: 20px 0 0; display: grid; gap: 12px; }
.farm-season-stats > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.farm-season-stats dt { color: var(--muted, #64748b); }
.farm-season-stats dd { margin: 0; font-weight: 600; }
.farm-activity { margin-top: 24px; min-width: 0; border-top: 1px solid var(--border, #e2e8f0); padding-top: 20px; }
.farm-activity-heading { margin-bottom: 14px; font-size: 13px; color: var(--muted, #64748b); }
.farm-heatmap-scroll { overflow-x: auto; padding: 2px 2px 8px; }
.farm-months { position: relative; height: 22px; font-size: 10px; color: var(--muted, #64748b); }
.farm-months span { position: absolute; white-space: nowrap; }
.farm-heatmap { display: grid; grid-template-rows: repeat(7, 12px); gap: 4px; width: max-content; }
.farm-day { display: block; width: 12px; height: 12px; border-radius: 3px; background: #e9eee5; }
.farm-day:focus-visible { outline: 2px solid #304f35; outline-offset: 1px; }
.farm-level-1 { background: #c9dea8; }
.farm-level-2 { background: #9fc875; }
.farm-level-3 { background: #6da350; }
.farm-level-4 { background: #426e36; }
.farm-heatmap-legend { display: flex; gap: 5px; align-items: center; justify-content: flex-end; color: var(--muted, #64748b); font-size: 11px; margin-top: 6px; }
.farm-heatmap-legend span { margin: 0 4px; }
.farm-rules { margin-top: 18px; font-size: 13px; color: var(--muted, #64748b); }
.farm-rules summary { cursor: pointer; min-height: 36px; padding-top: 8px; }
.farm-rules p { margin: 8px 0; line-height: 1.5; }
.farm-year-label { gap: 10px; background: #fff; padding: 0 12px; border: 1px solid #e4e9f0; border-radius: 12px; }
.farm-year-label svg { width: 20px; height: 20px; color: #73849b; }
#farm .farm-year-label select { border: 0; padding-left: 0; box-shadow: none; background: transparent; }
.farm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.farm-scene-card { grid-column: 1; grid-row: 2; }
.farm-top-stats .stat-card { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 16px; min-height: 112px; height: 100%; border-radius: 16px; box-shadow: 0 4px 20px #23375304; }
.farm-summary-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.farm-summary-icon svg { width: 31px; height: 31px; }
.farm-clock { color: #168875; border: 1px solid #c4e6da; background: #edf8f2; }
.farm-fire { background: #fff2e5; font-size: 30px; }
.farm-summary-content { min-width: 0; flex: 1; }
.farm-summary-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; line-height: 1.25; }
#farm .farm-summary-title > span, #farm .farm-summary-title > strong { font-size: 20px; color: #172237; font-weight: 750; }
.farm-summary-title > span::after { content: ':'; }
.farm-summary-title > strong { white-space: nowrap; margin: 0; }
.farm-goal { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
#farm .farm-goal > span { font-size: 11px; color: #748098; white-space: nowrap; }
.farm-goal progress { appearance: none; border: 0; height: 9px; flex: 1; min-width: 36px; width: 70px; border-radius: 6px; overflow: hidden; background: #edf1f5; }
.farm-goal progress::-webkit-progress-bar { background: #edf1f5; border-radius: 6px; }
.farm-goal progress::-webkit-progress-value { background: #449e8e; border-radius: 6px; }
.farm-goal progress::-moz-progress-bar { background: #449e8e; border-radius: 6px; }
#farm .farm-earned { margin-top: 6px; font-size: 11px; }
.farm-streak-flames { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; max-width: 230px; margin-top: 8px; }
#farm .farm-streak-flames span { min-width: 0; font-size: 20px; line-height: 1; text-align: center; filter: grayscale(1); opacity: .24; }
#farm .farm-streak-flames .is-lit { filter: none; opacity: 1; }
.farm-harvest-heading { display: flex; align-items: flex-start; gap: 12px; }
#farm .farm-harvest-icon { flex: 0 0 33px; color: #22864d; }
.farm-harvest-icon svg { width: 30px; height: 30px; stroke-width: 4; }
#farm .farm-harvest h2 { font-size: 20px; line-height: 1.3; }
.farm-harvest-heading p { margin: 6px 0 0; font-size: 13px; color: #7b879d; line-height: 1.5; }
.farm-crops { gap: 8px; margin-top: 16px; }
.farm-crop { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 9px 12px; min-height: 62px; background: #f6f8fa; }
#farm .farm-crop-icon { display: block; width: 40px; height: 40px; image-rendering: pixelated; }
.farm-legend-icon { width: 20px; height: 20px; image-rendering: pixelated; vertical-align: middle; }
#farm .farm-crop-copy > span { font-size: 14px; font-weight: 700; color: #1f2b41; }
.farm-crop-copy small { display: block; font-size: 11px; color: #7b879b; margin-top: 4px; line-height: 1.35; }
#farm .farm-crop strong { font-size: 25px; }
#farm .farm-crop-tomatoes strong { color: #cb3332; }
#farm .farm-crop-corn strong { color: #b68a14; }
#farm .farm-crop-potatoes strong { color: #916036; }
#farm .farm-crop-pumpkins strong { color: #e47c23; }
.farm-season-block { margin-top: 18px; padding: 14px 12px; border-radius: 10px; background: #f8fafb; }
.farm-season-block h3 { margin: 0 0 12px; font-size: 12px; font-weight: 700; color: #637189; }
.farm-season-stats { padding-top: 0; margin-top: 0; gap: 10px; }
#farmPause { min-height: 32px; padding: 5px 10px; font-size: 12px; white-space: nowrap; margin-left: auto; }
#farm .farm-year-label select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 1100px) {
  .farm-layout { grid-template-columns: 1fr; }
  .farm-harvest { grid-column: 1; grid-row: 3; }
  .farm-crops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .farm-season-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (max-width: 540px) {
  .app[data-route="farm"] .header h1::before { margin-right: 8px; }
  .farm-heading { gap: 12px; align-items: flex-start; flex-direction: column; }
  .farm-top-stats { gap: 10px; grid-template-columns: 1fr; }
  .farm-top-stats .stat-card { padding: 12px; min-height: 0; }
  .farm-top-stats strong { font-size: 21px; }
  .farm-top-stats p { font-size: 12px; }
  .farm-scene-heading { padding: 10px; gap: 8px; }
  .farm-scene-heading .button { font-size: 10px; padding: 6px 8px; }
  .farm-harvest { padding: 16px; }
  .farm-crops { grid-template-columns: 1fr; }
  .farm-crop { padding: 9px 12px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; font-size: 12px; }
  .farm-crop-icon { font-size: 20px; }
  .farm-crop strong { font-size: 18px; }
  .farm-season-stats { grid-template-columns: 1fr; }
}
