
/* —— compact person cards —— */
.farm-wrap, .combry-wrap, .newbie-wrap {
  max-width: min(720px, 100%) !important;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
.farm-roster {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}
@media (min-width: 720px) {
  .farm-roster { grid-template-columns: 1fr 1fr !important; }
}
.farm-person-card {
  padding: 12px !important;
  border-radius: 14px !important;
  max-width: 100%;
}
.farm-person-name { font-size: 1.02rem !important; }
.card-lvl {
  margin-left: 0.35em;
  font-size: 0.78em;
  font-weight: 700;
  color: #e0a060;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.farm-person-card {
  --exp-pct: 0;
}
.farm-person-card.has-exp-ring {
  border-color: transparent !important;
  box-shadow: none;
}
.farm-person-card.has-exp-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from -90deg,
    #ff8a2a 0 calc(var(--exp-pct) * 1%),
    rgba(255, 138, 42, 0.12) 0
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
.farm-card-radius {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 0.78rem;
  color: #b8a894;
}
.card-vip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e0b07a;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}
.card-vip input {
  width: 16px;
  height: 16px;
  accent-color: #d4a056;
  cursor: pointer;
}
.viewer-role .card-vip { pointer-events: none; opacity: 0.55; }
.promka-vip-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.promka-guard {
  display: grid;
  gap: 5px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  color: #d7c4ae;
  font-size: 0.78rem;
}
.promka-guard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.promka-guard strong { color: #e8d4b8; font-variant-numeric: tabular-nums; }
.promka-guard-track {
  height: 6px;
  border-radius: 99px;
  background: #2a221c;
  overflow: hidden;
}
.promka-guard-track i {
  display: block;
  height: 100%;
  background: #5a9a4a;
  width: 0;
}
.promka-guard.is-mid .promka-guard-track i { background: #c4a24a; }
.promka-guard.is-low .promka-guard-track i { background: #c45a4a; }
.promka-guard.is-miss { opacity: 0.72; }
.promka-guard.is-miss .promka-guard-track i { background: #3a322c; width: 0 !important; }
.farm-card-radius label { white-space: nowrap; }
.farm-card-radius input {
  width: 72px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  color: #f0e6da;
  font: inherit;
}
.duo-meters { gap: 6px !important; margin-top: 8px !important; }
.duo-block { padding: 8px !important; border-radius: 12px !important; gap: 6px !important; }
.stat-meter { padding: 8px 10px !important; }
.stat-meter-track { height: 8px !important; }
.farm-card-chiprow { display: none !important; }
.farm-person-meta { display: none !important; }
.farm-card-stats { display: none !important; }

.card-top-tools {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}
.card-top-tools .farm-person-name { flex: 1; min-width: 0; }
.card-info {
  position: relative;
  flex: 0 0 auto;
}
.card-info-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  color: #e0b07a;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}
.card-info-btn:hover, .card-info:focus-within .card-info-btn, .card-info.open .card-info-btn {
  border-color: #e0b07a;
  background: rgba(224,176,122,0.12);
}
.card-info-pop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: min(260px, 78vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #4a3a2c;
  background: linear-gradient(180deg, #221910, #120e0b);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
  color: #e8d8c4;
  font-size: 0.78rem;
  line-height: 1.35;
}
.card-info:hover .card-info-pop,
.card-info:focus-within .card-info-pop,
.card-info.open .card-info-pop { display: block; }
.card-info-pop .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.card-info-pop .row:last-child { border-bottom: 0; }
.card-info-pop .k { color: #9a8a78; }
.card-info-pop .v { color: #f0e2d0; text-align: right; font-weight: 650; }

.weapon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.22);
}
.weapon-ico {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #0a0806;
  border: 1px solid #2a221c;
  flex: 0 0 auto;
  image-rendering: auto;
}
.weapon-meta { min-width: 0; flex: 1; }
.weapon-name {
  margin: 0;
  font-size: 0.84rem;
  color: #f0e2d0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weapon-tear {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: #a89888;
}
.weapon-tear b { color: #e0b07a; }
.weapon-tear.is-low b { color: #ff6a7a; }
.weapon-empty { color: #7a6a5a; font-size: 0.78rem; }

.weight-badge {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #4a3a2c;
  background: #120e0b;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.weight-badge.is-clickable {
  cursor: pointer;
}
.weight-badge.is-clickable:hover {
  border-color: #e0b07a;
}
.weight-badge-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
  transition: height .2s ease;
}
.weight-badge.is-green .weight-badge-fill { background: rgba(46, 180, 100, 0.45); }
.weight-badge.is-yellow .weight-badge-fill { background: rgba(220, 180, 40, 0.5); }
.weight-badge.is-red .weight-badge-fill { background: rgba(220, 60, 70, 0.55); }
.weight-badge-ico {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  line-height: 1;
  filter: grayscale(0.15);
}

.equip-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.equip-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid #2a221c;
  background: #0a0806;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.equip-slot.is-empty {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), transparent 55%),
    #0a0806;
  opacity: 0.72;
}
.equip-slot.is-active {
  border-color: #3a8cff;
  box-shadow: 0 0 0 1px rgba(58,140,255,0.55), inset 0 0 0 1px rgba(58,140,255,0.35);
}
.equip-slot.is-clickable { cursor: pointer; }
.equip-slot.is-clickable:hover { border-color: #e0b07a; }
.equip-slot.is-repair-open {
  border-color: #e0b07a;
  overflow: visible;
  z-index: 6;
}
.equip-repair-pop {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translate(-50%, -100%);
  z-index: 8;
  white-space: nowrap;
}
.equip-repair-pop.is-fixed {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  z-index: 120;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.inv-drop-pop {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  background: #1c1510;
  border: 1px solid #4a3a2c;
  border-radius: 10px;
  white-space: normal;
}
.inv-drop-title {
  font-size: 0.78rem;
  color: #f0e2d0;
  font-weight: 700;
}
.inv-drop-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.7rem;
  color: #c4b49a;
}
.inv-drop-row input {
  appearance: none;
  border: 1px solid #4a3a2c;
  background: #120e0b;
  color: #f0e2d0;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 0.82rem;
}
.inv-drop-who {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.inv-drop-chip {
  appearance: none;
  border: 1px solid #3a5a8c;
  background: #152033;
  color: #cfe0ff;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 999px;
  cursor: pointer;
}
.inv-drop-chip:hover {
  border-color: #3a8cff;
  color: #fff;
}
.inv-drop-hint {
  font-size: 0.68rem;
  color: #8a7a66;
}
.inv-drop-btn {
  border-color: #8c3a3a;
  color: #ffcfcf;
  background: #331515;
}
.equip-repair-btn {
  appearance: none;
  border: 1px solid #4a3a2c;
  background: #1c1510;
  color: #f0e2d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.equip-repair-btn.equip-select-btn {
  border-color: #3a5a8c;
  color: #cfe0ff;
  background: #152033;
}
.equip-repair-btn.equip-select-btn:hover {
  border-color: #3a8cff;
  color: #fff;
  background: rgba(58,140,255,0.22);
}
.equip-repair-btn:hover {
  border-color: #e0b07a;
  color: #fff;
  background: rgba(224,176,122,0.16);
}
.inv-cell.is-clickable { cursor: pointer; }
.inv-cell.is-clickable[title] { cursor: pointer; }
.inv-cell.is-clickable:hover {
  outline: 1px solid rgba(224, 160, 96, 0.55);
}
.inv-cell.is-equip-open {
  outline: 1px solid #e0b07a;
}
.equip-slot img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.equip-wear {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: rgba(180, 40, 50, 0.55);
  pointer-events: none;
  z-index: 2;
  transition: height .15s ease;
}
.equip-slot.is-broken .equip-wear {
  background: rgba(200, 30, 45, 0.72);
}

.card-cfg { margin-top: 10px !important; gap: 6px !important; }
.card-cfg-btn { padding: 8px 9px !important; font-size: 0.74rem !important; }
.farm-card-actions { margin-top: 10px !important; gap: 6px !important; }
.farm-card-actions button { padding: 8px 9px !important; font-size: 0.74rem !important; }

@media (max-width: 640px) {
  .farm-wrap, .combry-wrap, .newbie-wrap, .wrap {
    max-width: 100% !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
  }
  .farm-roster { grid-template-columns: 1fr !important; }
  .combry-hero { grid-template-columns: 1fr !important; }
  .combry-grid { grid-template-columns: 1fr !important; }
  .farm-fields { grid-template-columns: 1fr !important; }
  .card-cfg { grid-template-columns: 1fr !important; }
  .card-cfg-btn.span2 { grid-column: auto !important; }
  .farm-card-actions { flex-direction: column; }
  .farm-card-actions button { width: 100%; }
  .farm-modal { align-items: flex-end !important; padding: 0 !important; }
  .farm-modal-sheet {
    width: 100% !important;
    max-height: min(92vh, 100%);
    border-radius: 16px 16px 0 0 !important;
  }
  .weapon-ico { width: 36px; height: 36px; }
  .equip-row { gap: 4px; }
  .weight-badge { width: 26px; height: 26px; }
  .section-brand-actions { flex-wrap: wrap; }
  #lizardsLive, #farmLive, #combryLive, #digLive {
    font-size: 0.72rem;
  }
}

/* —— inventory bag modal —— */
.card-bag-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
}
.card-bag-btn:hover {
  border-color: #e0b07a;
  background: rgba(224,176,122,0.12);
  transform: translateY(-1px);
}
.inv-modal.farm-modal {
  z-index: 90;
}
.inv-modal-sheet {
  width: min(420px, 100%) !important;
  max-height: min(86vh, 640px) !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
}
.inv-modal-sheet .farm-modal-head {
  flex: 0 0 auto;
}
.inv-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  align-content: start;
  scrollbar-gutter: stable;
}
.inv-cell {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid #3a3028;
  background:
    radial-gradient(120px 60px at 50% 0%, rgba(224,176,122,0.08), transparent 70%),
    #120e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  touch-action: manipulation;
}
.inv-cell img {
  position: relative;
  z-index: 1;
  width: 72%;
  height: 72%;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  pointer-events: none;
  flex: 0 0 auto;
}
.inv-qty {
  position: absolute;
  right: 3px;
  bottom: 2px;
  z-index: 2;
  min-width: 1.25em;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(224,176,122,0.35);
  color: #f0e2d0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.inv-cell.is-selected {
  border-color: #e0a060;
  box-shadow: 0 0 0 2px rgba(224, 160, 96, 0.45);
}
.inv-action-bar,
.inv-drop-panel {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(180, 120, 60, 0.4);
  border-radius: 10px;
  background: #1a140f;
}
.inv-action-bar[hidden],
.inv-drop-panel[hidden] {
  display: none !important;
}
.inv-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inv-action-name {
  min-width: 0;
  font-weight: 700;
  color: #f0e2d0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inv-action-btns {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.inv-drop-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inv-drop-opt {
  color: #8a7a6a;
  font-weight: 400;
  font-size: 0.72rem;
}
.inv-drop-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.inv-cell[title] { cursor: default; }
.inv-empty {
  margin: 18px 4px;
  text-align: center;
  color: #8a7a6a;
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .inv-modal.farm-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .inv-modal-sheet {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(88dvh, 88vh) !important;
    min-height: 0;
    border-radius: 18px 18px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .inv-modal-sheet .farm-modal-head {
    padding: 14px 14px 10px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .inv-modal-sheet .farm-modal-head h2 {
    font-size: 1.05rem;
  }
  .inv-modal-sheet .farm-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: 0 0 auto;
  }
  .inv-modal-body {
    padding: 10px max(12px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-bottom));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .inv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: calc(min(88dvh, 88vh) - 6.5rem);
    padding-bottom: 12px;
  }
  .inv-cell {
    min-height: 0;
    border-radius: 12px;
  }
  .inv-cell img {
    width: 78%;
    height: 78%;
    max-width: none;
    max-height: none;
  }
  .inv-qty {
    right: 4px;
    bottom: 3px;
    font-size: 0.78rem;
    min-width: 1.35em;
    padding: 2px 6px;
    border-radius: 8px;
  }
  .inv-empty {
    margin: 28px 8px;
    font-size: 0.92rem;
  }
}

@media (max-width: 380px) {
  .inv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .inv-cell {
    border-radius: 10px;
  }
  .inv-qty {
    font-size: 0.72rem;
    padding: 1px 4px;
  }
}

@media (min-width: 641px) {
  .inv-grid {
    max-height: min(52vh, 420px);
  }
}

.weight-modal-sheet {
  width: min(640px, 100%) !important;
}
.weight-modal-body {
  padding: 10px 14px 16px;
}
.weight-chart {
  width: 100%;
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%),
    #100c09;
  border: 1px solid #2a221c;
  border-radius: 12px;
  overflow: hidden;
}
.weight-chart svg { display: block; }
.weight-grid {
  stroke: rgba(240, 226, 208, 0.08);
  stroke-width: 1;
}
.weight-axis {
  fill: #8a7a6a;
  font-size: 10px;
  font-family: "Special Elite", ui-monospace, monospace;
}
.weight-bar { opacity: 0.9; }
.weight-bar.is-green { fill: rgba(46, 180, 100, 0.75); }
.weight-bar.is-yellow { fill: rgba(220, 180, 40, 0.8); }
.weight-bar.is-red { fill: rgba(220, 60, 70, 0.82); }
.weight-line {
  stroke: #e0b07a;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.95;
}

#appFarm .farm-wrap {
  max-width: min(920px, 100%) !important;
}
.farm-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #2a221c;
  border-radius: 12px;
  background: rgba(16, 12, 9, 0.72);
}
.farm-totals.is-live {
  border-color: rgba(80, 160, 90, 0.45);
}
.farm-totals-main {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.farm-totals-main:focus-visible {
  outline: 1px solid #e0a060;
}
.farm-totals-money,
.farm-totals-time {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.farm-totals-ico {
  font-size: 1.15rem;
  line-height: 1;
  color: #e0a060;
}
.farm-totals-label {
  display: block;
  font-size: 0.68rem;
  color: #8a7a6a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.farm-totals-money strong,
.farm-totals-time strong {
  display: block;
  font-size: 1.05rem;
  color: #e8d8c8;
}
.farm-totals.is-live .farm-totals-time strong { color: #8ee08e; }
.farm-totals-chevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8a7a6a;
  border-bottom: 2px solid #8a7a6a;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.farm-totals.is-open .farm-totals-chevron {
  transform: rotate(-135deg);
}
.farm-totals-bots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.farm-totals-bot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  color: #c8b8a8;
}
.farm-totals-bot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm-totals-bot.is-live .farm-totals-bot-name { color: #8ee08e; }
.farm-totals-bot-val { color: #e0a060; white-space: nowrap; }
.farm-totals-bot-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.farm-totals-bot-chip {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(224, 160, 96, 0.28);
  background: rgba(224, 160, 96, 0.12);
  color: #f0c890;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.farm-totals-bot-money {
  color: #e8d8c8;
  white-space: nowrap;
}
.farm-totals-bot-idle {
  color: #8a7a6a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.farm-totals-bot.is-live .farm-totals-bot-idle { color: #c8b8a8; }
.farm-totals-bot-idle.is-tick { color: #8ee08e; }
.farm-totals-bot-idle.is-sell { color: #8a7a6a; }
.farm-totals-bot-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}
.farm-totals-empty {
  margin: 0;
  font-size: 0.75rem;
  color: #8a7a6a;
}
.farm-totals-reset {
  width: 100%;
  min-height: 36px;
}

.card-map-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
  color: #e0b07a;
}
.card-map-btn:hover {
  border-color: #e0b07a;
  background: rgba(224,176,122,0.12);
}
.card-map-btn.has-path {
  border-color: #6abf7a;
  color: #8ee08e;
}
.card-gear-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
  color: #d8c49a;
}
.card-gear-btn:hover {
  border-color: #e0b07a;
  background: rgba(224,176,122,0.12);
  color: #e8d4a8;
}
.card-stream-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
  color: #d8c49a;
}
.card-stream-btn:hover {
  border-color: #8ec8e8;
  background: rgba(120, 180, 220, 0.14);
  color: #b8e0ff;
}
.farm-path-modal .farm-path-sheet {
  width: min(920px, 100%) !important;
  max-height: min(94vh, 860px) !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
  animation: none;
  transform: none;
}
.farm-setup-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 10px 8px;
}
.farm-setup-modes {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.farm-setup-modes button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.9);
  color: #b8a888;
  font: 600 13px/1 Oswald, sans-serif;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.farm-setup-modes button.active {
  color: #f0e0c0;
  border-color: rgba(210, 170, 90, 0.75);
  background: rgba(70, 52, 26, 0.95);
}
.farm-setup-modes button[data-farm-setup-mode="pan"].active {
  border-color: rgba(140, 180, 220, 0.75);
  background: rgba(40, 55, 75, 0.95);
  color: #d8e8f5;
}
.farm-setup-stage.is-pan {
  cursor: grab;
  touch-action: none;
}
.farm-setup-stage.is-pan:active {
  cursor: grabbing;
}
.farm-setup-stage.is-paint {
  cursor: crosshair;
  touch-action: none;
}
.farm-setup-radius-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
}
.farm-setup-merchant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 2px;
}
.farm-setup-merchant-row label {
  flex: 0 0 auto;
  font: 600 12px/1 Oswald, sans-serif;
  color: #b8a888;
  letter-spacing: 0.04em;
}
.farm-setup-merchant-row input {
  flex: 1 1 160px;
  min-width: 120px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.92);
  color: #e8dcc0;
  font: 500 14px/1 "Special Elite", serif;
}
.farm-setup-merchant-coords {
  font: 600 12px/1 Oswald, sans-serif;
  color: #8a9a6a;
  white-space: nowrap;
}
.farm-setup-radius-row label {
  flex: 0 0 auto;
  font: 600 13px/1 Oswald, sans-serif;
  color: #c8b898;
  min-width: 92px;
}
.farm-setup-radius-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
}
.farm-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}
.farm-setup-actions button {
  min-height: 40px;
  padding: 0 12px;
  font: 600 13px/1 Oswald, sans-serif;
  border-radius: 6px;
  pointer-events: auto;
  touch-action: manipulation;
}
.farm-setup-actions #farmSetupSaveBtn {
  margin-left: auto;
  background: #6a4a22;
  border: 1px solid rgba(210, 170, 90, 0.6);
  color: #f5ecd8;
  cursor: pointer;
}
.farm-setup-actions #farmSetupAutoPath {
  background: rgba(70, 90, 50, 0.55);
  border: 1px solid rgba(140, 180, 90, 0.55);
  color: #dce8c8;
  cursor: pointer;
}
.farm-setup-hint {
  margin: 0;
  font: 600 12px/1.35 Oswald, sans-serif;
  color: #9aaa88;
}
.farm-setup-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  height: min(52vh, 480px);
  border: 1px solid #4a3c2e;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0907;
  touch-action: none;
}
.farm-setup-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.farm-setup-hud {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(8, 10, 6, 0.78);
  color: #b8c8a0;
  font: 600 11px/1.3 Consolas, monospace;
  pointer-events: none;
  border: 1px solid rgba(140, 160, 100, 0.25);
}
.farm-path-tabs {
  display: flex;
  gap: 6px;
  padding: 0 14px 8px;
}
.farm-path-tabs button {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  color: #c8b8a8;
  cursor: pointer;
}
.farm-path-tabs a.farm-path-tab-link {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid #4a3a2c;
  background: #18120e;
  color: #c8b8a8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font: inherit;
}
.farm-path-tabs a.farm-path-tab-link:hover {
  border-color: #e0b07a;
  color: #f4eadb;
}
.farm-path-tabs button.active {
  border-color: #e0b07a;
  color: #f4eadb;
  background: rgba(224,176,122,0.14);
}
.promka-set-tabs {
  padding: 0 16px 4px;
}
.promka-list-add {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}
.promka-list-add input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.92);
  color: #e8dcc0;
  font: 500 14px/1 "Special Elite", serif;
}
.promka-list-add button {
  flex: 0 0 auto;
  min-height: 38px;
}
.farm-target-item .promka-list-del {
  margin-left: auto;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a7a6a;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex: 0 0 auto;
}
.farm-target-item > label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}
.farm-target-item .promka-list-del:hover {
  color: #e08a6a;
}
.farm-path-tools {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
  flex-wrap: wrap;
}
.farm-path-tools button {
  min-height: 36px;
}
.farm-path-coord {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #c8b8a8;
}
.farm-path-coord input {
  width: 72px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #4a3a2c;
  background: #120e0b;
  color: #f4eadb;
  padding: 0 8px;
}
.farm-path-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 0.82rem;
  color: #c8b8a8;
  cursor: pointer;
  user-select: none;
}
.farm-path-check input {
  width: 16px;
  height: 16px;
  accent-color: #e0b07a;
}
.farm-path-tools #farmPathDrawBtn.is-on,
.farm-path-tools #farmPathMarkHomeBtn.is-on {
  border-color: #e0b07a;
  color: #f4eadb;
  background: rgba(224,176,122,0.18);
}
.farm-path-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  height: min(58vh, 520px);
  margin: 0 12px;
  border: 1px solid #3a3028;
  border-radius: 12px;
  overflow: hidden;
  background: #0c0a08;
}
.farm-char-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  height: min(58vh, 520px);
  margin: 0 12px;
  border: 1px solid #4a3c2e;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0907;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}
.farm-char-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: auto;
}
.farm-char-floors {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 140px);
  pointer-events: auto;
}
.farm-char-floors-label {
  font: 600 11px/1 Oswald, sans-serif;
  color: #b8a888;
  margin-right: 2px;
  text-transform: lowercase;
}
.farm-char-floors button {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.88);
  color: #b8a888;
  font: 600 12px/1 Oswald, sans-serif;
  cursor: pointer;
  border-radius: 4px;
}
.farm-char-floors button.active {
  color: #f0e0c0;
  border-color: rgba(210, 170, 90, 0.7);
  background: rgba(60, 45, 22, 0.95);
}
.farm-char-weight {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 42;
  min-width: 112px;
  padding: 8px 10px 8px;
  border-radius: 8px;
  border: 1px solid rgba(160, 140, 90, 0.35);
  background: rgba(10, 9, 7, 0.86);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: #e8dcc4;
  pointer-events: none;
  overflow: visible;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.farm-char-weight.is-green {
  border-color: rgba(70, 180, 110, 0.55);
  box-shadow: 0 0 0 1px rgba(70, 180, 110, 0.12), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.farm-char-weight.is-yellow {
  border-color: rgba(220, 180, 50, 0.6);
  box-shadow: 0 0 0 1px rgba(220, 180, 50, 0.14), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.farm-char-weight.is-red {
  border-color: rgba(220, 70, 80, 0.65);
  box-shadow: 0 0 0 1px rgba(220, 70, 80, 0.16), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.farm-char-weight.is-pulse {
  animation: farmWeightPulse 0.55s ease;
}
.farm-char-weight-meter {
  position: relative;
  height: 4px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.farm-char-weight-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3cb86a, #7ed89a);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}
.farm-char-weight.is-yellow .farm-char-weight-fill {
  background: linear-gradient(90deg, #c9a020, #efd060);
}
.farm-char-weight.is-red .farm-char-weight-fill {
  background: linear-gradient(90deg, #c03040, #ef7080);
}
.farm-char-weight-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 5px;
  line-height: 1;
}
.farm-char-weight-label {
  flex: 1 1 100%;
  font: 600 10px/1 Oswald, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8e78;
  margin-bottom: 2px;
}
.farm-char-weight-val {
  font: 700 20px/1 Oswald, sans-serif;
  color: #f5ecd8;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease, transform 0.25s ease;
}
.farm-char-weight.is-pulse .farm-char-weight-val {
  transform: scale(1.06);
}
.farm-char-weight-unit {
  font: 600 12px/1 Oswald, sans-serif;
  color: #b8a888;
}
.farm-char-weight-pct {
  margin-left: auto;
  font: 600 12px/1 Oswald, sans-serif;
  color: #c8b898;
  font-variant-numeric: tabular-nums;
}
.farm-char-weight-float {
  position: absolute;
  right: 8px;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}
.farm-char-weight-chip {
  font: 700 13px/1 Oswald, sans-serif;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  animation: farmWeightChip 1.35s ease forwards;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.farm-char-weight-chip.is-up {
  color: #b8ffd0;
  background: rgba(40, 120, 70, 0.85);
  border: 1px solid rgba(120, 220, 150, 0.45);
}
.farm-char-weight-chip.is-down {
  color: #ffe0b8;
  background: rgba(140, 70, 30, 0.88);
  border: 1px solid rgba(230, 160, 80, 0.5);
}
@keyframes farmWeightPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes farmWeightChip {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  18% { opacity: 1; transform: translateY(-2px) scale(1); }
  70% { opacity: 1; transform: translateY(-14px) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.96); }
}
.farm-char-queue {
  position: absolute;
  right: 10px;
  top: 78px;
  z-index: 41;
  min-width: 132px;
  max-width: min(46vw, 200px);
  max-height: 42%;
  overflow: auto;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(180, 90, 70, 0.4);
  background: rgba(10, 8, 6, 0.88);
  color: #f0e0d0;
  pointer-events: none;
}
.farm-char-queue-title {
  font: 600 10px/1 Oswald, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c89878;
  margin-bottom: 5px;
}
.farm-char-queue-list {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: decimal;
}
.farm-char-queue-list li {
  font: 600 12px/1.35 Oswald, sans-serif;
  color: #e8d8c0;
  margin: 0 0 3px;
}
.farm-char-queue-list li.is-lock {
  color: #ffe0a8;
}
.farm-char-queue-list li.is-dead {
  color: #9a8e88;
  text-decoration: line-through;
}
.farm-setup-floors {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 16px);
  pointer-events: auto;
}
.farm-setup-floors button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.9);
  color: #b8a888;
  font: 600 12px/1 Oswald, sans-serif;
  cursor: pointer;
  border-radius: 4px;
}
.farm-setup-floors button.active {
  color: #f0e0c0;
  border-color: rgba(210, 170, 90, 0.7);
  background: rgba(60, 45, 22, 0.95);
}
.farm-char-hud {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(8, 10, 6, 0.78);
  color: #b8c8a0;
  font: 600 11px/1.3 "Consolas", "Lucida Console", monospace;
  letter-spacing: 0.02em;
  pointer-events: none;
  border: 1px solid rgba(140, 160, 100, 0.25);
}
.farm-char-expand {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(180, 150, 90, 0.45);
  background: rgba(18, 14, 10, 0.88);
  color: #e8d8b8;
  font: 600 12px/1 Oswald, sans-serif;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.farm-char-expand:hover {
  border-color: rgba(220, 180, 100, 0.7);
  color: #fff4dc;
}
.farm-world-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  height: min(58vh, 520px);
  margin: 0 12px;
  border: 1px solid #3a3028;
  border-radius: 12px;
  overflow: hidden;
  background: #100e0c;
  touch-action: none;
  user-select: none;
}
.farm-world-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
.farm-world-canvas:active {
  cursor: grabbing;
}
.farm-world-hud {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 96px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(12, 10, 8, 0.72);
  color: #d8c8b0;
  font: 600 12px/1.3 Oswald, sans-serif;
  pointer-events: none;
}
.farm-world-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.farm-world-zoom button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #4a3a2c;
  background: rgba(24, 18, 14, 0.92);
  color: #e8d8c0;
  font: 700 20px/1 Oswald, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.farm-world-zoom button:active {
  background: rgba(224,176,122,0.22);
}
.farm-path-viewport,
.farm-path-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.farm-path-canvas {
  pointer-events: none;
  z-index: 2;
  touch-action: none;
}
.farm-path-hint {
  margin: 8px 14px 12px;
  font-size: 0.78rem;
  color: #8a7a6a;
}

@media (max-width: 720px) {
  .farm-setup-panel {
    padding: 0 8px 6px;
    gap: 6px;
  }
  .farm-setup-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  .farm-setup-modes {
    gap: 5px;
  }
  .farm-setup-modes button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }
  .farm-setup-radius-row {
    gap: 8px;
  }
  .farm-setup-radius-row input[type="range"] {
    height: 40px;
  }
  .farm-setup-actions button {
    min-height: 44px;
    flex: 1 1 auto;
  }
  .farm-setup-actions #farmSetupSaveBtn {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .farm-char-weight {
    right: 8px;
    top: 6px;
    min-width: 104px;
    padding: 7px 8px;
  }
  .farm-char-weight-val {
    font-size: 18px;
  }
  .farm-setup-floors button {
    min-width: 36px;
    height: 36px;
  }
  .farm-path-modal {
    padding: 0 !important;
    align-items: stretch !important;
  }
  .farm-path-modal .farm-path-sheet {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .farm-path-modal .farm-modal-head {
    padding: 10px 12px 6px;
  }
  .farm-path-modal .farm-modal-head h2 {
    font-size: 1.05rem;
  }
  .farm-path-modal .farm-modal-head p {
    font-size: 0.72rem;
    line-height: 1.3;
  }
  .farm-path-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0 10px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .farm-path-tabs::-webkit-scrollbar {
    display: none;
  }
  .farm-path-tabs button {
    flex: 0 0 auto;
    min-width: 96px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.82rem;
  }
  .farm-path-tools {
    padding: 0 10px 8px;
    gap: 6px;
  }
  .farm-path-tools button,
  .farm-path-check {
    min-height: 40px;
  }
  .farm-path-stage,
  .farm-char-stage,
  .farm-world-stage {
    margin: 0 8px;
    min-height: 0;
    height: auto;
    flex: 1 1 auto;
    border-radius: 10px;
  }
  .farm-world-zoom button {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  .farm-path-hint {
    margin: 6px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    font-size: 0.72rem;
  }
}
@media (max-width: 380px) {
  .farm-path-tabs button {
    min-width: 84px;
    padding: 0 10px;
    font-size: 0.78rem;
  }
}

/* шаблоны настроек фарма */
.farm-preset-sheet {
  max-width: 520px;
  width: min(520px, 96vw);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}
.farm-preset-body {
  padding: 0 14px 14px;
  overflow: auto;
  min-height: 0;
}
.farm-preset-save-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.farm-preset-save-row input {
  flex: 1 1 160px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(180, 150, 90, 0.35);
  background: rgba(18, 14, 10, 0.9);
  color: #f0e0c0;
  font: 600 14px/1 Oswald, sans-serif;
}
.farm-preset-save-row button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid rgba(210, 170, 90, 0.6);
  background: #6a4a22;
  color: #f5ecd8;
  font: 600 13px/1 Oswald, sans-serif;
  cursor: pointer;
}
.farm-preset-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
}
.farm-preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.farm-preset-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(180, 150, 90, 0.28);
  background: rgba(22, 18, 14, 0.85);
}
.farm-preset-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 180px;
}
.farm-preset-item-main strong {
  color: #f0e0c0;
  font: 700 14px/1.2 Oswald, sans-serif;
}
.farm-preset-item-main span {
  color: #a89878;
  font: 600 12px/1.3 Oswald, sans-serif;
}
.farm-preset-item-acts {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.farm-preset-item-acts button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(180, 150, 90, 0.4);
  background: rgba(70, 52, 26, 0.9);
  color: #f0e0c0;
  font: 600 12px/1 Oswald, sans-serif;
  cursor: pointer;
}
.farm-preset-item-acts button.danger {
  background: rgba(80, 28, 24, 0.85);
  border-color: rgba(200, 90, 80, 0.45);
  color: #f0c8c0;
}

#appPromka .farm-wrap {
  max-width: min(920px, 100%) !important;
}

/* HUD карточки промки — как верхняя панель клиента */
.promka-hud {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  margin: 8px 0 8px;
  padding: 8px;
  border: 1px solid #3a3228;
  background:
    linear-gradient(180deg, rgba(42, 36, 30, 0.95), rgba(12, 10, 8, 0.96)),
    repeating-linear-gradient(90deg, transparent, transparent 7px, rgba(0,0,0,0.18) 8px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 180, 80, 0.08),
    inset 0 1px 0 rgba(255, 220, 160, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.35);
}
.promka-hud-face {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #5a4a38;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 160, 70, 0.18), transparent 55%),
    linear-gradient(180deg, #2a241c, #12100c);
  box-shadow: inset 0 0 0 2px #1a1612, 0 0 0 1px #0a0806;
  color: #e8a040;
  font: 700 1.15rem/1 Oswald, sans-serif;
  letter-spacing: 0.04em;
}
.promka-hud-main { min-width: 0; display: grid; gap: 5px; }
.promka-hud-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.promka-hud-title strong {
  color: #ff8a28;
  font: 700 0.95rem/1 Oswald, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.promka-hud-lvl {
  color: #e8c45a;
  font: 700 0.82rem/1 Oswald, sans-serif;
  min-width: 1.2em;
  text-align: right;
}
.promka-hud-exp {
  height: 5px;
  border: 1px solid #2a241c;
  background: #0a0806;
  overflow: hidden;
}
.promka-hud-exp i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #d87820 0 6px, #a85810 6px 7px);
  box-shadow: 0 0 8px rgba(255, 140, 40, 0.45);
}
.promka-hud-hp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a8a78;
}
.promka-hud-hp-head strong {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  color: #f0e2d0;
}
.promka-hud-hp-track {
  height: 10px;
  margin-top: 3px;
  border: 1px solid #2a2218;
  background:
    repeating-linear-gradient(90deg, #16120e 0 7px, #0c0a08 7px 8px);
  overflow: hidden;
}
.promka-hud-hp-fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, #e07020 0 7px, #8a4010 7px 8px);
  box-shadow: 0 0 10px rgba(224, 112, 32, 0.45);
  transition: width .4s ease;
}
.promka-hud-hp.is-mid .promka-hud-hp-fill {
  background: repeating-linear-gradient(90deg, #d8a030 0 7px, #8a6810 7px 8px);
}
.promka-hud-hp.is-low .promka-hud-hp-fill {
  background: repeating-linear-gradient(90deg, #c02838 0 7px, #6a1018 7px 8px);
}
.promka-hud-res {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.promka-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 4px;
  border: 1px solid #3a3228;
  background: #12100c;
  color: #e0a060;
  font: 700 0.78rem/1 Oswald, sans-serif;
}
.promka-chip-ico {
  width: 16px;
  text-align: center;
  color: #ff8a28;
}
.promka-hud-fx {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
}
.promka-hud-fx.is-empty {
  color: #6a5e52;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.promka-fx {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px 1px 2px;
  border: 1px solid #3a3228;
  background: #16120e;
  color: #c8b8a4;
  font-size: 0.68rem;
}
.promka-fx img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  object-fit: contain;
}
.promka-fx em { font-style: normal; }
.promka-fx small { color: #e0a060; font-size: 0.62rem; }
.promka-fx.is-heavy, .promka-fx.trauma, .promka-fx.debuff {
  border-color: rgba(180, 60, 50, 0.45);
  color: #e8b0a8;
}
.promka-fx.buff {
  border-color: rgba(80, 160, 90, 0.4);
  color: #b8e0b0;
}

.card-loc-btn {
  appearance: none;
  flex: 0 0 auto;
  margin-left: 2px;
  border: 1px solid rgba(180, 120, 60, 0.45);
  background: rgba(28, 18, 10, 0.85);
  color: #f0c48a;
  font-family: "Oswald", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.card-loc-btn:hover {
  border-color: #e0a060;
  color: #fff4dc;
  background: rgba(90, 48, 16, 0.7);
}
.card-loc-btn.is-off {
  opacity: 0.55;
  color: #9a8a78;
}

.card-map-loc-btn {
  appearance: none;
  flex: 0 0 auto;
  margin-left: 2px;
  border: 1px solid rgba(180, 120, 60, 0.45);
  background: rgba(28, 18, 10, 0.85);
  color: #f0c48a;
  font-family: "Oswald", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.03em;
  padding: 3px 7px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.card-map-loc-btn:hover {
  border-color: #e0a060;
  color: #fff4dc;
  background: rgba(90, 48, 16, 0.7);
}

.loc-map-modal.farm-modal { z-index: 80; }
.loc-map-sheet {
  width: min(980px, 100vw);
  height: min(94vh, 900px);
  max-width: 100%;
  max-height: min(94vh, 900px);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(520px 220px at 8% 0%, rgba(224, 120, 48, 0.16), transparent 55%),
    linear-gradient(180deg, #16100b, #0c0907);
  border: 1px solid rgba(180, 120, 60, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 180, 90, 0.08);
}
.loc-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(180, 120, 60, 0.22);
}
.loc-map-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c08040;
}
.loc-map-head h2 {
  margin: 2px 0 0;
  font-family: "Special Elite", cursive;
  font-size: 1.15rem;
  color: #f0e2d0;
}
.loc-map-sub {
  margin: 2px 0 0;
  color: #e0b07a;
  font-weight: 700;
}
.loc-map-head-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.loc-map-stage {
  position: relative;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  background: #070504;
  box-shadow: inset 0 0 90px rgba(40, 10, 0, 0.55);
}
.loc-map-osd, .loc-map-canvas {
  position: absolute;
  inset: 0;
}
.loc-map-canvas { pointer-events: none; z-index: 3; }
.loc-map-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(8,4,2,0.72) 100%);
}
.loc-map-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(20, 8, 0, 0.08) 2px 3px);
  mix-blend-mode: multiply;
}
.loc-map-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.loc-map-hud {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 6;
  color: #d8c4a4;
  font-size: 0.78rem;
  text-shadow: 0 1px 2px #000;
}

