/* ==========================================================================
   Home Nexus 3.0 · nexus.css — профиль, огород, магазин, активность.
   --------------------------------------------------------------------------
   Только свои классы/префикс .nexus-*: глобальных сбросов и правок чужих
   слоёв нет. Цвета — из токенов темы (base.css) с fallback, поэтому день,
   ночь и все восемь тем работают автоматически.

   z-index модалок ниже #cozy-fx-root (400), чтобы тосты наград/достижений
   были видны поверх окна; выше топбара (40) и панели (60).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Топбар: монеты, огород, магазин
   -------------------------------------------------------------------------- */
.nexus-coin-chip { gap: 5px; }
.nexus-coin-glyph { font-size: 16px; line-height: 1; }
.nexus-coin-count {
  font-family: var(--cozy-mono, Consolas, monospace);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--cozy-ink);
  min-width: 12px;
  text-align: center;
}
.nexus-top-glyph { font-size: 17px; line-height: 1; }
.nexus-coin-chip.is-bump { animation: nexusCoinBump 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes nexusCoinBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.14); background: color-mix(in srgb, var(--cozy-accent) 30%, transparent); }
  100% { transform: scale(1); }
}
@media (max-width: 1519px) {
  .nexus-top-btn .cozy-btn-label { display: none; }
}
@media (max-width: 430px) {
  .nexus-coin-glyph { font-size: 14px; }
  .nexus-coin-count { font-size: 11px; }
}

/* --------------------------------------------------------------------------
   2. Чипы героя и плиток
   -------------------------------------------------------------------------- */
.nexus-chip-btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-surface-2) 72%, transparent);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.nexus-chip-btn:hover {
  border-color: var(--cozy-accent);
  background: color-mix(in srgb, var(--cozy-accent) 14%, transparent);
  transform: translateY(-1px);
}
.nexus-chip-btn:active { transform: translateY(0) scale(0.98); }
.nexus-chip-btn:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-chip-btn b { color: var(--cozy-ink); }

.nexus-here {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--cozy-mono, Consolas, monospace);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #2b2112;
  background: var(--cozy-accent-soft, #f3d488);
  border: 1px solid color-mix(in srgb, var(--cozy-ink) 30%, transparent);
  white-space: nowrap;
  animation: nexusHereIn 0.32s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes nexusHereIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   3. Мини-карточка в поповере профиля
   -------------------------------------------------------------------------- */
.nexus-pop-mini {
  margin: 10px 0 2px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 55%, transparent);
}
.nexus-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cozy-ink);
}
.nexus-pop-level { font-weight: 700; }
.nexus-pop-coins { font-family: var(--cozy-mono, monospace); font-size: 11.5px; color: var(--cozy-accent-deep); }
.nexus-pop-meta { margin-top: 6px; font-size: 11px; color: var(--cozy-muted); }
.nexus-pop-open { width: 100%; margin-top: 8px; }

/* --------------------------------------------------------------------------
   4. Общая модалка Nexus
   -------------------------------------------------------------------------- */
body.nexus-modal-open { overflow: hidden; }

.nexus-modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: nexusFadeIn 0.2s ease both;
}
.nexus-modal[hidden] { display: none !important; }
.nexus-modal *, .nexus-modal *::before, .nexus-modal *::after { box-sizing: border-box; }

.nexus-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 10, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes nexusFadeIn { from { opacity: 0; } to { opacity: 1; } }

.nexus-card {
  position: relative;
  width: min(820px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1.5px solid var(--cozy-line);
  background: var(--cozy-paper, #fff8ec);
  color: var(--cozy-ink);
  box-shadow: 0 30px 80px rgba(30, 20, 8, 0.42);
  animation: nexusCardIn 0.28s cubic-bezier(0.2, 1.2, 0.35, 1) both;
  overscroll-behavior: contain;
}
@keyframes nexusCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.nexus-card-profile { width: min(840px, 100%); }
.nexus-card-shop { width: min(980px, 100%); }
.nexus-card-farm { width: min(980px, 100%); }

.nexus-card::-webkit-scrollbar { width: 9px; }
.nexus-card::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--cozy-ink) 22%, transparent);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.nexus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.nexus-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nexus-head-text { min-width: 0; }
.nexus-title {
  margin: 0;
  font-family: var(--cozy-display, Georgia, serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nexus-sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--cozy-muted); }
.nexus-head-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.nexus-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--cozy-line);
  background: var(--cozy-surface);
  color: var(--cozy-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nexus-close:hover { border-color: var(--cozy-accent); background: color-mix(in srgb, var(--cozy-accent) 16%, transparent); }
.nexus-close:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }

.nexus-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #2b2112;
  background: linear-gradient(145deg, var(--cozy-accent-soft, #f3d488), var(--cozy-accent, #d9a441));
  border: 2px solid color-mix(in srgb, var(--cozy-ink) 55%, transparent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--cozy-ink) 30%, transparent);
}
.nexus-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nexus-badge-big {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 26px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--cozy-accent) 20%, var(--cozy-surface));
  border: 1.5px solid var(--cozy-line);
}

/* --------------------------------------------------------------------------
   5. Профиль: кольцо уровня, XP, ежедневный бонус
   -------------------------------------------------------------------------- */
.nexus-level {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-surface) 78%, transparent);
}
.nexus-ring-wrap { display: grid; place-items: center; }
.nexus-ring { width: 132px; height: 132px; transform: rotate(-90deg); }
.nexus-ring-track {
  fill: none;
  stroke: color-mix(in srgb, var(--cozy-ink) 12%, transparent);
  stroke-width: 10;
}
.nexus-ring-fill {
  fill: none;
  stroke: var(--cozy-accent, #d9a441);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.25, 1, 0.4, 1);
}
.nexus-ring-level {
  transform: rotate(90deg);
  transform-origin: 64px 60px;
  fill: var(--cozy-ink);
  font-family: var(--cozy-display, Georgia, serif);
  font-size: 30px;
  font-weight: 700;
}
.nexus-ring-label {
  transform: rotate(90deg);
  transform-origin: 64px 80px;
  fill: var(--cozy-muted);
  font-family: var(--cozy-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nexus-level-info { min-width: 0; }
.nexus-level-title {
  font-family: var(--cozy-display, Georgia, serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.nexus-xpbar {
  position: relative;
  height: 11px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--cozy-ink) 12%, transparent);
  border: 1px solid var(--cozy-line);
}
.nexus-xpbar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cozy-accent, #d9a441), var(--cozy-accent-soft, #f3d488));
  transition: width 0.6s cubic-bezier(0.25, 1, 0.4, 1);
}
.nexus-xpbar-slim { height: 7px; margin-top: 7px; }
.nexus-xpmeta {
  margin-top: 6px;
  font-family: var(--cozy-mono, monospace);
  font-size: 10.5px;
  color: var(--cozy-muted);
}
.nexus-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.nexus-chip-btn, .nexus-chip-static {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cozy-ink);
  background: color-mix(in srgb, var(--cozy-bg) 50%, transparent);
  border: 1px solid var(--cozy-line);
}
.nexus-chip-btn { cursor: pointer; }
.nexus-chip-btn:hover { border-color: var(--cozy-accent); background: color-mix(in srgb, var(--cozy-accent) 16%, transparent); }
.nexus-chip-btn:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-chip-btn b, .nexus-chip-static b { color: var(--cozy-ink); }
.nexus-chip-coins { font-family: var(--cozy-mono, monospace); }

.nexus-daily {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-top: 13px;
}
.nexus-daily-sub { font-size: 11px; color: var(--cozy-muted); }

/* --------------------------------------------------------------------------
   6. Кнопки, «скоро», панели
   -------------------------------------------------------------------------- */
.nexus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 11px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, filter 0.2s;
}
.nexus-btn:hover:not([disabled]) {
  background: color-mix(in srgb, var(--cozy-accent) 18%, transparent);
  border-color: var(--cozy-accent);
  transform: translateY(-1px);
}
.nexus-btn:active:not([disabled]) { transform: translateY(0) scale(0.985); }
.nexus-btn:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-btn[disabled] { opacity: 0.6; cursor: default; }
.nexus-btn-primary {
  background: var(--cozy-accent, #d9a441);
  border-color: color-mix(in srgb, var(--cozy-ink) 30%, transparent);
  color: #2b2112;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cozy-ink) 38%, transparent);
}
.nexus-btn-primary:hover:not([disabled]) {
  background: var(--cozy-accent-soft, #f3d488);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cozy-ink) 38%, transparent);
}
.nexus-btn-ghost { background: transparent; }
.nexus-soon { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--cozy-muted); font-style: italic; }
.nexus-soon-block {
  margin: 0 0 14px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px dashed var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  font-size: 12.5px;
  font-style: normal;
}

.nexus-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.nexus-panel {
  padding: 14px;
  border-radius: 18px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-surface) 70%, transparent);
  min-width: 0;
}
.nexus-feed-panel { margin-top: 14px; }
.nexus-h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 11px;
  font-family: var(--cozy-display, Georgia, serif);
  font-size: 16px;
  font-weight: 600;
}
.nexus-h3 span {
  font-family: var(--cozy-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cozy-muted);
}
.nexus-h3-gap { margin-top: 16px; }

/* --------------------------------------------------------------------------
   7. Витрина достижений (20 клеток)
   -------------------------------------------------------------------------- */
.nexus-ach-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.nexus-ach {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 82px;
  padding: 9px 5px 7px;
  border-radius: 13px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.nexus-ach:hover { transform: translateY(-2px); border-color: var(--cozy-accent); }
.nexus-ach:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-ach-icon { font-size: 22px; line-height: 1; }
.nexus-ach-label {
  font-size: 9.5px;
  line-height: 1.2;
  text-align: center;
  font-weight: 600;
  color: var(--cozy-muted);
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.nexus-ach-lock {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 9px;
  opacity: 0.75;
}
.nexus-ach.is-unlocked {
  border-color: color-mix(in srgb, var(--cozy-accent) 60%, var(--cozy-line));
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--cozy-accent) 18%, transparent),
    color-mix(in srgb, var(--cozy-surface-2) 70%, transparent));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--cozy-accent) 18%, transparent);
}
.nexus-ach.is-unlocked .nexus-ach-label { color: var(--cozy-ink); }
.nexus-ach.is-unlocked .nexus-ach-lock { color: var(--cozy-accent-deep); font-weight: 800; }
.nexus-ach.is-locked { opacity: 0.62; }
.nexus-ach.is-locked .nexus-ach-icon { filter: grayscale(1); }
.nexus-ach.is-locked:hover { opacity: 0.85; }

/* --------------------------------------------------------------------------
   8. Статистика, статус, лента
   -------------------------------------------------------------------------- */
.nexus-stats { display: flex; flex-direction: column; gap: 5px; }
.nexus-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  font-size: 12px;
}
.nexus-stat-icon { width: 17px; text-align: center; }
.nexus-stat-label { flex: 1 1 auto; color: var(--cozy-muted); }
.nexus-stat-value { font-family: var(--cozy-mono, monospace); color: var(--cozy-ink); }

.nexus-presence { display: flex; flex-wrap: wrap; gap: 6px; }
.nexus-status {
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.nexus-status:hover { border-color: var(--cozy-accent); }
.nexus-status.is-active {
  background: color-mix(in srgb, var(--cozy-accent) 26%, transparent);
  border-color: var(--cozy-accent);
  font-weight: 700;
}
.nexus-status:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-status-edit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nexus-input {
  flex: 1 1 90px;
  min-width: 0;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid var(--cozy-line);
  background: var(--cozy-surface-2);
  color: var(--cozy-ink);
  font: inherit;
  font-size: 12px;
}
.nexus-input-emoji { flex: 0 0 58px; text-align: center; }
.nexus-input:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 1px; }
.nexus-status-edit .nexus-btn { min-height: 32px; padding: 6px 11px; }

.nexus-feed { display: flex; flex-direction: column; gap: 3px; max-height: 230px; overflow: auto; }
.nexus-feed-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px dashed transparent;
  font-size: 12px;
}
.nexus-feed-row:hover { border-color: var(--cozy-line); background: color-mix(in srgb, var(--cozy-bg) 40%, transparent); }
.nexus-feed-icon { width: 20px; text-align: center; font-size: 13px; flex: 0 0 auto; }
.nexus-feed-main { flex: 1 1 auto; min-width: 0; color: var(--cozy-muted); }
.nexus-feed-main b { color: var(--cozy-ink); }
.nexus-feed-row small { flex: 0 0 auto; font-family: var(--cozy-mono, monospace); font-size: 9.5px; color: var(--cozy-muted); opacity: 0.8; }
.nexus-feed-empty { margin: 4px 0; font-size: 12px; color: var(--cozy-muted); font-style: italic; }

.nexus-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* --------------------------------------------------------------------------
   9. Ферма 4.0 — огород, кухня, склад (FARM-CONTRACT §3)
   -------------------------------------------------------------------------- */
.nexus-farm-xp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--cozy-line);
  border-radius: 999px;
  background: var(--cozy-surface-2, rgba(255,246,230,.94));
  font: 700 11px/1.4 var(--cozy-mono, monospace);
  color: var(--cozy-ink);
  white-space: nowrap;
}
.nexus-farm-version {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid var(--cozy-line);
  border-radius: 999px;
  font: 700 10.5px/1.4 var(--cozy-mono, monospace);
  color: var(--cozy-muted);
  vertical-align: 1px;
}
.nexus-farm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 14px;
}
.nexus-farm-tabs[hidden] { display: none !important; }
.nexus-farm-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.nexus-farm-tab:hover { border-color: var(--cozy-accent); transform: translateY(-1px); }
.nexus-farm-tab.is-active {
  border-color: var(--cozy-accent);
  background: color-mix(in srgb, var(--cozy-accent) 18%, transparent);
  color: var(--cozy-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cozy-accent) 38%, transparent);
}
.nexus-farm-tab:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }

.nexus-farm-body { min-height: 120px; }
.nexus-farm-body[hidden],
.nexus-farm-panel[hidden] { display: none !important; }
.nexus-farm-panel { display: grid; gap: 12px; }
.nexus-farm-panel:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 3px; border-radius: 14px; }

.nexus-farm-loading,
.nexus-farm-empty {
  margin: 10px 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cozy-muted);
  font-style: italic;
}
.nexus-farm-loading[hidden] { display: none !important; }

/* Выбор культуры: горизонтальная лента карточек. */
.nexus-farm-crops {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 2px;
  scrollbar-width: thin;
}
.nexus-farm-crops::-webkit-scrollbar { height: 7px; }
.nexus-farm-crops::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--cozy-ink) 20%, transparent);
  border-radius: 99px;
}
.nexus-crop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex: 0 0 224px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.nexus-crop:hover { border-color: var(--crop-color, var(--cozy-accent)); transform: translateY(-1px); }
.nexus-crop:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-crop.is-active {
  border-color: var(--crop-color, var(--cozy-accent));
  background: color-mix(in srgb, var(--crop-color, var(--cozy-accent)) 20%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crop-color, var(--cozy-accent)) 40%, transparent);
}
.nexus-crop.is-locked { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.35); }
.nexus-crop.is-locked:hover { transform: none; border-color: var(--cozy-line); }
.nexus-crop-emoji { font-size: 20px; line-height: 1; }
.nexus-crop-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.nexus-crop-meta {
  display: block;
  font-family: var(--cozy-mono, monospace);
  font-size: 11px;
  line-height: 1.4;
  color: var(--cozy-muted);
}
.nexus-crop-meta-line { display: block; }
.nexus-crop-money { white-space: nowrap; }
.nexus-crop-lock { font-size: 11.5px; font-weight: 700; line-height: 1.35; color: var(--cozy-rose, #b4533a); }

/* Пейджер комнат: ‹ 1 2 3 4 › + счётчик. */
.nexus-farm-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 10px;
  border: 1px solid var(--cozy-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--cozy-surface-2) 34%, transparent);
}
.nexus-farm-pager-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cozy-muted);
  white-space: nowrap;
}
.nexus-farm-pager-title b {
  font-family: var(--cozy-mono, monospace);
  font-size: 13px;
  color: var(--cozy-ink);
}
.nexus-farm-pager-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nexus-farm-page-arrow,
.nexus-farm-page {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 46%, transparent);
  color: var(--cozy-muted);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}
.nexus-farm-page-arrow {
  width: 30px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  font-size: 17px;
  line-height: 1;
}
.nexus-farm-page { min-width: 36px; height: 36px; padding: 2px 5px; border-radius: 10px; }
.nexus-farm-page-num {
  font-family: var(--cozy-mono, monospace);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.15;
}
.nexus-farm-page-mark { font-size: 9px; line-height: 1; opacity: 0.85; }
.nexus-farm-page:hover:not([disabled]),
.nexus-farm-page-arrow:hover:not([disabled]) {
  border-color: var(--cozy-accent);
  color: var(--cozy-ink);
  transform: translateY(-1px);
}
.nexus-farm-page:focus-visible,
.nexus-farm-page-arrow:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-farm-page.has-room {
  color: var(--cozy-ink);
  border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 42%, var(--cozy-line));
}
.nexus-farm-page.is-shop {
  color: var(--cozy-accent-deep);
  border-style: dashed;
  border-color: color-mix(in srgb, var(--cozy-accent) 55%, var(--cozy-line));
}
.nexus-farm-page.is-locked { opacity: 0.62; border-style: dashed; }
.nexus-farm-page.is-active {
  opacity: 1;
  border-color: var(--cozy-accent);
  background: color-mix(in srgb, var(--cozy-accent) 20%, transparent);
  color: var(--cozy-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cozy-accent) 40%, transparent);
}
.nexus-farm-page.is-active .nexus-farm-page-mark { opacity: 1; }
.nexus-farm-page-arrow[disabled] { opacity: 0.4; cursor: default; }

.nexus-farm-page-content { display: grid; gap: 12px; min-width: 0; }
.nexus-farm-locked {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 1.5px dashed var(--cozy-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--cozy-surface-2) 30%, transparent);
  text-align: center;
}
.nexus-farm-locked-icon { font-size: 30px; line-height: 1; }
.nexus-farm-locked-title { font-size: 14px; font-weight: 800; line-height: 1.35; color: var(--cozy-ink); }
.nexus-farm-locked-text { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--cozy-muted); }

/* Комнаты (огород/кухня) карточками. */
.nexus-farm-room {
  border: 1.5px solid var(--cozy-line);
  border-radius: 18px;
  padding: 12px;
  background: color-mix(in srgb, var(--cozy-surface-2) 38%, transparent);
}
.nexus-farm-room-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.nexus-farm-room-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--cozy-ink);
}
.nexus-farm-room-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  color: var(--cozy-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.nexus-farm-room-badge.is-rent {
  color: var(--cozy-accent-deep);
  border-color: color-mix(in srgb, var(--cozy-accent) 48%, var(--cozy-line));
  background: color-mix(in srgb, var(--cozy-accent) 12%, transparent);
}
.nexus-farm-room-meta {
  font-family: var(--cozy-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: var(--cozy-muted);
}
.nexus-farm-room-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.nexus-btn-small {
  min-height: 30px !important;
  padding: 6px 11px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Грядки: 4×3 на десктопе, 3×4 на мобилке (медиа ниже). */
.nexus-plots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.nexus-plot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 108px;
  padding: 12px 8px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--cozy-line);
  background:
    radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--cozy-ink) 12%, transparent), transparent 70%),
    color-mix(in srgb, var(--cozy-bg) 46%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.2s;
}
.nexus-plot:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--cozy-accent); }
.nexus-plot:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-plot[disabled] { cursor: default; }
.nexus-plot.is-empty { border-style: dashed; }
.nexus-plot.is-growing { border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 42%, var(--cozy-line)); }
.nexus-plot-index {
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: var(--cozy-mono, monospace);
  font-size: 9px;
  color: var(--cozy-muted);
  opacity: 0.8;
}
.nexus-plot-emoji { font-size: 32px; line-height: 1; }
.nexus-plot-ghost { opacity: 0.38; filter: grayscale(0.4); }
.nexus-plot-name { font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.nexus-plot-label {
  font-size: 10px;
  line-height: 1.35;
  color: var(--cozy-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}
.nexus-plot-label-verb { }
.nexus-plot-timer {
  font-family: var(--cozy-mono, monospace);
  font-size: 12px;
  color: var(--cozy-accent-deep);
  font-weight: 700;
}
.nexus-plot-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 5px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--cozy-ink) 12%, transparent);
}
.nexus-plot-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cozy-accent, #d9a441), var(--cozy-leaf, #7d9a62));
  transition: width 0.9s linear;
}
.nexus-plot.is-ready {
  border-color: var(--cozy-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cozy-accent) 26%, transparent),
    0 8px 22px color-mix(in srgb, var(--cozy-accent) 24%, transparent);
  animation: nexusReadyPulse 2.2s ease-in-out infinite;
}
@keyframes nexusReadyPulse {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cozy-accent) 22%, transparent), 0 6px 18px color-mix(in srgb, var(--cozy-accent) 20%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cozy-accent) 34%, transparent), 0 10px 26px color-mix(in srgb, var(--cozy-accent) 30%, transparent); }
}
.nexus-plot.is-ready .nexus-plot-emoji { animation: nexusReadyBob 2.4s ease-in-out infinite; }
@keyframes nexusReadyBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}
.nexus-plot-ready {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
  color: #2b2112;
  background: var(--cozy-accent-soft, #f3d488);
  border-radius: 99px;
  padding: 2px 9px;
  margin-top: 2px;
  white-space: nowrap;
}
.nexus-plot.is-poor { opacity: 0.62; cursor: not-allowed; border-style: dashed; }
.nexus-plot-poor {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cozy-rose, #b4533a);
}

/* Кухня: плиты 1/3/6/12. */
.nexus-stoves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
/* Одна плита — компактная карточка, а не половина комнаты. */
.nexus-stoves[data-count="1"] { grid-template-columns: minmax(0, 240px); }
.nexus-stove {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 104px;
  padding: 12px 8px 16px;
  border-radius: 14px;
  border: 1.5px dashed var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.2s;
}
.nexus-stove:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--cozy-accent); }
.nexus-stove:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-stove.is-cooking {
  border-style: solid;
  border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 45%, var(--cozy-line));
  cursor: default;
}
.nexus-stove.is-cooking:hover { transform: none; }
.nexus-stove.is-ready {
  border-style: solid;
  border-color: var(--cozy-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cozy-accent) 24%, transparent),
    0 8px 20px color-mix(in srgb, var(--cozy-accent) 20%, transparent);
  animation: nexusReadyPulse 2.2s ease-in-out infinite;
}
.nexus-stove-plus { font-size: 24px; line-height: 1; color: var(--cozy-muted); }
.nexus-stove-label {
  font-size: 10px;
  line-height: 1.35;
  color: var(--cozy-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nexus-stove-emoji { font-size: 26px; line-height: 1; }
.nexus-stove.is-ready .nexus-stove-emoji { animation: nexusReadyBob 2.4s ease-in-out infinite; }
.nexus-stove-name { font-size: 11.5px; font-weight: 700; line-height: 1.3; }
.nexus-stove-timer {
  font-family: var(--cozy-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  color: var(--cozy-accent-deep);
}
.nexus-stove-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 5px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--cozy-ink) 12%, transparent);
}
.nexus-stove-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cozy-accent, #d9a441), var(--cozy-leaf, #7d9a62));
  transition: width 0.9s linear;
}
.nexus-stove-ready {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
  color: #2b2112;
  background: var(--cozy-accent-soft, #f3d488);
  border-radius: 99px;
  padding: 2px 9px;
  margin-top: 2px;
  white-space: nowrap;
}

/* Выбор блюда: инлайн-панель под плитами. */
.nexus-dish-picker {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1.5px solid var(--cozy-accent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--cozy-surface) 62%, transparent);
}
.nexus-dish-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.nexus-dish-head b { font-size: 13px; }
.nexus-dish-head > span { flex: 1 1 180px; color: var(--cozy-muted); font-size: 11.5px; }
.nexus-dish-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid var(--cozy-line);
  background: var(--cozy-surface);
  color: var(--cozy-ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.nexus-dish-close:hover { border-color: var(--cozy-accent); }
.nexus-dish-close:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-dish-list {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.nexus-dish-list::-webkit-scrollbar { width: 7px; }
.nexus-dish-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--cozy-ink) 20%, transparent);
  border-radius: 99px;
}
.nexus-dish-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.nexus-dish-row:hover:not([disabled]) { border-color: var(--cozy-accent); }
.nexus-dish-row:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-dish-row.is-active {
  border-color: var(--cozy-accent);
  background: color-mix(in srgb, var(--cozy-accent) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cozy-accent) 36%, transparent);
}
.nexus-dish-row.is-locked { opacity: 0.6; cursor: not-allowed; filter: grayscale(0.3); }
.nexus-dish-row.is-locked:hover { border-color: var(--cozy-line); }
.nexus-dish-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
.nexus-dish-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}
.nexus-dish-meta {
  font-family: var(--cozy-mono, monospace);
  font-size: 11px;
  line-height: 1.35;
  color: var(--cozy-muted);
  white-space: nowrap;
}
.nexus-dish-ings { display: flex; flex-wrap: wrap; gap: 4px; }
.nexus-dish-ing {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-surface-2) 62%, transparent);
  color: var(--cozy-muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.nexus-dish-ing.is-missing {
  color: var(--cozy-rose, #b4533a);
  border-color: color-mix(in srgb, var(--cozy-rose, #b4533a) 48%, var(--cozy-line));
  font-weight: 800;
}
.nexus-dish-lock { font-size: 11.5px; font-weight: 700; line-height: 1.35; color: var(--cozy-rose, #b4533a); }
.nexus-dish-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.nexus-dish-foot .nexus-farm-hint { flex: 1 1 220px; }

/* Покупка/аренда комнат. */
.nexus-farm-shop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--cozy-line) 72%, var(--cozy-accent));
  border-radius: 18px;
  background: color-mix(in srgb, var(--cozy-surface-2) 34%, transparent);
}
.nexus-farm-shop-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 0 1 auto; }
.nexus-farm-shop-title { font-size: 13px; font-weight: 800; line-height: 1.35; color: var(--cozy-ink); }
.nexus-farm-shop-sub { font-size: 11.5px; line-height: 1.4; color: var(--cozy-muted); }
.nexus-farm-shop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nexus-farm-limit {
  padding: 3px 10px;
  border: 1px solid var(--cozy-line);
  border-radius: 999px;
  color: var(--cozy-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.nexus-farm-sizes { display: flex; flex-wrap: wrap; gap: 5px; }
.nexus-farm-size {
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 9px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.nexus-farm-size:hover { border-color: var(--cozy-accent); }
.nexus-farm-size.is-active {
  border-color: var(--cozy-accent);
  background: color-mix(in srgb, var(--cozy-accent) 18%, transparent);
  color: var(--cozy-ink);
}
.nexus-farm-size:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-farm-size[disabled] { opacity: 0.55; cursor: default; }

.nexus-farm-hint {
  flex: 1 1 220px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--cozy-muted);
}

/* Склад. */
.nexus-farm-storage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}
.nexus-farm-storage-head b { font-size: 13.5px; line-height: 1.35; color: var(--cozy-ink); }
.nexus-storage-total {
  font-family: var(--cozy-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cozy-accent-deep);
}
.nexus-storage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nexus-storage-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--cozy-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--cozy-surface-2) 34%, transparent);
}
.nexus-storage-emoji { flex: 0 0 auto; font-size: 24px; line-height: 1; }
.nexus-storage-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 90px; }
.nexus-storage-info b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--cozy-ink);
}
.nexus-storage-info span {
  font-family: var(--cozy-mono, monospace);
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--cozy-muted);
}
.nexus-storage-qty {
  flex: 0 0 auto;
  font-family: var(--cozy-mono, monospace);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--cozy-ink);
}
.nexus-storage-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.nexus-storage-actions .nexus-btn-small { font-size: 11.5px !important; }
/* --------------------------------------------------------------------------
   10. Магазин
   -------------------------------------------------------------------------- */
.nexus-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}
.nexus-shop-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border-radius: 17px;
  border: 1.5px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-surface) 66%, transparent);
  min-width: 0;
}
.nexus-shop-card:hover { border-color: var(--cozy-accent); }
.nexus-shop-card.is-owned { border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 60%, var(--cozy-line)); }
.nexus-shop-card.is-soon { opacity: 0.9; }
.nexus-shop-preview {
  display: flex;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cozy-ink) 25%, transparent);
}
.nexus-shop-preview i { flex: 1; background: var(--swatch, #d9a441); }
.nexus-shop-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nexus-shop-emoji { font-size: 17px; }
.nexus-shop-title {
  flex: 1 1 auto;
  font-size: 13.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nexus-shop-price {
  flex: 0 0 auto;
  font-family: var(--cozy-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cozy-accent-deep);
}
.nexus-shop-card.is-owned .nexus-shop-price { color: var(--cozy-leaf, #7d9a62); }
.nexus-shop-desc {
  flex: 1 1 auto;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cozy-muted);
}
.nexus-shop-card .nexus-buy { width: 100%; margin-top: auto; font-size: 11.5px; padding: 7px 9px; }
.nexus-buy.is-poor { color: var(--cozy-muted); border-style: dashed; }
.nexus-buy.is-confirm { border-color: var(--cozy-accent); background: color-mix(in srgb, var(--cozy-accent) 22%, transparent); }
.nexus-buy.is-owned { border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 60%, transparent); color: var(--cozy-leaf, #7d9a62); }
.nexus-shop-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--cozy-line);
}
.nexus-sender-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cozy-accent-deep);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--cozy-accent-deep) 55%, transparent);
}
.nexus-sender-link:hover { border-bottom-style: solid; }
.nexus-sender-link:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; border-radius: 3px; }
.nexus-shop-hint { font-size: 10.5px; color: var(--cozy-muted); }

/* --------------------------------------------------------------------------
   9.1 Промокоды «Код для баллов» + админ-панель (CONTRACT §16.4)
   -------------------------------------------------------------------------- */
.nexus-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.nexus-promo { margin-top: 14px; }
.nexus-promo-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.nexus-promo-input {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--cozy-mono, monospace);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.nexus-promo-row .nexus-btn { flex: 0 0 auto; }
.nexus-promo-hint {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cozy-muted);
}
.nexus-promo-result {
  margin: 6px 0 0;
  min-height: 1.1em;
  font-size: 12px;
  line-height: 1.4;
  color: var(--cozy-muted);
}
.nexus-promo-result.is-error { color: #b4462f; font-weight: 600; }
.nexus-promo-result.is-ok { color: var(--cozy-leaf, #5f7c46); font-weight: 600; }
body[data-cozy-mode="night"] .nexus-promo-result.is-error { color: #f0a495; }

.nexus-admin { margin-top: 14px; }
.nexus-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.nexus-admin-head .nexus-h3 { margin: 0; }
.nexus-admin-refresh {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-ink);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.3s;
}
.nexus-admin-refresh:hover { border-color: var(--cozy-accent); background: color-mix(in srgb, var(--cozy-accent) 16%, transparent); }
.nexus-admin-refresh:active { transform: rotate(-90deg) scale(0.96); }
.nexus-admin-refresh:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.nexus-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--cozy-muted); min-width: 0; }
.nexus-field > span { line-height: 1.25; }
.nexus-field em { font-style: normal; opacity: 0.75; font-size: 10px; }
.nexus-field .nexus-input { width: 100%; }
.nexus-field-wide { grid-column: span 3; }
.nexus-admin-create { min-height: 36px; }
.nexus-admin-created {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--cozy-accent) 60%, var(--cozy-line));
  background: color-mix(in srgb, var(--cozy-accent) 12%, transparent);
  font-size: 12px;
}
.nexus-admin-created code {
  font-family: var(--cozy-mono, monospace);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cozy-ink);
}
.nexus-admin-list { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.nexus-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 40%, transparent);
}
.nexus-admin-row.is-inactive { opacity: 0.62; }
.nexus-admin-row-main { flex: 1 1 auto; min-width: 0; }
.nexus-admin-code-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nexus-admin-code-line code {
  font-family: var(--cozy-mono, monospace);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cozy-ink);
}
.nexus-admin-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--cozy-line);
}
.nexus-admin-badge.is-active {
  color: #2b2112;
  background: var(--cozy-accent-soft, #f3d488);
  border-color: color-mix(in srgb, var(--cozy-accent) 60%, var(--cozy-line));
}
.nexus-admin-badge.is-inactive { color: var(--cozy-muted); background: transparent; }
.nexus-admin-row small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--cozy-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.nexus-admin-disable { flex: 0 0 auto; min-height: 30px; padding: 5px 10px; font-size: 11px; }

/* --------------------------------------------------------------------------
   10.1 Присутствие 3.1: «кто в сети», график онлайна, невидимка (§13)
   -------------------------------------------------------------------------- */
.nexus-card-presence { width: min(900px, 100%); }
.nexus-presence-chip b { color: var(--cozy-ink); }
.nexus-h3-tight { margin: 0; }

.nexus-presence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.nexus-presence-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 42%, transparent);
}
.nexus-presence-row.is-self { border-color: color-mix(in srgb, var(--cozy-accent) 55%, var(--cozy-line)); }
.nexus-presence-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #2b2112;
  background: linear-gradient(145deg, var(--cozy-accent-soft, #f3d488), var(--cozy-accent, #d9a441));
  border: 1px solid color-mix(in srgb, var(--cozy-ink) 30%, transparent);
}
.nexus-presence-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nexus-presence-main { flex: 1 1 auto; min-width: 0; }
.nexus-presence-main b {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nexus-presence-main small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--cozy-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nexus-presence-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cozy-muted);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cozy-muted) 22%, transparent);
}
.nexus-presence-dot.is-online {
  background: var(--cozy-leaf, #7d9a62);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cozy-leaf, #7d9a62) 24%, transparent);
}

.nexus-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.nexus-range {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
}
.nexus-range button {
  border: 0;
  background: transparent;
  color: var(--cozy-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.nexus-range button:hover { color: var(--cozy-ink); background: color-mix(in srgb, var(--cozy-accent) 14%, transparent); }
.nexus-range button.is-active { color: #2b2112; background: var(--cozy-accent, #d9a441); }
.nexus-range button:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }

.nexus-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 150px;
  padding: 10px 8px 4px;
  border-radius: 14px;
  border: 1px solid var(--cozy-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cozy-surface-2) 55%, transparent), transparent),
    color-mix(in srgb, var(--cozy-bg) 40%, transparent);
  overflow: hidden;
}
.nexus-chart-bar {
  flex: 1 1 0;
  min-width: 2px;
  height: 0;
  border-radius: 5px 5px 2px 2px;
  background: color-mix(in srgb, var(--cozy-accent) 42%, transparent);
  transition: height 0.55s cubic-bezier(0.25, 1, 0.4, 1);
}
.nexus-chart-bar.has-online {
  background: linear-gradient(180deg, var(--cozy-accent-soft, #f3d488), var(--cozy-accent, #d9a441));
}
.nexus-chart.is-dense .nexus-chart-bar { border-radius: 3px 3px 1px 1px; }
.nexus-chart-axis {
  display: flex;
  gap: 3px;
  padding: 3px 8px 0;
  font-family: var(--cozy-mono, monospace);
  font-size: 8.5px;
  color: var(--cozy-muted);
}
.nexus-chart-axis span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; }
.nexus-chart-meta { margin-top: 8px; font-size: 12px; color: var(--cozy-ink); }
.nexus-chart-note {
  margin: 4px 0 0;
  min-height: 1em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cozy-accent-deep);
}
.nexus-chart-sub {
  margin: 12px 0 6px;
  font-family: var(--cozy-display, Georgia, serif);
  font-size: 13px;
  font-weight: 600;
}
.nexus-hourbars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 64px;
  padding: 6px;
  border-radius: 10px;
  border: 1px dashed var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 38%, transparent);
}
.nexus-hourbar { flex: 1 1 0; display: flex; align-items: flex-end; height: 100%; min-width: 0; }
.nexus-hourbar i {
  display: block;
  width: 100%;
  border-radius: 2px;
  background: color-mix(in srgb, var(--cozy-accent) 45%, transparent);
  transition: height 0.45s ease;
}

.nexus-presence-note { font-style: normal; }
.nexus-invisible-note {
  margin: 8px 0 0;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px dashed var(--cozy-line);
  font-size: 11px;
  line-height: 1.45;
  color: var(--cozy-muted);
}
.nexus-invisible-note.is-active {
  color: #2b2112;
  border-color: var(--cozy-accent);
  background: var(--cozy-accent-soft, #f3d488);
  font-weight: 600;
}
.nexus-status-invisible.is-active {
  background: color-mix(in srgb, var(--cozy-ink) 14%, transparent);
  border-color: var(--cozy-ink);
}

/* --------------------------------------------------------------------------
   11. Тост-резерв (если fx.js не загрузился)
   -------------------------------------------------------------------------- */
.nexus-toast-fallback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: 320px;
  padding: 12px 15px;
  border-radius: 14px;
  border: 2px solid var(--cozy-ink, #332a1e);
  background: var(--cozy-paper, #fff8e9);
  color: var(--cozy-ink, #332a1e);
  font-family: var(--cozy-font, "Trebuchet MS", sans-serif);
  font-size: 12.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  animation: nexusFadeIn 0.2s ease both;
}
.nexus-toast-fallback b { display: block; margin-bottom: 3px; }

/* --------------------------------------------------------------------------
   12. Мобильная адаптация
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .nexus-level { grid-template-columns: 118px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .nexus-ring { width: 112px; height: 112px; }
  .nexus-cols { grid-template-columns: minmax(0, 1fr); }
  .nexus-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .nexus-modal { padding: 8px; align-items: end; }
  .nexus-card {
    width: 100%;
    max-height: 94dvh;
    padding: 16px;
    border-radius: 20px;
  }
  .nexus-title { font-size: 20px; }
  .nexus-level { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .nexus-ring-wrap { justify-items: start; }
  .nexus-ring { width: 104px; height: 104px; }
  .nexus-ach-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nexus-ach { min-height: 74px; }
  .nexus-plots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nexus-plot { min-height: 100px; }
  .nexus-plot-label-verb { display: none; }
  .nexus-plot-ready { font-size: 9.5px; padding: 1px 7px; }
  .nexus-crop { flex: 0 0 176px; }
  .nexus-stoves { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .nexus-stoves[data-count="1"] { grid-template-columns: minmax(0, 148px); }
  .nexus-storage { grid-template-columns: minmax(0, 1fr); }
  .nexus-farm-shop { align-items: stretch; }
  .nexus-farm-shop-actions { width: 100%; justify-content: flex-start; }
  .nexus-farm-room { padding: 10px; }
  .nexus-dish-list { max-height: 270px; }
  .nexus-dish-head > span { flex: 1 1 100%; order: 3; }
  .nexus-dish-head b { order: 1; }
  .nexus-dish-close { order: 2; margin-left: auto; }
  .nexus-farm-tab { padding: 8px 11px; font-size: 12px; }
  .nexus-farm-crops { padding-bottom: 6px; }
  .nexus-farm-pager { padding: 7px 8px; gap: 6px 8px; }
  .nexus-farm-pager-title { font-size: 12px; }
  .nexus-farm-pager-controls { gap: 3px; }
  .nexus-farm-page { min-width: 32px; height: 32px; padding: 1px 4px; }
  .nexus-farm-page-num { font-size: 12px; }
  .nexus-farm-page-mark { font-size: 8px; }
  .nexus-farm-page-arrow { width: 28px; height: 32px; font-size: 16px; }
  .nexus-farm-locked { padding: 20px 12px; }
  .nexus-actions { position: sticky; bottom: -16px; padding: 10px 0 4px; background: var(--cozy-paper, #fff8ec); }
  .nexus-presence-list { grid-template-columns: minmax(0, 1fr); }
  .nexus-chart { height: 112px; }
  .nexus-hourbars { height: 52px; }
  .nexus-range button { padding: 5px 7px; font-size: 10.5px; }
  .nexus-shop-tabs, .nexus-shop-filters { gap: 4px; flex-wrap: wrap; }
  .nexus-shop-tab, .nexus-shop-filter { padding: 8px 10px; font-size: 12px; line-height: 1.4; }
  .nexus-shop-pack-badge { font-size: 11.5px; white-space: normal; }
  .nexus-shop-actions { flex-wrap: wrap; }
  .nexus-shop-actions .nexus-buy { flex: 1 1 100%; }
  .nexus-shop-grid, .nexus-shop-card { min-width: 0; max-width: 100%; }
  #nexus-shop-modal .nexus-card { padding-left: 12px; padding-right: 12px; }
  .cozy-theme-top { flex-wrap: wrap; }
  .cozy-theme-price, .cozy-theme-buy { flex: 0 0 auto; }
  .nexus-shop-chips { gap: 3px; }
  .cozy-theme-chips { gap: 3px; }
  .nexus-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nexus-field-wide { grid-column: span 2; }
  .nexus-admin-create { grid-column: span 2; }
  .nexus-promo-row .nexus-btn { width: 100%; }
}
@media (max-width: 430px) {
  #nexus-farm-sub { display: none; }
  .nexus-ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nexus-admin-form { grid-template-columns: minmax(0, 1fr); }
  .nexus-field-wide, .nexus-admin-create { grid-column: span 1; }
  .nexus-shop-grid { grid-template-columns: minmax(0, 1fr); }
  .nexus-head-main { gap: 9px; }
  .nexus-avatar, .nexus-badge-big { width: 48px; height: 48px; font-size: 22px; border-radius: 15px; }
}

/* --------------------------------------------------------------------------
   9.2 Магазин тем 3.3: табы, уровни, фишки, замки (CONTRACT §17.6)
   -------------------------------------------------------------------------- */
.nexus-shop-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
}
.nexus-shop-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.nexus-shop-tab:hover { color: var(--cozy-ink); border-color: var(--cozy-accent); }
.nexus-shop-tab.is-active {
  color: #2b2112;
  background: var(--cozy-accent, #d9a441);
  border-color: color-mix(in srgb, var(--cozy-ink) 30%, transparent);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cozy-ink) 30%, transparent);
}
.nexus-shop-tab:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-shop-tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--cozy-ink) 14%, transparent);
  font-family: var(--cozy-mono, monospace);
  font-size: 10px;
}
.nexus-shop-tab.is-active .nexus-shop-tab-count { background: rgba(43, 33, 18, 0.18); }

.nexus-shop-card.is-locked .nexus-shop-preview { opacity: 0.55; filter: grayscale(0.35); }
.nexus-shop-card.is-locked .nexus-shop-title { color: var(--cozy-muted); }
.nexus-shop-card.is-hub { border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 45%, var(--cozy-line)); }
.nexus-shop-card.is-highlight {
  animation: nexusShopHighlight 1.6s cubic-bezier(0.2, 1.2, 0.35, 1) both;
  border-color: var(--cozy-accent);
}
@keyframes nexusShopHighlight {
  0% { transform: scale(0.97); box-shadow: 0 0 0 0 color-mix(in srgb, var(--cozy-accent) 60%, transparent); }
  35% { transform: scale(1.015); box-shadow: 0 0 0 5px color-mix(in srgb, var(--cozy-accent) 24%, transparent); }
  100% { transform: scale(1); box-shadow: 0 8px 22px color-mix(in srgb, var(--cozy-accent) 18%, transparent); }
}
.nexus-shop-tier {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--cozy-mono, monospace);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--cozy-line);
  color: var(--cozy-muted);
}
.nexus-shop-tier.is-plus { border-color: color-mix(in srgb, var(--cozy-sky, #86a9bd) 55%, var(--cozy-line)); color: var(--cozy-sky, #86a9bd); }
.nexus-shop-tier.is-pro { border-color: color-mix(in srgb, var(--cozy-rose, #d47b9a) 55%, var(--cozy-line)); color: var(--cozy-rose, #d47b9a); }
.nexus-shop-tier.is-legend { border-color: color-mix(in srgb, var(--cozy-accent) 70%, var(--cozy-line)); color: var(--cozy-accent-deep); }
.nexus-shop-tier.is-flagship {
  color: #2b2112;
  background: linear-gradient(90deg, var(--cozy-accent-soft, #f3d488), var(--cozy-accent, #d9a441));
  border-color: color-mix(in srgb, var(--cozy-ink) 30%, transparent);
}
.nexus-shop-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.nexus-shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  color: var(--cozy-muted);
  border: 1px dashed var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 38%, transparent);
  white-space: nowrap;
}
.nexus-shop-chip.is-badge { color: var(--cozy-ink); border-style: solid; border-color: color-mix(in srgb, var(--cozy-accent) 55%, var(--cozy-line)); }
.nexus-shop-chip.is-signature { color: var(--cozy-accent-deep); }
.nexus-shop-actions { display: flex; gap: 6px; margin-top: auto; }
.nexus-shop-actions .nexus-buy { flex: 1 1 auto; }
.nexus-buy.is-apply {
  background: var(--cozy-accent, #d9a441);
  border-color: color-mix(in srgb, var(--cozy-ink) 30%, transparent);
  color: #2b2112;
  font-weight: 800;
}
.nexus-buy.is-apply:hover { background: var(--cozy-accent-soft, #f3d488); }
.nexus-shop-hub-note {
  margin: 8px 2px 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cozy-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   9.2b Магазин 3.4: единый список паков Sender+Дом (CONTRACT §18.2)
   -------------------------------------------------------------------------- */
.nexus-shop-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
}
.nexus-shop-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 45%, transparent);
  color: var(--cozy-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.nexus-shop-filter:hover { color: var(--cozy-ink); border-color: var(--cozy-accent); }
.nexus-shop-filter.is-active {
  color: #2b2112;
  background: var(--cozy-accent, #d9a441);
  border-color: color-mix(in srgb, var(--cozy-ink) 30%, transparent);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cozy-ink) 30%, transparent);
}
.nexus-shop-filter:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.nexus-shop-filter .nexus-shop-tab-count { background: color-mix(in srgb, var(--cozy-ink) 14%, transparent); }
.nexus-shop-filter.is-active .nexus-shop-tab-count { background: rgba(43, 33, 18, 0.18); }
.nexus-shop-packs-note {
  margin: 2px 2px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cozy-muted);
  font-style: italic;
}
.nexus-shop-pack-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid var(--cozy-line);
  color: var(--cozy-muted);
  background: color-mix(in srgb, var(--cozy-bg) 40%, transparent);
  white-space: nowrap;
}
.nexus-shop-pack-badge.is-world { color: var(--cozy-leaf, #5f7c46); border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 45%, var(--cozy-line)); }
.nexus-shop-pack-badge.is-palette { color: var(--cozy-accent-deep); border-color: color-mix(in srgb, var(--cozy-accent) 45%, var(--cozy-line)); }
.nexus-shop-card.is-free { opacity: 0.92; }
.nexus-shop-card.is-free .nexus-shop-preview { filter: saturate(0.85); }
.nexus-shop-card.is-world { border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 34%, var(--cozy-line)); }
.nexus-shop-card.is-palette { border-color: color-mix(in srgb, var(--cozy-accent) 28%, var(--cozy-line)); }
.nexus-shop-card[data-tier="flagship"] { border-color: color-mix(in srgb, var(--cozy-accent) 55%, var(--cozy-line)); }
.nexus-plot.is-poor { opacity: 0.62; cursor: not-allowed; border-style: dashed; }
.nexus-plot-poor {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--cozy-ripple, #b4533a);
  line-height: 1.1;
}

/* --------------------------------------------------------------------------
   9.2c Читабельность §18.6: кегль ≥12 (chips ≥11.5), line-height ≥1.35,
   muted-текст контрастнее, переносы/ellipsis, мобилка без горизонтального
   скролла, видимые фокус-ринги.
   -------------------------------------------------------------------------- */
.nexus-shop-title { font-size: 14px; line-height: 1.35; }
.nexus-shop-price { font-size: 12px; line-height: 1.4; }
.nexus-shop-desc { font-size: 12px; line-height: 1.5; }
.nexus-shop-tier { font-size: 11.5px; line-height: 1.4; padding: 2px 7px; }
.nexus-shop-chip { font-size: 11.5px; line-height: 1.4; white-space: normal; }
.nexus-shop-pack-badge {
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  max-width: 100%;
  text-align: left;
  letter-spacing: 0;
}
.nexus-shop-card:not(.is-free) .nexus-shop-pack-badge::after {
  content: " · включается отдельно";
  font-weight: 700;
  opacity: 0.92;
}
.nexus-shop-packs-note { font-size: 12px; line-height: 1.45; }
.nexus-shop-actions { flex-wrap: wrap; }
.nexus-shop-actions .nexus-buy { min-width: 0; font-size: 12px; line-height: 1.4; flex: 1 1 140px; }
.nexus-shop-card { min-width: 0; }
.nexus-shop-grid { min-width: 0; }
#nexus-shop-modal .nexus-card { overflow-x: hidden; }
.nexus-crop-meta {
  font-size: 12px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--cozy-muted) 72%, var(--cozy-ink));
}
.nexus-plot-poor { font-size: 12px; line-height: 1.4; }
.nexus-promo-hint { font-size: 12px; line-height: 1.45; }
.nexus-promo-result { font-size: 12px; line-height: 1.45; }
.nexus-shop-filter { font-size: 12px; line-height: 1.4; }
.nexus-shop-filter:focus-visible,
.nexus-shop-card .nexus-buy:focus-visible,
.nexus-shop-card [data-apply-pack]:focus-visible,
.nexus-crop:focus-visible,
.nexus-plot:focus-visible,
.nexus-promo-row .nexus-btn:focus-visible,
.cozy-theme-apply:focus-visible,
.cozy-theme-buy:focus-visible {
  outline: 2px solid var(--cozy-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   9.3 Карточки тем в настройках: цена/замок/фишки (CONTRACT §17.6)
   -------------------------------------------------------------------------- */
.cozy-theme-card.is-locked .cozy-theme-orb { filter: grayscale(0.45); opacity: 0.78; }
.cozy-theme-card.is-locked .cozy-theme-tagline { color: var(--cozy-muted); }
.cozy-theme-price {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--cozy-mono, monospace);
  border: 1px solid var(--cozy-line);
  color: var(--cozy-muted);
  white-space: nowrap;
}
.cozy-theme-price.is-free { color: var(--cozy-leaf, #5f7c46); border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 45%, var(--cozy-line)); }
.cozy-theme-price.is-owned { color: var(--cozy-leaf, #5f7c46); border-color: color-mix(in srgb, var(--cozy-leaf, #7d9a62) 45%, var(--cozy-line)); }
.cozy-theme-price.is-locked { color: var(--cozy-accent-deep); border-color: color-mix(in srgb, var(--cozy-accent) 50%, var(--cozy-line)); }
.cozy-theme-pack-badge {
  display: inline-flex;
  align-self: flex-start;
  margin: 1px 0 2px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--cozy-muted);
  border: 1px dashed color-mix(in srgb, var(--cozy-accent) 40%, var(--cozy-line));
  background: color-mix(in srgb, var(--cozy-bg) 38%, transparent);
}
.cozy-theme-buy {
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--cozy-accent) 65%, var(--cozy-ink));
  background: var(--cozy-accent, #d9a441);
  color: var(--cozy-ink, #2b2112);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.18s, transform 0.18s;
}
.cozy-theme-buy:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cozy-theme-buy:focus-visible { outline: 2px solid var(--cozy-accent); outline-offset: 2px; }
.cozy-theme-info, .cozy-theme-card { min-width: 0; }
.cozy-theme-top b {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cozy-theme-price { font-size: 12px; line-height: 1.4; }
.cozy-theme-pack-badge { font-size: 12px; line-height: 1.4; white-space: normal; max-width: 100%; }
.cozy-theme-buy { font-size: 12px; line-height: 1.4; }
.cozy-theme-chip { font-size: 11.5px; line-height: 1.4; white-space: normal; }
.cozy-theme-sender-note {
  margin: 2px 0 3px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cozy-muted);
  font-style: italic;
  overflow-wrap: anywhere;
}
.cozy-theme-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 3px; }
.cozy-theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--cozy-muted);
  border: 1px dashed var(--cozy-line);
  background: color-mix(in srgb, var(--cozy-bg) 38%, transparent);
  white-space: normal;
}
.cozy-theme-chip i { font-style: normal; }
.cozy-theme-chip.is-badge { color: var(--cozy-ink); border-style: solid; border-color: color-mix(in srgb, var(--cozy-accent) 55%, var(--cozy-line)); }
.cozy-theme-chip.is-signature { color: var(--cozy-accent-deep); }
.cozy-theme-top { flex-wrap: wrap; row-gap: 4px; }

/* --------------------------------------------------------------------------
   9.4 Уникальные фишки миров: #cozy-theme-fx (CONTRACT §17.6)
   Слой рисуется CSS-градиентами, pointer-events:none, ниже #cozy-app (z=1).
   Отключается на мобиле/lite и при reduced-motion (анимации — статика).
   -------------------------------------------------------------------------- */
#cozy-theme-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.9;
}
#cozy-theme-fx::before,
#cozy-theme-fx::after {
  content: "";
  position: absolute;
  inset: -25%;
  pointer-events: none;
  will-change: transform, background-position, opacity;
}

/* wheat — зерно/время суток */
body[data-theme-ambient="grain"] #cozy-theme-fx::before {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(217, 164, 65, 0.30) 0 1.6px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(168, 116, 34, 0.24) 0 1.4px, transparent 2px),
    radial-gradient(circle at 45% 85%, rgba(236, 197, 106, 0.26) 0 1.2px, transparent 2px);
  background-size: 74px 74px, 110px 110px, 150px 150px;
  animation: themeFxDrift 46s linear infinite;
}
body[data-theme-signature="grain-field"] #cozy-theme-fx::after {
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, color-mix(in srgb, var(--cozy-accent) 16%, transparent) 100%);
  animation: themeFxBreath 18s ease-in-out infinite;
}

/* hotline — VHS/неон */
body[data-theme-ambient="vhs"] #cozy-theme-fx::before {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  animation: themeFxScan 7.5s linear infinite;
  opacity: 0.55;
}
body[data-theme-signature="vhs-sunset"] #cozy-theme-fx::after {
  background:
    linear-gradient(0deg, transparent 46%, rgba(255, 45, 120, 0.16) 48%, rgba(0, 229, 255, 0.14) 51%, transparent 54%),
    linear-gradient(90deg, rgba(255, 45, 120, 0.07), transparent 22%, transparent 78%, rgba(0, 229, 255, 0.07));
  animation: themeFxScan 4.2s linear infinite reverse;
}

/* minimal — blueprint-сетка */
body[data-theme-ambient="grid"] #cozy-theme-fx::before {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--cozy-accent) 16%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cozy-accent) 16%, transparent) 1px, transparent 1px),
    linear-gradient(to right, color-mix(in srgb, var(--cozy-accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cozy-accent) 8%, transparent) 1px, transparent 1px);
  background-size: 180px 180px, 180px 180px, 36px 36px, 36px 36px;
  animation: themeFxPan 60s linear infinite;
  opacity: 0.5;
}
body[data-theme-signature="blueprint"] #cozy-theme-fx::after {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--cozy-accent) 14%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cozy-accent) 14%, transparent) 1px, transparent 1px),
    linear-gradient(to right, color-mix(in srgb, var(--cozy-accent) 7%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cozy-accent) 7%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 12% 14%, transparent 0 26px, color-mix(in srgb, var(--cozy-accent) 22%, transparent) 26px 27px, transparent 27px);
  background-size: 180px 180px, 180px 180px, 36px 36px, 36px 36px, 100% 100%;
  opacity: 0.55;
  animation: themeFxPan 55s linear infinite;
}

/* icecream — посыпка */
body[data-theme-ambient="sprinkles"] #cozy-theme-fx::before {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(212, 123, 154, 0.55) 0 2.4px, transparent 3px),
    radial-gradient(circle at 60% 50%, rgba(134, 169, 189, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 80%, rgba(217, 164, 65, 0.55) 0 2.2px, transparent 3px),
    radial-gradient(circle at 40% 70%, rgba(125, 154, 98, 0.5) 0 1.8px, transparent 3px);
  background-size: 130px 130px, 96px 96px, 170px 170px, 120px 120px;
  animation: themeFxFalls 13s linear infinite;
  opacity: 0.5;
}
body[data-theme-signature="sprinkles-world"] #cozy-theme-fx::after {
  background: radial-gradient(90% 70% at 50% 110%, color-mix(in srgb, var(--cozy-rose) 12%, transparent), transparent 70%);
}

/* fallout — Pip-Boy свечение */
body[data-theme-ambient="scanlines"] #cozy-theme-fx::before {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 4px);
  opacity: 0.5;
}
body[data-theme-signature="pipboy"] #cozy-theme-fx::after {
  background:
    radial-gradient(120% 100% at 50% 50%, transparent 48%, rgba(24, 60, 24, 0.30) 100%),
    linear-gradient(0deg, transparent 0 60%, rgba(140, 255, 140, 0.06) 61%, transparent 63%);
  animation: themeFxFlicker 6.5s steps(2, end) infinite, themeFxScan 11s linear infinite;
}

/* ps1 — CRT скан-линии */
body[data-theme-ambient="pixels"] #cozy-theme-fx::before {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 5px);
  opacity: 0.45;
}
body[data-theme-signature="crt"] #cozy-theme-fx::after {
  background:
    linear-gradient(180deg, transparent 44%, rgba(255, 255, 255, 0.05) 47%, transparent 50%),
    radial-gradient(130% 100% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.28) 100%);
  animation: themeFxScan 9s linear infinite;
}

/* xbox360 — blades-переход */
body[data-theme-ambient="stars"] #cozy-theme-fx::before {
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.24) 0 1.2px, transparent 2px),
    radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px);
  background-size: 140px 140px, 90px 90px;
  animation: themeFxBreath 14s ease-in-out infinite;
}
body[data-theme-signature="blades"] #cozy-theme-fx::after {
  background: linear-gradient(115deg,
    transparent 0 38%, color-mix(in srgb, var(--cozy-leaf, #7d9a62) 16%, transparent) 42% 48%,
    transparent 52% 58%, rgba(255, 255, 255, 0.06) 62% 66%, transparent 70%);
  background-size: 220% 220%;
  animation: themeFxBlades 12s ease-in-out infinite;
}

/* neon — для xbox360: мягкие неоновые дуги поколений */
body[data-theme-ambient="neon"] #cozy-theme-fx::before {
  background:
    radial-gradient(60% 40% at 15% 20%, color-mix(in srgb, var(--cozy-leaf, #7d9a62) 20%, transparent), transparent 70%),
    radial-gradient(50% 38% at 85% 30%, color-mix(in srgb, var(--cozy-accent) 16%, transparent), transparent 70%),
    radial-gradient(46% 34% at 50% 92%, color-mix(in srgb, var(--cozy-sky, #86a9bd) 14%, transparent), transparent 72%);
  animation: themeFxBreath 9s ease-in-out infinite;
}
body[data-theme-signature="blades"] #cozy-theme-fx::before {
  opacity: 0.9;
}

/*
/* rose — лепестки */
body[data-theme-ambient="petals"] #cozy-theme-fx::before {
  background-image:
    radial-gradient(ellipse 5px 3px at 20% 30%, rgba(212, 123, 154, 0.45), transparent 60%),
    radial-gradient(ellipse 4px 3px at 70% 60%, rgba(196, 111, 137, 0.4), transparent 60%),
    radial-gradient(ellipse 6px 3px at 45% 80%, rgba(240, 190, 205, 0.4), transparent 60%);
  background-size: 190px 240px, 150px 210px, 240px 280px;
  animation: themeFxFalls 17s linear infinite;
  opacity: 0.55;
}
body[data-theme-signature="rose-petals"] #cozy-theme-fx::after {
  background: radial-gradient(100% 80% at 50% 110%, color-mix(in srgb, var(--cozy-rose) 10%, transparent), transparent 70%);
}

@keyframes themeFxDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-120px, 60px, 0); }
}
@keyframes themeFxPan {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 180px 180px, 180px 180px, 360px 360px, 360px 360px; }
}
@keyframes themeFxScan {
  from { background-position: 0 0; }
  to { background-position: 0 26px; }
}
@keyframes themeFxFalls {
  from { background-position: 0 -260px, 0 -180px, 0 -320px, 0 -220px; }
  to { background-position: 0 380px, 0 300px, 0 460px, 0 360px; }
}
@keyframes themeFxBreath {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}
@keyframes themeFxBlades {
  0%, 100% { transform: translate3d(-8%, 4%, 0); }
  50% { transform: translate3d(8%, -4%, 0); }
}
@keyframes themeFxFlicker {
  0%, 100% { opacity: 0.7; }
  47% { opacity: 0.7; }
  48% { opacity: 0.42; }
  49% { opacity: 0.7; }
  72% { opacity: 0.5; }
}

/* --------------------------------------------------------------------------
   13. Лёгкий режим и «меньше движения»
   -------------------------------------------------------------------------- */
html.cozy-lite .nexus-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.cozy-lite .nexus-card { box-shadow: 0 8px 22px rgba(20, 14, 6, 0.28); }
html.cozy-lite #cozy-theme-fx { display: none !important; }
html.cozy-lite .nexus-plot.is-ready,
html.cozy-lite .nexus-stove.is-ready { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .nexus-modal, .nexus-card, .nexus-chip-btn, .nexus-here { animation: none !important; }
  #cozy-theme-fx::before, #cozy-theme-fx::after { animation: none !important; }
  .nexus-ring-fill, .nexus-xpbar i, .nexus-plot-bar i,
  .nexus-stove-bar i, .nexus-farm-page, .nexus-farm-page-arrow,
  .nexus-chart-bar, .nexus-hourbar i { transition: none !important; }
  .nexus-plot.is-ready, .nexus-plot.is-ready .nexus-plot-emoji,
  .nexus-stove.is-ready, .nexus-stove.is-ready .nexus-stove-emoji { animation: none !important; }
}
body.cozy.reduce-motion .nexus-modal,
body.cozy.reduce-motion .nexus-card,
body.cozy.reduce-motion .nexus-chip-btn,
body.cozy.reduce-motion .nexus-here { animation: none !important; }
body.cozy.reduce-motion #cozy-theme-fx::before,
body.cozy.reduce-motion #cozy-theme-fx::after { animation: none !important; }
body.cozy.reduce-motion .nexus-ring-fill,
body.cozy.reduce-motion .nexus-xpbar i,
body.cozy.reduce-motion .nexus-plot-bar i,
body.cozy.reduce-motion .nexus-stove-bar i,
body.cozy.reduce-motion .nexus-farm-page,
body.cozy.reduce-motion .nexus-farm-page-arrow,
body.cozy.reduce-motion .nexus-chart-bar,
body.cozy.reduce-motion .nexus-hourbar i { transition: none !important; }
body.cozy.reduce-motion .nexus-plot.is-ready,
body.cozy.reduce-motion .nexus-plot.is-ready .nexus-plot-emoji,
body.cozy.reduce-motion .nexus-stove.is-ready,
body.cozy.reduce-motion .nexus-stove.is-ready .nexus-stove-emoji { animation: none !important; }
