/* The bases' pages (/b/<slug>: the guest's booking and its steps, the staff's panel), in the banner's style the owner
   chose on 04.10.2026 and asked for here on 05.10.2026 («Силу озёр под новый стиль переделай»): the tokens of brand.css
   — the paper, the sheet, the ink, the muted words, hairlines, the forest and the lime, the highlighter, the banner's
   card (a 1 px edge, the shared corners and shadow) — Manrope for headings and words,
   JetBrains Mono for dates, times and prices, sentence-case muted labels, never tracked capitals.
   BUTTONS — the working screens' one rule (brand.css): a plain <button> and .btn are the main action (forest),
   .lime the screen's one key action («Показать свободные», «Получить счёт», «Я оплатил(а)»), .ghost the second (an ink
   outline), .bad/.danger what cancels or deletes (a red outline).
   The guest's side sells the base: air, 16 px words, 48 px fields and buttons, one lime action a screen. The staff's
   side is a work tool: 15 px words, 44 px targets, dense lists.
   The company's cabinet (.desk, desk.css) shares this sheet and lays its own rules over it: a rule here that the
   desk must not take is written for body.stay:not(.desk). */

/* --- The frame ------------------------------------------------------------------------------------------------ */
body.stay {
  background: var(--paper);
  font: 400 15px/1.5 var(--sans);
}
body.stay.guest {
  font-size: 16px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  background: var(--lime);
  color: var(--ink);
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
/* The header: the base's mark and ours on the paper over a hairline, the line of what the page is under them, the
   badge at the right */
.stay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.stay-identity {
  min-width: 0;
}
.stay-partnership {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
}
.property-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  font: 600 19px/1.2 var(--sans);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.property-brand > span:last-child {
  overflow-wrap: anywhere;
}
/* «Ваш отдых начинается здесь», «Управление базой»: a muted sentence under the marks */
.stay .property-context {
  margin: 2px 0 0;
  font: 400 13px/1.35 var(--sans);
  letter-spacing: 0;
  color: var(--muted);
}
/* The base's own logo (Сила Озёр): its name is in the picture, the words are for screen readers */
.property-logo {
  display: block;
  width: 64px;
  height: 57px;
  flex: 0 0 auto;
  object-fit: contain;
}
/* A logo the base uploaded in «Страница базы»: any shape, 48 px tall */
.property-logo.uploaded {
  width: auto;
  height: 48px;
  max-width: 160px;
}
.brand-divider {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}
/* «× на связи 24» stays one piece: a phone's line never ends on the «×» */
.platform-pair {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.stay .platform-brand {
  font-size: 21px;
  /* 44 px to tap, the robot and the name in the middle of it (brand.css centres them), level with the base's mark
     (the owner, 04.10.2026: «наш лейбл уехал» — the name once stood at the top of its box, above its neighbours). */
  min-height: 44px;
  flex-shrink: 0;
}
/* A base without a logo of its own: the lake's mark, lime waves on the forest */
.lake-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--control-radius);
  background: var(--forest);
}
.lake-mark svg {
  width: 32px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 2;
  stroke-linecap: round;
}
.header-badge {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* --- The layout and the staff's menu: on the paper, a line a section — its number in mono, its name in words; the
   section one is on is the forest key (a computer's column, a phone's sideways strip alike) ------------------------- */
.stay-layout {
  width: 100%;
  max-width: 1600px;
  margin: auto;
}
.staff .stay-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.stay main {
  min-width: 0;
  padding: 36px clamp(20px, 3.5vw, 56px) 20px;
}
.guest main {
  width: 100%;
  max-width: 1080px;
  margin: auto;
}
.stay-nav {
  padding: 35px 18px;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.stay-nav .eyebrow {
  padding-left: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.stay-nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  margin-bottom: 6px;
  border-radius: var(--control-radius);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.stay-nav a span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stay-nav a:hover {
  background: var(--shade);
}
.stay-nav a[aria-current] {
  background: var(--forest);
  color: var(--on-forest);
}
.stay-nav a[aria-current] span {
  color: var(--lime);
}
@media (min-width: 1101px) {
  .stay-nav {
    position: sticky;
    top: 20px;
    align-self: start;
    margin: 28px 0 24px 18px;
    padding: 0 0 8px;
    border: 0;
  }
  .stay-nav a {
    margin-bottom: 2px;
    padding: 10px 12px;
  }
  .stay-nav a:focus-visible {
    outline-color: var(--ink);
    outline-offset: 2px;
  }
  .staff main {
    border-left: 1px solid var(--rule);
  }
}

/* --- Words: Lora for the page's and the cards' titles, Golos Text for the rest, mono for figures ------------------ */
.stay :is(h1, h2, h3) {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}
.stay h1 {
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.stay h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 14px;
}
.stay h3 {
  font-size: 17px;
  line-height: 1.35;
}
.stay p {
  font-size: 15px;
  line-height: 1.55;
}
.guest p {
  font-size: 16px;
}
.stay .muted {
  font-size: 13px;
  color: var(--muted);
}
.guest .muted {
  font-size: 14px;
}
/* The labels over a block («Работа с гостями», «Планы на отдых»): a muted sentence, as the code writes it (the
   cabinet's are capitals the browser lowers: brand.css) */
.stay .eyebrow {
  margin-bottom: 12px;
}
body.stay:not(.desk) .eyebrow {
  margin-bottom: 6px;
  font: 400 14px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
/* Dates, times, sums and counts in mono where the page marks them */
.stay :is(.num, .mono) {
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stay label {
  margin-top: 14px;
}

/* --- Buttons: the working screens' rule (brand.css takes .btn; a plain <button> here) ------------------------------ */
.stay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 8px 16px;
  border: 1px solid var(--forest);
  border-radius: var(--control-radius);
  background: var(--forest);
  color: var(--on-forest);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}
.stay button:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
}
.stay button.ghost {
  background: var(--sheet);
  border-color: var(--faint);
  color: var(--ink);
}
.stay button.ghost:hover {
  background: var(--shade);
  border-color: var(--forest);
}
.stay button.lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.stay button.lime:hover {
  background: var(--lime-hover);
  border-color: var(--lime-hover);
}
.stay :is(button.bad, button.danger, button.remove-item) {
  background: transparent;
  border-color: var(--error-edge);
  color: var(--error);
}
.stay :is(button.bad, button.danger, button.remove-item):hover {
  background: var(--error-tint);
  border-color: var(--error);
}
.stay form > button {
  margin-top: 14px;
}
body.stay:not(.desk) form.inline > button {
  margin-top: 0;
}
/* The guest's side: a thumb's size and 16 px words */
.guest button,
.guest .btn:not(.small) {
  min-height: 48px;
  padding: 10px 20px;
  font-size: 16px;
}

/* --- Fields: one height, one font, one corner (no weight of their own: a form's own rule wins, as in desk.css) ---- */
:where(body.stay) input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"])),
:where(body.stay) select {
  min-height: var(--control-h);
  padding: 8px 12px;
  font: 400 15px/1.35 var(--sans);
  border-radius: var(--control-radius);
}
:where(body.stay.guest) input:where(:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"])),
:where(body.stay.guest) select {
  min-height: 48px;
  font-size: 16px;
}
:where(body.stay) textarea {
  font: 400 15px/1.5 var(--sans);
}
:where(body.stay:not(.desk)) input[type="date"] {
  font-family: var(--mono);
}
.stay input[type="radio"] {
  width: auto;
}
body.stay:not(.desk) input[type="radio"] {
  accent-color: var(--forest);
}
.stay .check {
  font-size: 13px;
  align-items: center;
}
.stay .check input {
  margin-top: 0;
}
.guest .check {
  font-size: 14px;
  font-weight: 400;
}

/* --- Cards: the banner's card ---------------------------------------------------------------------------------- */
.stay .card {
  min-width: 0;
  background: var(--sheet);
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 22px;
  margin: 18px 0;
}
.guest .card {
  padding: 24px;
}
.stay .card > :first-child,
.stay .card > form:first-child > :first-child {
  margin-top: 0;
}
.stay .card p:last-child {
  margin-bottom: 0;
}
.stay .grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stay .row,
.page-head {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.page-head {
  margin-bottom: 24px;
}
.page-head p {
  margin-bottom: 0;
}
body.stay:not(.desk) .page-head > div > p {
  max-width: 760px;
  color: var(--muted);
}
/* The calendars under the booking's dates on the guest's page: two quiet buttons in a row, wrapping on a narrow phone. */
.stay .calendar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 8px;
}
.stay .price {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Statuses: a small chip in its tone, 4 px corners ------------------------------------------------------------ */
.stay .tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 2px 8px;
  border-radius: var(--card-radius);
  background: var(--shade);
  color: var(--ink);
}
.stay .tag.ok {
  background: var(--ok-tint);
  color: var(--ok);
}
.stay .tag.warn {
  background: var(--warn-tint);
  color: var(--warn);
}
.stay .tag.bad {
  background: var(--error-tint);
  color: var(--error);
}

/* --- Notices: a strip with a rule at its left, in its tone; the words are ink ------------------------------------ */
.stay .notice {
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--forest);
  border-radius: var(--card-radius);
  background: var(--band);
  font-size: 14px;
  line-height: 1.55;
}
.stay :is(.notice.warn, .notice.warning) {
  background: var(--warn-tint);
  border-color: #e6d6a6;
  border-left-color: #b8862a;
}
.stay :is(.notice.bad, .notice.error) {
  background: var(--error-tint);
  border-color: var(--error-edge);
  border-left-color: var(--error);
  color: var(--ink);
}
.stay .notice.bad h2 {
  color: var(--error);
  margin: 0 0 8px;
  font-size: 18px;
}
.stay .err,
.stay .error {
  color: var(--error);
}
/* A refusal says what to do: a strip in the error's tone, the words in ink-red */
.stay .err:not(:empty) {
  padding: 12px 16px;
  border-left: 3px solid var(--error);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  background: var(--error-tint);
}
.stay .hidden {
  display: none !important;
}

/* --- Tables: hairlines between rows, the head in muted words on nothing, figures tabular ------------------------- */
.stay table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.stay td,
.stay th {
  border-bottom: 1px solid var(--hair);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.stay th {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border-bottom-color: var(--rule);
}
.table-scroll tr:hover td {
  background: var(--paper);
}
.table-scroll tr:last-child td {
  border-bottom: 0;
}
.table-scroll,
.chess {
  overflow-x: auto;
  max-width: 100%;
}
.table-scroll table {
  min-width: 620px;
}
.table-scroll.compact table {
  min-width: 0;
}
/* A table wider than its box scrolls sideways; a shadow at the edge that hides columns says so, since a touch screen
   draws no scrollbar (the desk's organisations, team and report tables on a phone) */
.table-scroll {
  --table-bg: var(--sheet);
  scrollbar-color: var(--card-edge) transparent;
  scrollbar-width: thin;
  background:
    linear-gradient(to right, var(--table-bg) 40%, transparent) 0 0 / 48px 100% no-repeat local,
    linear-gradient(to left, var(--table-bg) 40%, transparent) 100% 0 / 48px 100% no-repeat local,
    linear-gradient(to right, rgba(24, 35, 29, 0.14), rgba(24, 35, 29, 0)) 0 0 / 16px 100% no-repeat scroll,
    linear-gradient(to left, rgba(24, 35, 29, 0.14), rgba(24, 35, 29, 0)) 100% 0 / 16px 100% no-repeat scroll;
}
.table-scroll table {
  background: transparent;
}
main > .table-scroll,
.stay-layout > main > .table-scroll {
  --table-bg: var(--paper);
}
/* The invoices to check: the sum and the deadline in mono */
.stay #invoices td:first-child b,
.stay #invoices td:nth-child(3) {
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}

/* --- The QR: a white field in a hairline frame (a bank's camera reads it best on white) -------------------------- */
.stay .qr {
  display: inline-block;
  padding: 12px;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: #fff;
  line-height: 0;
  max-width: 100%;
}
body.stay:not(.desk) .qr + p {
  margin-top: 10px;
}
.stay .qr svg {
  width: 220px;
  max-width: 100%;
  height: auto;
}
/* The guests' documents: a v2 check-in code is ~110 modules — drawn wide and crisp so a phone reads it from the screen */
.stay .qr.dense {
  display: block;
  width: fit-content;
  max-width: 100%;
}
.stay .qr.dense svg {
  width: min(100%, 340px);
  shape-rendering: crispEdges;
}

/* --- Folds ------------------------------------------------------------------------------------------------------ */
.stay details summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.stay details[open] > summary {
  margin-bottom: 14px;
}
.stay details.card {
  padding-block: 13px;
}
.stay details.card > summary {
  line-height: 22px;
  padding: 11px 0;
}
.stay form.inline {
  display: inline;
}
/* «Лист ожидания»: whom to call about the opening, a line each with «Позвонил» that a phone reads whole
   (app/stays/admin_panel.py call_row) */
.stay .call-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.stay .call-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}
.cancel-panel {
  width: 100%;
  border-top: 1px solid var(--hair);
  padding-top: 12px;
  margin-top: 6px;
}
.stay .cancel-panel > summary {
  width: fit-content;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
/* «Отменить бронь №1»: the way to the danger in its red */
.stay .cancel-panel:has(button.bad) > summary {
  color: var(--error);
}
.cancel-panel[open] {
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  background: var(--paper);
}
.cancel-panel:has(button.bad)[open] {
  border-color: var(--error-edge);
  background: var(--error-tint);
}
.cancel-panel p {
  max-width: 620px;
}
.cancel-panel select {
  max-width: 420px;
}

/* --- The guest's page: the base's first screen, «Когда к нам?», the houses, the form ------------------------------- */
/* The first screen: the base's name, its own words, where and when; its picture right of them on a computer and 16:10
   after the name on a phone (app/stays/base_page.py hero). No picture: the forest's band with the lake's lines. */
.stay-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 32px;
  border-radius: var(--card-radius);
  background: var(--forest);
  color: var(--on-forest);
}
.stay .stay-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  color: var(--on-forest);
  overflow-wrap: anywhere;
}
/* A long name (over 30 characters, app/stays/base_page.py hero) a size smaller: four lines of it filled a phone. */
.stay .stay-hero h1.long-name {
  font-size: clamp(26px, 2.6vw, 36px);
}
.stay-hero-text {
  position: relative;
  z-index: 1;
}
.stay-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
}
.stay .stay-hero-actions .btn {
  background: var(--sheet);
  color: var(--forest);
  border-color: var(--sheet);
}
.stay-hero-actions > a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-forest);
  text-underline-offset: 4px;
}
.stay .stay-hero .stay-tagline {
  max-width: 34em;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.5;
  color: #f0f6ec;
}
.stay .stay-hero .stay-hero-facts {
  max-width: 680px;
  margin: 0;
  font-size: 15px;
  color: #d9e5d0;
}
.stay-hero.with-picture {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "name media" "text media";
  gap: 0 32px;
}
.stay-hero.with-picture h1 {
  grid-area: name;
  align-self: end;
}
.stay-hero.with-picture .stay-hero-text {
  grid-area: text;
}
.stay-hero-media {
  grid-area: media;
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--forest-deep);
}
.stay-hero-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lake-lines {
  position: absolute;
  right: -30px;
  bottom: -70px;
  width: 390px;
  height: 290px;
  opacity: 0.2;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1;
}
@media (max-width: 899px) {
  .stay-hero.with-picture {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "name" "media" "text";
  }
  .stay-hero-media {
    min-height: 0;
    aspect-ratio: 16 / 10;
    margin: 2px 0 16px;
  }
}
/* A demo base's strip over every guest's page (base_page.demo_strip), as the company demos' (business.css .biz-demo):
   what the demo is, the administrator's panel and the way back to the examples, «хочу так же» marked with the
   highlighter at the right. Its ground runs the full width; 44 px targets. A computer: one line; a tablet: what the
   demo is and «хочу так же», the two ways under them. */
.stay-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 24px;
  min-height: 48px;
  padding: 2px clamp(16px, 3vw, 40px);
  font: 400 14px/1.4 var(--sans);
  color: var(--muted);
  background: var(--shade);
  border-bottom: 1px solid var(--rule);
}
.stay .stay-demo p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.stay .stay-demo-text {
  color: var(--ink);
}
.stay .stay-demo-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
}
.stay-demo a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--faint);
}
.stay-demo a:hover {
  text-decoration-color: currentColor;
}
.stay-demo a.stay-demo-join {
  margin-left: auto;
  font-weight: 600;
  text-decoration-color: var(--lime-deep);
  text-decoration-thickness: 2px;
  background: linear-gradient(transparent 50%, var(--hi) 50%) 0 50% / 100% 1.3em no-repeat;
}
.stay-demo a.stay-demo-join:hover {
  background: linear-gradient(transparent 15%, var(--lime) 15%) 0 50% / 100% 1.3em no-repeat;
}
@media (min-width: 600px) and (max-width: 959px) {
  .stay .stay-demo-links {
    order: 1;
    flex: 1 1 100%;
  }
}
/* A phone: one line «Демо · К примерам» and «хочу так же» (two on 320 px), so «Заезд» stays on the first screen of a
   390 × 844; the panel waits for the booking, whose page leads to it («Открыть панель администратора»). */
@media (max-width: 599px) {
  .stay-demo {
    column-gap: 16px;
    padding: 2px 16px;
  }
  .stay-demo-what,
  .stay-demo a.stay-demo-panel {
    display: none;
  }
  .stay .stay-demo-text::after {
    content: "·";
    margin: 0 8px;
    color: var(--faint);
  }
  .stay .stay-demo-text {
    margin-right: -16px;
  }
}
@media (max-width: 379px) {
  .stay-demo a.stay-demo-join {
    margin-left: 0;
  }
}
/* A demo base's notice: a line of the fiction, «Как устроено демо» folded */
.stay .demo-notice p {
  margin: 0;
  font-size: 14px;
}
.stay .demo-notice > p:first-child {
  color: var(--ink);
}
.stay .demo-notice details {
  margin: 2px 0;
}
.stay .demo-notice details > summary {
  width: fit-content;
  font-size: 14px;
  font-weight: 600;
}
.stay .demo-notice details[open] > summary {
  margin-bottom: 4px;
}
.stay .search-card .grid {
  gap: 16px 20px;
  align-items: end;
}
.stay .search-card h2 {
  font-size: 24px;
}
/* «Бронь от 2 суток»: the base's shortest stay, one line under «Когда к нам?» */
.stay .search-card .min-stay {
  margin: -6px 0 4px;
  color: var(--muted);
}
.stay .search-card label {
  font-size: 14px;
  font-weight: 600;
}
/* The calendar is a big target: the whole field opens it (booking.js), the date in mono */
.stay .search-card input[type="date"] {
  min-height: 52px;
  font-size: 17px;
  cursor: pointer;
}
.stay .search-card input#guests {
  min-height: 52px;
  font: 500 17px/1.35 var(--mono);
}
/* «Едем с питомцем» stands on the line of the inputs, the tick at the field's middle */
.stay .search-card .check.pets {
  min-height: 52px;
  margin: 0;
  align-items: center;
  font-size: 15px;
  color: var(--ink);
}
.stay .search-card .check.pets input {
  margin: 0;
}
.stay .search-card #search {
  min-width: 260px;
  margin-top: 22px;
}
.booking-channels .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stay .booking-channels {
  background: transparent;
  box-shadow: none;
}
.stay .booking-channels h2 {
  font-size: 18px;
}
/* The free houses: one sheet, the groups' titles as its bars, a house a row between hairlines */
.stay #list:empty {
  display: none;
}
.stay #list[aria-busy="true"] {
  opacity: 0.6;
}
.stay #list:has(> .card) {
  margin: 24px 0;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.stay #list > .card {
  margin: 0;
  padding: 22px 24px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.stay #list > .card:last-child {
  border-bottom: 0;
}
.stay #list > .card h2 {
  font-size: 21px;
  margin-bottom: 4px;
}
.stay #list > .card > p {
  margin: 10px 0 0;
}
.stay #list > .card > .row:last-child {
  margin-top: 16px;
}
.stay .group-title {
  margin: 0;
  padding: 12px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-size: 17px;
  color: var(--ink);
}
.stay .breakdown {
  margin-top: 2px;
}
/* «Выбрать домик»: chips with 4 px corners, the chosen one under the highlighter */
.stay .houses {
  margin: 12px 0 0;
}
.stay .houses summary {
  font-size: 14px;
}
.stay .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stay .chip {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}
.stay .chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.stay .chip span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.stay .chip small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.stay .chip input:checked + span {
  background: var(--hi);
  border-color: var(--forest);
}
.stay .chip input:focus-visible + span {
  outline: 3px solid #5a842a;
  outline-offset: 2px;
}
/* The form under the houses: the house, the dates and the sum in its title, the lime «Получить счёт» */
.stay #form {
  scroll-margin-top: 24px;
}
.stay #formTitle {
  font-size: 24px;
}
.stay #submit {
  min-width: 220px;
}
/* «Кому домик» over the dates: the house «Выбрать даты» carried here (booking.js) */
.stay .search-card .search-choice {
  margin: -4px 0 6px;
  font-weight: 600;
  color: var(--ink);
}
/* A free house's photo beside its name in the results and in «Помочь подобрать»: its 480 px file, 4:3 */
.stay .result-thumb,
.stay .suggestion-thumb {
  flex: 0 0 auto;
  display: block;
  width: 96px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--control-radius);
  background: var(--shade);
}
.stay .result-thumb img,
.stay .suggestion-thumb {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
}
.stay #list .card > .row:first-child {
  justify-content: flex-start;
}
.stay #list .result-title {
  flex: 1 1 200px;
  min-width: 0;
}
.stay .suggestion > .row {
  justify-content: flex-start;
}
.stay .suggestion h3 {
  margin: 0;
}

/* «Дома и цены» (app/stays/base_page.py): one sheet, a house a row between hairlines — its photo at the left, its name,
   what it holds, a few lines about it, the houses one can pick, «от … ₽ за сутки» and «Выбрать даты» at the foot; a
   large base's groups as tabs over it, a phone's tabs a strip that scrolls sideways */
.stay-houses {
  margin: 32px 0 24px;
}
.stay .stay-houses > h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.house-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.stay .house-tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--card-edge);
  border-radius: var(--control-radius);
  background: var(--sheet);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.stay .house-tabs button:hover {
  background: var(--shade);
  border-color: var(--forest);
}
.stay .house-tabs button[aria-selected="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--on-forest);
}
.house-group-title,
.stay .house-group-title {
  display: none;
}
#house-catalog.show-all .house-group-title {
  display: block;
  margin: 20px 0 10px;
  font-size: 17px;
}
#house-catalog.show-all .house-group:first-child .house-group-title {
  margin-top: 0;
}
.house-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.house-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "head" "body";
  gap: 0 24px;
  margin: 0;
  padding: 22px 24px;
  border-bottom: 1px solid var(--hair);
}
.house-row:last-child {
  border-bottom: 0;
}
.house-row.has-photo {
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas: "thumb head" "thumb body";
}
.house-head {
  grid-area: head;
  min-width: 0;
}
.house-body {
  grid-area: body;
  min-width: 0;
}
.house-thumb {
  grid-area: thumb;
  display: block;
  align-self: start;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--shade);
}
.house-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s;
}
@media (hover: hover) {
  .house-thumb:hover img {
    transform: scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .house-thumb img {
    transition: none;
  }
}
.stay .house-row h3 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.3;
}
/* The name leads to the house's own page */
.stay .house-row h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--card-edge);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.stay .house-row h3 a:hover {
  text-decoration-color: currentColor;
}
.stay .house-row .house-places {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.stay .house-row .house-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink);
}
.stay .house-row .house-names {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.house-buy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.stay .house-row .house-price {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.stay .house-price b {
  font-size: 18px;
  white-space: nowrap;
}
.stay .house-pick {
  margin-left: auto;
}
.photo-set[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .stay-houses {
    margin-top: 24px;
  }
  /* A phone's tabs: one line that scrolls sideways to the screen's edge */
  .house-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
  }
  .house-tabs::-webkit-scrollbar {
    display: none;
  }
  .house-row {
    padding: 18px;
  }
  /* The photo a thumbnail beside the name; the words under both */
  .house-row.has-photo {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "thumb head" "body body";
    gap: 0 14px;
  }
  .stay .house-row h3 {
    font-size: 17px;
  }
  .stay .house-pick {
    flex: 1 1 100%;
    margin-left: 0;
  }
}

/* A house type's own page (/b/<slug>/houses/<id>): its name, what it holds and its price, «Выбрать даты»; its photos
   — the first large, the rest beside and under it on a computer, a strip on a phone —, its words and its houses */
.stay .house-back {
  margin: 0 0 12px;
  font-size: 15px;
}
.stay .house-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.house-page-head {
  margin-bottom: 20px;
}
.stay .house-page-head h1 {
  margin-bottom: 6px;
}
.stay .house-page-head .house-places {
  margin: 0;
  color: var(--muted);
}
.stay .house-page-head .house-price {
  margin: 8px 0 0;
  color: var(--ink);
}
.stay .house-action {
  margin: 16px 0 0;
}
.house-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.house-gallery li {
  min-width: 0;
  margin: 0;
}
.house-gallery li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.house-shot {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--shade);
}
.house-shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.stay .house-about {
  max-width: 760px;
}
.stay .house-about p {
  color: var(--ink);
}
.house-units {
  margin-top: 28px;
}
.stay .house-units h2 {
  margin-bottom: 4px;
}
.house-units ul {
  columns: 4 140px;
  column-gap: 24px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.house-units li {
  break-inside: avoid;
  padding: 6px 0;
  font-size: 15px;
}
.house-units li span {
  color: var(--muted);
}
@media (max-width: 700px) {
  /* A phone's photos: a strip of large tiles, the next one peeking, to the screen's edge */
  .house-gallery {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
  }
  .house-gallery::-webkit-scrollbar {
    display: none;
  }
  .house-gallery li,
  .house-gallery li:first-child {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
  .stay .house-action .btn {
    width: 100%;
  }
}

/* While the base does not sell: «Сообщить, когда откроется бронирование» in the dates' place — a name, a phone or an
   e-mail, the consent, the lime action (app/stays/base_page.py opening, site/assets/stays-opening.js) */
.stay .opening-card h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.stay .opening-card .grid {
  margin-top: 4px;
}
.stay .opening-request > summary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--forest);
  border-radius: var(--control-radius);
  background: var(--forest);
  color: var(--on-forest);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.stay .opening-request > summary::-webkit-details-marker { display: none; }
.stay .opening-request > summary::after { content: "+"; margin-left: 14px; }
.stay .opening-request[open] > summary::after { content: "−"; }
.stay .opening-request > summary:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 3px; }
.stay .opening-request form { margin-top: 16px; }
.stay .opening-card label.check {
  margin-top: 16px;
}
.stay .opening-card button[type="submit"] {
  min-width: 260px;
}
.stay #opening-done h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
@media (max-width: 700px) {
  body.stay.guest:not(.desk) details.opening-request > summary {
    display: flex;
    padding: 12px 16px;
  }
  .stay .opening-card .grid { grid-template-columns: 1fr; gap: 12px; }
  .stay .opening-card button[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}

/* «Территория»: the owner's photos of the place, four 4:3 tiles a row on a computer, a strip on a phone */
.stay-territory {
  margin: 32px 0 24px;
}
.stay .stay-territory h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.territory-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.territory-gallery li {
  min-width: 0;
  margin: 0;
}
@media (max-width: 700px) {
  .territory-gallery {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
  }
  .territory-gallery::-webkit-scrollbar {
    display: none;
  }
  .territory-gallery li {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
}

/* «Контакты»: the address, «Маршрут» and the map's switch side by side, one height; the map once asked for (the frame
   made on the tap, app/page_media.py MAP_SCRIPT); then the phones, the base's site and its hours as a short list */
.stay .stay-contacts h2 {
  margin-bottom: 12px;
}
.stay .biz-map {
  margin: 0 0 16px;
}
.stay .biz-map .biz-address {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--ink);
}
.stay .biz-map-frame {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--shade);
  aspect-ratio: 4 / 3;
}
.stay .biz-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (min-width: 600px) {
  .stay .biz-map-frame {
    aspect-ratio: 16 / 9;
  }
}
.stay .biz-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.stay .biz-map-actions .btn,
.stay .biz-map-actions button {
  min-height: 44px;
  margin: 0;
  padding: 8px 16px;
  font-size: 15px;
}
.stay .biz-map .biz-map-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.stay-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
}
.stay-facts dt {
  color: var(--muted);
  font-size: 15px;
}
.stay-facts dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.stay-facts a {
  color: var(--ink);
}
@media (max-width: 520px) {
  .stay-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .stay-facts dd + dt {
    margin-top: 10px;
  }
}

/* The viewer of the company pages (app/page_media.py GALLERY_SCRIPT): the picture whole on a dark ground, «‹» «›» at
   its sides, «✕» in the corner (48 px each), «3 из 8» */
body.viewer-open {
  overflow: hidden;
}
.stay .biz-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 8px 52px;
  background: rgba(12, 16, 13, 0.95);
  touch-action: pan-y pinch-zoom;
}
.stay .biz-viewer[hidden] {
  display: none;
}
.stay .biz-viewer-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.stay .biz-viewer .biz-viewer-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  color: #ffffff;
  font: 500 15px/1.4 var(--mono);
}
.stay .biz-viewer .biz-viewer-words {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 44px;
  margin: 0;
  text-align: center;
  color: #ffffff;
  font: 400 15px/1.4 var(--sans);
  overflow-wrap: anywhere;
}
.stay .biz-viewer.captioned {
  padding-bottom: 92px;
}
.stay .biz-viewer .biz-viewer-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(244, 241, 232, 0.45);
  border-radius: 50%;
  background: rgba(12, 16, 13, 0.62);
  color: #ffffff;
  font: 400 30px/1 var(--sans);
  cursor: pointer;
}
.stay .biz-viewer .biz-viewer-btn:hover {
  background: rgba(12, 16, 13, 0.85);
}
.stay .biz-viewer .biz-viewer-btn:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.stay .biz-viewer .biz-viewer-close {
  top: 8px;
  right: 8px;
  font-size: 22px;
}
.stay .biz-viewer .biz-viewer-prev {
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
}
.stay .biz-viewer .biz-viewer-next {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}
.stay .biz-viewer.single :is(.biz-viewer-prev, .biz-viewer-next) {
  display: none;
}
@media (min-width: 768px) {
  .stay .biz-viewer {
    padding: 64px 88px 56px;
  }
  .stay .biz-viewer .biz-viewer-close {
    top: 16px;
    right: 16px;
  }
  .stay .biz-viewer .biz-viewer-prev {
    left: 20px;
  }
  .stay .biz-viewer .biz-viewer-next {
    right: 20px;
  }
}
/* «Помочь подобрать домик» reads like its siblings: one level, one style */
#help-select > summary {
  cursor: pointer;
}
/* Search results on a phone: every card lays out alike — the «свободно» tag top right however long the title, the
   price, then «Забронировать» under it (a flex-wrap put the button beside a short price and under a long one) */
@media (max-width: 480px) {
  .stay #list .card > .row:first-child {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .stay #list .card > .row:first-child > .tag {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .stay #list .card > .row:last-child {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* --- The staff's lists: the filter, the occupancy board, the figures ---------------------------------------------- */
.stay .filter-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 16px;
}
.stay .filter-form label {
  margin-top: 0;
}
.stay .filter-form input,
.stay .filter-form select {
  margin-top: 6px;
}
/* The board («Шахматка»): the dates in mono over the columns, the houses' names in the sticky first column; a booked
   night in its status's colour — yellow waits for the payment, blue has the first night paid, green is paid, the
   forest is checked in; a departure day is hatched (the house is free from check-in), a turnover carries both */
.chess {
  margin: 4px 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
}
.chess table {
  white-space: nowrap;
  font-size: 13px;
}
.chess td {
  border: 0;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 0;
  min-width: 40px;
  height: 40px;
  text-align: center;
  vertical-align: middle;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}
.chess tr:first-child td {
  height: 34px;
  color: var(--muted);
  border-bottom-color: var(--rule);
}
.chess th {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--hair);
  background: var(--sheet);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
}
.chess tr:last-child :is(td, th) {
  border-bottom: 0;
}
.chess .hold {
  background: var(--warn-tint);
}
.chess .deposit_paid {
  background: #d3e3ea;
}
.chess .paid {
  background: var(--hi);
}
.chess .checked_in {
  background: var(--forest);
}
.chess .checked_in a {
  color: var(--lime);
}
.chess a {
  display: block;
  line-height: 40px;
  color: var(--ink);
  text-decoration: none;
}
.chess a:hover {
  text-decoration: underline;
}
.chess .out {
  background: repeating-linear-gradient(135deg, var(--shade) 0 4px, var(--sheet) 4px 8px);
}
.chess .turn {
  background-image: repeating-linear-gradient(135deg, rgba(23, 32, 26, 0.16) 0 3px, transparent 3px 8px);
}
.chess tr.lost th {
  color: var(--error);
}
.board-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.board-groups a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.board-groups a:hover {
  background: var(--shade);
}
.board-groups a[aria-current] {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--on-forest);
}
/* The page's foot: the base, and «Сервис на связи 24» with the name in its own heavy letters, never parted before
   its «24» */
.stay-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
}
.stay-footer .stay-service a {
  font-family: "Golos Wordmark", var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
/* A guest's page: the seller and its documents (app/stays/base_page.py seller) */
.stay-footer .stay-seller p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.stay-footer .stay-legal a {
  color: var(--ink);
}
/* «7 дней · 30 дней · 90 дней · 365 дней»: a strip of keys, the period one is on outlined in ink */
.periods {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: var(--control-radius);
  background: var(--shade);
  gap: 3px;
}
.periods a {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}
@media (max-width: 760px) {
  /* a thumb's target on a phone: the rows were 33 px */
  .periods a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }
}
.periods a[aria-current] {
  background: var(--sheet);
  outline: 1px solid var(--ink);
}
/* Four figures in a row are one sheet with a hairline between its cells (not four cards); a featured figure stands
   on the result's pale-green band, its number under the highlighter */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.stay .kpis > .metric {
  margin: 0 -1px -1px 0;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  box-shadow: none;
  background: var(--sheet);
  color: var(--ink);
}
.stay .kpis > .metric.featured {
  background: var(--band);
}
.metric-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.metric-value {
  display: block;
  margin: 10px 0 6px;
  font-family: var(--mono);
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* A figure keeps its number and unit whole («19 500 ₽»): the tile takes the row rather than break it */
body.stay:not(.desk) .metric-value {
  overflow-wrap: normal;
}
.metric.featured .metric-value {
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(transparent 58%, var(--hi) 58%);
}
.metric-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
}
.dashboard-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-grid > .card {
  margin: 0 0 20px;
}
.section-heading {
  margin-top: 38px;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
  margin: 24px 0 12px;
}
.chart text {
  font: 12px var(--sans);
  fill: var(--muted);
}
.chart .gridline {
  stroke: var(--hair);
  stroke-dasharray: 3 5;
}
.chart .area {
  fill: var(--band);
}
.chart .line {
  stroke: var(--forest);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .point {
  fill: var(--forest);
}
.empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border-radius: var(--card-radius);
  background: var(--paper);
}
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
}
.data-row > div {
  min-width: 0;
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row a {
  text-decoration: none;
  font-weight: 600;
}
.data-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
body.stay:not(.desk) .data-row small {
  font-size: 12px;
}
body.stay:not(.desk) .data-row form {
  flex-shrink: 0;
}
body.stay:not(.desk) .data-row > p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}
body.stay:not(.desk) .data-row > b {
  font-family: var(--mono);
  font-weight: 500;
}
.theme {
  margin: 20px 0;
}
.theme .row {
  font-size: 13px;
}
.theme-track {
  height: 7px;
  border-radius: 2px;
  background: var(--shade);
  overflow: hidden;
  margin-top: 10px;
}
.theme-track span {
  height: 100%;
  display: block;
  background: #749b4e;
  border-radius: 2px;
}
body.stay:not(.desk) .theme-track span {
  background: var(--forest);
}
/* «Загрузка на 14 дней»: a bar a day on the shade, the count over it and the date under it in mono */
.occupancy-days {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
  margin: 24px 0 10px;
}
.occupancy-day {
  text-align: center;
  font: 500 11px/1.3 var(--mono);
  color: var(--muted);
}
/* The day's date under its bar is one line; on a phone 14 columns are 20 px each, so every other date is shown and
   «01.10» no longer wraps into «01.1» and «0» */
.occupancy-day > span {
  display: block;
  white-space: nowrap;
  letter-spacing: -0.04em;
}
@media (max-width: 520px) {
  .occupancy-day:nth-child(even) > span {
    visibility: hidden;
  }
}
.occupancy-track {
  height: 86px;
  display: flex;
  align-items: flex-end;
  background: var(--shade);
  border-radius: 2px;
  overflow: hidden;
}
.occupancy-track span {
  display: block;
  width: 100%;
  background: var(--forest);
  min-height: 0;
}
.occupancy-day b {
  display: block;
  font-weight: 500;
  margin: 6px 0;
  font-size: 12px;
  color: var(--ink);
}
.service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hair);
}
.service-card:last-child {
  border: 0;
}
.service-card p {
  margin: 8px 0 0;
  font-size: 12px;
}
body.stay:not(.desk) .service-card p {
  margin-top: 6px;
  font-size: 13px;
}
.service-card h3 {
  margin: 0;
}
.service-card .tag {
  justify-self: start;
}
.monitor-summary {
  display: flex;
  align-items: center;
  gap: 20px;
}
.status-orb {
  display: grid;
  place-items: center;
  font-size: 26px;
  height: 64px;
  width: 64px;
  flex-shrink: 0;
  border-radius: var(--card-radius);
  background: var(--band);
}
.monitor-summary.attention .status-orb {
  background: var(--warn-tint);
}
body.stay:not(.desk) .card.monitor-summary.attention {
  border-left: 3px solid #b8862a;
}
.update-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.update-controls label {
  margin: 0;
  font-size: 11px;
}
body.stay:not(.desk) .update-controls label {
  font-size: 13px;
}
.stay .save-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.stay .save-bar span {
  font-size: 12px;
  color: var(--muted);
}
.stay [data-client-form] > h2 {
  margin-top: 36px;
}

/* --- «Цены и сезон»: the console's form inside the panel — the folds one sheet, the save bar at its end --------- */
body.stay:not(.desk) details.form-section {
  margin: 0 0 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  box-shadow: var(--card-shadow);
  min-width: 0;
}
body.stay:not(.desk) details.form-section > summary {
  margin: 0;
}
body.stay:not(.desk) details.form-section[open] > summary {
  margin-bottom: 8px;
}
body.stay:not(.desk) .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
body.stay:not(.desk) .form-grid > .wide {
  grid-column: 1/-1;
}
body.stay:not(.desk) .form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
body.stay:not(.desk) .field label {
  margin: 7px 0 0;
}
body.stay:not(.desk) .field input,
body.stay:not(.desk) .field select {
  margin: 0;
}
body.stay:not(.desk) details.form-section .grid > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
/* The settings' rows as the console lays the same form out (control.css): four fields a row at most, a caption
   7 px over its field, so «Доплата за доп. гостя, ₽/сутки» stays on one line beside its neighbours */
body.stay:not(.desk) [data-client-form] .grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
body.stay:not(.desk) [data-client-form] label {
  margin-top: 7px;
}
/* «+ Добавить период» and «Удалить категорию» are two buttons, not one bar */
body.stay:not(.desk) button.add-row + button.remove-item {
  margin-left: 8px;
}
/* The form's end: a sheet in its place, not a bar stuck to the window — «Есть несохранённые изменения» (settings.js)
   floats over the window's corner and must stay pressable */
body.stay:not(.desk) [data-client-form] .save-bar {
  padding: 14px 20px;
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  background: var(--sheet);
  box-shadow: var(--card-shadow);
}
body.stay:not(.desk) [data-client-form] .save-bar button {
  margin: 0;
}
body.stay:not(.desk) .settings-launch .eyebrow {
  margin-bottom: 14px;
}

/* --- The guests' documents, requests and cards -------------------------------------------------------------------- */
.picture-editor {
  grid-column: 1/-1;
  min-width: 0;
}
.picture-editor input[type="file"] {
  max-width: 100%;
}
.stay .people {
  margin: 8px 0 12px;
  padding-left: 22px;
}
.stay .people li {
  margin: 4px 0;
}
.stay form.documents .person {
  border-top: 1px solid var(--hair);
  padding: 6px 0;
}
.stay form.documents .person .grid {
  margin-top: 8px;
}
.stay form.documents .person p.muted {
  margin: 2px 0 0;
  font-size: 12px;
}
/* «Анкеты гостей»: a card a page when printed, each value a button that copies it */
.guest-cards {
  display: grid;
  gap: 16px;
}
.guest-card {
  background: var(--sheet);
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  padding: 16px;
  break-inside: avoid;
}
.stay .guest-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.guest-card h2 small {
  font: 400 13px var(--sans);
  color: var(--muted);
}
.guest-card table {
  font-size: 14px;
}
.stay .guest-card th {
  width: 38%;
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  vertical-align: top;
}
.stay .guest-card button.copy {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 2px 6px;
  background: transparent;
  color: var(--ink);
  border: 1px dashed var(--card-edge);
  border-radius: var(--card-radius);
  font: inherit;
  text-align: left;
}
.stay .guest-card button.copy.copied {
  border-color: var(--forest);
  background: var(--band);
}
.stay .guest-card p > button.ghost.copy {
  display: inline-flex;
  min-height: var(--control-h);
  padding: 8px 16px;
  border: 1px solid var(--ink);
  font-weight: 600;
}
.guest-card .blank {
  display: inline-block;
  min-width: 60%;
  border-bottom: 1px solid var(--ink);
  height: 1em;
}
.guest-card .signature {
  margin-top: 18px;
}
/* The guests' requests during the stay: red while an urgent one waits — on the panel and in the staff's list */
.stay .requests-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}
.stay .requests-list .request {
  border-top: 1px solid var(--hair);
  padding: 10px 0;
}
.stay .requests-list .request:first-child {
  border-top: 0;
}
.stay .requests-list .request.urgent > b {
  color: var(--error);
}
.stay .requests-list .request p {
  margin: 4px 0;
}
.stay .requests-list form.inline button {
  width: auto;
}
.stay .request-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--card-radius);
  border: 1px solid var(--card-edge);
  margin: 4px 6px 0 0;
}
.stay .requests .request-form {
  border: 1px solid var(--card-edge);
  border-radius: var(--card-radius);
  margin: 8px 0;
  background: var(--sheet);
}
.stay .requests .request-form > summary {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  min-height: 24px;
}
.stay .requests .request-form[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--hair);
}
.stay .requests .request-form > form {
  padding: 12px 14px;
}
.stay .requests fieldset {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.stay .requests fieldset legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.stay .card.attention {
  border-color: var(--error-edge);
}
/* The guest's rating: five stars in a row, no fieldset frame (its legend is for a screen reader) */
.stay fieldset.rating {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
}

/* --- Phones and tablets ------------------------------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .staff .stay-layout {
    grid-template-columns: 1fr;
  }
  .stay-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 12px clamp(16px, 3.5vw, 56px);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .stay-nav .eyebrow {
    display: none;
  }
  .stay-nav a {
    flex-shrink: 0;
    margin: 0;
    padding: 10px 12px;
    min-height: 44px; /* a thumb's target */
  }
}
@media (max-width: 820px) {
  /* Where four figures do not fit, two a row; a figure that needs more than half the row takes the whole row */
  .kpis:not(.goals) {
    display: flex;
    flex-wrap: wrap;
  }
  .stay .kpis:not(.goals) > .metric {
    flex: 1 1 calc(50% - 7px);
    min-width: min-content;
  }
  .stay .kpis:not(.goals) > .metric.featured {
    flex-basis: 100%;
  }
}
@media (max-width: 700px) {
  .stay-header {
    padding: 10px 16px;
  }
  /* A folded title («Новая бронь по телефону», «Описания домиков») and the board's group chips are a thumb's target on
     a phone: 44 px rows. */
  .stay details > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  body.stay:not(.desk) details:not(.form-section, .item) > summary {
    display: list-item;
    padding-block: 10px;
    line-height: 24px;
  }
  .board-groups a {
    min-height: 44px;
    padding: 5px 14px;
  }
  .header-badge {
    display: none;
  }
  .stay main {
    padding: 26px 16px 20px;
  }
  .stay .card,
  .guest .card {
    padding: 18px;
  }
  .stay #list > .card {
    padding: 18px;
  }
  .stay .group-title {
    padding: 10px 18px;
  }
  /* A native date also reserves space for its calendar icon. Keep the complete year/placeholder visible without
     shrinking the 16 px mobile input text. */
  .stay .search-card .grid {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  }
  .stay .search-card input[type="date"] {
    padding-inline: 8px;
    font-size: 16px;
  }
  .stay .search-card #search {
    width: 100%;
    min-width: 0;
  }
  /* A phone's first screen holds the base, its picture and words, and the dates under them (390 × 844) */
  .guest main {
    padding-top: 16px;
  }
  .stay-hero {
    margin-bottom: 14px;
    padding: 18px 16px;
  }
  .stay .stay-hero h1 {
    margin-bottom: 10px;
  }
  .stay-hero.with-picture .stay-hero-media {
    margin: 0 0 12px;
  }
  .stay .stay-hero .stay-tagline {
    margin-bottom: 8px;
    font-size: 16px;
  }
  .stay .stay-hero h1.long-name {
    font-size: 24px;
  }
  /* The hours are in «Контакты»: a long name, a picture and the owner's 160 characters still leave «Заезд» on the
     first screen (390 × 844). */
  .stay .stay-hero .stay-hero-hours {
    display: none;
  }
  .stay .demo-notice {
    margin: 14px 0;
    padding: 10px 14px;
  }
  .guest .search-card {
    margin-top: 14px;
  }
  .stay .search-card h2 {
    margin-bottom: 8px;
  }
  .dashboard-grid,
  .dashboard-grid.equal {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .stay .filter-form {
    grid-template-columns: 1fr;
  }
  body.stay:not(.desk) .form-grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stay-partnership {
    gap: 2px 8px;
  }
  .platform-pair {
    gap: 6px;
  }
  .property-brand {
    font-size: 16px;
    gap: 6px;
  }
  .stay .platform-brand {
    font-size: 18px;
  }
  .property-logo {
    width: 48px;
    height: 43px;
  }
  .property-logo.uploaded {
    width: auto;
    height: 40px;
    max-width: 120px;
  }
  .lake-mark {
    width: 36px;
    height: 36px;
  }
  .lake-mark svg {
    width: 26px;
  }
  .brand-divider {
    font-size: 16px;
  }
  .stay .grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .occupancy-days {
    gap: 3px;
  }
  body.stay:not(.desk) .data-row {
    flex-wrap: wrap;
  }
}
@media print {
  .staff .stay-layout {
    display: block;
  }
  .stay .table-scroll {
    overflow: visible;
    background: none;
  }
  .stay .table-scroll table {
    min-width: 0;
    width: 100%;
  }
  .stay .stay-demo,
  .stay .stay-header,
  .stay .stay-nav,
  .stay .stay-footer,
  .stay .no-print,
  .stay .skip-link {
    display: none !important;
  }
  .stay main {
    padding: 0;
    max-width: none;
    border: 0;
  }
  .guest-card {
    border: 0;
    border-radius: 0;
    padding: 0;
    page-break-after: always;
  }
  .stay .guest-card button.copy {
    border: 0;
    padding: 0;
  }
}
/* A guest chooses the dates next to the house, on a phone as well as on a computer. */
.house-calendar { max-width: 480px; margin-top: 20px; padding: 16px; border: 1px solid var(--hair, #d5dfd9); border-radius: 16px; background: var(--sheet, #fff); }
.calendar-heading, .calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-heading h4 { margin: 0; font-size: 20px; }
.calendar-month { margin: 16px 0 8px; }
.calendar-month b { text-align: center; text-transform: capitalize; }
.calendar-month button { padding: 8px 12px; min-width: 44px; }
.calendar-guide { font-size: 13px; color: var(--muted, #53675c); }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-week span { text-align: center; font-size: 12px; padding: 6px 0; }
.house-calendar .calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; min-height: 48px; min-width: 0; border-radius: 8px; border: 1px solid transparent; font-size: 15px; background: #f3f5f4; color: #52615a; }
.calendar-day small { font-size: clamp(9px, 2.7vw, 11px); line-height: 1.3; white-space: nowrap; }
.house-calendar .calendar-day.free { background: #e7f4dd; color: #183d2b; }
.house-calendar .calendar-day:disabled { opacity: .6; cursor: default; }
.house-calendar .calendar-day.selected { background: #153b2b; color: #fff; opacity: 1; }
.house-calendar .calendar-day.in-range { background: #c8edac; color: #153b2b; }
.calendar-summary { min-height: 2.6em; font-size: 15px; }
.house-calendar .actions { margin-bottom: 0; }
@media (max-width: 480px) { .house-calendar { padding: 10px; } .calendar-days { gap: 2px; } }

/* Keep both sides of a booking change readable without horizontal scrolling on a phone. */
@media(max-width:600px){
  #edit-review .table-scroll{overflow:visible;background:none}
  #edit-review table,#edit-review tbody{display:block;width:100%;min-width:0}
  #edit-review thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  #edit-review tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 16px;padding:14px 0;border-bottom:1px solid var(--line,#d5ded9)}
  #edit-review tbody th{grid-column:1/-1;padding:0;border:0;font-weight:600}
  #edit-review tbody td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
  #edit-review tbody td::before{display:block;margin-bottom:4px;font-size:12px;color:var(--muted,#53645c)}
  #edit-review tbody td:nth-child(2)::before{content:"Было"}
  #edit-review tbody td:last-child::before{content:"Станет"}
  #edit-review tbody td:last-child{font-weight:600}
}
