.farm-office-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-block: 1px solid #ffffff20;
  padding: 18px 0;
  font-size: 12px;
  letter-spacing: 1px;
}
.farm-office-top b {
  display: block;
  font-size: 27px;
  color: #e4bc66;
  margin-top: 8px;
}
.farm-office-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.farm-office-tabs button {
  border: 1px solid #ffffff25;
  background: transparent;
  padding: 12px 15px;
  color: #c5cfb8;
  cursor: pointer;
}
.farm-office-tabs .active {
  color: #14291e;
  background: #e5bc67;
}
.farm-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.farm-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #b8c5ae;
}
.farm-form input,
.farm-form select,
.narration select {
  width: 100%;
  min-height: 44px;
  background: #10261b;
  color: #f0efdc;
  border: 1px solid #ffffff30;
  padding: 12px;
  font: inherit;
}
.farm-form h3,
.form-wide {
  grid-column: 1/-1;
}
.farm-form h3 {
  margin: 14px 0 0;
}
.farm-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.farm-action-row button:disabled,
.farm-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sandbox-note {
  font-size: 12px !important;
  color: #9aaa94 !important;
  line-height: 1.7 !important;
}
.field-overview {
  display: flex;
  gap: 25px;
  align-items: center;
  margin: 30px 0;
}
.field-overview h3 {
  font-size: 28px;
  margin: 10px 0;
}
.field-crop-icon {
  font-size: 70px;
  color: #e1bc6b;
}
.farm-progress {
  height: 5px;
  background: #ffffff15;
}
.farm-progress i {
  height: 100%;
  background: #dfb65e;
  display: block;
}
.farm-metrics,
.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.budget-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.farm-metrics > div,
.budget-summary > div {
  padding: 20px;
  background: #ffffff06;
  border: 1px solid #ffffff13;
}
.farm-metrics small,
.budget-summary small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: #b2bfa5;
}
.farm-metrics b,
.budget-summary b {
  display: block;
  font-size: 28px;
  margin-top: 10px;
  color: #e8d8a7;
}
.budget-summary .negative {
  color: #e8957c;
}
.clock-option,
.narration > label {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.practice-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.practice-chips span {
  border: 1px solid #ffffff20;
  padding: 8px;
  font-size: 12px;
}
#farm-message:empty {
  display: none;
}
#farm-message {
  padding: 15px;
  border: 1px solid #e7bf67;
  color: #e7bf67;
  margin: 20px 0;
}
.farm-ledger {
  width: 100%;
  text-align: left;
  font-size: 12px;
  border-collapse: collapse;
}
.farm-ledger th,
.farm-ledger td {
  padding: 15px 10px;
  border-bottom: 1px solid #ffffff18;
}
.farm-ledger td:nth-child(2) {
  white-space: nowrap;
  color: #e7c57e;
}
.ledger-scroll {
  overflow: auto;
}
.planter-preview {
  --planter: #628a3c;
  background: #ffffff06;
  padding: 35px 20px;
  text-align: center;
  margin-top: 20px;
}
.planter-preview > span {
  font-size: 10px;
  letter-spacing: 3px;
}
.planter-bar {
  height: 20px;
  background: var(--planter);
  margin-top: 30px;
  border-radius: 5px;
}
.planter-rows {
  display: flex;
  justify-content: space-around;
  gap: 2px;
}
.planter-rows i {
  width: 14px;
  height: 28px;
  background: var(--planter);
  border: 3px solid #242923;
  border-radius: 4px;
}
.planter-preview > b {
  display: block;
  letter-spacing: 2px;
  font-size: 12px;
  margin-top: 22px;
}
.hand-character {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 45px;
  color: #e4bd66;
  background: radial-gradient(ellipse, #ffffff0d, transparent);
  padding: 25px;
}
.hand-character span {
  font-size: 100px;
}
.hand-advice,
.hand-joke {
  padding: 25px;
  margin: 18px 0;
  border: 1px solid #ffffff20;
  background: #ffffff05;
}
.hand-joke {
  border-color: #e4bd6640;
}
.hand-joke .eyebrow {
  color: #e4bd66;
}
.narration {
  background: #ffffff06;
  border: 1px solid #ffffff20;
  padding: 18px;
  margin: 20px 0;
}
.narration-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.narration-options {
  display: flex;
  gap: 15px;
  margin: 15px 0;
}
.narration-options label {
  font-size: 12px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.narration-options select {
  font-size: 12px;
}
.narration small {
  display: block;
  color: #c5cfb8;
  font-size: 12px;
  line-height: 1.6;
}
.farm-quick-actions {
  position: absolute;
  left: 36px;
  top: 125px;
  z-index: 5;
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 360px;
}
.playing .farm-quick-actions {
  display: flex;
}
.farm-quick-actions button {
  background: #12281ee8;
  color: #e3dfc6;
  border: 1px solid #c8c9a345;
  padding: 10px 13px;
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
}
.farm-quick-actions button:hover {
  border-color: #e4bd66;
}
.library-mode .farm-quick-actions {
  display: none;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid #edc776;
  outline-offset: 4px;
}
details {
  font-size: 13px;
  line-height: 1.7;
  margin: 20px 0;
}
summary {
  cursor: pointer;
  color: #e0c17f;
}
@media (max-width: 700px) {
  .farm-form {
    grid-template-columns: 1fr;
  }
  .farm-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .farm-metrics > div:last-child {
    grid-column: 1/-1;
  }
  .farm-quick-actions {
    top: 105px;
    left: 18px;
    right: 18px;
    max-width: none;
  }
  .farm-quick-actions button {
    font-size: 9px;
    padding: 8px;
  }
  .farm-office-tabs button {
    font-size: 11px;
    padding: 10px;
  }
  .farm-office-top {
    font-size: 10px;
  }
  .farm-office-top b {
    font-size: 23px;
  }
  .budget-summary b {
    font-size: 22px;
  }
  .budget-summary > div {
    padding: 14px;
  }
  .narration-options {
    flex-direction: column;
  }
  .field-overview {
    gap: 15px;
  }
  .field-overview h3 {
    font-size: 23px;
  }
  .farm-action-row button {
    flex: 1 1 auto;
  }
  .farm-form h3 {
    grid-column: 1;
  }
  .narration-buttons button {
    width: 100%;
  }
}
/* Keep management destinations clear of the quiz card and cinematic. */
.farm-quick-actions {
  left: 350px;
  right: 260px;
  top: 77px;
  max-width: 600px;
  z-index: 4;
}
body.entering .farm-quick-actions {
  opacity: 0;
  pointer-events: none;
}
@media (min-width: 701px) and (max-width: 1100px) {
  .farm-quick-actions {
    left: 310px;
    right: 220px;
  }
}
@media (max-width: 700px) {
  .farm-quick-actions {
    left: 14px;
    right: 70px;
    top: 320px;
    max-width: none;
  }
  .farm-quick-actions button {
    min-height: 36px;
  }
}
.modal:has(#farm-office) {
  background: #14291e;
  color: #f5f3ea;
}
.modal:has(#farm-office) h2,
.modal:has(#farm-office) h3 {
  color: #f5f3ea;
}
.modal:has(#farm-office) p {
  color: #c2cfb8;
}
.modal:has(#farm-office) .eyebrow {
  color: #e4bc66;
}
.modal:has(#farm-office) .notice {
  background: #ffffff08;
  border-color: #ffffff20;
  color: #c9d2bf;
}
.modal:has(#farm-office) a {
  color: #e4bc66;
}
.modal:has(#farm-office) .secondary {
  color: #e5ddbd;
  border-color: #ffffff30;
  background: transparent;
}
.narration {
  background: #e9ecdf;
  border-color: #a3af95;
}
.narration small {
  color: #4e6347;
}
.narration-options label {
  color: #31543b;
}
@media (max-width: 700px) {
  .farm-quick-actions {
    top: 280px;
    left: 14px;
    right: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .farm-quick-actions button {
    flex: 0 0 auto;
    min-height: 36px;
  }
}

/* ---------------------------------------------------------------- Proving Ground farm: clock HUD
   A compact chip in the top bar (it used to float over the 3D world and covered item cards).
   Full place, weather and clock status are in its tooltip and accessible label. */
.farm-clock {
  display: none;
  flex: 0 1 auto;
  min-width: 0;
  margin-right: 10px;
}
.playing .farm-clock {
  display: block;
}
.library-mode .farm-clock,
.talent-mode .farm-clock,
.farm-mode .farm-clock {
  display: none;
}
.farm-clock-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  text-align: left;
  background: #ffffff0d;
  border: 1px solid #ffffff30;
  border-radius: 22px;
  color: #f0efdc;
  padding: 5px 14px 5px 10px;
  cursor: pointer;
  line-height: 1.2;
}
.farm-clock-btn:hover,
.farm-clock-btn:focus-visible {
  border-color: var(--lime);
}
.fc-icon {
  font-size: 18px;
  flex: none;
}
.fc-main {
  display: grid;
  min-width: 0;
}
.fc-main b {
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-temp {
  color: var(--lime);
}
.fc-sub {
  color: #c5cfb8;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.fc-sub.live {
  color: #9fd38b;
}
.fc-sub.paused {
  color: #e4bc66;
}
@media (max-width: 1320px) {
  .fc-sub {
    display: none;
  }
}
@media (max-width: 1100px) {
  .fc-when {
    display: none;
  }
  .farm-clock-btn {
    padding: 5px 11px 5px 8px;
    gap: 6px;
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  /* Keep the call to action short beside the navigation. */
  .farm-clock-cta .fc-main b {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .farm-clock {
    margin-right: 6px;
  }
  .farm-clock-btn {
    padding: 4px 9px 4px 7px;
  }
  .fc-icon {
    font-size: 15px;
  }
  .farm-clock-cta .fc-main {
    display: none;
  }
}

/* ---------------------------------------------------------------- farm office */
.farm-office-top small {
  display: block;
  margin-top: 4px;
  color: #b8c5ae;
  letter-spacing: 0;
}
.negative {
  color: #f08c7a !important;
}
.season-over {
  border: 1px solid #e4bc66;
  padding: 14px;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.field-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.field-picker button {
  background: transparent;
  border: 1px dashed #ffffff35;
  color: #c5cfb8;
  padding: 8px 12px;
  cursor: pointer;
}
.field-picker .active {
  border-style: solid;
  border-color: #e4bc66;
  color: #f0efdc;
}
.inline-search {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-search input,
.inline-search select {
  min-height: 40px;
  background: #10261b;
  color: #f0efdc;
  border: 1px solid #ffffff30;
  padding: 8px 10px;
  font: inherit;
  flex: 1 1 120px;
  min-width: 0;
}
.choice.selected {
  border-color: #e4bc66;
  background: #e4bc6620;
}
.plain-list {
  padding-left: 18px;
  line-height: 1.7;
}
.farm-alerts {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
  margin: 14px 0;
}
.farm-alerts li {
  padding: 8px 12px;
  border-left: 3px solid #9fd38b;
  background: #ffffff08;
  font-size: 13px;
}
.farm-alerts .warn {
  border-color: #e4bc66;
}
.farm-alerts .bad {
  border-color: #e0614f;
}
.forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.forecast > div {
  display: grid;
  gap: 3px;
  border: 1px solid #ffffff20;
  padding: 10px;
  font-size: 12px;
  color: #c5cfb8;
}
.forecast b {
  color: #f0efdc;
  font-size: 16px;
}
.sample-grid,
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.sample-grid .choice {
  display: grid;
  gap: 4px;
  text-align: left;
}
.sample-grid .choice span {
  font-size: 12px;
  color: #b8c5ae;
}
.store-item {
  border: 1px solid #ffffff20;
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.store-item p {
  margin: 0;
  font-size: 12px;
  color: #c5cfb8;
}
.store-item small {
  color: #b8c5ae;
}
.sponsor-tag {
  justify-self: start;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 2px 6px;
  background: #e4bc66;
  color: #14291e;
}
.lab-card {
  border: 1px solid #ffffff20;
  padding: 12px;
  margin: 10px 0;
}
.lab-card.pending {
  color: #c5cfb8;
  border-style: dashed;
}
.rating-deficient {
  color: #f08c7a;
}
.rating-low {
  color: #e4bc66;
}
.rating-high {
  color: #8fc3e6;
}
.rating-sufficient {
  color: #9fd38b;
}
.farm-ledger small {
  display: block;
  color: #b8c5ae;
  font-size: 11px;
}
.market-crop {
  margin: 18px 0;
}
.market-crop h3 small {
  font-weight: normal;
  color: #b8c5ae;
}
.mix-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 90px auto auto 34px 34px;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
}
.mix-row select,
.mix-row input {
  min-height: 38px;
  background: #10261b;
  color: #f0efdc;
  border: 1px solid #ffffff30;
  padding: 6px;
  font: inherit;
  min-width: 0;
}
.mix-row small {
  color: #b8c5ae;
}
.mix-order {
  color: #e4bc66;
  font-weight: bold;
}
.icon-btn {
  background: transparent;
  border: 1px solid #ffffff30;
  color: #f0efdc;
  min-height: 38px;
  cursor: pointer;
}
@media (max-width: 700px) {
  .mix-row {
    grid-template-columns: 24px 1fr 80px;
  }
  .forecast {
    grid-template-columns: 1fr;
  }
}
.app-report-body {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.coverage-map {
  width: 176px;
  height: 176px;
  image-rendering: pixelated;
  border: 1px solid #ffffff30;
}
.legend {
  font-size: 11px;
  color: #c5cfb8;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px 0 8px;
  vertical-align: middle;
}
.journal {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  font-size: 13px;
}
.journal small {
  display: block;
  color: #b8c5ae;
}
.two-col-farm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.harvest-night {
  border: 1px solid #e4bc6655;
  background: linear-gradient(160deg, #1d3a28, #10231a);
  padding: 18px;
  margin: 14px 0;
}
.loss-bars {
  display: grid;
  gap: 6px;
}
.loss-bars div {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.loss-bars i {
  display: block;
  height: 10px;
  background: #e0614f;
  border-radius: 2px;
}

/* ---------------------------------------------------------------- application pass */
.flight {
  display: grid;
  gap: 10px;
}
.flight-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.flight-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #c5cfb8;
  max-width: 420px;
}
.flight-hud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 1px;
  color: #c5cfb8;
}
.flight-hud b {
  display: block;
  color: #f0efdc;
  font-size: 15px;
}
.flight-hud b.on {
  color: #7cc4ff;
}
.flight-hud .warn {
  color: #e4bc66;
}
#flight-canvas {
  display: block;
  width: min(620px, 100%);
  aspect-ratio: 1;
  border: 1px solid #ffffff30;
  touch-action: none;
}
.flight-pad {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.flight-pad button {
  min-width: 52px;
  min-height: 48px;
  background: #10261b;
  border: 1px solid #ffffff35;
  color: #f0efdc;
  font-size: 18px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.flight-pad .primary {
  font-size: 12px;
  letter-spacing: 1px;
  background: #e5bc67;
  color: #14291e;
}
.flight-pad [data-toggle='auto'] {
  font-size: 12px;
  letter-spacing: 1px;
}
.flight-pad [data-toggle='auto'].active {
  background: #4f9a49;
  border-color: #7cc46f;
}

.flight-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lightbar {
  display: inline-flex;
  gap: 3px;
  padding: 5px 7px;
  background: #0b140f;
  border: 1px solid #ffffff30;
  border-radius: 4px;
}
.lightbar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #26332b;
}
.lightbar i.on {
  background: #f2b33d;
  box-shadow: 0 0 6px #f2b33d;
}
.lightbar i.on.bad {
  background: #e0614f;
  box-shadow: 0 0 6px #e0614f;
}
.lightbar i.on.good {
  background: #5fd16a;
  box-shadow: 0 0 6px #5fd16a;
}
.lightbar-text {
  font-size: 11px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  min-width: 190px;
}
.flight-views {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}
.flight-views button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  letter-spacing: 1px;
}
.flight-views button.active {
  background: #e5bc67;
  color: #14291e;
  border-color: #e5bc67;
}
.flight-stage {
  position: relative;
  width: 100%;
}
.flight-stage[data-view='map'] .flight-3d {
  display: none;
}
.flight-3d-canvas {
  display: block;
  border: 1px solid #ffffff30;
  touch-action: none;
}
.flight-stage[data-view='3d'] #flight-canvas {
  position: absolute;
  top: 10px;
  right: 10px;
  width: min(26%, 190px);
  border-radius: 4px;
  box-shadow: 0 2px 10px #0008;
  opacity: 0.92;
  pointer-events: none;
}
.flight-alert {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  display: grid;
  gap: 4px;
  pointer-events: none;
  text-align: center;
}
.flight-alert span {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  background: #0b140fd9;
  color: #f2d16b;
}
.flight-alert span.bad {
  color: #fff;
  background: #a8231bdd;
  animation: flight-blink 0.7s steps(2) infinite;
}
@keyframes flight-blink {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flight-alert span.bad {
    animation: none;
  }
}
html[data-motion='calm'] .flight-alert span.bad {
  animation: none;
}
.flight-crash {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: #2a0d0add;
  color: #fff;
}
.flight-crash b {
  font-size: 26px;
  letter-spacing: 3px;
}
.flight-crash p {
  max-width: 460px;
  margin: 0 auto;
}
.flight-crash[hidden],
.flight-alert[hidden] {
  display: none;
}

/* ================================================================== full-screen farm office */

body.farm-mode #world {
  display: none;
}
#farm-hub {
  background: #eef0e6;
  color: var(--forest);
  min-height: calc(100svh - 88px);
}
body.farm-mode .header {
  position: sticky;
  top: 0;
  z-index: 12;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fh {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100svh - 88px);
}
.fh-side {
  background: var(--forest);
  color: var(--paper);
  padding: 18px 14px;
  position: sticky;
  top: 88px;
  height: calc(100svh - 88px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fh-back {
  background: none;
  border: 1px solid #ffffff30;
  color: var(--paper);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.fh-solo .fh-back {
  color: var(--forest);
  border: 0;
  padding: 0;
  margin-bottom: 14px;
}
.fh-back:hover,
.fh-back:focus-visible {
  background: #ffffff14;
}
.fh-farm {
  display: grid;
  gap: 2px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid #ffffff1f;
}
.fh-farm .eyebrow {
  color: var(--lime);
}
.fh-farm small {
  color: var(--muted);
}
.fh-nav-group {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}
.fh-nav-group > span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px;
}
.fh-nav-group button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.fh-nav-group button i {
  font-style: normal;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}
.fh-nav-group button kbd {
  margin-left: auto;
  font:
    11px/1 ui-monospace,
    monospace;
  color: var(--muted);
  border: 1px solid #ffffff26;
  border-radius: 4px;
  padding: 2px 5px;
}
.fh-nav-group button:hover,
.fh-nav-group button:focus-visible {
  background: #ffffff12;
}
.fh-nav-group button.active {
  background: var(--paper);
  color: var(--forest);
  font-weight: 700;
}
.fh-nav-group button.active kbd {
  color: var(--green);
  border-color: #14291e30;
}
.fh-keys {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.fh-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #b3261e;
  color: #fff;
  font:
    700 11px/18px Barlow,
    Arial,
    sans-serif;
  text-align: center;
}
.fh-badge[hidden] {
  display: none;
}
.fh-main {
  padding: 18px 28px 40px;
  min-width: 0;
}
.fh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #14291e1a;
}
.fh-crumb {
  font-size: 13px;
  color: #4d5f52;
}
.fh-top-stats {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.fh-top-stats > span {
  display: grid;
  line-height: 1.25;
}
.fh-top-stats small {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5c6d60;
}
.fh-top-stats b {
  font-size: 15px;
}
.fh-top-stats em {
  font-style: normal;
  font-size: 12px;
  color: #5c6d60;
}
.fh-top-stats em.live {
  color: #1f7a3a;
}
.fh-bell,
.alert-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #14291e26;
  background: #fff;
  color: var(--forest);
  font-size: 18px;
  cursor: pointer;
}
.alert-bell {
  background: transparent;
  color: var(--paper);
  border-color: #ffffff30;
  margin-right: 8px;
  flex: none;
}
.fh-bell .fh-badge,
.alert-bell .fh-badge {
  position: absolute;
  top: -4px;
  right: -6px;
}
.fh-title {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 30px;
  letter-spacing: 0.01em;
  margin: 8px 0 10px;
  outline: none;
}
#farm-message:empty {
  display: none;
}
#farm-message {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e2ead9;
}
#farm-message.error {
  background: #f8e1de;
  color: #7a1c15;
}
#farm-message.working {
  background: #fff3d6;
}
#farm-office[aria-busy='true'] #office-panel {
  opacity: 0.6;
  transition: opacity 0.2s;
}

/* season timeline */
.fh-timeline {
  --tl-label: 92px;
  position: relative;
  margin: 14px 0 4px;
  padding: 18px 12px 8px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #14291e14;
  font-size: 12px;
}
.tl-months {
  position: absolute;
  top: 4px;
  left: calc(12px + var(--tl-label));
  right: 12px;
  height: 14px;
}
.tl-months span {
  position: absolute;
  color: #5c6d60;
  transform: translateX(2px);
}
.tl-row {
  display: grid;
  grid-template-columns: var(--tl-label) 1fr;
  align-items: center;
  height: 22px;
}
.tl-label {
  color: #4d5f52;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-track {
  position: relative;
  height: 14px;
  background: repeating-linear-gradient(90deg, #14291e0d 0 1px, transparent 1px 9.5%);
  border-radius: 4px;
}
.tl-crop {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 4px;
  background: #5e9a4a;
  border-radius: 4px;
  overflow: hidden;
}
.tl-crop span {
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
  line-height: 14px;
  white-space: nowrap;
}
.tl-empty {
  color: #8a978c;
  font-size: 11px;
  padding-left: 4px;
}
.tl-app {
  position: absolute;
  top: 3px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #2a78d6;
  box-shadow: 0 0 0 2px #fff;
}
.tl-due {
  position: absolute;
  top: -2px;
  margin-left: -6px;
  font-style: normal;
  color: #b26a00;
  font-weight: 700;
}
.tl-today {
  position: absolute;
  top: 16px;
  bottom: 4px;
  width: 2px;
  background: #b3261e;
}
.tl-today span {
  position: absolute;
  top: -14px;
  left: 4px;
  font:
    700 9px/1 Barlow,
    Arial,
    sans-serif;
  color: #b3261e;
  letter-spacing: 0.1em;
}

/* cards, KPIs, grids */
.fh-card {
  background: #fff;
  border: 1px solid #14291e14;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 14px 0;
}
.fh-card h3 {
  margin: 0 0 10px;
}
.fh-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fh-card-head h3 {
  margin: 0;
}
.fh-card-head small {
  color: #5c6d60;
}
.fh-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fh-grid-2 > .fh-card {
  margin: 0;
}
.fh-grid-2 + .fh-card,
.fh-card + .fh-grid-2 {
  margin-top: 14px;
}
.fh-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.fh-kpis-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fh-kpi {
  background: #fff;
  border: 1px solid #14291e14;
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.fh-card .fh-kpi {
  background: #f5f6f0;
}
.fh-kpi small {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5c6d60;
}
.fh-kpi b {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 26px;
  line-height: 1.1;
}
.fh-kpi span {
  font-size: 12px;
  color: #5c6d60;
}
.fh-kpi.neg b,
.negative {
  color: #b3261e;
}
.fh-kpi.pos b,
.positive {
  color: #1f7a3a;
}
.fh-seg {
  display: inline-flex;
  gap: 2px;
  background: #e6e9dd;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.fh-seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--forest);
}
.fh-seg button.active {
  background: #fff;
  font-weight: 700;
  box-shadow: 0 1px 3px #0002;
}
.fh-seg-big {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.fh-seg-big button {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 14px;
}
.fh-seg-big small {
  color: #5c6d60;
}
.fh-seg button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fh-empty {
  color: #5c6d60;
  font-style: italic;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll .farm-ledger {
  min-width: 560px;
}

/* field map */
.fh-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.fh-tile {
  display: grid;
  gap: 6px;
  text-align: left;
  min-height: 118px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  font: inherit;
  cursor: pointer;
  color: var(--forest);
  background: #eef4e6;
}
.fh-tile.selected {
  border-color: var(--forest);
}
.fh-tile:hover,
.fh-tile:focus-visible {
  border-color: #14291e80;
}
.fh-tile.seq-1 {
  background: #d3e6c4;
}
.fh-tile.seq-2 {
  background: #b2d39c;
}
.fh-tile.seq-3 {
  background: #86b86c;
}
.fh-tile.seq-4 {
  background: #5e9a4a;
  color: #fff;
}
.fh-tile.seq-5 {
  background: #3f7a35;
  color: #fff;
}
.fh-tile-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.fh-tile-top small,
.fh-tile-foot {
  font-size: 12px;
  opacity: 0.85;
}
.fh-tile-crop {
  font-weight: 600;
  font-size: 13px;
}
.fh-tile-bar {
  height: 4px;
  background: #ffffff80;
  border-radius: 2px;
  overflow: hidden;
}
.fh-tile-bar i {
  display: block;
  height: 100%;
  background: var(--forest);
}
.fh-tile-foot em {
  font-style: normal;
  font-weight: 700;
  background: #fff;
  color: #7a1c15;
  border-radius: 4px;
  padding: 0 4px;
}
.fh-tile-foot em.warn {
  color: #7a4a00;
}
.fh-tile-add {
  background: #fff;
  border: 2px dashed #14291e33;
  place-content: center;
  text-align: center;
}
.fh-legend-note {
  font-size: 12px;
  color: #5c6d60;
  margin: 8px 0 0;
}

/* alerts and status (always icon + label, never colour alone) */
.fh-alerts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.fh-alerts li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f6f0;
  border-left: 3px solid #2a5a8a;
}
.fh-alerts li.bad {
  border-color: #b3261e;
  background: #fbefed;
}
.fh-alerts li.warn {
  border-color: #b26a00;
  background: #fdf5e6;
}
.fh-alerts li.good {
  border-color: #1f7a3a;
  background: #edf6ee;
}
.fh-alert-icon {
  font-weight: 700;
  text-align: center;
}
.fh-status {
  padding: 10px 14px;
  border-radius: 8px;
  background: #edf6ee;
  border-left: 3px solid #1f7a3a;
}
.fh-status.warn {
  background: #fdf5e6;
  border-color: #b26a00;
}
.fh-status.bad {
  background: #fbefed;
  border-color: #b3261e;
}
.fh-restructure {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  background: #fbefed;
  border-radius: 8px;
}
button.danger {
  background: #b3261e;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 11px 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.journal li.unread {
  background: #fff8e3;
}

/* guided first season */
.fh-tour {
  border-color: #e4b86099;
  background: #fffdf5;
}
.fh-steps {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 18px;
}
.fh-steps li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: #5c6d60;
}
.fh-steps li.done {
  color: #1f7a3a;
  text-decoration: line-through;
}
.fh-steps li.next {
  color: var(--forest);
  font-weight: 700;
}

/* charts */
.fh-chart-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.fh-chart {
  margin: 0;
  min-width: 0;
}
.fh-chart figcaption {
  display: grid;
  margin-bottom: 4px;
}
.fh-chart figcaption small {
  color: #5c6d60;
  font-size: 12px;
}
.fh-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #3a4b3f;
  margin-bottom: 2px;
}
.fh-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}
.fh-chart-plot {
  position: relative;
}
.fh-chart-plot svg {
  display: block;
  overflow: visible;
}
.fh-chart-plot .grid {
  stroke: #14291e14;
}
.fh-chart-plot .tick {
  font-size: 10px;
  fill: #6b7a6e;
}
.fh-chart-plot .end-label {
  font-size: 11px;
  fill: #3a4b3f;
}
.fh-chart-plot .cross {
  stroke: #14291e55;
  stroke-dasharray: 3 3;
}
.fh-chart-plot .dot {
  stroke: #fff;
  stroke-width: 2;
}
.fh-chart-empty {
  color: #8a978c;
  font-size: 13px;
  padding-top: 40px;
  text-align: center;
}
.fh-tip {
  position: absolute;
  top: 4px;
  pointer-events: none;
  background: var(--forest);
  color: var(--paper);
  font-size: 12px;
  border-radius: 6px;
  padding: 6px 9px;
  display: grid;
  gap: 2px;
  white-space: nowrap;
  box-shadow: 0 6px 18px #0003;
}
.fh-tip[hidden] {
  display: none;
}
.fh-tip i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
}
.fh-chart-table summary {
  font-size: 12px;
  color: #4d5f52;
  cursor: pointer;
  margin-top: 4px;
}
.fh-chart-table .ledger-scroll {
  max-height: 220px;
}
.fh-spend > div i {
  background: #2a78d6;
}
.fh-whatif td,
.fh-whatif th {
  text-align: right;
  white-space: nowrap;
}
.fh-machine.owned {
  border-color: #3f7a3555;
  background: #f3f8ef;
}

/* signed-out / loading */
.fh-solo {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.fh-skeleton {
  display: grid;
  gap: 10px;
}
.fh-skeleton i {
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e3e6da, #f2f3ec, #e3e6da);
  background-size: 200% 100%;
  animation: fh-shimmer 1.4s linear infinite;
}
@keyframes fh-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* in-game confirmation */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0b1610b3;
  display: grid;
  place-items: center;
  padding: 18px;
}
.confirm-box {
  background: var(--paper);
  color: var(--forest);
  border-radius: 12px;
  padding: 24px 26px;
  width: min(460px, 100%);
  box-shadow: 0 30px 80px #0006;
}
.confirm-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
}
.confirm-details {
  margin: 14px 0;
  display: grid;
  gap: 6px;
}
.confirm-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #14291e14;
  padding-bottom: 6px;
}
.confirm-details dt {
  color: #5c6d60;
}
.confirm-details dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* world screen: lighter quick actions and the real-farm dock */
.farm-quick-actions .qa-primary {
  background: var(--lime);
  color: var(--forest);
  font-weight: 700;
}
.dock-next b {
  display: block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .fh-skeleton i {
    animation: none;
  }
}
@media (max-width: 900px) {
  .fh {
    grid-template-columns: 1fr;
  }
  .fh-side {
    position: sticky;
    top: 70px;
    z-index: 4;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 8px 10px;
    gap: 8px;
  }
  .fh-farm,
  .fh-keys,
  .fh-nav-group > span,
  .fh-nav-group button kbd {
    display: none;
  }
  .fh-side nav {
    display: flex;
    gap: 4px;
  }
  .fh-nav-group {
    display: flex;
    gap: 4px;
    margin: 0;
  }
  .fh-nav-group button,
  .fh-back {
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 13px;
  }
  .fh-main {
    padding: 12px 14px 32px;
  }
  .fh-grid-2,
  .fh-kpis-3 {
    grid-template-columns: 1fr;
  }
  .fh-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fh-top-stats {
    gap: 12px;
  }
  .fh-timeline {
    --tl-label: 62px;
  }
  .farm-ledger {
    font-size: 13px;
  }
  .alert-bell {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .fh-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* field conditions, custom bookings, prevented planting */
.tl-job {
  position: absolute;
  top: -3px;
  margin-left: -6px;
  font-style: normal;
  font-weight: 700;
  color: #6b4a2b;
}
.fh-jobs {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.fh-jobs li {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4efe6;
  border-left: 3px solid #6b4a2b;
}
.fh-pp {
  margin-top: 12px;
}
.fh-pp h4 {
  margin: 0 0 6px;
}
.market-crop .inline-search select {
  max-width: 9.5em;
}

/* Machine tiers, water & drainage, heat units */
.fh-seg button b,
.fh-seg button small {
  display: block;
}
.fh-seg button small {
  font-size: 11px;
  opacity: 0.8;
}
.fh-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  margin: 6px 0;
  cursor: pointer;
}
.fh-check input {
  margin-top: 3px;
}
.fh-machine .plain-list {
  font-size: 13px;
  margin: 6px 0;
}
.farm-ledger tr.fh-row-current td {
  font-weight: 700;
}

/* ---------------------------------------------------------------- touch pad (application pass) */
.flight-pad {
  justify-content: space-between;
  align-items: stretch;
}
.pad-cluster {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pad-mid {
  justify-content: center;
}
.flight-pad button {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.flight-pad button.held {
  background: #2a5a3c;
  border-color: #e5bc67;
}
.flight-pad .primary.spraying {
  background: #4f9a49;
  color: #fff;
}
.flight-touch-note {
  display: none;
}
@media (pointer: coarse) {
  .flight-pad button {
    min-width: 64px;
    min-height: 60px;
    font-size: 22px;
  }
  .pad-steer button {
    min-width: 78px;
  }
  .flight-pad .primary,
  .flight-pad [data-toggle='auto'] {
    font-size: 14px;
    min-width: 96px;
  }
  .flight-touch-note {
    display: block;
  }
}
.flight-stick {
  position: absolute;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  border: 2px solid #ffffff55;
  background: #0b140f40;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.flight-stick[hidden] {
  display: none;
}
.flight-stick i {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5bc67cc;
  box-shadow: 0 2px 8px #0008;
}
.flight-stage {
  touch-action: none;
}
/* Full screen: the view fills the screen with the HUD on top and the pad along the bottom. */
.flight.flight-full {
  background: #0b140f;
  padding: 8px;
  overflow: auto;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
}
.flight.flight-full > .sandbox-note,
.flight.flight-full .flight-head p {
  display: none;
}
.flight.flight-full #flight-canvas,
.flight.flight-full .flight-3d-canvas {
  max-height: calc(100vh - 210px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
.flight.flight-full .flight-pad {
  position: sticky;
  bottom: 0;
  background: #0b140fe6;
  padding: 6px 0;
}

/* ---------------------------------------------------------------- as-applied map and replay */
.aa-box {
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px 20px;
}
.aa-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.aa-head h3 {
  margin: 2px 0 4px;
}
.aa-stage {
  position: relative;
  margin: 10px 0 8px;
}
.aa-stage canvas {
  display: block;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 6px;
}
.aa-readout {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #0b140fd9;
  color: #f0efdc;
  font-size: 12px;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.aa-readout:empty {
  display: none;
}
.aa-readout .aa-on {
  color: #f2d16b;
  font-weight: 700;
}
.aa-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aa-controls input[type='range'] {
  flex: 1 1 160px;
  min-height: 32px;
}
.aa-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.aa-time {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  min-width: 82px;
}
.aa-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  column-gap: 16px;
}

/* ---------------------------------------------------------------- spray records */
.spray-records td {
  vertical-align: top;
}
.spray-records td small + small,
.spray-records td small {
  margin-bottom: 2px;
}
.spray-replay {
  display: block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 11px;
}
@media print {
  body.farm-mode * {
    visibility: hidden;
  }
  body.farm-mode .spray-record-card,
  body.farm-mode .spray-record-card * {
    visibility: visible;
    color: #000 !important;
  }
  body.farm-mode .spray-record-card {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
  }
  .spray-record-card .no-print,
  .spray-replay {
    display: none !important;
  }
}

/* farm coach: Tips button, next-step hint and the coach panel */
.fh-tips {
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid var(--fh-line-strong);
  background: var(--fh-accent-soft);
  color: var(--fh-ink);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.fh-tips:hover {
  border-color: var(--fh-accent-ink);
}
.coach-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--fh-surface);
  color: var(--fh-ink);
  border: 1px solid var(--fh-line);
  border-left: 4px solid var(--fh-info);
  box-shadow: var(--fh-shadow);
}
.coach-hint.coach-now {
  border-left-color: var(--fh-warn);
}
.coach-hint-text {
  flex: 1 1 260px;
}
.coach-hint-actions,
.coach-tip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.coach-hint-actions button,
.coach-tip-actions button {
  padding: 6px 12px;
  font-size: 12px;
}
.coach-hint-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--fh-info-bg);
  color: var(--fh-info);
}
.coach-now .coach-hint-badge {
  background: var(--fh-warn-bg);
  color: var(--fh-warn);
}
.coach-idea .coach-hint-badge {
  background: var(--fh-fair-bg);
  color: var(--fh-fair);
}
.coach-setup {
  margin: 0 0 14px;
}
.coach {
  position: fixed;
  top: 96px;
  right: 16px;
  bottom: 16px;
  width: min(410px, calc(100vw - 32px));
  z-index: 25;
  display: flex;
}
.coach-body {
  flex: 1;
  overflow-y: auto;
  background: var(--fh-surface);
  color: var(--fh-ink);
  border: 1px solid var(--fh-line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px #0004;
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.coach-pill {
  display: none;
}
.coach.min {
  top: auto;
  bottom: 16px;
  width: auto;
}
.coach.min .coach-body {
  display: none;
}
.coach.min .coach-pill {
  display: block;
  padding: 10px 16px;
  border-radius: 22px;
  border: 1px solid var(--fh-line-strong);
  background: var(--fh-surface);
  color: var(--fh-ink);
  font-weight: 800;
  box-shadow: 0 10px 30px #0004;
  cursor: pointer;
}
.coach-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.coach-head h3 {
  margin: 2px 0 0;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 26px;
}
.coach-head .eyebrow {
  color: var(--fh-good);
}
.coach-close {
  border: 0;
  background: transparent;
  color: var(--fh-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.coach h4 {
  margin: 0 0 8px;
  font-size: 15px;
}
.coach-level {
  display: flex;
  border: 1px solid var(--fh-line-strong);
  border-radius: 8px;
  overflow: hidden;
}
.coach-level button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--fh-ink);
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.coach-level button + button {
  border-left: 1px solid var(--fh-line);
}
.coach-level button.active {
  background: var(--fh-accent-soft);
  box-shadow: inset 0 -3px 0 var(--fh-accent-ink);
}
.coach-tips,
.coach-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.coach-tip {
  border: 1px solid var(--fh-line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--fh-surface-2);
  display: grid;
  gap: 6px;
  justify-items: start;
}
.coach-tip p {
  margin: 0;
  color: var(--fh-muted);
  font-size: 13px;
  line-height: 1.45;
}
.coach-card {
  border: 2px solid var(--fh-accent-ink);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--fh-surface);
  display: grid;
  gap: 8px;
}
.coach-card h4 {
  margin: 0;
  font-size: 17px;
}
.coach-q {
  margin: 0;
  font-style: italic;
  color: var(--fh-muted);
}
.coach-source,
.coach-note,
.coach-ask small {
  color: var(--fh-faint);
  font-size: 12px;
}
.coach-steps {
  counter-reset: step;
}
.coach-steps li {
  counter-increment: step;
  display: grid;
  gap: 2px;
  padding-left: 30px;
  position: relative;
}
.coach-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fh-good-bg);
  color: var(--fh-good);
  font-weight: 800;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.coach-steps label {
  display: flex;
  gap: 8px;
  align-items: start;
  line-height: 1.45;
  cursor: pointer;
}
.coach-steps input {
  margin-top: 4px;
}
.coach-steps li.done span {
  text-decoration: line-through;
  color: var(--fh-faint);
}
.coach-steps .text-link {
  justify-self: start;
  font-size: 12px;
  margin-left: 22px;
}
.coach-tipline {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--fh-good-bg);
  color: var(--fh-good);
  font-size: 13px;
}
.coach-loading {
  margin: 0;
  color: var(--fh-muted);
  animation: coach-pulse 1.4s ease-in-out infinite;
}
@keyframes coach-pulse {
  50% {
    opacity: 0.45;
  }
}
.coach-ask {
  display: grid;
  gap: 6px;
}
.coach-ask label {
  display: grid;
  gap: 2px;
}
.coach-ask-row {
  display: flex;
  gap: 6px;
}
.coach-ask-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--fh-line-strong);
  background: var(--fh-input);
  color: var(--fh-ink);
}
.coach-ask-row button {
  padding: 8px 12px;
}
.coach-mic.listening {
  background: var(--fh-bad-bg);
  color: var(--fh-bad);
  animation: coach-pulse 1s ease-in-out infinite;
}
.coach-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.coach-note {
  margin: 0;
}
@media (max-width: 760px) {
  .coach {
    top: auto;
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-height: 78svh;
  }
  .coach.min {
    left: auto;
  }
  .fh-tips span {
    display: none;
  }
}
html[data-motion='calm'] .coach-loading,
html[data-motion='calm'] .coach-mic.listening {
  animation: none;
}

/* Talk-through setup (setup-talk.js) */
.coach-setup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.coach-setup small {
  flex-basis: 100%;
  color: var(--fh-muted);
}
.talk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #0007;
  padding: 16px;
}
.talk {
  width: min(560px, 100%);
  max-height: min(760px, calc(100svh - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--fh-surface);
  color: var(--fh-ink);
  border: 1px solid var(--fh-line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px #0005;
  padding: 16px 18px;
}
.talk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.talk-head h3 {
  margin: 2px 0 0;
}
.talk-head .eyebrow {
  color: var(--fh-good);
}
.talk-steps {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.talk-steps li {
  flex: 1;
  text-align: center;
  padding: 4px 2px;
  border-radius: 6px;
  background: var(--fh-surface-2, transparent);
  border: 1px solid var(--fh-line);
  color: var(--fh-muted);
}
.talk-steps li.done {
  background: var(--fh-good-bg);
  color: var(--fh-good);
  border-color: transparent;
}
.talk-steps li.now {
  border-color: var(--fh-good);
  color: var(--fh-ink);
  font-weight: 700;
}
.talk-log {
  flex: 1;
  min-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}
.talk-msg {
  margin: 0;
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
}
.talk-coach {
  align-self: flex-start;
  background: var(--fh-info-bg);
  color: var(--fh-ink);
  border-bottom-left-radius: 4px;
}
.talk-you {
  align-self: flex-end;
  background: var(--fh-good-bg);
  color: var(--fh-ink);
  border-bottom-right-radius: 4px;
}
.talk-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.talk-choices button {
  padding: 8px 12px;
}
.talk-summary {
  flex-basis: 100%;
  display: grid;
  gap: 4px;
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 1px solid var(--fh-line);
  border-radius: 10px;
}
.talk-summary div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}
.talk-summary dt {
  color: var(--fh-muted);
}
.talk-summary dd {
  margin: 0;
  font-weight: 600;
}
.talk-ask {
  display: flex;
  gap: 6px;
}
.talk-ask input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--fh-line-strong);
  border-radius: 8px;
  background: var(--fh-surface);
  color: var(--fh-ink);
}
.talk-ask button {
  padding: 8px 12px;
}
.talk-mic.listening {
  background: var(--fh-bad-bg);
  color: var(--fh-bad);
  animation: coach-pulse 1s ease-in-out infinite;
}
.talk-status {
  min-height: 1.2em;
  color: var(--fh-muted);
}
.talk-foot {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--fh-muted);
}
.talk-foot label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--fh-ink);
  font-size: 13px;
}
@media (max-width: 760px) {
  .talk-backdrop {
    padding: 0;
    place-items: end stretch;
  }
  .talk {
    width: 100%;
    max-height: 92svh;
    border-radius: 14px 14px 0 0;
  }
}
html[data-motion='calm'] .talk-mic.listening {
  animation: none;
}

/* ---------------------------------------------------------------- application pass: briefing, controls */
.flight-alert span.good {
  color: #bff0b0;
}
.flight-pad-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #0b140fcc;
  color: #bff0b0;
  font-size: 11px;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.flight-pad-badge[hidden],
.flight-brief[hidden] {
  display: none;
}
.flight-brief,
.flight-setup {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: #0b140fe8;
  color: #f0efdc;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.45;
}
.flight-brief {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.flight-brief > b {
  font-size: 22px;
  letter-spacing: 3px;
  color: #e5bc67;
}
.flight-brief > p {
  max-width: 560px;
  margin: 0;
}
.fs-keys {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px 14px;
  text-align: left;
  max-width: 760px;
}
.fs-keys kbd {
  display: inline-block;
  min-width: 64px;
  padding: 1px 6px;
  border: 1px solid #ffffff40;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #ffffff14;
  font:
    600 11px/1.6 ui-monospace,
    monospace;
  text-align: center;
}
.fs-small {
  font-size: 11px;
  color: #c5cfb8;
  margin: 0;
}
.flight-setup {
  z-index: 3;
}
.fs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.fs-head b {
  letter-spacing: 2px;
  color: #e5bc67;
}
.fs-head span {
  flex: 1;
  color: #c5cfb8;
  font-size: 12px;
}
.fs-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px 20px;
}
.fs-body section {
  border-top: 1px solid #ffffff22;
  padding-top: 8px;
}
.fs-body h4 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e5bc67;
}
.fs-body p {
  margin: 0 0 8px;
}
.fs-radio,
.fs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.fs-radio {
  align-items: flex-start;
}
.fs-radio input {
  margin-top: 3px;
}
.flight-setup select,
.flight-setup input[type='range'] {
  max-width: 100%;
}
.flight-setup select {
  background: #14291e;
  color: #f0efdc;
  border: 1px solid #ffffff40;
  border-radius: 4px;
  padding: 3px 6px;
}
.fs-status {
  color: #bff0b0;
}
.fs-axes {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fs-axes th {
  text-align: left;
  font-weight: 600;
  color: #c5cfb8;
  font-size: 11px;
}
.fs-axes td,
.fs-axes th {
  padding: 3px 4px;
  border-bottom: 1px solid #ffffff14;
}
.fs-axes button {
  padding: 2px 8px;
  font-size: 10px;
  min-height: 0;
}
.fs-meter {
  position: relative;
  display: block;
  width: 64px;
  height: 8px;
  border-radius: 4px;
  background: #ffffff1c;
  overflow: hidden;
}
.fs-meter i {
  position: absolute;
  left: calc(50% - 1px);
  top: 0;
  width: 100%;
  height: 100%;
  border-left: 3px solid #e5bc67;
  box-sizing: border-box;
  transform: translateX(0);
}
.fs-hint {
  color: #e5bc67;
  font-weight: 600;
}
.flight-pad [data-cmd] {
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Teach Rowdy (Rowdy page) */
.rt {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--fh-line-strong, #ffffff30);
  background: var(--fh-surface, #ffffff06);
  border-radius: 10px;
}
.rt-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: end;
  justify-content: space-between;
}
.rt-head h3 {
  margin: 2px 0;
}
.rt-head small {
  color: var(--fh-muted, #ffffffa0);
}
.rt-bar {
  flex: 1 1 200px;
  max-width: 320px;
  height: 10px;
  border-radius: 5px;
  background: var(--fh-surface-2, #ffffff14);
  overflow: hidden;
}
.rt-bar span {
  display: block;
  height: 100%;
  background: var(--fh-good, #7fc46a);
  transition: width 0.4s;
}
.rt-lessons {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}
.rt-lesson {
  padding: 14px 16px;
  border: 1px solid var(--fh-warn, #e4bd66);
  background: var(--fh-warn-bg, #e4bd6612);
  border-radius: 8px;
}
.rt-lesson header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}
.rt-lesson header small {
  color: var(--fh-muted, #ffffffa0);
}
.rt-topic {
  font-weight: 700;
}
.rt-lesson blockquote {
  margin: 8px 0;
  font-style: italic;
  color: var(--fh-muted, #ffffffc0);
}
.rt-options {
  display: grid;
  gap: 8px;
}
.rt-options button {
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}
.rt-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.rt-words label {
  flex: 1 1 260px;
  display: grid;
  gap: 4px;
}
.rt-words textarea {
  width: 100%;
  resize: vertical;
}
.rt-none {
  color: var(--fh-muted, #ffffffa0);
}
.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.rt-skills,
.rt-ranks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.rt-skills li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rt-skills li > span:first-child {
  min-width: 120px;
}
.rt-pips {
  display: inline-flex;
  gap: 3px;
}
.rt-pips i {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: var(--fh-surface-2, #ffffff18);
  border: 1px solid var(--fh-line, #ffffff20);
}
.rt-pips i.on {
  background: var(--fh-good, #7fc46a);
  border-color: transparent;
}
.rt-habit {
  font-style: normal;
  font-size: 0.85em;
  color: var(--fh-bad, #e07a6a);
}
.rt-ranks li {
  font-size: 0.92em;
  color: var(--fh-muted, #ffffffa0);
}
.rt-ranks li.got {
  color: var(--fh-ink, inherit);
}
.rt-ranks li.got b {
  color: var(--fh-good, #7fc46a);
}
.rt-log small {
  color: var(--fh-muted, #ffffffa0);
}

/* Revolution Drones: model picker, spec sheet and the drone card on the Apply page */
.fh-machine .drone-models {
  margin: 6px 0;
}
.drone-spec {
  font-size: 0.86em;
}
.drone-pick {
  border-left: 3px solid #c8102e;
  padding: 4px 0 4px 10px;
}
.drone-pick .drone-spec {
  margin: 4px 0;
}
