/* The chat of etema.ru (design spec of the site chat, 10; the pixel reference is the mockup v4,
   sections A to D and F). It is a light interface in both themes, like the site it sits on, and it
   loads nothing from outside: the policy of the chat host is script-src and style-src 'self'. */

:root {
  color-scheme: light;
  --surface: #ffffff;
  --page: #f1f2f4;
  --ink: #1a1a1a;
  --ink-2: #5f646b;
  --ink-3: #6b7178;
  --line: #e3e5e8;
  --line-2: #c9ced4;
  --wash: #f4f5f7;
  --incoming: #f1f2f4;
  --accent: #5e7a20;
  --accent-ink: #ffffff;
  --accent-wash: #eef3e1;
  --ticket: #4dc57c;
  --link: #3f5a12;
  --online: #2e9e5b;
  --off: #b3b9c0;
  --error: #b42318;
  --scrim: rgba(26, 26, 26, 0.4);
  --shadow: 0 2px 6px rgba(26, 26, 26, 0.1), 0 12px 30px rgba(26, 26, 26, 0.16);
  --shadow-small: 0 1px 3px rgba(26, 26, 26, 0.14);
  --font: "Fira Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 400 15px/1.38 var(--font);
  -webkit-text-size-adjust: 100%;
  /* a swipe down on a short conversation, which cannot scroll, is Chrome's pull to refresh on a phone, and
     it reloads the page with the draft in the field (the thread has its own `contain`) */
  overscroll-behavior-y: none;
}

body[data-view="closed"] .chat,
body[data-view="bubble"] .chat {
  display: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--link);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chat:focus-visible {
  outline: none;
}

/* a field shows the focus by its own border, and to a keyboard (the page has `data-keys` after a Tab) by a
   ring round it as well: a text field matches :focus-visible whenever it has the focus, a tap included */
.inp:focus-visible,
.field-text:focus-visible {
  outline: none;
  border-color: var(--accent);
}

:root[data-keys] .inp:focus-visible,
:root[data-keys] .field-text:focus-visible {
  box-shadow: 0 0 0 1px var(--accent);
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

/* the holders that only group the window's parts */
.view-chat,
.layer {
  display: contents;
}

/* ---------- the window ---------- */

.chat {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

body[data-view="panel"] .chat {
  border-radius: 16px;
}

/* the page of the link in a mail: a column in the middle of a grey page */
body[data-view="standalone"] {
  background: var(--page);
}

/* a card only where the screen is wide and tall: a phone on its side is wide enough (866 points) and far too
   short for it, and gets the whole screen */
@media (min-width: 700px) and (min-height: 560px) {
  body[data-view="standalone"] .chat {
    inset: 24px auto 24px 50%;
    width: 520px;
    margin-left: -260px;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
}

/* a phone's overlay is scrolled and tapped, never pinched or double-tapped: the page behind it is wider than the screen
   and would be zoomed out under the chat (chat.js, «a phone's overlay is not pinched»). On every element, since the
   value is an intersection that stops at a scroller, and the thread is one */
body[data-view="overlay"],
body[data-view="overlay"] * {
  touch-action: pan-x pan-y;
}

/* ---------- the head ---------- */

.head {
  flex: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px 11px 14px;
}

.head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-left {
  margin-left: -6px;
}

/* the logo's tile: the ticket mark of etema.ru on its green, white (owner's choice A, 23.10.2026) */
.avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ticket);
  color: #ffffff;
}

.avatar .ic {
  width: 26px;
  height: 26px;
}

.titles {
  flex: 1;
  min-width: 0;
}

.name {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
}

.sub {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.38;
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--online);
}

.dot.off {
  background: var(--off);
}

/* The head of a conversation (the owner's H1, 26.10.2026): one row, the title and under it a status of one line,
   in the quiet colour of the hours it replaces, with a dot that alone has colour. The hours' sentence and the way
   back to the site are in the menu then. 51 points high where the head of the first screen is 106 to 130. */
.chat.compact .head {
  padding: 3px 8px 3px 14px;
}

.chat.compact .avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.chat.compact .avatar .ic {
  width: 22px;
  height: 22px;
}

.chat.compact .name {
  font-size: 16px;
}

.presence {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.3;
}

.presence .dot {
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.hbtn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
}

.hbtn:hover,
.hbtn[aria-expanded="true"],
.hbtn[aria-pressed="true"] {
  background: var(--wash);
}

.hbtn .ic {
  width: 22px;
  height: 22px;
}

.hbtn.expand .ic {
  width: 19px;
  height: 19px;
}

/* ---------- the thread ---------- */

.thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
}

.thread > * {
  flex: none;
}

/* a short conversation sits at the bottom, a long one scrolls (the first child takes the room) */
.thread > :first-child {
  margin-top: auto;
}

.thread.top > :first-child {
  margin-top: 0;
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 84%;
}

.msg.me {
  align-self: flex-end;
  align-items: flex-end;
}

.msg.op {
  align-self: flex-start;
}

.bub {
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.38;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.me .bub {
  border-bottom-right-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
}

.me .bub a {
  color: var(--accent-ink);
}

.op .bub {
  border-bottom-left-radius: 6px;
  background: var(--incoming);
  color: var(--ink);
}

.who {
  padding: 0 4px;
  color: var(--ink-2);
  font-size: 12px;
}

.tm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.tm .ic {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.tm .ic.waiting {
  color: var(--ink-3);
}

.note-time {
  align-self: center;
}

.sys {
  align-self: center;
  max-width: 92%;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
}

.day {
  align-self: center;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--accent);
}

/* the card of the order (mockup A5): it stands at the top of the thread, above the greeting */
.ordc {
  align-self: stretch;
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

.ordc b {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
}

.ordc .seen {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.ordc .seen .ic {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent);
}

.topic {
  align-self: flex-end;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 12px;
}

.typing {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  color: var(--ink-2);
  font-size: 13px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.7;
  animation: blink 1.2s infinite ease-in-out;
}

.typing i:nth-of-type(2) {
  animation-delay: 0.2s;
}

.typing i:nth-of-type(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 0.9;
  }
}

/* the first screen: the label, the chips and the quiet line of other ways */
.label {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
}

.chip:hover {
  background: var(--wash);
}

/* the pictures of the messengers are ETEMA's own, 96 points square with their own shapes: plain images,
   24 in the menu and 28 in the quiet line */
.glyph {
  width: 24px;
  height: 24px;
  flex: none;
  display: block;
}

/* the quiet line of the first screen: «Написать нам:», three buttons and «или оставьте заявку». The line
   breaks between these pieces and never inside one, so a piece that has no room stands whole at the start
   of the next line (no line begins with a dot or a comma: there is none to begin with) */
.alt {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.alt .lead {
  margin-right: 6px;
}

/* a messenger is a button with nothing on it but its picture: a target of 40 by 40 (the same under a finger
   and under a mouse) with the picture, 28 points, in the middle of it, and 4 points between the targets, so
   that none is over another and a tap is never the neighbour's */
.alt .ways {
  display: flex;
  gap: 4px;
}

.alt .way {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.alt .way .glyph {
  width: 28px;
  height: 28px;
}

/* a config of the release before has no pictures: the name stands in the place of the picture */
.alt .way.named {
  width: auto;
  padding: 0 8px;
}

/* «или оставьте заявку» and «Оставьте заявку.»: one piece each, and a target of 40 points high, which the
   button fills (the words of the sentence are the same size as the rest) */
.alt .or,
.alt .tail {
  display: flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
}

.alt .or {
  gap: 0.28em;
}

.alt .linkish {
  align-self: stretch;
}

/* at 380 points and under the line has little or no room to spare with its spaces (at 375 it has 4 points,
   at 360 it is 15 too wide), and the picture has 6 points of its target on each side, which is space enough
   between the label, the pictures and the words: without them it needs 329 points */
@media (max-width: 380px) {
  .alt .lead {
    margin-right: 0;
  }

  .alt .ways {
    gap: 0;
  }
}

/* the link-looking button: a word in a sentence that does something */
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  text-decoration: underline;
  font: inherit;
}

/* ---------- the cards of the thread: the soft line, the note, the operator's request ---------- */

.soft,
.ask {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
}

.ask {
  gap: 10px;
  padding: 14px;
  border-color: var(--line-2);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.soft p,
.ask h4 {
  margin: 0;
}

/* the two fields of the operator's request stand in plain boxes, not in a row: they take the width */
.ask .inp {
  width: 100%;
}

/* F3 names its field above it, closer to it than the other things of the card are to each other */
.soft .lab {
  margin: 0 0 -4px;
  align-self: flex-start;
}

.soft p {
  font-size: 14px;
  line-height: 1.4;
}

.ask p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.ask h4 {
  font-size: 15.5px;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 8px;
}

/* the page of the link in a mail: the way back to the site, under the hours */
.go {
  margin-top: 6px;
  font-size: 13px;
}

.go a {
  color: var(--link);
}

.lab {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
}

.lab small {
  color: var(--ink-3);
  font-weight: 400;
}

.inp {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
}

.inp::placeholder,
.field-text::placeholder {
  color: var(--ink-3);
}

textarea.inp {
  height: 86px;
  padding-top: 10px;
  line-height: 1.35;
  font-size: 15px;
  resize: vertical;
}

.inp[aria-invalid="true"] {
  border-color: var(--error);
}

.btn {
  height: 44px;
  flex: none;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
}

.btn:disabled {
  border-color: var(--line-2);
  background: var(--line);
  color: var(--ink-3);
  cursor: default;
}

.btn.ghost {
  border-color: var(--line-2);
  background: transparent;
  color: var(--ink);
}

.btn.large {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
}

.hint,
.error {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.hint {
  color: var(--ink-2);
}

.error {
  color: var(--error);
}

.fine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.35;
}

.skip {
  min-height: 44px;
  flex: none;
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: underline;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.check input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.check label {
  padding-block: 3px;
}

/* ---------- the banner of a text session: the way to the code that opens the files ---------- */

.lock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: var(--wash);
}

.lock p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
}

.lock .row {
  align-items: center;
}

.inp.code {
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- the composer ---------- */

.composer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.status {
  margin: 0;
  padding: 0 6px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.35;
}

.status:empty {
  display: none;
}

.compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.field-text {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--wash);
  font-size: 16px;
  line-height: 1.3;
  resize: none;
}

.send {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.send:disabled {
  background: var(--line-2);
  color: var(--surface);
  cursor: default;
}

.send .ic {
  width: 21px;
  height: 21px;
}

.consent {
  margin: 0;
  padding: 0 6px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.35;
}

/* ---------- files: the paperclip, the files in the thread, what an upload says (B4, B2) ---------- */

/* the paperclip sits inside the field, at its left end (mockup B1, B4): the field leaves room for it */
.field-box {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.field-box .field-text {
  padding-left: 46px;
  padding-right: 12px;
}

.clip {
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
}

.clip:hover {
  background: var(--wash);
}

.clip .ic {
  width: 24px;
  height: 24px;
}

.bub.file {
  display: flex;
  flex-direction: column;
  gap: 8px;
  white-space: normal;
}

/* a picture is the bubble: a thin frame of the bubble's colour around it */
.bub.pic-bub {
  padding: 4px;
}

.pic {
  display: block;
  line-height: 0;
  border-radius: 14px;
  overflow: hidden;
}

.pic-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 260px;
  background: var(--wash);
}

.pic-bub .up,
.pic-bub .doc {
  padding: 0 6px 4px;
}

.doc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  white-space: normal;
}

/* a card under the words of a message, in their bubble (B2, D6) */
.bub .under {
  margin-top: 8px;
}

.doc-ic {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
}

.op .doc-ic {
  background: var(--surface);
  color: var(--accent);
}

.doc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.doc-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* the size under a name: the colour of the words beside it, not a faded one (a faded white on the
   green is under 4.5 to 1), and the grey of a secondary line on the grey bubble */
.doc-meta {
  font-size: 12.5px;
}

.op .doc-meta,
.uploading .doc-meta,
.failed .doc-meta {
  color: var(--ink-2);
}

/* «Скачать» is a small text link at the end of the card, as B2 draws it: a button with a border and
   padding took the room of the name on a phone, which broke «Билеты_48213.pdf» in the middle of the
   word. The box is still 44 points high for a thumb (and the width of its word: the name of a file
   needs every point of a 360 wide phone), and white on the green of the visitor's own bubble,
   where the link colour would not be read. */
.bub a.doc-get {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--link);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.me .bub a.doc-get {
  color: #ffffff;
  text-decoration: underline;
}

.up {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.up-bar {
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.up-bar::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.35);
}

.up-bar::-webkit-progress-value {
  background: #ffffff;
}

.up-bar::-moz-progress-bar {
  background: #ffffff;
}

.up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.up-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

/* a card that is on its way (B4): white, with an edge, and a green bar */
.bub.uploading,
.me .bub.uploading {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

.uploading .doc-ic {
  background: var(--accent-wash);
  color: var(--accent);
}

.uploading .up-line {
  color: var(--ink-2);
}

.uploading .up-bar,
.uploading .up-bar::-webkit-progress-bar {
  background: var(--line);
}

.uploading .up-bar::-webkit-progress-value {
  background: var(--accent);
}

.uploading .up-bar::-moz-progress-bar {
  background: var(--accent);
}

/* a file that did not go: the bubble is white with a red edge, and says why */
.bub.failed,
.me .bub.failed {
  border: 1px solid var(--error);
  background: var(--surface);
  color: var(--ink);
}

.bub.failed .up-line {
  color: var(--error);
}

/* a message that the network never let through: its words, then why and the button */
.bub.failed > .up {
  margin-top: 8px;
}

/* files over the window: where they will land */
.chat.dropping::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 6;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: var(--accent-wash);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- the menu «⋯» ---------- */

.scrim {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
}

body[data-view="overlay"] .scrim,
body[data-view="standalone"] .scrim {
  background: var(--scrim);
}

.menu {
  --menu-top: 56px;
  position: absolute;
  top: var(--menu-top);
  right: 10px;
  z-index: 5;
  width: min(320px, calc(100% - 20px));
  /* a window too short for it (a phone on its side is 390 points high) keeps the menu in, and it scrolls */
  max-height: calc(100% - var(--menu-top) - 10px);
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* under the one row's head, 2 points into its foot: the head is as tall as its title is long (the cabinet's
   takes two lines), so `--head` is its height, which the script gives to the window's style */
.chat.compact .menu {
  --menu-top: calc(var(--head, 51px) - 2px);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 15.5px;
  text-align: left;
  text-decoration: none;
}

.menu-item:hover {
  background: var(--wash);
}

.menu-item .ic {
  width: 22px;
  height: 22px;
  color: var(--ink-2);
}

.menu-item small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 400;
}

.menu-item.primary {
  font-weight: 600;
}

.menu-sep {
  height: 1px;
  margin: 4px 8px;
  background: var(--line);
}

.menu-mail {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 6px 6px 12px;
  font-size: 15.5px;
}

/* the address is one line (it breaks after the «@» only, at a size far too large for its place: the owner's phone
   broke «support@etema.r» and «u» when it was let break anywhere), and the word that follows a copy stands under it */
.menu-mail .addr {
  flex: 1;
  min-width: 0;
}

.menu-mail .ic {
  width: 22px;
  height: 22px;
  color: var(--ink-2);
}

.copied {
  display: block;
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

/* the hours' sentence of the one row's menu: a quiet note at its end */
.menu-note {
  margin: 0;
  padding: 6px 12px 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.38;
}

/* out of sight and still read by a screen reader: what a live region says that the eye sees at once */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
}

.copy .ic {
  width: 16px;
  height: 16px;
  color: var(--link);
}

/* the menu's is a picture alone, a target of 44 by 44 */
.menu-mail .copy {
  width: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

.menu-mail .copy .ic {
  width: 20px;
  height: 20px;
}

.menu-mail .copy.ticked {
  background: var(--wash);
}

/* ---------- the form «Оставить заявку» and the screen after it ---------- */

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.back {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--link);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
}

.back .ic {
  width: 18px;
  height: 18px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
}

.form h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.form .intro {
  margin: -6px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

.form .inp {
  width: 100%;
}

.quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

.quiet .copy {
  margin-left: 0;
}

/* the honeypot: out of sight and out of the tab order, a script fills it and a person does not */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 22px 18px;
  text-align: center;
}

.done .ok {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
}

.done .ok .ic {
  width: 32px;
  height: 32px;
}

.done h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.done p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
}

.recap {
  margin: 6px 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.recap b {
  color: var(--ink);
  font-weight: 600;
}

.spacer {
  flex: 1;
}

.foot {
  padding: 16px;
}

/* ---------- the order card (a later sprint fills it) ---------- */

.ordc {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

.ordc b {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
}

/* ---------- the reply bubble drawn above the button (the loader sizes the frame to it) ---------- */

/* The loader of a zoomed-out page (v2) draws the bubble at the zoom its own button has, so that a frame as big as the
   bubble is shown at its size and nothing is scaled up (a scaled layer is drawn at the page's scale and stretched,
   which blurs it): chat.js sets `--z` on it (`zoom`, the loader's word), and every length of it is that many times
   the one below. Without the word `--z` is 1 and the bubble is as it was. */
.tip {
  --u: calc(1px * var(--z, 1));
  position: fixed;
  left: calc(24 * var(--u)); /* the room the shadow needs: the frame is the bubble and this much round it */
  top: calc(24 * var(--u));
  width: calc(232 * var(--u));
  display: none;
  flex-direction: column;
  gap: calc(2 * var(--u));
  padding: calc(10 * var(--u)) calc(14 * var(--u));
  border: 0;
  border-radius: calc(14 * var(--u));
  background: var(--surface);
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(26, 26, 26, 0.1), 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(26, 26, 26, 0.16);
  color: var(--ink);
  font-size: calc(14 * var(--u));
  line-height: 1.35;
  text-align: left;
}

body[data-view="bubble"] .tip {
  display: flex;
}

.tip b {
  font-weight: 600;
}

.tip span {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* ---------- a thumb's room ---------- */

/* The small words that do something (the link under the hours, «Согласие и политика», the messengers,
   «оставьте заявку», «Согласие» of the card, the copy button, the box of consent) were 13 to 25 points high
   and 20 or 24 across (the Android run of 23.10.2026). Where there is a thumb they keep their looks and take
   room round them: the padding is a target and no space, a negative margin takes it back, so no line of the
   page moves. An inline link's vertical padding is no part of the line at all. The consent under the field is
   the exception, because a target must not reach over its neighbour (a tap there would go into the field).
   The quiet line has no room of this kind: its buttons are targets of 40 by 40 for everybody. */
@media (any-pointer: coarse) {
  .go a,
  .fine a {
    padding: 14px 6px;
    margin: -14px -6px;
  }

  /* «Согласие и политика» sits 7 points under the field: its room goes down, to the edge of the screen, and
     up only as far as the air between them (on a line of its own it reached 6 points into the field) */
  .consent a {
    padding: 6px 6px 21px;
    margin: 0 -6px;
  }

  .quiet .copy {
    padding: 0 14px;
    margin: 0 -10px;
  }

  /* the whole row of consent is the target: the label is 44 points high, and the room of the box itself,
     out to the edge of the card, is a part of the label that lies over it, so a tap at the box toggles it */
  .check {
    position: relative;
    min-height: 44px;
  }

  .check label {
    flex: 1;
    padding-block: 12px;
  }

  .check label::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 -14px;
    width: 58px;
  }

  .check input {
    margin-top: 11px;
  }
}

/* ---------- a person who asks for less motion gets none ---------- */

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