/* Панель сайтов: все сайты одним списком, у каждой строки кнопки с подписями,
   по «Подробнее» раскрываются заметки (один блокнот) и сведения. Светлое, спокойное оформление. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jetbrains-mono-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --ground: oklch(0.966 0.007 165);
  --pane: oklch(0.995 0.002 165);
  --raise: oklch(0.948 0.01 165);
  --raise-2: oklch(0.915 0.013 165);
  --ink: oklch(0.235 0.025 165);
  --ink-2: oklch(0.47 0.02 165);
  --line: oklch(0.89 0.011 165);
  --accent: oklch(0.52 0.125 155);
  --accent-press: oklch(0.47 0.12 155);
  --accent-ink: oklch(0.99 0.01 155);
  --accent-text: oklch(0.45 0.12 155);
  --accent-wash: oklch(0.935 0.04 155);
  --up: oklch(0.62 0.15 152);
  --slow: oklch(0.74 0.15 72);
  --slow-text: oklch(0.5 0.11 65);
  --down: oklch(0.56 0.19 28);
  --muted-dot: oklch(0.74 0.012 165);
  --lift: 0 16px 40px -14px oklch(0.25 0.03 165 / 0.26), 0 2px 6px -2px oklch(0.25 0.03 165 / 0.1);
  --hair: 1px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: 'Onest', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

@media (min-resolution: 2dppx) {
  :root {
    --hair: 0.5px;
  }
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--accent-wash);
  color: var(--ink);
}

input,
textarea {
  caret-color: var(--accent);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--raise-2) transparent;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.mono {
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

mark {
  background: oklch(from var(--slow) l c h / 0.32);
  color: inherit;
  border-radius: 3px;
}

.loading {
  padding: 40px;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Страница и шапка ---------- */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.head {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.summary {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

.summary b {
  font-weight: 600;
}

.summary .ok {
  color: var(--accent-text);
}

.summary .slow {
  color: var(--slow-text);
}

.summary .down {
  color: var(--down);
}

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

.tools {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.search {
  position: relative;
  flex: 1 1 320px;
  max-width: 480px;
}

.search .i {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-2);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  border: 0;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  outline: none;
  transition: box-shadow 140ms var(--ease);
}

.search input::placeholder {
  color: var(--ink-2);
}

.search input:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  translate: 0 -50%;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  color: var(--ink-2);
  font: 500 12px/1 var(--mono);
}

.search input:focus ~ kbd,
.search input:not(:placeholder-shown) ~ kbd {
  display: none;
}

.folders {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.folder {
  flex: none;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 550;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.folder:hover {
  background: var(--raise);
  color: var(--ink);
}

.folder[aria-pressed='true'] {
  background: var(--ink);
  color: var(--pane);
}

.folder .count {
  font-size: 13px;
  color: var(--ink-2);
}

.folder[aria-pressed='true'] .count {
  color: oklch(from var(--pane) l c h / 0.75);
}

/* ---------- Кнопки ---------- */

.btn {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  background: var(--pane);
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), box-shadow 140ms var(--ease), transform 140ms var(--ease),
    color 140ms var(--ease);
}

.btn:hover {
  background: var(--raise);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.btn--primary:hover {
  background: var(--accent-press);
}

.btn--quiet {
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}

.btn--quiet:hover {
  background: var(--raise);
  color: var(--ink);
}

.btn--danger {
  color: var(--down);
}

.btn--danger-fill {
  background: var(--down);
  color: oklch(0.99 0 0);
  box-shadow: none;
}

.btn--sm {
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.btn--icon {
  width: 40px;
  padding: 0;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.btn.is-done {
  background: var(--accent-wash);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px oklch(from var(--accent) l c h / 0.4);
}

.btn.is-done .i {
  animation: pop 320ms var(--ease) both;
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

/* ---------- Список ---------- */

.sheet {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 16px;
  background: var(--pane);
  box-shadow: 0 0 0 var(--hair) var(--line), 0 1px 2px oklch(0.25 0.03 165 / 0.04);
  overflow: hidden;
}

.site + .site,
.site + .found,
.found + .site {
  border-top: var(--hair) solid var(--line);
}

.site-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 180px auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 18px;
  transition: background-color 140ms var(--ease);
}

.site-row:hover,
.site.is-open > .site-row {
  background: oklch(from var(--raise) l c h / 0.55);
}

.ava {
  --size: 44px;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: oklch(0.56 0.12 var(--h, 160));
  color: oklch(0.99 0.01 var(--h, 160));
  font-weight: 650;
  font-size: 15.5px;
  user-select: none;
}

.ava.is-muted {
  background: var(--raise-2);
  color: var(--ink-2);
}

.ava--new {
  background: transparent;
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.who {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.who-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.who-name strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.who-name .i {
  width: 15px;
  height: 15px;
  color: var(--ink-2);
}

.who-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: nowrap;
}

.who-meta .mono {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.host-own {
  color: var(--ink);
  font-weight: 550;
}

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

button.who:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tag {
  flex: none;
  padding: 1px 6px;
  border-radius: 5px;
  outline: 1px dashed var(--ink-2);
  outline-offset: -1px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.tag--down {
  outline-style: solid;
  color: var(--down);
}

/* Состояние: точка и слова */
.status {
  display: grid;
  gap: 1px;
  font-size: 14.5px;
  font-weight: 550;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status small {
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-dot);
}

.is-up .dot {
  background: var(--up);
}

.is-slow .dot {
  background: var(--slow);
}

.is-down .dot,
.is-missing .dot {
  background: var(--down);
}

.is-checking .dot {
  animation: breathe 1s var(--ease) infinite alternate;
}

@keyframes breathe {
  to {
    opacity: 0.3;
  }
}

.is-slow .status-line {
  color: var(--slow-text);
}

.is-down .status-line,
.is-missing .status-line {
  color: var(--down);
}

.is-archived .status-line,
.is-unknown .status-line,
.is-checking .status-line {
  color: var(--ink-2);
}

.actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.actions .btn-admin,
.actions .slot {
  width: 116px;
}

/* Пустое место вместо «Админки»: просто надпись, ничем не похожая на кнопку */
.actions .slot {
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  line-height: 1.2;
}

.actions .more {
  width: 128px;
}

.more .i {
  transition: transform 220ms var(--ease);
}

.site.is-open .more .i {
  transform: rotate(180deg);
}

.found {
  background: var(--accent-wash);
}

.found .site-row:hover {
  background: transparent;
}

.empty {
  padding: 36px 20px;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Раскрытая строка ---------- */

.details {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px 28px;
  padding: 6px 18px 20px 78px;
  background: oklch(from var(--raise) l c h / 0.55);
  animation: unfold 240ms var(--ease) both;
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.details h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 8px;
}

.block-head small {
  flex: 1;
  color: var(--ink-2);
  font-size: 13px;
}

.pad {
  min-height: 110px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.pad a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pad.is-empty {
  color: var(--ink-2);
}

.pad-form {
  display: grid;
  gap: 8px;
}

.pad-form textarea {
  width: 100%;
  min-height: 170px;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  outline: none;
  resize: vertical;
  line-height: 1.55;
}

.row-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pad-form .row-buttons {
  justify-content: flex-end;
}

.facts {
  margin: 0;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  overflow: hidden;
}

.fact {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 6px 0 14px;
}

.fact + .fact {
  border-top: var(--hair) solid var(--line);
}

.fact dt {
  color: var(--ink-2);
  font-size: 13.5px;
}

.fact dd {
  margin: 0;
  padding: 10px 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}

.fact dd a:hover {
  color: var(--accent-text);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-2);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.icon-btn:hover {
  background: var(--raise);
  color: var(--ink);
}

.details-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  border-top: var(--hair) solid var(--line);
}

.details-foot .grow {
  flex: 1;
}

.confirm {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px oklch(from var(--down) l c h / 0.4);
}

.confirm p {
  margin: 0;
  max-width: 62ch;
}

/* ---------- Форма ---------- */

.form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.form-title {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 650;
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field label {
  font-size: 13.5px;
  font-weight: 600;
}

.field .error {
  color: var(--down);
  font-size: 13px;
  font-weight: 550;
}

.field .hint {
  color: var(--ink-2);
  font-size: 13px;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--pane);
  box-shadow: inset 0 0 0 var(--hair) var(--line);
  outline: none;
  transition: box-shadow 140ms var(--ease);
}

.input.mono {
  font-size: 14px;
}

.input::placeholder {
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0;
}

.input:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.input[aria-invalid='true'] {
  box-shadow: inset 0 0 0 1.5px var(--down);
}

.input-row {
  display: flex;
  gap: 6px;
}

.input-row .input {
  flex: 1;
  min-width: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.adding {
  background: oklch(from var(--raise) l c h / 0.55);
}

.adding .details {
  padding-left: 18px;
  background: transparent;
}

/* ---------- Всплывающее ---------- */

.qr {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(360px, calc(100vw - 32px));
  height: fit-content;
  padding: 20px;
  display: grid;
  gap: 14px;
  justify-items: center;
  border: 0;
  border-radius: 18px;
  background: var(--pane);
  color: var(--ink);
  box-shadow: var(--lift);
  text-align: center;
}

.qr:not(:popover-open) {
  display: none;
}

/* Меню настроек под шестерёнкой */
.menu {
  position: fixed;
  inset: auto;
  top: 84px;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  width: 320px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--pane);
  color: var(--ink);
  box-shadow: var(--lift);
}

.menu button,
.menu label {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.menu button:hover,
.menu label:hover {
  background: var(--raise);
}

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

.menu span {
  display: grid;
}

.menu b {
  font-weight: 600;
}

.menu small {
  color: var(--ink-2);
  font-size: 13px;
}

.menu hr {
  margin: 4px 8px;
  border: 0;
  border-top: var(--hair) solid var(--line);
}

/* Вход */
.login {
  min-height: calc(100dvh - 96px);
  display: grid;
  place-items: center;
}

.login form {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px 24px 24px;
  border-radius: 18px;
  background: var(--pane);
  box-shadow: 0 0 0 var(--hair) var(--line), var(--lift);
}

.login-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
}

.login-mark .i {
  width: 28px;
  height: 28px;
}

.login h1 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.login p {
  margin: -6px 0 6px;
  color: var(--ink-2);
}

.login .error {
  min-height: 20px;
  color: var(--down);
  font-size: 14px;
  font-weight: 550;
}

.login .btn {
  height: 46px;
}

.qr::backdrop {
  background: oklch(0.2 0.02 165 / 0.32);
}

.qr h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.qr-code {
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 var(--hair) var(--line);
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-url {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--raise);
}

.seg button {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.seg button[aria-pressed='true'] {
  background: var(--pane);
  color: var(--ink);
  box-shadow: 0 1px 3px -1px oklch(0.25 0.03 165 / 0.25);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--pane);
  font-size: 14.5px;
  font-weight: 550;
  box-shadow: var(--lift);
  translate: -50% 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 300ms var(--ease);
}

.toast.is-shown {
  opacity: 1;
  transform: none;
}

/* ---------- Ширины ---------- */

/* Состояние под именем нужно только на узком экране */
.who-status {
  display: none !important;
}

@media (max-width: 1099px) {
  .site-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .status {
    display: none;
  }

  .who-status {
    display: flex !important;
    font-size: 14px;
    font-weight: 550;
  }
}

@media (max-width: 759px) {
  .page {
    padding: max(18px, env(safe-area-inset-top)) 12px 48px;
  }

  .head h1 {
    font-size: 26px;
  }

  .head-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .head {
    position: relative;
  }

  .summary {
    margin-top: 10px;
  }

  .head > * {
    min-width: 0;
  }

  .head-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    padding-inline: 10px;
  }

  /* «Ещё» — в углу рядом с заголовком, чтобы две главные кнопки уместились в одну строку */
  .head-actions .btn[popovertarget] {
    position: absolute;
    top: 0;
    right: 0;
    flex: none;
    height: 36px;
  }

  .menu {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .search {
    flex-basis: 100%;
    max-width: none;
  }

  .site-row {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      'ava who'
      'acts acts';
    gap: 12px;
    padding: 14px 12px 10px;
  }

  .site-row > .ava {
    grid-area: ava;
  }

  .who {
    grid-area: who;
  }

  .actions {
    grid-area: acts;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .actions .btn {
    height: auto;
    min-height: 58px;
    padding: 8px 2px;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    border-radius: 12px;
  }

  .actions .btn .i {
    width: 20px;
    height: 20px;
  }

  .actions .btn-admin {
    width: auto;
  }

  .actions .slot {
    width: auto;
    min-height: 58px;
    padding: 8px 2px;
    font-size: 12px;
  }

  /* «Подробнее» — отдельной строкой под четырьмя кнопками */
  .actions .more {
    grid-column: 1 / -1;
    width: auto;
    min-height: 40px;
    flex-direction: row;
    gap: 6px;
    font-size: 14px;
  }

  .actions .more .i {
    width: 18px;
    height: 18px;
  }

  .details {
    grid-template-columns: 1fr;
    padding: 4px 12px 16px;
  }

  .fact {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 1px;
    padding: 7px 6px 7px 14px;
  }

  .fact dt {
    grid-row: 2;
    grid-column: 1;
    font-size: 12.5px;
  }

  .fact dd {
    grid-row: 1;
    grid-column: 1;
    padding: 0;
  }

  .fact .icon-btn {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .found .actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .found .actions .btn {
    min-height: 44px;
    padding-inline: 14px;
    flex-direction: row;
    font-size: 14px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
