:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --ink: #161513;
  --muted: #6b675f;
  --subtle: #8f8a80;
  --line: #e4dfd4;
  --accent: #1f4e46;
  --accent-fg: #f4f1ea;
  --danger: #8a2e2e;
  --display: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 1px 0 rgb(22 21 19 / 0.04), 0 18px 40px -24px rgb(22 21 19 / 0.28);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(rgb(22 21 19 / 0.035) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

a { color: inherit; }
img, svg, video, canvas { max-width: 100%; height: auto; }
img { display: block; }
input, select, textarea, button {
  max-width: 100%;
  font: inherit;
  font-size: 16px;
}
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}
p, label, span, td, th, li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1rem;
  min-width: 0;
}

/* ========== Шапка ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgb(255 253 248 / 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-top: var(--safe-t);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.7rem 0;
  min-width: 0;
  position: relative;
}

.brand {
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.brand span {
  margin-left: 0.35rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
  color: var(--ink);
  flex-shrink: 0;
}
.nav-toggle-bars {
  display: block;
  width: 1.15rem;
  height: 0.12rem;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -0.35rem 0 currentColor, 0 0.35rem 0 currentColor;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  height: 0;
  box-shadow: none;
  background: transparent;
  position: relative;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.15rem;
  height: 0.12rem;
  background: currentColor;
  border-radius: 1px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.35rem 0 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0.15rem;
}
.site-nav.is-open {
  display: flex;
}
.site-nav .btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.9rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  flex-shrink: 0;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn-danger { color: var(--danger); }
.btn:hover { opacity: 0.92; }
.btn-place {
  padding: 0 0.85rem;
}

.main {
  padding: 1.25rem 0 3rem;
  min-width: 0;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-bottom: var(--safe-b);
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-brand {
  font-family: var(--display);
  color: var(--ink);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-heading {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 600;
}
.seo-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.seo-links .section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}
.seo-links .subs { margin-bottom: 1.25rem; }
.facts a { text-decoration: underline; text-underline-offset: 2px; }
.ad-meta-line a, .cat a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.card-body h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.15rem;
}


.hero {
  max-width: 40rem;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  min-width: 0;
}
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.65rem, 6.5vw, 3rem);
}
.lead {
  color: var(--muted);
  max-width: 40rem;
  margin: 0.75rem 0 0;
  font-size: 0.96rem;
}

.search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  min-width: 0;
}
.search input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0 1rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.search .btn { width: 100%; min-height: 48px; }
.search input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus,
.filters input:focus,
.filters select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.55rem;
  margin: 0 -0.25rem 1rem;
  padding-inline: 0.25rem;
  min-width: 0;
  scrollbar-width: thin;
}
.chips::-webkit-scrollbar { height: 4px; }
.chips::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.chip.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}
.sub {
  text-decoration: none;
  background: var(--surface);
  color: var(--muted);
  border-radius: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.sub.is-on {
  background: var(--accent);
  color: var(--accent-fg);
}

.count { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  min-width: 0;
  width: 100%;
}
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover { transform: translateY(-2px); }
.card-img {
  aspect-ratio: 16 / 10;
  width: 100%;
  min-height: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--subtle);
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.card-body {
  min-width: 0;
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.card-body h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}
.cat {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.price {
  margin-top: auto;
  padding-top: 0.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.empty-title {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.pager a {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  text-decoration: none;
  background: var(--surface);
}
.pager a.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.city-pick {
  margin: 0 0 1.4rem;
}
.city-pick .section-title { margin-bottom: 0.35rem; }
.more-wrap {
  display: flex;
  justify-content: center;
  margin: 1.6rem 0 0.4rem;
}
.more-wrap .btn {
  min-width: 12rem;
  min-height: 44px;
}
.city-pick-search {
  display: block;
  max-width: 22rem;
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.city-pick-search input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}
#home-city-more { margin: 0.2rem 0 0.6rem; }

.form {
  width: 100%;
  max-width: 36rem;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  min-width: 0;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
.form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.form textarea {
  min-height: 8rem;
  resize: vertical;
}
.form input[type="file"] {
  min-height: 48px;
  padding: 0.5rem;
}
.form input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  appearance: auto;
  -webkit-appearance: checkbox;
}
.form button { width: 100%; min-height: 48px; }
.check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  grid-template-columns: none;
}
.check input {
  width: auto;
  margin-top: 0.25rem;
  flex: 0 0 auto;
}
.check span { min-width: 0; }
.check.is-off { opacity: 0.45; }
.check.is-off span { color: var(--subtle, #8f8a80); }
.note {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  min-width: 0;
}
.errors {
  background: #f7eceb;
  color: var(--danger);
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  overflow-wrap: anywhere;
}
.success {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-img {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid var(--line);
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.price-lg {
  font-family: var(--display);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0 0;
}
.body-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 1.25rem 0;
}
.contact {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.contact a { color: var(--accent); }
.back a { color: var(--muted); text-decoration: none; }
.tiny { font-size: 0.8rem; color: var(--subtle); }

.mine {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
  min-width: 0;
}
.mine-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  min-width: 0;
}
.mine-row > * { min-width: 0; }
.mine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}
.mine-actions form { margin: 0; flex: 1 1 auto; }
.mine-actions .btn,
.mine-actions button {
  flex: 1 1 8rem;
  width: auto;
}

.legal { max-width: 46rem; min-width: 0; }
.legal h2 { margin-top: 1.5rem; font-size: 1.15rem; font-weight: 500; }
.legal ul { padding-left: 1.2rem; }

/* ========== Фильтры ========== */
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  align-items: end;
}
.filters[hidden] {
  display: none !important;
}
.filters label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  min-width: 0;
}
.filters input:not([type="checkbox"]),
.filters select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
.filters select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: var(--bg);
  padding-right: 2rem;
}
.filters .check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  align-self: end;
  min-height: 44px;
  padding: 0.2rem 0;
  color: var(--ink);
  font-weight: 400;
  font-size: 0.92rem;
}
.filters .check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  flex: 0 0 auto;
  appearance: auto;
  -webkit-appearance: checkbox;
  border: none;
  background: transparent;
  padding: 0;
}
.filters > .btn {
  min-height: 44px;
  width: 100%;
}
.filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  grid-column: 1 / -1;
}
.filters-actions .check {
  min-height: auto;
  padding: 0.4rem 0;
}
.filters-actions .btn {
  width: auto;
  min-width: 9rem;
}

.card-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.7rem;
  font-weight: 500;
}
.badge-light {
  background: rgb(255 253 248 / 0.92);
  color: var(--ink);
}
.badge-urgent {
  background: #b42318;
  color: #fff;
}
.badge-sold {
  background: var(--ink);
  color: var(--bg);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.facts > div {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.9rem;
  padding: 0.75rem;
  min-width: 0;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0.25rem 0 0; font-weight: 500; }
.extra-block {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
  background: var(--bg);
  margin: 0;
  min-width: 0;
}
.extra-block[hidden] { display: none !important; }
.extra-block legend {
  font-weight: 600;
  padding: 0 0.4rem;
  font-size: 0.95rem;
}
.extra-block .tiny { margin: 0; color: var(--muted); }
.market {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  margin: 0 0 1.25rem;
}
.market-title {
  margin: 0 0 0.4rem;
  font-weight: 600;
  font-size: 0.98rem;
}
.market p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.market strong { color: var(--ink); font-weight: 600; }
.market-hint { margin-top: 0.4rem !important; }
.market-low { color: #1f4e46 !important; }
.market-high { color: #b42318 !important; }
.ad-video {
  margin: 0.35rem 0 0;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}
.ad-video iframe { width: 100%; height: 100%; border: 0; }
.thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
}
.thumb {
  flex: 0 0 4rem;
  width: 4rem;
  height: 4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--surface);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.view-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}
.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.form-lite {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}
.form-lite textarea,
.form-lite input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  font: inherit;
}
.review-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.review-list li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem;
}
.inbox {
  display: grid;
  gap: 1.25rem;
}
.thread-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.thread-list a {
  display: block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
}
.thread-list a.is-on {
  background: var(--ink);
  color: var(--bg);
}
.thread-list span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubbles {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}
.bubble {
  max-width: 90%;
  background: var(--bg);
  border-radius: 1rem;
  padding: 0.65rem 0.85rem;
}
.bubble.mine-b {
  margin-left: auto;
  background: var(--accent);
  color: var(--accent-fg);
}
.steps {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}
.steps li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1rem 1.15rem;
}
.steps h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.15rem;
}

/* Десктоп: обычная горизонтальная навигация */
@media (min-width: 720px) {
  .bar {
    flex-wrap: nowrap;
    padding: 0.9rem 0;
  }
  .brand { font-size: 1.4rem; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    width: auto;
    border-top: none;
    margin-top: 0;
    padding: 0;
    gap: 0.35rem;
  }
  .site-nav .btn {
    width: auto;
    justify-content: center;
    min-height: 42px;
  }
  .header-actions {
    order: 0;
  }
}

@media (min-width: 640px) {
  .wrap { padding-inline: 1.25rem; }
  .main { padding: 2rem 0 3.5rem; }
  .hero { margin-bottom: 2.25rem; padding-left: 1.25rem; }
  .search {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .search input { flex: 1 1 auto; }
  .search .btn { width: auto; flex: 0 0 auto; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
  .card { border-radius: 1.25rem; }
  .card-img { aspect-ratio: 4 / 3; }
  .form { padding: 1.35rem; border-radius: 1.25rem; }
  .mine-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .mine-actions { width: auto; }
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 0;
  }
  .footer-grid > * { flex: 1 1 18rem; }
}

@media (min-width: 700px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filters > .btn {
    width: auto;
    justify-self: start;
    min-width: 10rem;
  }
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .inbox {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .main { padding: 2.5rem 0 4rem; }
  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .wrap { padding-inline: 0.75rem; }
  .brand span { display: none; }
  .btn-place { padding: 0 0.75rem; font-size: 0.88rem; }
  .hero h1 { font-size: 1.65rem; }
  .lead { font-size: 0.94rem; }
}

@media (hover: none) and (pointer: coarse) {
  .btn, .chip, .sub, .pager a, .nav-toggle { -webkit-tap-highlight-color: transparent; }
  .card:hover, .btn:hover { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.extra-license.is-off { opacity: .45; }
.extra-license.is-off span { color: var(--subtle, #8f8a80); }
.studio-layout {
  display: grid;
  gap: 1.25rem;
}
.studio-side {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 0.85rem;
  display: grid;
  gap: 0.2rem;
  height: max-content;
}
.studio-side-title {
  margin: 0 0.55rem 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.studio-side a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.studio-side a.is-on {
  background: var(--ink);
  color: var(--bg);
}
.studio-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.studio-list li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}
.studio-list h2 { margin: 0.2rem 0; font-size: 1.15rem; }
.course-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
.lesson-list, .lesson-nav {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.65rem;
}
.lesson-nav {
  padding-left: 0;
  list-style: none;
}
.lesson-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  text-decoration: none;
  border: 1px solid var(--line);
}
.lesson-nav a.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
@media (min-width: 800px) {
  .studio-layout { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}
@media (min-width: 960px) {
  .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
