:root {
  --ink: #1c2429;
  --muted: #66727a;
  --line: #e4eaee;
  --paper: #eef2f4;
  --white: #ffffff;
  --sea: #0e7c8c;
  --sea-deep: #0a5f6c;
  --sun: #f0a018;
  --sun-deep: #d4890c;
  --shadow: 0 1px 2px rgba(28, 36, 41, 0.04), 0 8px 24px rgba(28, 36, 41, 0.04);
  --tone: #5e7d84;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 6% -12%, rgba(14, 124, 140, 0.09), transparent 58%),
    radial-gradient(900px 460px at 100% 0%, rgba(240, 160, 24, 0.07), transparent 52%),
    var(--paper);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
[x-cloak] { display: none !important; }
.glyph { width: 22px; height: 22px; display: block; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.announce {
  background: rgba(14, 61, 70, 0.82);
  color: #d7eef1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 7px 16px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: 1px solid rgba(28, 36, 41, 0.06);
}
.top__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0 8px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo__sun {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 30deg, #f7c35a, #f0a018, #ffe9b3, #f0a018);
}
.logo__word {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.logo__word span { color: var(--sea); }

.seek {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(28, 36, 41, 0.08);
  border-radius: 12px;
}
.seek:focus-within { border-color: var(--sea); background: #fff; }
.seek__place, .seek__go, .seek__q { border: 0; background: transparent; }
.seek__place {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; color: var(--sea-deep); font-weight: 700; white-space: nowrap;
  border-right: 1px solid var(--line); cursor: pointer; max-width: 160px;
}
.seek__place span { overflow: hidden; text-overflow: ellipsis; }
.seek__q { padding: 11px 14px; outline: none; min-width: 0; }
.seek__go {
  margin: 4px; padding: 8px 16px; border-radius: 8px;
  background: var(--sea); color: #fff; font-weight: 700; cursor: pointer;
}
.seek__go:hover { background: var(--sea-deep); }
.seek__cities {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 40;
  width: 260px; max-height: 360px; overflow: auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
}
.seek__cities button {
  display: block; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; background: transparent; border-radius: 8px; cursor: pointer;
}
.seek__cities button:hover { background: #f4f7f8; }

.top__actions { display: flex; gap: 8px; align-items: center; }
.ghost, .sun, .filters-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 10px; font-weight: 700; border: 0; cursor: pointer;
}
.ghost { color: var(--ink); }
.sun { background: var(--sun); color: #1c2429; }
.sun:hover { background: var(--sun-deep); color: #fff; }

.cats-bar { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 0 0 12px; }
.cats-bar__all {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  border: 0; background: var(--ink); color: #fff;
  border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 700;
  margin-top: 2px;
}
.cats-bar__all span { display: block; width: 13px; height: 2px; background: #fff; margin: 2px 0; }
.cats-bar__links {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  min-width: 0; padding: 4px 0 0;
}
.cats-bar__links a { color: var(--muted); font-weight: 600; font-size: 14px; }
.cats-bar__links a:hover, .cats-bar__links a.is-on { color: var(--ink); }
.mega {
  position: absolute; left: 0; right: 0; top: calc(100% - 2px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px) saturate(1.05);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px 16px 16px;
  z-index: 40;
}
.mega__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 4px;
}
.mega__item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 13px;
}
.mega__item:hover, .mega__item.is-on { background: #f4f7f8; color: var(--ink); }
.mega__icon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
  color: rgba(46, 72, 78, 0.48);
  background: rgba(94, 125, 132, 0.08);
}
.mega__icon .glyph { width: 16px; height: 16px; }
.mega__subs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px;
}
.mega__subs a {
  background: rgba(94, 125, 132, 0.1); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.mega__subs a:hover { background: rgba(28, 36, 41, 0.78); color: #fff; }
.mega__subs-root { background: rgba(14, 124, 140, 0.12) !important; color: var(--sea-deep) !important; }

.hero { padding: 28px 0 8px; }
.hero__inner {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 22px 24px;
  background: linear-gradient(120deg, rgba(14, 61, 70, 0.88) 0%, rgba(14, 124, 140, 0.78) 58%, rgba(26, 163, 181, 0.7) 100%);
  color: #fff; border-radius: 18px;
}
.eyebrow { margin: 0; opacity: 0.75; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.03em; }
.lead { margin: 0; max-width: 560px; opacity: 0.88; }
.hero__cta { flex-shrink: 0; }

.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 18px 0 24px;
}
.tile {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(28, 36, 41, 0.06);
  border-radius: 14px;
  padding: 12px;
  min-height: 96px;
  display: flex; flex-direction: column; gap: 6px;
}
.tile:hover {
  border-color: rgba(14, 124, 140, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}
.tile__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: rgba(46, 72, 78, 0.46);
  background: rgba(94, 125, 132, 0.08);
}
.tile__icon .glyph { width: 18px; height: 18px; }
.tile__name { font-weight: 800; font-size: 14px; line-height: 1.25; }
.tile__n { color: var(--muted); font-size: 12px; margin-top: auto; opacity: 0.85; }

.tile-tone--car, .tile-tone--ship,
.tile-tone--home, .tile-tone--phone, .tile-tone--washer,
.tile-tone--sofa, .tile-tone--shirt, .tile-tone--baby, .tile-tone--paw,
.tile-tone--briefcase, .tile-tone--wrench, .tile-tone--heart,
.tile-tone--ball, .tile-tone--leaf, .tile-tone--brick, .tile-tone--cog,
.tile-tone--grape, .tile-tone--ticket, .tile-tone--gift, .tile-tone--dots {
  --tone: #5e7d84;
}

.band { padding: 8px 0 36px; }
.band__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.band__head h2 { margin: 0; font-size: 22px; }
.band__head a { color: var(--sea); font-weight: 700; }
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cards--catalog { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(28, 36, 41, 0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); }
.card--premium { border-color: rgba(240, 160, 24, 0.35); }
.card__photo {
  aspect-ratio: 4 / 3;
  background-color: rgba(94, 125, 132, 0.1);
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid; place-items: center;
}
.card__glyph { color: rgba(46, 72, 78, 0.38); }
.card__glyph .glyph { width: 40px; height: 40px; }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(240, 160, 24, 0.88); color: #1c2429;
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.badge--top { background: rgba(14, 124, 140, 0.82); color: #fff; }
.card__body { padding: 12px 14px 14px; }
.card__price { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.card__price small { color: var(--muted); font-size: 12px; font-weight: 600; }
.card__body h3 {
  margin: 0; font-size: 14px; line-height: 1.35; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 38px;
}
.card__facts, .card__meta { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.cards--list { grid-template-columns: 1fr; }
.cards--list .card { flex-direction: row; min-height: 148px; }
.cards--list .card__photo { width: 220px; flex-shrink: 0; aspect-ratio: auto; }
.cards--list .card__body h3 { min-height: 0; -webkit-line-clamp: 3; font-size: 16px; }

.catalog { padding: 18px 0 48px; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a + a::before { content: "›"; margin-right: 6px; color: #b0bac0; }
.crumbs a:hover { color: var(--sea); }
.catalog__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; }
.catalog__head h1 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.muted { color: var(--muted); }
.filters-toggle { display: none; background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(28, 36, 41, 0.08); }
.subcats { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.subcats a {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 999px;
  padding: 7px 12px; font-weight: 600; font-size: 13px;
}
.subcats a:hover { border-color: var(--sea); color: var(--sea); }
.catalog__layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 20px; align-items: start; }
.filters {
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px;
  padding: 14px; position: sticky; top: 108px;
}
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters__head h2 { margin: 0; font-size: 16px; }
.filters__close { display: none; border: 0; background: transparent; color: var(--sea); font-weight: 700; cursor: pointer; }
.filters__block { margin-bottom: 14px; }
.filters__block h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.filters select, .filters input[type="number"] {
  width: 100%; border: 1px solid rgba(28, 36, 41, 0.1); border-radius: 10px;
  padding: 8px 10px; background: rgba(255, 255, 255, 0.55);
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs__item {
  border: 1px solid rgba(28, 36, 41, 0.1); border-radius: 999px; padding: 6px 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}
.tabs__item input { display: none; }
.tabs__item:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.checks label { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 14px; }
.checks em { color: var(--muted); font-style: normal; }
.filters__more { border-top: 1px solid var(--line); padding-top: 10px; }
.filters__more summary { cursor: pointer; font-weight: 700; color: var(--sea); margin-bottom: 10px; }
.filters__apply { width: 100%; margin-top: 4px; }
.filters-mask { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 999px;
  padding: 6px 10px; font-size: 13px; font-weight: 600;
}
.chip:hover { border-color: var(--ink); }
.chip--clear { color: var(--sea); }
.results__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.sorts, .views, .pager { display: flex; gap: 4px; }
.sorts a, .pager a, .views a {
  padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted);
}
.sorts a.is-on, .pager a.is-on, .views a.is-on { background: var(--ink); color: #fff; }
.pager { margin-top: 16px; }
.empty {
  background: rgba(255, 255, 255, 0.5); border: 1px dashed rgba(28, 36, 41, 0.16); border-radius: 16px;
  padding: 40px; text-align: center;
}

.item { padding: 20px 0 56px; }
.item__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; }
.item__gallery {
  min-height: 420px; border-radius: 16px;
  background-color: rgba(94, 125, 132, 0.12);
  background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.item__ph { text-align: center; color: rgba(46, 72, 78, 0.42); display: grid; gap: 8px; justify-items: center; }
.item__ph .glyph { width: 56px; height: 56px; }
.item__ph span { color: var(--muted); font-size: 13px; }
.item__info {
  background: var(--glass-strong); backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px; padding: 18px;
  position: sticky; top: 108px; align-self: start;
}
.pill {
  display: inline-flex; background: var(--sun); color: #1c2429;
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.pill--top { background: var(--sea); color: #fff; }
.item__info h1 { font-size: 24px; margin: 10px 0 8px; letter-spacing: -0.03em; }
.item__price { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.specs div { background: rgba(94, 125, 132, 0.08); border-radius: 10px; padding: 8px 10px; }
.specs dt { color: var(--muted); font-size: 11px; }
.specs dd { margin: 3px 0 0; font-weight: 700; font-size: 13px; }
.seller { display: grid; gap: 6px; padding-top: 8px; }
.seller__label { margin: 0; color: var(--muted); font-size: 12px; }
.seller__phone { margin: 0; font-weight: 700; }
.item__text { margin-top: 24px; max-width: 760px; line-height: 1.65; background: var(--glass-strong); backdrop-filter: blur(12px); border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px; padding: 18px 20px; }
.item__text h2 { margin: 0 0 8px; font-size: 18px; }

.foot { border-top: 1px solid rgba(28, 36, 41, 0.06); padding: 28px 0; margin-top: 8px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(12px); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; color: var(--muted); }
.foot__grid a, .foot__grid b { display: block; color: var(--ink); margin-bottom: 6px; }

.flashes { padding-top: 14px; }
.flash {
  background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 12px;
  padding: 10px 14px; margin: 0 0 8px; font-weight: 600;
}
.flash--success { border-color: #b7e0c4; background: #f1faf4; }
.flash--error { border-color: #f0c2c2; background: #fff5f5; }

.auth { display: grid; place-items: start center; padding: 32px 0 64px; }
.auth__card, .form, .panel {
  background: var(--glass-strong); backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px; padding: 22px;
}
.auth__card { width: min(420px, 100%); display: grid; gap: 12px; }
.auth__card h1, .form h2 { margin: 0; }
.form, .auth__card label { display: grid; gap: 6px; font-weight: 700; font-size: 13px; }
.form { display: grid; gap: 12px; }
.form input, .form select, .form textarea,
.auth__card input, .inline input, .inline select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; font-weight: 500;
}
.errorlist { color: #b42318; margin: 0; padding-left: 16px; font-weight: 600; }

.cabinet { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 22px 0 56px; align-items: start; }
.cabinet__nav {
  background: var(--glass-strong); backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08); border-radius: 16px; padding: 10px;
  display: grid; gap: 4px; position: sticky; top: 108px;
}
.cabinet__nav a, .linkish {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 10px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.cabinet__nav a.is-on, .cabinet__nav a:hover, .linkish:hover { background: #f4f7f8; color: var(--ink); }
.cabinet__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.cabinet__head h1, .cabinet__main h1 { margin: 0 0 6px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stats div { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid rgba(28, 36, 41, 0.07); border-radius: 14px; padding: 14px; }
.stats b { display: block; font-size: 24px; }
.stats span { color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rows { display: grid; gap: 8px; }
.row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(28, 36, 41, 0.07); border-radius: 12px; padding: 10px 12px;
}
.table { display: grid; gap: 10px; }
.table__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(28, 36, 41, 0.07); border-radius: 14px; padding: 14px;
}
.table__actions, .inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table__actions button, .table__actions .ghost {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 10px; cursor: pointer; font-weight: 700;
}
.st { font-size: 12px; font-weight: 800; font-style: normal; padding: 3px 8px; border-radius: 999px; background: #eef2f4; }
.st--active { background: #d9f3e3; color: #146c2e; }
.st--moderation { background: #fff3d6; color: #8a5a00; }
.st--sold { background: #e4eefc; color: #1d4e89; }
.st--archived, .st--draft { background: #eee; color: #555; }
.st--admin { background: #dceef1; color: var(--sea-deep); }
.st--moderator { background: #fff3d6; color: #8a5a00; }
.warn { color: #b42318; font-size: 13px; margin: 6px 0 0; }
.tabs__item.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.inline { margin: 0 0 16px; }
.inline input, .inline select { width: auto; min-width: 180px; }

.htmx-request .cards { opacity: 0.55; transition: opacity .15s; }

.ghost { display: inline-flex; align-items: center; gap: 6px; }
.note {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: rgba(240, 160, 24, 0.92); color: #1c2429;
  font-size: 11px; font-weight: 800; line-height: 1;
}
.seller__chat { display: grid; gap: 8px; margin-top: 8px; }
.seller__chat textarea {
  width: 100%; border: 1px solid rgba(28, 36, 41, 0.1); border-radius: 12px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.55); resize: vertical; min-height: 72px;
}
.chat {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  min-height: 62vh;
  align-items: stretch;
}
.chat__inbox, .chat__room {
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 36, 41, 0.08);
  border-radius: 16px;
}
.chat__inbox { padding: 8px; overflow: auto; max-height: 72vh; }
.chat__item {
  display: grid; gap: 2px;
  padding: 10px 12px; border-radius: 12px; margin-bottom: 4px;
}
.chat__item:hover { background: rgba(94, 125, 132, 0.08); }
.chat__item.is-on { background: rgba(14, 124, 140, 0.12); }
.chat__item.is-new b { color: var(--sea-deep); }
.chat__item small {
  color: var(--muted); font-weight: 600; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat__room { display: flex; flex-direction: column; min-height: 62vh; }
.chat__room--empty { display: grid; place-items: center; padding: 24px; }
.chat__head {
  padding: 14px 16px; border-bottom: 1px solid rgba(28, 36, 41, 0.06);
  display: grid; gap: 2px;
}
.chat__head a { color: var(--sea); font-weight: 700; font-size: 13px; }
.chat__log {
  flex: 1; overflow: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 280px; max-height: 52vh;
}
.chat__empty { margin: auto; text-align: center; }
.bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(94, 125, 132, 0.12);
}
.bubble b { display: block; font-size: 12px; margin-bottom: 2px; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble time { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.bubble--mine {
  margin-left: auto;
  background: rgba(14, 124, 140, 0.16);
}
.chat__form {
  display: grid; grid-template-columns: 1fr auto;
  gap: 8px; padding: 12px; border-top: 1px solid rgba(28, 36, 41, 0.06);
  align-items: end;
}
.chat__form textarea {
  width: 100%; border: 1px solid rgba(28, 36, 41, 0.1); border-radius: 12px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.55); resize: vertical; min-height: 52px;
}

@media (max-width: 980px) {
  .top__row { grid-template-columns: auto 1fr; }
  .top__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .seek { grid-column: 1 / -1; }
  .catalog__layout, .item__grid, .cards, .cards--catalog, .foot__grid, .cabinet, .split, .stats, .table__row, .chat { grid-template-columns: 1fr; }
  .cards--list, .foot__grid { grid-template-columns: 1fr; }
  .cards--list .card { flex-direction: column; }
  .cards--list .card__photo { width: 100%; aspect-ratio: 4 / 3; }
  .hero__inner { flex-direction: column; align-items: flex-start; }
  .filters-toggle { display: inline-flex; }
  .filters {
    position: fixed; inset: auto 0 0; top: auto; z-index: 50;
    border-radius: 16px 16px 0 0; max-height: 86vh; overflow: auto;
    transform: translateY(110%); transition: transform .2s ease;
  }
  .catalog__layout.is-filters .filters { transform: translateY(0); }
  .filters__close { display: inline; }
  .filters-mask {
    display: block; position: fixed; inset: 0; background: rgba(16, 24, 28, 0.45); z-index: 40;
  }
  .cabinet__nav { position: static; }
}

@media (max-width: 640px) {
  .mosaic, .cards, .cards--catalog, .item__grid { grid-template-columns: 1fr; }
  .cats-bar { flex-direction: column; }
  .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
