:root {
  color-scheme: light;
  --bg: #eef3f5;
  --panel: #ffffff;
  --panel-soft: #f8fbfc;
  --text: #17212b;
  --muted: #627083;
  --line: #d6e0e7;
  --accent: #0f766e;
  --accent-dark: #0b5e58;
  --accent-soft: #d9f3ef;
  --warm: #c4871a;
  --danger: #b42318;
  --shadow-soft: 0 18px 44px rgba(24, 33, 47, 0.09);
  --shadow-lift: 0 24px 58px rgba(24, 33, 47, 0.15);
  --motion-fast: 160ms ease;
  --motion-med: 260ms ease;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #0f1720;
  --panel: #182330;
  --panel-soft: #14202c;
  --text: #e8eef4;
  --muted: #a4b3c3;
  --line: #2c3a49;
  --accent: #2dd4bf;
  --accent-dark: #5eead4;
  --accent-soft: #123d3a;
  --warm: #f4bf50;
  --danger: #f87171;
  --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-lift: 0 24px 58px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 46%, #e9eff3 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

:root[data-theme="night"] body {
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent 34%),
    linear-gradient(180deg, #0b1119 0%, var(--bg) 52%, #111827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 72%);
  animation: ambientShift 18s ease-in-out infinite alternate;
}

:root[data-theme="night"] body::before {
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.055) 1px, transparent 1px);
}

.shell,
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  animation: pageEnter 420ms ease both;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  animation: pageEnter 380ms ease both;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 20px;
  background: linear-gradient(180deg, #102a2a 0%, #172533 100%);
  color: #fff;
  animation: sidebarEnter 420ms ease both;
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.16);
}

.sidebar h1 {
  font-size: 30px;
  color: #f8fafc;
}

.sidebar .eyebrow {
  color: #8fd6cd;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button {
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: #dbe4ef;
  border: 1px solid transparent;
  transition: background var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}

.side-nav button.active,
.side-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(3px);
}

.admin-content {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
}

.admin-section {
  display: grid;
  gap: 18px;
  animation: contentEnter 320ms ease both;
}

.admin-section[hidden] {
  display: none;
}

.page-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 820px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f9fcfc);
  padding: 18px;
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.stat-card:hover {
  border-color: rgba(20, 108, 99, 0.35);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 14px;
}

.stat-card strong {
  font-size: 36px;
  color: var(--accent-dark);
}

.intro,
.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.intro {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 248, 0.94));
  box-shadow: var(--shadow-soft);
}

.intro::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 180px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  opacity: 0.55;
}

.site-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin-bottom: 14px;
  animation: logoPop 480ms ease both;
}

.sidebar-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  margin-bottom: 14px;
  animation: logoPop 480ms ease both;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  color: #111827;
}

h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.admin-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(180deg, #12847b, var(--accent));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.language-switch {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.language-switch button {
  width: 42px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(207, 217, 226, 0.9);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  transition: transform var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.theme-toggle {
  width: 42px !important;
  min-width: 42px;
  padding: 0 !important;
  font-size: 12px;
}

.theme-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.theme-toggle[data-theme-mode="day"] .theme-icon {
  border-radius: 50%;
  background: #f7b731;
  box-shadow: 0 0 0 4px rgba(247, 183, 49, 0.22);
}

.theme-toggle[data-theme-mode="day"] .theme-icon::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 9%, #f7b731 9% 13%, transparent 13% 22%, #f7b731 22% 26%, transparent 26% 35%, #f7b731 35% 39%, transparent 39% 48%, #f7b731 48% 52%, transparent 52% 61%, #f7b731 61% 65%, transparent 65% 74%, #f7b731 74% 78%, transparent 78% 87%, #f7b731 87% 91%, transparent 91% 100%);
  z-index: -1;
}

.theme-toggle[data-theme-mode="night"] .theme-icon {
  border-radius: 50%;
  background: #dbeafe;
  box-shadow: inset -6px 0 0 #7c8aa2, 0 0 0 4px rgba(124, 138, 162, 0.18);
}

.theme-toggle[data-theme-mode="auto"] .theme-icon {
  border-radius: 50%;
  background: linear-gradient(90deg, #f7b731 0 50%, #334155 50% 100%);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.theme-toggle[data-theme-mode="auto"] .theme-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
}

.theme-toggle[data-theme-mode="auto"] .theme-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 5px;
  height: 5px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

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

.language-switch button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 108, 99, 0.24);
}

.flag-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 18px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.flag-ru {
  background: linear-gradient(to bottom, #fff 0 33.33%, #1c57a7 33.33% 66.66%, #d52b1e 66.66% 100%);
}

.flag-uz {
  background: linear-gradient(to bottom, #1eb6d7 0 30%, #ce1126 30% 34%, #fff 34% 63%, #ce1126 63% 67%, #3cae49 67% 100%);
}

.flag-uz::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: -2px 0 0 1px #fff;
}

.flag-uz::after {
  content: "•••";
  position: absolute;
  left: 13px;
  top: 1px;
  color: #fff;
  font-size: 6px;
  letter-spacing: 1px;
  line-height: 1;
}

button:hover,
.admin-link:hover {
  background: var(--accent-dark);
  box-shadow: 0 10px 22px rgba(20, 108, 99, 0.2);
  transform: translateY(-1px);
}

button:active,
.admin-link:active {
  transform: translateY(0) scale(0.98);
}

button.secondary {
  background: #334155;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #8f1d14;
}

button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.toolbar,
.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: flex-start;
}

.card-actions {
  justify-content: flex-end;
}

.feedback-form,
.login-form,
.news-panel {
  background: var(--panel);
  border: 1px solid rgba(214, 224, 231, 0.95);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  animation: contentEnter 360ms ease both;
  transition: box-shadow var(--motion-med), transform var(--motion-med);
}

:root[data-theme="night"] .feedback-form,
:root[data-theme="night"] .login-form,
:root[data-theme="night"] .news-panel,
:root[data-theme="night"] .intro,
:root[data-theme="night"] .stat-card,
:root[data-theme="night"] .choice-card,
:root[data-theme="night"] .compact-item,
:root[data-theme="night"] .feedback-card {
  background: linear-gradient(180deg, rgba(24, 35, 48, 0.96), rgba(19, 30, 42, 0.96));
  border-color: var(--line);
}

.feedback-form:hover,
.news-panel:hover {
  box-shadow: var(--shadow-lift);
}

.feedback-form {
  display: grid;
  gap: 20px;
}

.news-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.news-form {
  display: grid;
  gap: 16px;
}

.selector {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.checkbox-list {
  display: grid;
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
}

.field.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 700;
}

:root[data-theme="night"] label,
:root[data-theme="night"] h1,
:root[data-theme="night"] h2,
:root[data-theme="night"] .choice-card strong,
:root[data-theme="night"] .person-card strong {
  color: var(--text);
}

.label-row,
.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-row {
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title-row .eyebrow {
  margin: 0;
}

.optional {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.info-button,
.ghost-icon {
  min-height: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  padding: 0;
}

.info-button {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 13px;
}

.info-button:hover,
.ghost-icon:hover {
  background: rgba(20, 108, 99, 0.08);
  color: var(--accent-dark);
}

.field-help {
  margin: 0;
  color: #516173;
  font-size: 14px;
  line-height: 1.45;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.carousel-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.ghost-icon {
  width: 34px;
  height: 30px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  background: linear-gradient(180deg, #fff, #fbfdfe);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

:root[data-theme="night"] input,
:root[data-theme="night"] textarea,
:root[data-theme="night"] select {
  background: linear-gradient(180deg, #111c27, #0f1923);
  border-color: #314254;
  color: var(--text);
}

:root[data-theme="night"] input::placeholder,
:root[data-theme="night"] textarea::placeholder {
  color: #8191a4;
}

.preview {
  display: grid;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.preview p {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.preview img {
  width: min(420px, 100%);
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.preview-links {
  color: var(--accent-dark);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(20, 108, 99, 0.18);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.public-managers-section {
  margin-bottom: 24px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.person-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(184px, 214px);
  grid-template-columns: none;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 0 0 12px;
  scroll-snap-type: inline mandatory;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.42) rgba(15, 118, 110, 0.08);
  cursor: grab;
}

.person-grid::-webkit-scrollbar {
  height: 8px;
}

.person-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.person-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 108, 99, 0.46), rgba(34, 158, 217, 0.38));
}

.person-grid::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.person-grid.is-dragging,
.platform-rail.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none;
}

.person-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.person-card:hover {
  border-color: rgba(20, 108, 99, 0.35);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.choice-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  cursor: pointer;
  scroll-snap-align: start;
  animation: cardEnter 360ms ease both;
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med), background var(--motion-med);
}

.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.choice-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
  border: 1px solid rgba(214, 224, 231, 0.9);
}

.choice-card strong,
.person-card strong {
  color: #263244;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.choice-card .radio-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #cbd5e1;
  box-shadow: 0 0 0 1px var(--line);
}

.choice-card input:checked + .target-label + .radio-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 108, 99, 0.18);
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 108, 99, 0.12), var(--shadow-soft);
  transform: translateY(-2px);
}

.choice-card:hover {
  border-color: rgba(20, 108, 99, 0.42);
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.choice-card:nth-child(2),
.stat-card:nth-child(2) {
  animation-delay: 45ms;
}

.choice-card:nth-child(3),
.stat-card:nth-child(3) {
  animation-delay: 90ms;
}

.choice-card:nth-child(4),
.stat-card:nth-child(4) {
  animation-delay: 135ms;
}

.choice-card:nth-child(5),
.stat-card:nth-child(5) {
  animation-delay: 180ms;
}

.choice-card:nth-child(n + 6),
.stat-card:nth-child(n + 6) {
  animation-delay: 220ms;
}

.choice-card small {
  color: var(--muted);
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.photo-preview {
  width: 120px;
  aspect-ratio: 3 / 4;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #e2e8f0;
  transition: transform var(--motion-med), box-shadow var(--motion-med);
}

.person-card img {
  width: 64px;
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
}

.person-card div {
  display: grid;
  gap: 4px;
}

.person-card span {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.attachment-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.attachment-field input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-button,
.attachment-clear,
.attachment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(15, 118, 110, 0.06);
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}

.attachment-button:hover,
.attachment-clear:hover,
.attachment-link:hover {
  border-color: rgba(15, 118, 110, 0.44);
  background: rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.attachment-clear {
  min-height: 34px;
  color: #7f1d1d;
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(185, 28, 28, 0.06);
}

.attachment-name {
  color: var(--muted);
  font-size: 14px;
}

.attachment-field small {
  flex-basis: 100%;
  color: var(--muted);
  line-height: 1.4;
}

#status {
  margin: 0;
  color: var(--muted);
}

.auth-shell {
  min-height: calc(var(--vh, 1vh) * 100);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-form {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
}

.login-form h1 {
  font-size: 34px;
}

.error {
  margin: 0;
  color: var(--danger);
}

.feedback-list {
  display: grid;
  gap: 16px;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.compact-item div {
  display: grid;
  gap: 4px;
}

.manager-row-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.manager-row-main img {
  width: 58px;
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
  border: 1px solid var(--line);
}

.compact-item span {
  color: var(--muted);
}

.feedback-card {
  background: linear-gradient(180deg, #ffffff, #f9fcfc);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  animation: contentEnter 300ms ease both;
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.feedback-card:hover,
.compact-item:hover {
  border-color: rgba(20, 108, 99, 0.35);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.card-top div {
  display: grid;
  gap: 4px;
}

.card-top span,
time,
.empty {
  color: var(--muted);
}

dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 20px;
  margin: 16px 0 0;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.web-platforms {
  position: relative;
  margin-top: 24px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 248, 0.94));
  box-shadow: var(--shadow-soft);
  animation: contentEnter 360ms ease both;
}

.platforms-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 20px 10px;
}

.platforms-heading h2 {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

:root[data-theme="night"] .platforms-heading h2 {
  color: var(--accent-dark);
}

.platform-carousel-actions {
  position: absolute;
  right: 20px;
  top: 10px;
}

.platform-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-behavior: smooth;
  padding: 0 20px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.42) rgba(15, 118, 110, 0.08);
  cursor: grab;
}

.platform-rail::-webkit-scrollbar {
  height: 8px;
}

.platform-rail::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.platform-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 108, 99, 0.46), rgba(34, 158, 217, 0.38));
}

.platform-rail::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.platform-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 70px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbfb);
  color: var(--text);
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform var(--motion-med), border-color var(--motion-med), box-shadow var(--motion-med), background var(--motion-med);
}

.platform-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.platform-card strong {
  color: inherit;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.platform-mark {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(15, 23, 42, 0.16);
}

.platform-mark-image {
  overflow: hidden;
  background: #ffffff;
}

.platform-mark-image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  padding: 7px;
}

.platform-admin-row {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.platform-icon-preview {
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 8px;
}

.platform-icon-preview:not([src]) {
  display: none;
}

.platform-mark-forum,
.platform-mark-1 {
  background: linear-gradient(135deg, #1453ba, #0f766e);
}

.platform-mark-mtu,
.platform-mark-2 {
  background: linear-gradient(135deg, #475569, #c4871a);
}

.platform-mark-bot,
.platform-mark-3 {
  background: linear-gradient(135deg, #229ed9, #0f766e);
}

:root[data-theme="night"] .web-platforms {
  background: linear-gradient(135deg, rgba(8, 19, 29, 0.96), rgba(15, 23, 32, 0.96));
}

:root[data-theme="night"] .platform-card {
  border-color: rgba(143, 214, 205, 0.22);
  background: rgba(10, 27, 38, 0.72);
  color: #f8fafc;
}

:root[data-theme="night"] .platform-card:hover {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(16, 42, 42, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

:root[data-theme="night"] .platform-mark-image,
:root[data-theme="night"] .platform-icon-preview {
  background: #f8fafc;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 18px 2px 4px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sidebarEnter {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ambientShift {
  from {
    opacity: 0.75;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.03);
  }
}

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

:root[data-device="tablet"] .shell {
  width: min(960px, calc(100% - 28px));
}

:root[data-device="tablet"] .person-grid {
  grid-auto-columns: minmax(176px, 202px);
}

:root[data-device="phone"] .shell,
:root[data-device="phone"] .admin-content {
  width: min(100% - 22px, 640px);
  padding: 18px 0;
}

:root[data-device="phone"] .intro,
:root[data-device="phone"] .feedback-form,
:root[data-device="phone"] .news-panel,
:root[data-device="phone"] .login-form {
  padding: 18px;
}

:root[data-device="phone"] .person-grid {
  grid-auto-columns: minmax(156px, 72vw);
  gap: 12px;
}

:root[data-device="phone"] .language-switch {
  justify-content: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
}

:root[data-device="phone"] h1 {
  font-size: 34px;
}

:root[data-pointer="touch"] button,
:root[data-pointer="touch"] .admin-link,
:root[data-pointer="touch"] input,
:root[data-pointer="touch"] select {
  min-height: 48px;
}

:root[data-pointer="touch"] .ghost-icon {
  width: 42px;
  height: 38px;
}

@media (max-width: 720px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro,
  .admin-header,
  .card-top {
    display: grid;
  }

  .field.two,
  dl {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 36px;
  }

  .platforms-heading {
    display: grid;
    gap: 10px;
    justify-items: center;
  }

  .platform-carousel-actions {
    position: static;
  }
}
