.fund-line {
  height: 4px;
  margin: 0 0 9px;
  background: #31372b;
}

.fund-line i {
  display: block;
  width: 13%;
  height: 100%;
  background: var(--gold);
}

.location-button.locked b {
  color: var(--gold);
  font-size: .72rem;
}

.start-menu {
  width: min(780px, calc(100vw - 28px));
  overflow: hidden;
}

.start-menu::backdrop {
  background: rgba(4, 7, 5, .9);
  backdrop-filter: blur(7px);
}

.start-menu form {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  padding: 0;
}

.start-visual {
  position: relative;
  min-height: 440px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(8, 12, 9, .12), rgba(8, 12, 9, .9)), url("assets/dacha.png") center / cover;
}

.start-badge {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #172018;
  font: 800 .9rem Georgia, serif;
  transform: rotate(-7deg);
}

.start-title {
  position: absolute;
  left: 28px;
  bottom: 30px;
}

.start-title p {
  margin: 0;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.start-title h2 {
  margin: 6px 0 3px;
  font-size: 2.15rem;
}

.start-title span {
  color: #c8cec5;
  font-size: .7rem;
}

.mentor-pair {
  position: absolute;
  right: 24px;
  bottom: 26px;
  display: flex;
}

.mentor-pair img {
  width: 58px;
  height: 58px;
  border: 2px solid #172119;
  border-radius: 50%;
  object-fit: cover;
}

.mentor-pair img + img {
  margin-left: -12px;
}

.start-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.start-copy h3 {
  margin: 7px 0 9px;
  font: 500 1.55rem Georgia, serif;
}

.start-copy p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}

.start-copy small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: .62rem;
  text-align: center;
}

.start-menu .start-copy button {
  margin-top: 16px;
}

@media (max-width: 680px) {
  .start-menu form {
    grid-template-columns: 1fr;
  }

  .start-visual {
    min-height: 210px;
  }

  .start-copy {
    padding: 25px;
  }

  .start-title {
    bottom: 22px;
  }

  .mentor-pair {
    bottom: 18px;
  }
}

.onboarding-modal {
  width: min(720px, calc(100vw - 28px));
  overflow: hidden;
  border-color: #6d6c52;
}

.onboarding-modal::backdrop {
  background: rgba(3, 6, 4, .87);
  backdrop-filter: blur(8px) saturate(.65);
}

.onboarding-scene {
  padding: 26px;
  background: linear-gradient(145deg, rgba(37, 49, 39, .98), rgba(18, 26, 20, .99));
}

.onboarding-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.onboarding-heading h2 {
  margin: 5px 0 0;
  font-size: 1.55rem;
}

.onboarding-modal .text-button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 11px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.onboarding-modal .text-button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.onboarding-message {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 190px;
  padding: 22px 0 18px;
}

.onboarding-message img {
  width: 112px;
  height: 144px;
  border: 1px solid #687067;
  object-fit: cover;
}

.onboarding-message strong {
  color: var(--gold);
  font: 500 1.1rem Georgia, serif;
}

.onboarding-message p {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.onboarding-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-choices button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #202b22;
  color: var(--text);
  font-size: .76rem;
  font-weight: 600;
  text-align: left;
}

.onboarding-choices button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.onboarding-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: .65rem;
}

.onboarding-note i {
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 560px) {
  .onboarding-scene {
    padding: 19px;
  }

  .onboarding-message {
    grid-template-columns: 72px 1fr;
    gap: 13px;
    min-height: 160px;
  }

  .onboarding-message img {
    width: 72px;
    height: 96px;
  }

  .onboarding-choices {
    grid-template-columns: 1fr;
  }
}

.scene-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.scene-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

img.scene-layer {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.scene-art { position: absolute; inset: 0; }
.scene-art > #sceneImage { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene[data-location="dacha"] { display: flex; flex-direction: column; }
.scene[data-location="dacha"] .scene-art { position: relative; inset: auto; width: 100%; aspect-ratio: 2 / 1; flex: none; margin-top: 120px; }
.scene[data-location="dacha"] .scene-art > #sceneImage { object-fit: contain; }
.scene[data-location="dacha"] .scene-shade { display: none; }
.scene[data-location="dacha"] .dialogue-box { position: relative; inset: auto; margin: 16px 14px 14px; }
.scene[data-location="dacha"] .scene-cost { top: 82px; left: 20px; right: auto; }
@media (min-width: 1121px) {
  .main-grid:has(.scene[data-location="dacha"]) { grid-template-rows: minmax(590px, auto) 136px; }
}
@media (min-width: 761px) and (max-width: 1120px) {
  .main-grid:has(.scene[data-location="dacha"]) { grid-template-rows: minmax(590px, auto) auto auto; }
}
/* All upgrade regions use the same 1774 × 887 camera frame as the backdrop. */
img.scene-layer--yard-fence { clip-path: inset(50% 29% 38% 49%); }
img.scene-layer--yard-firepit { clip-path: inset(68% 29% 17% 49%); }
img.scene-layer--yard-table { clip-path: inset(56% 58% 14% 10%); }
img.scene-layer--packing-corner { clip-path: inset(47% 17% 36% 71%); }
img.scene-layer--moonshine-still { clip-path: inset(45% 1% 34% 87%); }

.scene-shade { z-index: 2; }
.scene-title,
.scene-cost { z-index: 3; }
.dialogue-box { z-index: 4; }

.scene[data-phase="night"] .scene-art {
  filter: brightness(.46) saturate(.72) hue-rotate(8deg);
}

.scene-layer--yard-firepit {
  animation: none;
}

.scene-layer--lake-shimmer {
  inset: 37% 20% 29% 42%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 210, 133, .15) 43%, transparent 63%);
  mix-blend-mode: screen;
  filter: blur(7px);
  animation: lakeShimmer 8s ease-in-out infinite;
}

.scene[data-location="lake"] .scene-layer--lake-shimmer {
  inset: 38% 5% 13% 4%;
  opacity: .72;
}

.scene-layer--tree-breeze {
  inset: -1% -1% 48%;
  backdrop-filter: blur(.3px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 100%);
  transform-origin: center top;
  animation: treeBreeze 10s ease-in-out infinite;
}

@keyframes firelight {
  0%, 100% { filter: brightness(.96); opacity: .96; }
  50% { filter: brightness(1.12) saturate(1.08); opacity: 1; }
}

@keyframes lakeShimmer {
  0%, 100% { transform: translateX(-3%) scaleX(.96); opacity: .35; }
  50% { transform: translateX(4%) scaleX(1.05); opacity: .72; }
}

@keyframes treeBreeze {
  0%, 100% { transform: skewX(-.12deg) translateX(-.08%); }
  50% { transform: skewX(.18deg) translateX(.12%); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-layer--yard-firepit,
  .scene-layer--lake-shimmer,
  .scene-layer--tree-breeze {
    animation: none;
  }
}

/* Guidance, contacts and explainable actions */
.guidance-card p:not(.kicker) { margin: 7px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.45; }
.guidance-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.guidance-actions button { padding: 6px 8px; border: 1px solid #6f623b; background: #212c22; color: var(--gold); font-size: .61rem; cursor: pointer; }
.location-button em { display: inline-block; margin-top: 4px; color: var(--gold); font-size: .54rem; font-style: normal; letter-spacing: .04em; text-transform: uppercase; }
.contact-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.contact-tabs button { padding: 6px; border: 1px solid var(--soft); background: #172119; color: var(--muted); font-size: .62rem; cursor: pointer; }
.contact-tabs button.active { border-color: var(--gold); color: var(--gold); }
.chat-actions { display: grid; gap: 5px; margin-top: 7px; }
.chat-actions button { padding: 6px 7px; border: 1px solid var(--soft); background: #202b22; color: var(--text); text-align: left; font-size: .59rem; cursor: pointer; }
.chat-actions button:hover { border-color: var(--gold); }
.assignment-card { margin-top: 7px; padding: 8px; border: 1px dashed #665b3c; background: #1b251d; }
.assignment-card strong,.assignment-card span,.assignment-card small { display: block; }
.assignment-card strong { color: var(--gold); font-size: .64rem; }
.assignment-card span { margin-top: 4px; font-size: .58rem; line-height: 1.35; }
.assignment-card small { margin-top: 4px; color: var(--muted); font-size: .54rem; }
.assignment-card button { margin-top: 6px; }
.offer-card { position: relative; }
.offer-card .offer-category { margin: 0 0 5px; color: #9eaa9e; font-size: .52rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.offer-card .offer-benefit { margin-top: 5px; color: #d9e2d4; font-size: .58rem; line-height: 1.35; }
.offer-card.locked { opacity: .66; }
.offer-card.locked::after { content: "ЗАКРЫТО"; position: absolute; top: 7px; right: 7px; color: #db8a6d; font-size: .5rem; font-weight: 800; }

/* Visual room and loadout */
.room-modal { width: min(1080px, calc(100vw - 28px)); max-height: calc(100vh - 24px); overflow: auto; }
.room-modal form { padding: 18px; }
.room-heading p:not(.kicker) { max-width: 650px; margin: 4px 0 0; }
.room-scene { position: relative; width: 100%; aspect-ratio: 2 / 1; margin-top: 12px; overflow: hidden; border: 1px solid #596258; background: #101611; }
.room-background,.room-layers,.room-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.room-background,.room-layer { object-fit: fill; }
.room-scene[data-phase="ruined"] .room-background { filter: brightness(.48) saturate(.55); }
.room-scene[data-phase="repairing"] .room-background { filter: brightness(.72) saturate(.75); }
.room-scene[data-phase="ruined"]::after,.room-scene[data-phase="repairing"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg,rgba(0,0,0,.28),transparent 48%,rgba(21,31,24,.22)); }
.room-layer--weapon { clip-path: inset(17% 73% 29% 10%); }
.room-layer--ammo { clip-path: inset(45% 44% 39% 35%); }
.room-layer--jacket { clip-path: inset(16% 16% 48% 69%); }
.room-layer--binoculars { clip-path: inset(42% 15% 38% 66%); }
.room-stage { position: absolute; z-index: 3; left: 12px; bottom: 12px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(9,13,10,.78); color: #e9cf8b; font-size: .62rem; }
.loadout-summary { display: flex; justify-content: space-between; gap: 18px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); background: #111a14; }
.loadout-summary span,.loadout-summary strong { display: block; }
.loadout-summary span { color: var(--gold); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.loadout-summary strong { margin-top: 4px; font-size: .7rem; }
.loadout-summary small { color: var(--muted); font-size: .58rem; align-self: center; }
.room-inventory { grid-template-columns: repeat(4,minmax(0,1fr)); }
.inventory-item { position: relative; }
.inventory-item.packed { border-color: var(--gold); background: #263326; }
.inventory-item button { min-height: 30px; margin-top: 8px; padding: 4px 7px; }
.inventory-item .item-effect { color: #dce3d8; }

@media (max-width: 760px) {
  .room-inventory { grid-template-columns: 1fr 1fr; }
  .loadout-summary { display: block; }
  .loadout-summary small { display: block; margin-top: 7px; }
}
