:root {
  --color-primary: #2f80ed;
  --color-accent: #ff965c;
  --color-bg: #f8fbff;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-danger: #b91c1c;
  --color-border: #dde8f5;
  --color-blue-soft: #eaf3ff;
  --color-peach-soft: #fff0e8;
  --shadow-soft: 0 18px 55px rgba(47, 128, 237, 0.12);
  --radius-card: 8px;
  --radius-control: 8px;
  --container: 1180px;
  --kc-viewport-height: 100dvh;
  --kc-viewport-bottom-inset: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Manrope, Arial, sans-serif;
  line-height: 1.55;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

input {
  font: inherit;
}

select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid rgba(221, 232, 245, 0.82);
  background: rgba(248, 251, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.header-actions,
.hero-actions,
.footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: max-content;
  color: var(--color-primary);
  font-weight: 800;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.top-nav {
  gap: 22px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a:hover,
.ghost-link:hover {
  color: var(--color-primary);
}

.header-actions {
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--color-primary);
  color: white;
}

.btn.secondary {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
}

.btn.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--color-muted);
}

.btn.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.btn.wide {
  width: 100%;
}

.ghost-link {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 76px 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 0.82fr);
  gap: 52px;
  align-items: center;
  min-height: auto;
  padding-top: 46px;
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: 58px;
}

h2 {
  font-size: 40px;
}

h3 {
  margin: 0;
  font-size: 18px;
}

.lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--color-muted);
  font-size: 20px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-mascots {
  position: relative;
  min-height: 470px;
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 18px 22px 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(234, 243, 255, 0.72), rgba(255, 240, 232, 0.74));
  overflow: hidden;
}

.hero-mascots img {
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(47, 128, 237, 0.16));
}

.hero-mascots picture {
  display: grid;
  justify-items: center;
  width: 100%;
}

.mascot-caption {
  display: grid;
  gap: 4px;
  width: min(100%, 420px);
  margin-top: -18px;
  padding: 16px 18px;
  border: 1px solid rgba(221, 232, 245, 0.9);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.mascot-caption strong {
  color: var(--color-text);
  font-size: 20px;
}

.mascot-caption span,
.section-text,
.section-heading p:not(.eyebrow),
.value-list span,
.product-grid span,
.auth-cta p,
.auth-card-link span,
.footer {
  color: var(--color-muted);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.wide-heading {
  max-width: 100%;
}

.section-text {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: 18px;
}

.partners-accent {
  max-width: 620px;
  margin-top: 0;
  color: var(--color-text);
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 800;
  line-height: 1.18;
}

.product-grid,
.potential-grid,
.value-list,
.safety-grid,
.auth-actions {
  display: grid;
  gap: 16px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid article,
.value-list article,
.safety-grid span,
.auth-card-link {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.product-grid article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
}

.product-grid strong,
.auth-card-link strong {
  font-size: 18px;
}

.potential-section {
  padding-top: 36px;
}

.potential-section .section-heading {
  max-width: 1080px;
}

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

.potential-grid article {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.potential-grid picture {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-blue-soft);
}

.potential-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.potential-grid article div {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.potential-grid strong {
  font-size: 20px;
}

.potential-grid span {
  color: var(--color-muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.blue-band,
.peach-band {
  max-width: 1228px;
  border-radius: var(--radius-card);
}

.blue-band {
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.95), rgba(255, 255, 255, 0.76));
}

.peach-band {
  background: linear-gradient(135deg, rgba(255, 240, 232, 0.95), rgba(255, 255, 255, 0.78));
}

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

.value-list article {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.safety-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.safety-grid span {
  padding: 18px;
  font-weight: 800;
}

.auth-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
  gap: 40px;
  align-items: center;
  max-width: 1228px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--color-primary), #5aa4ff);
  color: white;
}

.auth-cta .eyebrow,
.auth-cta p {
  color: rgba(255, 255, 255, 0.84);
}

.auth-card-link {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--color-text);
}

.auth-card-link.primary-card {
  border-color: rgba(255, 150, 92, 0.52);
  background: var(--color-peach-soft);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--color-border);
}

.footer strong {
  color: var(--color-text);
}

.footer-email {
  display: inline-block;
  margin-top: 8px;
  color: var(--color-primary);
  font-weight: 700;
}

.footer nav {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  justify-items: start;
}

.auth-footer {
  display: block;
  max-width: var(--container);
  padding-top: 30px;
}

.register-shell + .auth-footer {
  max-width: 1120px;
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.92), rgba(255, 240, 232, 0.72) 52%, rgba(248, 251, 255, 0.98));
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
}

.auth-shell {
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.register-shell {
  max-width: var(--container);
}

.compact-auth-shell {
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
}

.auth-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.auth-panel {
  padding: 34px;
}

.auth-visual-panel {
  min-height: calc(100vh - 230px);
  padding: 0;
  overflow: hidden;
}

.auth-content {
  position: relative;
  min-height: calc(100vh - 230px);
  padding: 44px;
}

.register-content {
  min-height: calc(100vh - 230px);
}

.auth-form-side {
  min-width: 0;
  width: 100%;
}

.auth-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
}

.auth-visual img {
  display: block;
  width: min(28vw, 330px);
  max-height: 300px;
  object-fit: contain;
  object-position: center;
}

.register-visual img {
  width: min(30vw, 360px);
  max-height: 320px;
}

.auth-intro {
  margin-bottom: 0;
}

.auth-intro h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.auth-intro p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 18px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.reset-form {
  margin-top: 10px;
}

.auth-visual-panel .auth-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.auth-visual-panel .auth-form > .esia-button,
.auth-visual-panel .auth-form > .auth-divider,
.auth-visual-panel .auth-form > .segmented-control,
.auth-visual-panel .auth-form > .identity-options,
.auth-visual-panel .auth-form > .contact-note,
.auth-visual-panel .registration-flow > .form-grid,
.auth-visual-panel .registration-flow > .verification-steps,
.auth-visual-panel .registration-flow > .form-field,
.auth-visual-panel .registration-flow > .btn {
  grid-column: 1 / -1;
}

.login-panel .auth-form > * {
  grid-column: 1 / -1;
}

.auth-visual-panel .identity-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-control,
.role-grid,
.identity-options {
  display: grid;
  gap: 8px;
}

.segmented-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-bg);
}

.segment {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-muted);
  font-weight: 800;
}

.segment.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(47, 128, 237, 0.1);
}

.form-field {
  display: grid;
  gap: 8px;
  color: var(--color-text);
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
}

.form-field input,
.form-field select {
  min-height: 50px;
  padding: 0 14px;
}

.password-input-shell {
  position: relative;
  display: block;
  width: 100%;
}

.form-field .password-input-shell input {
  padding-right: 54px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
  transform: translateY(-50%);
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  background: var(--color-blue-soft);
}

.password-visibility-toggle:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.16);
}

.password-visibility-toggle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
}

.form-field textarea {
  min-height: 118px;
  padding: 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(47, 128, 237, 0.72);
  outline: 3px solid rgba(47, 128, 237, 0.14);
}

.file-upload {
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 700;
}

.file-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload:focus-within {
  border-color: rgba(47, 128, 237, 0.72);
  outline: 3px solid rgba(47, 128, 237, 0.14);
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 800;
}

.file-upload-name {
  min-width: 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--color-muted);
  font-size: 14px;
}

.form-row a {
  color: var(--color-primary);
  font-weight: 800;
}

.form-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(47, 128, 237, 0.28);
  border-radius: var(--radius-control);
  background: var(--color-blue-soft);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

.form-status[data-status-type="success"] {
  border-color: rgba(34, 197, 94, 0.28);
  background: #ecfdf3;
  color: #166534;
}

.form-status[data-status-type="error"] {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fff1f2;
  color: #991b1b;
}

.form-status:empty {
  display: none;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-line input,
.role-grid input {
  accent-color: var(--color-primary);
}

.role-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.registration-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.registration-type {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-muted);
  text-align: left;
}

.registration-type strong {
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.22;
}

.registration-type span {
  font-size: 14px;
  line-height: 1.38;
}

.registration-type.is-active {
  border-color: rgba(47, 128, 237, 0.52);
  background: var(--color-blue-soft);
  color: var(--color-text);
}

.registration-flow {
  margin-top: 0;
}

.verification-steps {
  display: grid;
  gap: 12px;
}

.verification-steps > p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

.verification-steps > .verification-note {
  color: var(--color-blue);
  font-weight: 800;
}

.verification-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.verification-step.is-locked {
  background: rgba(248, 251, 255, 0.78);
  opacity: 0.72;
}

.verification-step.is-verified {
  border-color: rgba(34, 197, 94, 0.34);
  background: #f0fdf4;
}

.verification-step-text {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 10px;
  align-items: center;
  align-self: center;
}

.verification-step-text strong,
.verification-step-text small {
  grid-column: 2;
}

.verification-step-text strong {
  color: var(--color-text);
  line-height: 1.25;
}

.verification-step-text small {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.step-number {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
}

.verification-code {
  min-width: 156px;
}

.verification-code input:disabled {
  background: var(--color-bg);
  color: var(--color-muted);
}

.role-grid label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

.role-grid label:has(input:checked) {
  border-color: rgba(255, 150, 92, 0.62);
  background: var(--color-peach-soft);
  color: var(--color-text);
}

.esia-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 66px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 128, 237, 0.34);
  border-radius: var(--radius-control);
  background: linear-gradient(135deg, var(--color-primary), #5aa4ff);
  color: white;
  text-align: left;
  font-weight: 800;
}

.esia-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.esia-button small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.esia-button span,
.identity-options .esia-button span {
  color: white;
}

.identity-options .esia-button small {
  color: rgba(255, 255, 255, 0.82);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--color-border);
}

.identity-options article,
.contact-note {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.identity-options article strong,
.contact-note strong {
  color: var(--color-text);
  font-size: 18px;
}

.identity-options article span,
.contact-note span {
  color: var(--color-muted);
}

.contact-note {
  border-color: rgba(255, 150, 92, 0.44);
  background: var(--color-peach-soft);
}

.button-link {
  border: 0;
  background: transparent;
}

.cabinet-page {
  min-height: 100vh;
}

.cabinet-app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}

.cabinet-app-shell.is-sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.cabinet-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 14px 0 32px rgba(47, 128, 237, 0.06);
  backdrop-filter: blur(18px);
}

.cabinet-sidebar-top {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding-bottom: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 78%, rgba(255, 255, 255, 0));
}

.cabinet-sidebar-brand {
  padding: 4px 6px 12px;
  min-width: 0;
}

.cabinet-sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-toggle-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sidebar-toggle-icon-show {
  display: none;
}

.cabinet-sidebar-burger {
  display: none;
  width: 18px;
  height: 12px;
  border-block: 2px solid currentColor;
  position: relative;
}

.cabinet-sidebar-burger::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 2px solid currentColor;
  content: "";
  transform: translateY(-50%);
}

.cabinet-sidebar-toggle:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar {
  align-items: center;
  padding-inline: 14px;
  border-right-color: transparent;
  background: transparent;
  box-shadow: none;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-top {
  display: grid;
  justify-items: center;
  background: transparent;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-brand span,
.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-logout {
  display: none;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-menu {
  display: none;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-brand {
  padding: 0;
}

.cabinet-app-shell.is-sidebar-collapsed .sidebar-toggle-icon-hide {
  display: none;
}

.cabinet-app-shell.is-sidebar-collapsed .sidebar-toggle-icon-show {
  display: block;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-nav {
  padding-right: 0;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-nav button {
  justify-items: center;
  width: 58px;
  min-height: 52px;
  padding: 10px 8px;
  text-align: center;
}

.cabinet-app-shell.is-sidebar-collapsed .cabinet-nav button strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-sidebar-menu {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.cabinet-sidebar-logout {
  margin-top: auto;
  padding: 12px 10px;
  color: var(--color-muted);
  text-align: left;
}

.cabinet-main {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 18px clamp(18px, 4vw, 52px) 52px;
}

.cabinet-app-shell.is-chat-section .cabinet-main {
  gap: 0;
  width: 100%;
  padding: 0;
}

.cabinet-app-shell.is-chat-section .cabinet-topbar {
  min-height: 54px;
  padding: 4px clamp(16px, 3vw, 34px);
  background: var(--color-surface);
}

.cabinet-app-shell.is-chat-section ~ .auth-footer {
  display: none;
}

.cabinet-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  min-height: 50px;
  padding-block: 4px;
  background: linear-gradient(180deg, var(--color-bg) 76%, rgba(244, 248, 253, 0));
}

.cabinet-rules-button,
.cabinet-notifications-button,
.cabinet-top-logout {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.cabinet-rules-button {
  margin-left: auto;
}

.cabinet-rules-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.cabinet-rules-button:hover,
.cabinet-notifications-button:hover,
.cabinet-notifications-button.is-active,
.cabinet-top-logout:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
}

.cabinet-notifications-button img,
.cabinet-top-logout img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.header-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid var(--color-surface);
  border-radius: 999px;
  background: #e54848;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(229, 72, 72, 0.24);
}

.header-notification-badge[hidden] {
  display: none;
}

.cabinet-mobile-menu-toggle {
  display: none;
}

.cabinet-profile-card,
.cabinet-side-panel,
.cabinet-panel,
.cabinet-overview article {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.cabinet-profile-card {
  display: grid;
  gap: 22px;
  min-height: 0;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.9), rgba(255, 255, 255, 0.94) 54%),
    var(--color-surface);
}

.cabinet-profile-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cabinet-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  font-size: 26px;
  font-weight: 800;
  overflow: hidden;
}

.cabinet-avatar::after {
  position: absolute;
  inset: auto 0 0;
  padding: 5px 4px;
  background: rgba(32, 42, 58, 0.72);
  color: white;
  content: "Фото";
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.cabinet-avatar:hover::after {
  opacity: 1;
}

.cabinet-avatar.is-uploading::after {
  content: "Сохраняем";
  opacity: 1;
}

.cabinet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cabinet-profile-card h1 {
  max-width: none;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.05;
}

.cabinet-profile-card.is-hidden {
  display: none;
}

.cabinet-nickname {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 24px;
  font-weight: 700;
}

.cabinet-nickname .button-link {
  font-size: 14px;
}

.profile-edit-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
}

.profile-edit-icon:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
}

.profile-edit-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.cabinet-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cabinet-contact-grid div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
}

.cabinet-contact-grid span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.cabinet-contact-grid strong {
  color: var(--color-text);
  overflow-wrap: break-word;
  word-break: normal;
}

.cabinet-editable-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.cabinet-profile-edit-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(47, 128, 237, 0.26);
  border-radius: var(--radius-card);
  background: rgba(234, 243, 255, 0.72);
}

.cabinet-profile-edit-panel h3 {
  margin: 0;
}

.cabinet-profile-edit-panel .auth-form {
  grid-template-columns: minmax(0, 1fr);
}

.cabinet-profile-edit-panel .btn,
.cabinet-profile-edit-panel .form-status {
  grid-column: 1 / -1;
}

.cabinet-nav {
  display: grid;
  grid-auto-rows: auto;
  align-items: start;
  gap: 6px;
  max-height: calc(100vh - 172px);
  overflow: auto;
  padding-right: 4px;
}

.cabinet-nav button {
  position: relative;
  display: block;
  min-height: auto;
  height: auto;
  padding: 14px 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--color-text);
  overflow: visible;
  text-align: left;
  white-space: normal;
}

.cabinet-nav button strong {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

.cabinet-nav button span {
  display: block;
  min-width: 0;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.cabinet-section-panel {
  min-height: 360px;
}

.cabinet-section-panel.is-messenger-panel {
  min-height: calc(100vh - 54px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cabinet-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.cabinet-content-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.cabinet-panel-block {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.cabinet-panel-block h2,
.cabinet-panel-block h3 {
  max-width: none;
  margin: 0;
}

.compact-heading {
  margin-bottom: 4px;
}

.compact-heading h2 {
  max-width: 900px;
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.empty-state strong {
  color: var(--color-text);
  font-size: 18px;
}

.empty-state span {
  color: var(--color-muted);
}

.empty-state.compact {
  min-height: 108px;
  align-content: center;
}

.purchases-heading {
  max-width: 980px;
}

.purchases-heading p:not(.eyebrow) {
  max-width: 900px;
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.55;
}

.purchase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.purchase-card {
  display: grid;
  gap: 18px;
  align-content: space-between;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.purchase-card-body {
  display: grid;
  gap: 14px;
}

.purchase-card-head {
  display: grid;
  gap: 8px;
}

.purchase-card h3,
.purchase-card p {
  margin: 0;
}

.purchase-card h3 {
  color: var(--color-text);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
}

.purchase-card-price {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 150, 92, 0.38);
  border-radius: var(--radius-control);
  background: rgba(255, 150, 92, 0.12);
  color: #cf5417;
  font-size: 16px;
  font-weight: 900;
}

.purchase-card-summary,
.purchase-card-details {
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.purchase-card-details {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.purchase-card-details[hidden] {
  display: none;
}

.purchase-card-details strong {
  color: var(--color-text);
}

.purchase-detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.purchase-example {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-bg);
  color: var(--color-text);
}

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

.purchase-history {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.purchase-history-head {
  display: grid;
  gap: 8px;
}

.purchase-history-head h3 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.12;
}

.purchase-history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
}

.purchase-history-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--color-text);
  font-size: 16px;
}

.purchase-history-table th,
.purchase-history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.purchase-history-table th {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-history-table tr:last-child td {
  border-bottom: 0;
}

.notice-dialog-actions {
  grid-template-columns: 1fr;
}

.link-child-hint {
  display: block;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-soft-blue);
  color: var(--color-text);
  line-height: 1.45;
}

.link-child-hint[hidden] {
  display: none;
}

.notification-center {
  display: grid;
  gap: 16px;
  width: 100%;
}

.notification-center-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.notification-center-top p {
  margin: 0;
  color: var(--color-muted);
  font-weight: 700;
}

.notification-list {
  display: grid;
  gap: 12px;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.notification-card.is-unread {
  border-color: rgba(47, 128, 237, 0.42);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.82), rgba(255, 255, 255, 0.98));
}

.notification-card-main {
  display: grid;
  gap: 8px;
}

.notification-card-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-card-heading strong {
  color: var(--color-text);
  font-size: 18px;
}

.notification-card p,
.notification-card time {
  margin: 0;
  color: var(--color-muted);
}

.notification-card time {
  font-size: 13px;
  font-weight: 700;
}

.notification-status {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e54848;
  color: white;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-status.is-read {
  background: var(--color-blue-soft);
  color: var(--color-muted);
}

.notification-read-button {
  align-self: center;
  white-space: nowrap;
}

.achievements-shell {
  display: grid;
  gap: 18px;
}

.achievement-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.achievement-hero p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.achievement-score {
  display: grid;
  place-items: center;
  width: 132px;
  min-height: 108px;
  border: 1px solid rgba(47, 128, 237, 0.28);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.96), rgba(255, 244, 238, 0.96));
  color: var(--color-blue);
}

.achievement-score strong {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
}

.achievement-score span {
  color: var(--color-blue);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.achievement-progress {
  grid-column: 1 / -1;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-soft-blue);
}

.achievement-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-blue), var(--color-accent));
}

.achievement-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.achievement-hp-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.achievement-hp-rule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  text-align: left;
  overflow-wrap: break-word;
}

.achievement-hp-rule div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.achievement-hp-rule strong {
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.25;
}

.achievement-hp-rule span {
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.45;
}

.achievement-hp-rule b {
  flex: 0 0 auto;
  color: var(--color-primary);
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
}

.account-level-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.account-level-step,
.achievement-award {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.account-level-step.is-current {
  border-color: rgba(47, 128, 237, 0.58);
  background: var(--color-soft-blue);
}

.account-level-step.is-locked {
  opacity: 0.52;
}

.account-level-step strong,
.achievement-award strong {
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.2;
}

.account-level-step span,
.achievement-award p {
  margin: 0;
  color: var(--color-muted);
}

.achievement-awards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.achievement-award > span {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--color-soft-blue);
  color: var(--color-blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.achievement-award.is-earned {
  border-color: rgba(255, 150, 92, 0.46);
  background: linear-gradient(135deg, var(--color-surface), rgba(255, 244, 238, 0.9));
}

.achievement-award.is-earned > span {
  background: rgba(255, 150, 92, 0.16);
  color: #c65117;
}

.achievement-award.is-unlocked {
  border-color: rgba(255, 150, 92, 0.58);
  background: linear-gradient(135deg, var(--color-surface), rgba(255, 240, 232, 0.92));
}

.achievement-award.is-unlocked > span {
  background: rgba(255, 150, 92, 0.16);
  color: #c65117;
}

.achievement-award.is-locked {
  background: var(--color-bg);
}

.achievement-award-reward {
  margin-top: 2px;
  color: var(--color-primary);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.achievement-award-action {
  width: 100%;
  margin-top: 6px;
}

.achievement-award small {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

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

.achievement-events-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  text-align: left;
}

.achievement-events-list article div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.achievement-events-list article span {
  color: var(--color-muted);
}

.achievement-events-list b {
  color: var(--color-blue);
  white-space: nowrap;
}

.cabinet-card-list {
  display: grid;
  gap: 12px;
}

.cabinet-mini-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.cabinet-mini-card span {
  color: var(--color-muted);
}

.cabinet-publication-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.publication-preview {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.9), rgba(255, 247, 242, 0.86));
}

.publication-preview span {
  color: var(--color-muted);
}

.cabinet-action-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span {
  padding: 9px 12px;
  border: 1px solid rgba(47, 128, 237, 0.24);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-weight: 800;
}

.profile-about-panel {
  margin-top: 16px;
}

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

.profile-about-form textarea {
  min-height: 120px;
  resize: vertical;
}

.profile-feedback-panel {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.profile-feedback-note {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.5;
}

.profile-feedback-form {
  display: grid;
  width: 100%;
  gap: 16px;
}

.profile-feedback-form textarea {
  min-height: 150px;
  resize: vertical;
}

.feedback-file-upload,
.teaching-file-upload {
  display: grid;
  gap: 8px;
  color: var(--color-text);
  font-weight: 800;
}

.feedback-file-upload strong,
.teaching-file-upload strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.feedback-file-upload strong span:first-child,
.teaching-file-upload strong span:first-child {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 900;
}

.feedback-file-upload strong span:last-child,
.teaching-file-upload strong span:last-child {
  color: var(--color-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.interest-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-option {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  cursor: pointer;
}

.interest-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interest-option span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(47, 128, 237, 0.22);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 800;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.interest-option input:checked + span {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.interest-option input:focus-visible + span {
  outline: 3px solid rgba(47, 128, 237, 0.18);
  outline-offset: 2px;
}

.interest-chip-row {
  margin-top: 2px;
}

.teaching-entry {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.teaching-heading {
  margin-bottom: 16px;
}

.teaching-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.teaching-stats article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
}

.teaching-stats span,
.teaching-course-card dt,
.teaching-student-row small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.teaching-stats strong {
  color: var(--color-primary);
  font-size: 30px;
  line-height: 1;
}

.teaching-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.teaching-create-panel {
  align-self: stretch;
}

.teaching-form,
.teaching-course-list,
.teaching-review-list,
.teaching-student-list {
  display: grid;
  gap: 12px;
}

.teaching-form-grid {
  display: grid;
  gap: 12px;
}

.teaching-form .form-field input,
.teaching-form .form-field select,
.teaching-form .form-field textarea,
.teaching-review-card .form-field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.teaching-form .form-field input,
.teaching-form .form-field select {
  min-height: 54px;
  padding: 0 14px;
}

.teaching-form .form-field textarea,
.teaching-review-card .form-field textarea {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

.teaching-form .form-field input:focus,
.teaching-form .form-field select:focus,
.teaching-form .form-field textarea:focus,
.teaching-review-card .form-field textarea:focus {
  border-color: rgba(47, 128, 237, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.12);
}

.teaching-course-card,
.teaching-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.teaching-course-card h3,
.teaching-review-card h3 {
  margin: 6px 0 4px;
  font-size: 20px;
}

.teaching-course-card p,
.teaching-review-card p {
  margin: 0;
  color: var(--color-muted);
}

.teaching-course-main {
  display: grid;
  gap: 10px;
}

.teaching-status {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 900;
}

.teaching-course-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.teaching-course-card dl div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.teaching-course-card dd {
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.teaching-course-editor {
  display: grid;
  gap: 12px;
}

.teaching-course-editor summary {
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 900;
}

.teaching-course-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.teaching-review-card.is-reviewed {
  background: var(--color-surface-soft);
}

.teaching-review-card form {
  display: grid;
  gap: 10px;
}

.teaching-review-card textarea {
  resize: vertical;
}

.teaching-submission-content {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.hobby-assignment-box {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.hobby-assignment-box > div:first-child {
  display: grid;
  gap: 6px;
}

.hobby-assignment-box strong {
  color: var(--color-text);
}

.hobby-assignment-box p,
.hobby-assignment-box small {
  margin: 0;
  color: var(--color-muted);
}

.hobby-submission-state {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
}

.hobby-submission-state span {
  color: var(--color-muted);
}

.hobby-assignment-form {
  display: grid;
  gap: 12px;
}

.hobby-assignment-form textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  outline: none;
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hobby-assignment-form textarea:focus {
  border-color: rgba(47, 128, 237, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.12);
}

.hobby-material-file {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(47, 128, 237, 0.22);
  border-radius: var(--radius-sm);
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.teaching-student-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(92px, auto);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.teaching-student-row div {
  display: grid;
  min-width: 0;
}

.teaching-student-row strong,
.teaching-student-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teaching-student-row > span:last-of-type {
  color: var(--color-primary);
  font-weight: 900;
}

.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 42, 58, 0.34);
  backdrop-filter: blur(8px);
}

body.is-rules-open {
  overflow: hidden;
}

.platform-rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  overflow: auto;
  background: var(--color-bg);
}

.platform-rules-screen {
  display: grid;
  gap: 24px;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 44px) 46px;
}

.platform-rules-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.platform-rules-header > div {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.platform-rules-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-rules-tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.platform-rules-tab.is-active {
  border-color: rgba(47, 128, 237, 0.32);
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.platform-rules-header h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.platform-rules-body {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.platform-rules-body h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
}

.platform-rules-body h2 {
  margin: 18px 0 0;
  color: var(--color-text);
  font-size: 26px;
  line-height: 1.2;
}

.platform-rules-body h3 {
  margin: 10px 0 0;
  color: var(--color-text);
  font-size: 21px;
  line-height: 1.25;
}

.platform-rules-body p,
.platform-rules-body li {
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.6;
}

.platform-rules-body p {
  margin: 0;
}

.platform-rules-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.platform-rules-body strong {
  color: var(--color-text);
}

.platform-rules-body a {
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: none;
}

.confirm-dialog {
  display: grid;
  gap: 18px;
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow: 0 22px 70px rgba(32, 42, 58, 0.22);
}

.confirm-dialog h2,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog p {
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.45;
}

.confirm-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cabinet-nav button.is-active,
.cabinet-nav button:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
}

.cabinet-nav button.is-active strong,
.cabinet-nav button:hover strong {
  color: var(--color-primary);
}

.cabinet-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cabinet-overview article {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 20px;
  box-shadow: none;
}

.cabinet-overview article span {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.cabinet-overview article strong {
  color: var(--color-text);
  font-size: 32px;
  line-height: 1;
}

.cabinet-overview article p {
  margin: 0;
  color: var(--color-muted);
}

.cabinet-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.cabinet-panel {
  display: grid;
  gap: 18px;
  min-height: 260px;
  padding: 22px;
  box-shadow: none;
}

.cabinet-children ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cabinet-children li {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 800;
}

.cabinet-children li span {
  color: var(--color-muted);
}

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

.cabinet-task-list article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.cabinet-task-list strong {
  color: var(--color-text);
}

.cabinet-task-list span {
  color: var(--color-muted);
}

.status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid rgba(47, 128, 237, 0.28);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 900;
}

.partner-profile-details {
  display: grid;
  gap: 10px;
}

.partner-profile-details div {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(218, 231, 246, 0.72);
}

.partner-profile-details strong {
  color: var(--color-muted);
}

.partner-profile-details span,
.partner-profile-details a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-weight: 700;
}

.partner-profile-description {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.cabinet-settings {
  min-height: 0;
}

.cabinet-settings-stack {
  display: grid;
  gap: 18px;
}

.cabinet-password-form {
  grid-template-columns: 1fr;
  align-items: end;
}

.cabinet-password-form .btn,
.cabinet-password-form .form-status {
  grid-column: 1 / -1;
}

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

.cabinet-settings-form .btn,
.cabinet-settings-form .form-status {
  grid-column: 1 / -1;
}

.blocked-users-list {
  display: grid;
  gap: 12px;
}

.blocked-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
}

.blocked-user-card strong,
.blocked-user-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-card span {
  color: var(--color-muted);
}

.cabinet-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.muted-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.45;
}

.hobbies-shell,
.feed-shell,
.admin-shell {
  display: grid;
  gap: 18px;
}

.feed-shell {
  width: min(100%, 760px);
  margin-inline: auto;
}

.feed-compose-dialog .panel-heading {
  margin-bottom: 16px;
}

.feed-form {
  display: grid;
  gap: 14px;
}

.feed-form label {
  display: grid;
  gap: 8px;
  color: var(--color-text);
  font-weight: 800;
}

.feed-upload {
  min-width: 0;
  min-height: 120px;
  padding: 18px;
  overflow: hidden;
  border: 1px dashed rgba(47, 128, 237, 0.46);
  border-radius: var(--radius-card);
  background: var(--color-blue-soft);
  cursor: pointer;
}

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

.feed-upload strong {
  overflow: hidden;
  color: var(--color-primary);
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-upload small {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

.feed-form textarea,
.feed-form select {
  width: 100%;
  min-height: 58px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  line-height: 1.45;
}

.feed-form textarea {
  min-height: 142px;
  resize: vertical;
}

body.modal-open {
  overflow: hidden;
}

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

.feed-compose-modal[hidden] {
  display: none;
}

.feed-compose-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(7px);
}

.feed-compose-dialog {
  position: relative;
  display: grid;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: 0 24px 70px rgba(28, 44, 70, 0.22);
}

.feed-compose-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.feed-compose-close:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
}

.feed-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.feed-tab {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.feed-tab.is-active,
.feed-tab:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-primary);
  color: white;
}

.feed-create-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 128, 237, 0.34);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.feed-create-toggle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.feed-create-toggle.is-active {
  border-color: rgba(47, 128, 237, 0.58);
  background: var(--color-blue-soft);
  transform: rotate(45deg);
}

.feed-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.feed-carousel {
  position: relative;
  min-width: 0;
  padding-inline: 58px;
}

.feed-track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.feed-track .feed-card {
  align-self: flex-start;
  scroll-snap-align: start;
}

.feed-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transform: translateY(-50%);
}

.feed-carousel-arrow[hidden] {
  display: none;
}

.feed-carousel-arrow img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.feed-carousel-arrow:first-child {
  left: 0;
}

.feed-carousel-arrow:last-child {
  right: 0;
}

.feed-card {
  display: grid;
  flex: 0 0 100%;
  gap: 12px;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.feed-card.is-targeted {
  border-color: rgba(47, 128, 237, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.12);
}

.feed-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 0;
}

.profile-link-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-link-button span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-link-button strong {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-link-button small {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.feed-card-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(47, 128, 237, 0.28);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
}

.feed-media {
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
  max-height: min(62vh, 620px);
  border-block: 1px solid var(--color-border);
  background: var(--color-bg);
}

.feed-media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 2px;
  max-height: none;
  background: var(--color-surface);
}

.feed-media-grid.count-3 img:first-child,
.feed-media-grid.count-3 video:first-child {
  grid-row: span 2;
}

.feed-media img,
.feed-media video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(62vh, 620px);
  object-fit: contain;
}

.feed-media-grid img,
.feed-media-grid video {
  width: 100%;
  height: 100%;
  max-height: 360px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.feed-card-caption {
  display: grid;
  gap: 4px;
  padding: 0 16px;
}

.feed-card-caption p {
  margin: 0;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-line;
}

.feed-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(218, 231, 246, 0.72);
}

.feed-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.feed-action span {
  color: #99a4b2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.feed-action span[aria-hidden="true"] {
  font-size: 22px;
}

.feed-action strong {
  font: inherit;
  font-weight: 800;
}

.feed-action img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.feed-action-icon {
  flex: 0 0 auto;
  width: 42px;
  padding-inline: 8px;
}

.feed-action-manage {
  color: var(--color-danger);
  min-width: max-content;
}

.feed-report-form,
.feed-report-reasons,
.feed-edit-form {
  display: grid;
  gap: 12px;
}

.feed-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
}

.feed-report-reasons label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 800;
}

.feed-report-reasons input {
  accent-color: var(--color-primary);
}

.feed-action.is-active,
.feed-action:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.projects-shell {
  display: grid;
  gap: 18px;
}

.projects-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.projects-toolbar h3,
.projects-other-panel h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.projects-list {
  display: grid;
  gap: 14px;
}

.project-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.project-card-main {
  display: grid;
  gap: 12px;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-card h3 {
  margin: 8px 0 0;
  color: var(--color-text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.project-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(47, 128, 237, 0.28);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 900;
}

.project-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-goal {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.project-goal strong {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-goal span {
  color: var(--color-muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.kopilka-shell {
  display: grid;
  gap: 18px;
}

.kopilka-list,
.kopilka-history-list {
  display: grid;
  gap: 14px;
}

.children-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.children-list-panel,
.children-picker-panel,
.children-detail-panel {
  min-width: 0;
}

.children-picker-panel {
  display: grid;
  gap: 16px;
}

.children-picker-panel .panel-heading {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: start;
  gap: 16px 20px;
  text-align: left;
}

.children-picker-panel .panel-heading > div:first-child {
  min-width: 0;
}

.children-picker-panel .panel-heading h3,
.children-picker-panel .panel-heading .eyebrow {
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.children-picker-panel .panel-heading h3 {
  max-width: none;
  white-space: normal;
}

.children-link-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  min-width: min(100%, 420px);
}

.children-link-tools .link-child-hint {
  flex-basis: 100%;
  margin-left: 0;
  text-align: left;
}

.children-picker-panel > .panel-heading > .link-child-hint {
  grid-column: 1 / -1;
  justify-self: stretch;
  margin: 0;
  text-align: left;
}

.children-list,
.child-stack,
.child-confirmation-list {
  display: grid;
  gap: 14px;
}

.children-selector-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.children-list.compact-list {
  gap: 12px;
}

.child-selector-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.child-selector-card:hover,
.child-selector-card.is-active {
  border-color: rgba(47, 128, 237, 0.48);
  background: var(--color-blue-soft);
}

.child-selector-card span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.child-selector-card strong,
.child-selector-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-selector-card strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
}

.child-selector-card small {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

.child-selector-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.child-selector-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-detail-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.child-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(47, 128, 237, 0.18);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.82), rgba(255, 240, 232, 0.4));
}

.child-detail-hero h3 {
  margin: 4px 0 8px;
  color: var(--color-text);
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.06;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.child-detail-hero span {
  color: var(--color-muted);
  font-size: 22px;
  font-weight: 900;
  overflow-wrap: break-word;
  word-break: normal;
}

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

.child-tab {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.child-tab:hover,
.child-tab.is-active {
  border-color: rgba(47, 128, 237, 0.5);
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.child-tab-content {
  display: grid;
  gap: 16px;
}

.child-safe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.child-tab-content .cabinet-panel-block h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.child-tab-content .cabinet-panel-block p {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.child-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.child-confirmation-card {
  gap: 12px;
}

.child-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kopilka-review-actions {
  justify-content: flex-start;
  padding-top: 2px;
}

.child-confirmation-status {
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 800;
}

.kopilka-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.kopilka-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.kopilka-card h3 {
  margin: 8px 0 0;
  color: var(--color-text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.kopilka-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.kopilka-money-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.kopilka-money-row strong {
  color: var(--color-text);
  font-size: 20px;
  font-weight: 900;
}

.kopilka-money-row span {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 900;
}

.kopilka-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-blue-soft);
}

.kopilka-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.kopilka-link-state {
  overflow-wrap: break-word;
  word-break: normal;
  padding: 12px 14px;
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.kopilka-link-state a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  word-break: break-all;
}

.kopilka-public-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

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

.kopilka-public-brand {
  margin-bottom: 24px;
}

.kopilka-public-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.kopilka-public-head {
  display: grid;
  gap: 10px;
}

.kopilka-public-head h1 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
}

.kopilka-public-tag {
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(47, 128, 237, 0.25);
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-weight: 900;
}

.kopilka-public-author {
  width: 100%;
  justify-content: flex-start;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.kopilka-public-avatar {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.kopilka-public-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kopilka-public-description {
  margin: 0;
  color: var(--color-muted);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}

.kopilka-public-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.kopilka-public-total strong {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 900;
}

.kopilka-public-total span {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 900;
}

.kopilka-public-progress {
  height: 14px;
}

.kopilka-public-note {
  padding: 14px 16px;
  border: 1px solid rgba(255, 150, 92, 0.32);
  border-radius: var(--radius-card);
  background: var(--color-peach-soft);
  color: var(--color-muted);
  font-weight: 800;
}

.kopilka-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.kopilka-history-item div {
  display: grid;
  gap: 5px;
}

.kopilka-history-item div:last-child {
  text-align: left;
}

.kopilka-history-item strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.kopilka-history-item span,
.kopilka-history-item small {
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.kopilka-expense-form {
  margin: 10px 0 4px;
  padding: 16px;
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.project-author {
  width: fit-content;
  max-width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.project-form {
  gap: 14px;
}

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

.feed-comments {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.feed-comments[hidden] {
  display: none;
}

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

.feed-comment {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.feed-comment p {
  margin: 0 0 0 48px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.feed-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.feed-comment-form input {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
}

.hobby-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hobby-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.hobby-search {
  display: grid;
  gap: 8px;
}

.hobby-search span {
  color: var(--color-text);
  font-weight: 900;
}

.hobby-search input {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-weight: 800;
}

.hobby-tab {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hobby-tab.is-active,
.hobby-tab:hover {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.hobbies-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
}

.hobby-detail,
.hobby-quick-list,
.hobby-request-list,
.admin-list {
  display: grid;
  gap: 12px;
}

.hobby-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hobby-catalog > .empty-state {
  grid-column: 1 / -1;
}

.hobby-catalog > .hobby-detail-card {
  grid-column: 1 / -1;
}

.hobby-card,
.hobby-quick-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.hobby-card:hover,
.hobby-quick-card:hover {
  border-color: rgba(47, 128, 237, 0.46);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.96), rgba(255, 247, 242, 0.78));
}

.hobby-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.hobby-card-top strong,
.hobby-quick-card strong {
  font-size: 20px;
  line-height: 1.2;
}

.hobby-card-top em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.hobby-card span:not(.hobby-card-top),
.hobby-card small,
.hobby-quick-card span {
  color: var(--color-muted);
}

.hobby-detail-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.hobby-back-button {
  justify-self: start;
}

.hobby-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.hobby-detail-head h3,
.hobby-detail-head p,
.hobby-detail-grid h4,
.hobby-mini-card p {
  margin: 0;
}

.hobby-detail-head h3 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.hobby-detail-head p,
.hobby-mini-card span {
  color: var(--color-muted);
}

.hobby-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.hobby-progress span {
  color: var(--color-muted);
  font-weight: 800;
}

.hobby-progress div {
  grid-column: 1 / -1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-blue-soft);
}

.hobby-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.hobby-detail-grid {
  display: grid;
  gap: 16px;
}

.hobby-detail-grid.single-column {
  grid-template-columns: 1fr;
}

.hobby-detail-grid section {
  display: grid;
  gap: 10px;
}

.hobby-detail-section {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.hobby-section-heading,
.hobby-chat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hobby-chat-actions {
  justify-content: flex-start;
}

.hobby-mini-card,
.hobby-request-item,
.admin-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.hobby-detail-section .hobby-mini-card {
  background: var(--color-surface);
}

.hobby-material-card {
  width: 100%;
  color: var(--color-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.hobby-material-card:hover {
  border-color: rgba(47, 128, 237, 0.46);
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.94), rgba(255, 247, 242, 0.82));
}

.hobby-material-type,
.admin-item-meta {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hobby-material-modal[hidden] {
  display: none;
}

.hobby-material-modal {
  position: fixed;
  z-index: 92;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.hobby-material-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 100%);
  height: min(820px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: 0 28px 80px rgba(28, 44, 70, 0.28);
}

.hobby-material-dialog.is-fullscreen {
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #0b1220;
}

.hobby-material-viewer-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}

.hobby-material-viewer-head h3,
.hobby-material-viewer-head p {
  margin: 0;
}

.hobby-material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hobby-material-frame-wrap {
  min-height: 0;
  padding: 14px;
  background: var(--color-bg);
}

.hobby-material-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--color-surface);
}

.hobby-material-dialog.is-fullscreen .hobby-material-frame-wrap {
  display: grid;
  place-items: center;
  padding: 0;
  background: #0b1220;
}

.hobby-material-dialog.is-fullscreen .hobby-material-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.hobby-material-dialog.is-fullscreen .hobby-material-frame-wrap[data-content-kind="video"] iframe {
  width: min(100vw, calc((100dvh - 88px) * 16 / 9));
  height: min(calc(100dvh - 88px), calc(100vw * 9 / 16));
  border-radius: 0;
}

.hobby-material-dialog.is-fullscreen .hobby-material-viewer-head {
  border-bottom: 0;
  background: var(--color-surface);
}

@media (max-width: 720px) {
  .hobby-material-modal {
    padding: 0;
  }

  .hobby-material-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .hobby-material-viewer-head {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .hobby-material-actions {
    justify-content: stretch;
  }

  .hobby-material-actions .btn {
    flex: 1 1 auto;
  }

  .hobby-material-frame-wrap {
    padding: 0;
  }

  .hobby-material-frame-wrap iframe {
    border-radius: 0;
  }
}

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

.hobby-request-form .btn,
.hobby-request-form .form-status {
  grid-column: 1 / -1;
}

.hobby-request-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.hobby-request-item span {
  color: var(--color-primary);
  font-weight: 800;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-overview article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.admin-overview span {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-overview strong {
  font-size: 34px;
  line-height: 1;
}

.admin-overview p,
.admin-item p {
  margin: 0;
  color: var(--color-muted);
}

.admin-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.admin-item h4 {
  margin: 0;
  font-size: 22px;
}

.admin-report-details {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.admin-report-details div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.admin-report-details dt,
.admin-report-details dd {
  min-width: 0;
  margin: 0;
}

.admin-report-details dt {
  color: var(--color-muted);
  font-weight: 800;
}

.admin-report-details dd {
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.admin-report-details a {
  color: var(--color-primary);
  font-weight: 800;
}

.admin-archive-block {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.admin-archive-block h4 {
  margin: 0;
  font-size: 20px;
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-feedback-group {
  display: grid;
  gap: 10px;
}

.admin-feedback-group + .admin-feedback-group {
  margin-top: 18px;
}

.admin-feedback-group h4 {
  margin: 0;
  font-size: 20px;
}

.admin-feedback-item.is-archived {
  opacity: 0.86;
}

.admin-feedback-fields {
  display: grid;
  gap: 6px;
}

.admin-feedback-fields p strong {
  color: var(--color-text);
}

.admin-feedback-attachments {
  display: grid;
  gap: 8px;
}

.admin-feedback-attachments > strong {
  color: var(--color-text);
}

.admin-feedback-attachments > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-feedback-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
}

.admin-feedback-attachment span {
  color: var(--color-muted);
  font-size: 12px;
}

.admin-money-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-money-summary article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.admin-money-summary span {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-money-summary strong {
  font-size: 24px;
}

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

.admin-money-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.admin-money-item h4 {
  margin: 0;
  font-size: 20px;
}

.admin-money-item p {
  margin: 0;
  color: var(--color-muted);
}

.admin-money-item > strong {
  color: var(--color-primary);
  font-size: 22px;
  white-space: nowrap;
}

.admin-money-item.is-expense > strong {
  color: var(--color-danger);
}

.admin-data-panel {
  overflow: hidden;
}

.admin-data-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-table-tabs {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.admin-table-tab {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.admin-table-tab.is-active {
  border-color: var(--color-primary);
  background: var(--color-blue-soft);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.admin-table-tab strong {
  font-size: 16px;
}

.admin-table-tab span,
.admin-table-toolbar p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-table-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.admin-table-toolbar {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.admin-table-toolbar h4,
.admin-edit-form h4 {
  margin: 0;
  font-size: 24px;
}

.admin-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.admin-data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-data-table th,
.admin-data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: left;
  vertical-align: top;
}

.admin-data-table th {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-data-table tr:last-child td {
  border-bottom: 0;
}

.admin-cell-muted {
  color: var(--color-muted);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.btn.danger {
  border-color: rgba(185, 28, 28, 0.2);
  background: #fff5f5;
  color: #b91c1c;
}

.admin-edit-form {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-form-grid label {
  display: grid;
  gap: 8px;
  color: var(--color-text);
  font-weight: 800;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.admin-form-grid textarea {
  resize: vertical;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.admin-confirm {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(6px);
}

.admin-confirm-box {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: 0 24px 80px rgba(28, 44, 70, 0.24);
}

.admin-confirm-box strong {
  font-size: 22px;
}

.admin-confirm-box div {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.admin-auth-panel {
  max-width: 1100px;
}

.admin-page-content {
  display: grid;
  gap: 18px;
}

.social-shell {
  display: grid;
  gap: 16px;
}

.social-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.social-results,
.social-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.social-columns {
  display: grid;
  gap: 14px;
  align-items: start;
}

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

.social-list .social-card.is-social-hidden {
  display: none;
}

.social-list.is-expanded .social-card.is-social-hidden {
  display: grid;
}

.social-list-toggle {
  justify-self: start;
  margin-top: 4px;
}

.social-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.social-card:hover,
.social-card:focus-visible {
  border-color: rgba(47, 128, 237, 0.42);
  background: var(--color-blue-soft);
  outline: none;
  transform: translateY(-1px);
}

.social-avatar,
.chat-avatar,
.public-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.chat-photo-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-photo-button .chat-avatar {
  grid-area: 1 / 1;
}

.chat-photo-button > span:not(.chat-avatar) {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 22, 38, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.chat-photo-button:hover > span:not(.chat-avatar),
.chat-photo-button:focus-visible > span:not(.chat-avatar) {
  opacity: 1;
}

.social-avatar img,
.chat-avatar img,
.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-card-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.social-card-main strong,
.chat-list-button strong,
.chat-header strong {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-card-main span,
.social-card-main p,
.chat-list-button small,
.chat-list-button time,
.chat-header-profile small {
  margin: 0;
  overflow: hidden;
  color: var(--color-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.public-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 42, 58, 0.34);
  backdrop-filter: blur(8px);
}

.public-profile-dialog {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(100%, 560px);
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow: 0 22px 70px rgba(32, 42, 58, 0.22);
}

.public-profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 28px;
  line-height: 1;
}

.public-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-right: 46px;
}

.public-profile-avatar {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.public-profile-hero h2,
.public-profile-bio {
  margin: 0;
}

.public-profile-hero h2 {
  color: var(--color-text);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.public-profile-hero span,
.public-profile-bio {
  color: var(--color-muted);
}

.public-profile-bio {
  font-size: 18px;
  line-height: 1.45;
}

.public-profile-stats {
  display: grid;
  gap: 10px;
}

.public-profile-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-bg);
}

.public-profile-meta span {
  color: var(--color-muted);
  font-weight: 800;
}

.public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.public-profile-actions .social-status {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  line-height: 1.25;
}

.social-status {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.messenger-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  height: calc(100vh - 54px);
  min-height: 560px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chat-list-panel,
.chat-window {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--color-surface);
}

.chat-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--color-border);
  overflow: hidden;
}

.chat-list-toolbar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
}

.chat-list-header {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-bottom: 1px solid var(--color-border);
}

.chat-list-header h3 {
  margin: 0;
  color: var(--color-text);
}

.chat-list-header span {
  color: var(--color-muted);
  font-size: 14px;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: auto;
  padding: 12px;
}

.chat-list-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  text-align: left;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.chat-list-button.is-active,
.chat-list-button:hover {
  border-color: rgba(47, 128, 237, 0.28);
  background: var(--color-blue-soft);
}

.chat-list-button span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-list-button time {
  align-self: start;
  font-size: 12px;
}

.chat-window {
  overflow: hidden;
}

.chat-window-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.chat-header {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.chat-header-profile {
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.chat-header-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.chat-header-menu-toggle {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-blue-soft);
  color: var(--color-primary);
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
}

.chat-header-menu-toggle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.chat-header-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  display: grid;
  min-width: 230px;
  max-width: min(300px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.chat-header-menu-panel[hidden] {
  display: none;
}

.chat-header-menu-panel button {
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.chat-header-menu-panel button:last-child {
  border-bottom: 0;
}

.chat-header-menu-panel button:hover {
  background: var(--color-blue-soft);
}

.chat-header-profile span {
  display: grid;
  min-width: 0;
}

.chat-back-button {
  display: none;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.chat-header-profile small {
  overflow: hidden;
  color: var(--color-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 20px 24px;
  background: var(--color-surface);
}

.chat-notice {
  align-self: stretch;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.78);
}

.message-bubble {
  position: relative;
  display: grid;
  gap: 6px;
  align-self: flex-start;
  max-width: min(72%, 620px);
  padding: 10px 12px 8px;
  border: 1px solid var(--color-border);
  border-radius: 16px 16px 16px 4px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 24px rgba(73, 102, 139, 0.08);
  user-select: text;
}

.message-bubble.is-own {
  align-self: flex-end;
  border-color: rgba(47, 128, 237, 0.2);
  border-radius: 16px 16px 4px 16px;
  background: var(--color-blue-soft);
}

.message-bubble.is-selected {
  outline: 2px solid rgba(47, 128, 237, 0.36);
  outline-offset: 2px;
}

.message-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-bubble strong {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 900;
}

.message-meta {
  display: inline-flex;
  gap: 6px;
  justify-self: end;
  align-items: center;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.message-meta time,
.message-meta span {
  color: inherit;
  font: inherit;
}

.message-actions {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 3;
  display: none;
  flex-direction: column;
  min-width: 178px;
  max-width: min(220px, 40vw);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(73, 102, 139, 0.14);
  overflow: hidden;
  transform: translateY(-50%);
}

.message-bubble.is-own .message-actions {
  right: calc(100% + 8px);
  left: auto;
}

.message-bubble.is-selected .message-actions {
  display: flex;
}

.message-actions button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.message-actions button + button {
  border-top: 1px solid var(--color-border);
}

.message-actions button:hover {
  background: var(--color-blue-soft);
}

.message-forward-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 32, 48, 0.28);
}

.message-forward-dialog {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  max-height: min(640px, calc(100dvh - 40px));
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 24px 60px rgba(73, 102, 139, 0.22);
  overflow: hidden;
}

.feed-action-dialog {
  overflow: auto;
}

.message-forward-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.message-forward-header h2 {
  margin: 0;
  font-size: 24px;
}

.message-forward-header button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.message-forward-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.message-forward-list > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.message-forward-list > button:hover {
  border-color: rgba(47, 128, 237, 0.34);
  background: var(--color-blue-soft);
}

.message-forward-list span {
  display: grid;
  min-width: 0;
}

.message-forward-list strong,
.message-forward-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-forward-list small {
  color: var(--color-muted);
}

.chat-dialog {
  width: min(620px, 100%);
}

.chat-dialog-form {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.chat-dialog-form textarea {
  min-height: 100px;
  resize: vertical;
}

.chat-dialog-tools {
  display: flex;
  justify-content: flex-end;
}

.chat-icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.chat-member-picker,
.chat-members-list {
  display: grid;
  gap: 8px;
  max-height: min(360px, 48vh);
  overflow: auto;
}

.chat-member-picker label,
.chat-members-list article {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.chat-member-picker label {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.chat-members-list article {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.chat-member-picker input {
  width: 18px;
  height: 18px;
}

.chat-member-picker span,
.chat-member-info {
  display: grid;
  min-width: 0;
}

.chat-member-picker strong,
.chat-member-picker small,
.chat-members-list strong,
.chat-members-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-member-picker small,
.chat-members-list small {
  color: var(--color-muted);
}

.chat-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.message-bubble time {
  justify-self: end;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.chat-message-media {
  display: block;
  width: min(360px, 100%);
  max-height: 360px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--color-surface-soft);
}

.chat-voice-message {
  display: grid;
  grid-template-columns: 54px minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: min(340px, 64vw);
  min-height: 70px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.chat-voice-play {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.22);
}

.chat-voice-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid currentColor;
}

.chat-voice-message.is-playing .chat-voice-play span {
  width: 18px;
  height: 22px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

.chat-voice-wave {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: var(--color-primary);
}

.chat-voice-wave i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.32;
}

.chat-voice-wave i:nth-child(2n) {
  height: 14px;
}

.chat-voice-wave i:nth-child(3n) {
  height: 22px;
  opacity: 0.48;
}

.chat-voice-wave i:nth-child(5n) {
  height: 30px;
}

.chat-voice-duration {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.chat-voice-message audio {
  display: none;
}

.chat-message-file {
  display: grid;
  gap: 2px;
  width: min(360px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 900;
}

.chat-message-file span {
  color: var(--color-muted);
  font-size: 12px;
}

.message-compose {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.chat-members-count {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.message-compose.is-disabled {
  display: block;
  padding: 16px 18px;
  color: var(--color-muted);
  background: var(--color-surface-soft);
}

.message-compose textarea {
  min-height: 58px;
  max-height: 120px;
  padding: 14px 10px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  resize: none;
  outline: 0;
  caret-color: #000;
}

.message-attach-button,
.message-emoji-button,
.message-voice-button,
.message-send-button {
  display: inline-grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.message-attach-button img,
.message-emoji-button img,
.message-voice-button img,
.message-send-button img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.message-voice-button img,
.message-send-button img {
  filter: brightness(0) invert(1);
}

.message-attach-button {
  margin-left: 8px;
}

.message-attach-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.message-emoji-button {
  opacity: 0.76;
  cursor: pointer;
}

.message-voice-button,
.message-send-button {
  background: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 10px 24px rgba(47, 128, 237, 0.22);
}

.message-voice-button.is-recording {
  background: #ef4444;
}

.message-send-button {
  display: none;
}

.message-compose.has-message .message-voice-button {
  display: none;
}

.message-compose.has-message .message-send-button {
  display: inline-grid;
}

.message-compose {
  position: relative;
}

.message-compose::after {
  position: absolute;
  inset: 12px 18px;
  z-index: 0;
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: 0 8px 22px rgba(73, 102, 139, 0.12);
  content: "";
}

.message-compose > * {
  position: relative;
  z-index: 1;
}

.message-attachment-preview {
  grid-column: 1 / -1;
  order: -1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-blue-soft);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
}

.message-edit-preview {
  grid-column: 1 / -1;
  order: -2;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(47, 128, 237, 0.24);
  border-radius: 14px;
  background: var(--color-blue-soft);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 900;
}

.message-edit-preview[hidden] {
  display: none;
}

.message-edit-preview button {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.message-emoji-picker {
  position: absolute;
  right: 74px;
  bottom: calc(100% + 10px);
  z-index: 8;
  width: min(520px, calc(100vw - 40px));
  max-height: min(460px, calc(var(--kc-viewport-height, 100vh) - 180px));
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(73, 102, 139, 0.18);
}

.message-emoji-picker[hidden] {
  display: none;
}

.message-emoji-picker section + section {
  margin-top: 12px;
}

.message-emoji-picker strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-emoji-picker section div {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.message-emoji-picker button {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--color-surface-soft);
  font-size: 22px;
  cursor: pointer;
}

.message-emoji-picker button:hover {
  border-color: var(--color-border);
  background: var(--color-blue-soft);
}

.message-attachment-preview[hidden] {
  display: none;
}

.message-attachment-preview button {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.reset-code-panel {
  margin: 0;
}

.reset-form .reset-code-panel .verification-step {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  align-items: end;
}

.reset-form .verification-code {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.reset-form .verification-code span {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 800;
}

.reset-form .verification-code input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  outline: none;
}

.reset-form .verification-code input:focus {
  border-color: rgba(47, 128, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.14);
}

@media (max-width: 640px) {
  .reset-form .reset-code-panel .verification-step {
    grid-template-columns: 1fr;
  }

  .reset-form .verification-code input {
    min-height: 48px;
    font-size: 18px;
  }
}

.is-hidden {
  display: none;
}

.app-page {
  min-height: 100vh;
  background: var(--color-bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px max(24px, calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid rgba(221, 232, 245, 0.86);
  background: rgba(248, 251, 255, 0.94);
  backdrop-filter: blur(18px);
}

.app-header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

.app-header-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
}

.app-sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  align-content: start;
  gap: 6px;
  height: max-content;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.app-sidebar a {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  color: var(--color-muted);
  font-weight: 800;
}

.app-sidebar a.is-active,
.app-sidebar a:hover {
  background: var(--color-blue-soft);
  color: var(--color-primary);
}

.app-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.profile-hero,
.home-hero,
.profile-card,
.dashboard-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px;
}

.home-hero h1 {
  max-width: 900px;
  font-size: clamp(36px, 4.6vw, 56px);
}

.home-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 19px;
}

.child-hero {
  background: linear-gradient(135deg, rgba(255, 240, 232, 0.88), rgba(255, 255, 255, 0.94));
}

.adult-hero {
  background: linear-gradient(135deg, rgba(234, 243, 255, 0.92), rgba(255, 255, 255, 0.96));
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 30px;
  font-weight: 800;
}

.adult-hero .profile-avatar {
  background: var(--color-accent);
}

.profile-hero h1 {
  font-size: clamp(34px, 4.2vw, 52px);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.profile-meta span {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.card-label,
.panel-heading a {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.adult-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adult-capabilities {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 176px;
  padding: 20px;
  box-shadow: none;
}

.profile-card strong {
  color: var(--color-text);
  font-size: 20px;
  line-height: 1.2;
}

.profile-card p {
  margin: 0;
  color: var(--color-muted);
}

.compact-card {
  min-height: 142px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: var(--color-blue-soft);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.adult-columns {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
}

.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  box-shadow: none;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  font-size: 26px;
}

.task-list,
.safe-list,
.activity-list,
.recommendation-grid {
  display: grid;
  gap: 10px;
}

.task-list article,
.safe-list span,
.activity-list span,
.recommendation-grid article,
.featured-progress {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
}

.task-list article strong {
  color: var(--color-text);
}

.task-list article span,
.safe-list span,
.activity-list span,
.recommendation-grid article p,
.featured-progress p {
  color: var(--color-muted);
}

.activity-list span strong,
.recommendation-grid article strong,
.featured-progress strong {
  color: var(--color-text);
}

.featured-progress {
  gap: 14px;
}

.recommendation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .top-nav {
    display: none;
  }

  .site-header.menu-open .top-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .split-section,
  .auth-cta {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .product-grid,
  .potential-grid,
  .safety-grid,
  .role-grid,
  .registration-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-content,
  .register-content {
    min-height: auto;
  }

  .auth-topline {
    align-items: flex-end;
    gap: 22px;
  }

  .auth-visual img,
  .register-visual img {
    width: min(34vw, 220px);
    max-height: 220px;
  }

  .auth-visual-panel .identity-options {
    grid-template-columns: 1fr;
  }

  .app-shell,
  .profile-hero,
  .home-hero,
  .content-columns,
  .adult-columns,
  .hobbies-layout,
  .children-workspace {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .app-sidebar a {
    white-space: nowrap;
  }

  .profile-grid,
  .dashboard-kpi-grid,
  .adult-kpi-grid,
  .adult-capabilities,
  .recommendation-grid,
  .hobby-catalog,
  .child-report-grid,
  .social-columns,
  .admin-money-summary,
  .admin-data-layout,
  .admin-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .messenger-layout {
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  html {
    overflow-x: hidden;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    padding: 12px 16px;
  }

  .brand span,
  .header-actions .ghost-link {
    display: none;
  }

  .section {
    padding: 54px 16px;
  }

  .hero {
    gap: 28px;
    padding-top: 34px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 17px;
  }

  .product-grid,
  .potential-grid,
  .value-list,
  .safety-grid,
  .form-grid,
  .role-grid,
  .registration-type-grid {
    grid-template-columns: 1fr;
  }

  .product-grid article,
  .potential-grid article div,
  .value-list article,
  .auth-card-link {
    padding: 18px;
  }

  .hero-mascots {
    min-height: auto;
    padding: 14px 14px 20px;
  }

  .hero-mascots img {
    width: min(100%, 360px);
  }

  .mascot-caption {
    margin-top: -8px;
  }

  .footer {
    display: grid;
  }

  .auth-header {
    padding: 16px;
  }

  .auth-shell {
    padding: 20px 16px 54px;
  }

  .auth-panel {
    padding: 22px;
  }

  .auth-visual-panel {
    padding: 0;
  }

  .auth-content,
  .register-content {
    padding: 22px;
  }

  .auth-topline {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
  }

  .auth-visual img,
  .register-visual img {
    justify-self: center;
    width: min(100%, 260px);
    max-height: 260px;
  }

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

  .form-row {
    display: grid;
    justify-content: stretch;
  }

  .app-header {
    display: grid;
    padding: 12px 16px;
  }

  .app-header-nav {
    overflow-x: auto;
  }

  .app-shell {
    padding: 16px;
  }

  .btn {
    min-width: 0;
    min-height: 38px;
    max-width: 100%;
    padding: 0 13px;
    font-size: 13px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cabinet-main,
  .cabinet-panel,
  .cabinet-section-panel,
  .cabinet-panel-block,
  .cabinet-profile-card,
  .children-workspace,
  .children-list-panel,
  .children-picker-panel,
  .children-detail-panel,
  .feed-shell,
  .admin-shell,
  .admin-list,
  .hobbies-layout,
  .hobby-detail-section {
    min-width: 0;
    max-width: 100%;
  }

  .profile-grid,
  .dashboard-kpi-grid,
  .adult-kpi-grid,
  .achievement-stats-grid,
  .achievement-hp-rules-grid,
  .achievement-awards-grid,
  .adult-capabilities,
  .recommendation-grid,
  .child-safe-grid,
  .child-report-grid,
  .admin-data-layout,
  .admin-form-grid,
  .admin-overview,
  .admin-money-summary,
  .admin-money-item,
  .admin-item,
  .hobby-detail-head,
  .hobby-request-item {
    grid-template-columns: 1fr;
  }

  .children-link-tools {
    justify-content: stretch;
    min-width: 0;
  }

  .children-link-tools .btn {
    width: 100%;
  }

  .admin-report-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .partner-profile-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .children-link-tools .link-child-hint {
    text-align: left;
  }

  .child-detail-card {
    padding: 16px;
  }

  .child-detail-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .child-detail-hero h3 {
    font-size: clamp(30px, 11vw, 42px);
  }

  .child-detail-hero span {
    font-size: 18px;
  }

  .admin-table-toolbar,
  .children-picker-panel .panel-heading,
  .feed-toolbar,
  .admin-confirm-box div {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .admin-table-toolbar .btn,
  .admin-confirm-box .btn,
  .admin-form-actions .btn {
    width: 100%;
  }

  .admin-item-actions {
    justify-content: stretch;
  }

  .admin-item-actions .btn {
    width: 100%;
  }

  .chat-member-picker label {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .chat-members-list article {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .chat-members-list .social-avatar {
    justify-self: start;
    align-self: center;
    width: 46px;
    height: 46px;
  }

  .chat-members-list .chat-member-info {
    justify-self: start;
    width: 100%;
    text-align: left;
  }

  .chat-members-list .chat-member-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .chat-members-list article .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-hero,
  .home-hero,
  .profile-card,
  .dashboard-panel {
    padding: 18px;
  }

  .verification-step,
  .cabinet-app-shell,
  .cabinet-workspace,
  .cabinet-profile-top,
  .cabinet-content-grid,
  .cabinet-publication-grid,
  .teaching-entry,
  .teaching-stats,
  .teaching-layout,
  .teaching-form-grid,
  .teaching-course-card dl,
  .teaching-student-row,
  .hobby-catalog,
  .social-search,
  .social-columns,
  .messenger-layout {
    grid-template-columns: 1fr;
  }

  .notification-card,
  .notification-center-top {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .notification-read-button,
  .notification-center-top .btn {
    width: 100%;
  }

  .cabinet-app-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .cabinet-topbar {
    min-height: 50px;
    gap: 10px;
    padding-inline: 0;
  }

  .cabinet-rules-button,
  .cabinet-notifications-button,
  .cabinet-top-logout {
    width: 42px;
    height: 42px;
  }

  .cabinet-mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-primary);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
  }

  .cabinet-topbar {
    justify-content: space-between;
  }

  .cabinet-page {
    font-size: 14px;
  }

  .cabinet-mobile-menu-toggle span {
    width: 18px;
    height: 12px;
    border-block: 2px solid currentColor;
    position: relative;
  }

  .cabinet-mobile-menu-toggle span::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    border-top: 2px solid currentColor;
    content: "";
    transform: translateY(-50%);
  }

  .cabinet-app-shell.is-mobile-menu-open::before {
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(32, 42, 58, 0.24);
    content: "";
  }

  .cabinet-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(88vw, 340px);
    height: 100vh;
    gap: 14px;
    padding: 16px;
    border-right: 1px solid var(--color-border);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 18px 0 42px rgba(32, 42, 58, 0.16);
    transform: translateX(-108%);
    transition: transform 0.2s ease;
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-sidebar {
    transform: translateX(0);
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-nav button {
    display: block;
    width: 100%;
    min-height: auto;
    height: auto;
    padding: 14px 16px 16px;
    overflow: visible;
    text-align: left;
    white-space: normal;
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-nav button strong,
  .cabinet-app-shell.is-mobile-menu-open .cabinet-nav button span {
    display: block;
    max-width: 100%;
    overflow: visible;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-nav button span {
    margin-top: 6px;
    line-height: 1.5;
  }

  .cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar,
  .cabinet-app-shell.is-mobile-menu-open.is-sidebar-collapsed .cabinet-sidebar {
    align-items: stretch;
    padding-inline: 16px;
    border-right: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 18px 0 42px rgba(32, 42, 58, 0.16);
  }

  .cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-brand span,
  .cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-logout {
    display: inline;
  }

  .cabinet-app-shell.is-sidebar-collapsed:not(.is-mobile-menu-open) .cabinet-sidebar-brand span,
  .cabinet-app-shell.is-sidebar-collapsed:not(.is-mobile-menu-open) .cabinet-sidebar-logout {
    display: none;
  }

  .cabinet-app-shell.is-sidebar-collapsed .cabinet-sidebar-menu,
  .cabinet-app-shell.is-mobile-menu-open.is-sidebar-collapsed .cabinet-sidebar-menu {
    display: grid;
  }

  .cabinet-app-shell.is-sidebar-collapsed:not(.is-mobile-menu-open) .cabinet-sidebar-menu {
    display: none;
  }

  .cabinet-sidebar-brand {
    padding: 0;
  }

  .cabinet-sidebar-toggle {
    position: static;
    z-index: auto;
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  .cabinet-sidebar-toggle .sidebar-toggle-icon {
    display: none;
  }

  .cabinet-sidebar-burger {
    display: block;
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-sidebar-burger {
    border: 0;
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-sidebar-burger::before {
    top: 5px;
    transform: rotate(45deg);
  }

  .cabinet-app-shell.is-mobile-menu-open .cabinet-sidebar-burger::after {
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    border-top: 2px solid currentColor;
    content: "";
    transform: rotate(-45deg);
  }

  .cabinet-sidebar-menu {
    gap: 10px;
    min-height: 0;
  }

  .cabinet-nav {
    display: grid;
    max-height: none;
    overflow-y: auto;
    margin: 0;
    padding: 0 4px 8px 0;
  }

  .cabinet-nav button {
    min-width: 0;
    min-height: 0;
    padding: 14px 16px 16px;
  }

  .cabinet-nav button span {
    display: block;
    max-height: none;
    overflow: visible;
    line-height: 1.3;
    white-space: normal;
  }

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

  .feed-card-head {
    display: grid;
    gap: 10px;
    padding: 0;
  }

  .feed-card-meta {
    justify-content: flex-start;
  }

  .feed-media {
    max-height: 48vh;
    margin-inline: -12px;
    width: calc(100% + 24px);
  }

  .feed-media-grid {
    max-height: none;
  }

  .feed-media img,
  .feed-media video {
    max-height: 48vh;
  }

  .feed-media-grid img,
  .feed-media-grid video {
    max-height: none;
  }

  .feed-card-caption p {
    font-size: 13px;
    line-height: 1.38;
  }

  .feed-card-caption {
    padding: 0;
  }

  .feed-card-caption strong {
    font-size: 14px;
  }

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

  .feed-comment p {
    margin-left: 0;
  }

  .feed-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .feed-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .feed-tab,
  .feed-action {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .feed-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .feed-action {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.15;
  }

  .feed-action span[aria-hidden="true"] {
    font-size: 18px;
  }

  .feed-action img {
    width: 20px;
    height: 20px;
  }

  .feed-action-icon {
    width: 100%;
  }

  .feed-action-manage {
    grid-column: 1 / -1;
    width: 100%;
  }

  .feed-edit-actions {
    grid-template-columns: 1fr;
  }

  .feed-carousel {
    padding-inline: 0;
  }

  .feed-carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .feed-carousel-arrow:first-child {
    left: 6px;
  }

  .feed-carousel-arrow:last-child {
    right: 6px;
  }

  .feed-compose-modal {
    align-items: start;
    padding: 14px;
    overflow-y: auto;
  }

  .feed-compose-dialog {
    width: 100%;
    max-width: 100%;
    max-height: none;
    padding: 18px;
    overflow-x: hidden;
  }

  .feed-compose-dialog .panel-heading h3 {
    max-width: calc(100% - 112px);
    font-size: 24px;
    line-height: 1.12;
  }

  .feed-compose-close {
    top: 16px;
    right: 16px;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .feed-upload {
    min-height: 96px;
    padding: 14px;
  }

  .feed-upload strong {
    max-width: 100%;
    font-size: 17px;
  }

  .feed-upload small,
  .feed-form label {
    font-size: 13px;
  }

  .feed-form textarea,
  .feed-form select {
    min-height: 46px;
    padding: 12px;
    font-size: 14px;
  }

  .feed-form textarea {
    min-height: 112px;
  }

  .feed-create-toggle {
    width: 48px;
    height: 48px;
  }

  .projects-toolbar {
    align-items: center;
  }

  .projects-toolbar h3,
  .projects-other-panel h3 {
    font-size: 28px;
  }

  .project-card-head,
  .project-card-actions,
  .project-form-grid,
  .kopilka-card-head,
  .kopilka-history-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-card-actions {
    justify-content: stretch;
  }

  .project-card-actions .btn {
    width: 100%;
  }

  .project-card p,
  .project-goal span,
  .kopilka-card p {
    font-size: 16px;
  }

  .kopilka-money-row {
    align-items: flex-start;
  }

  .kopilka-history-item div:last-child {
    text-align: left;
  }

  .feed-compose-modal {
    align-items: end;
    padding: 12px;
  }

  .feed-compose-dialog {
    max-height: calc(100vh - 24px);
    padding: 22px;
  }

  .feed-compose-close {
    top: 12px;
    right: 12px;
  }

  .public-profile-dialog {
    padding: 22px;
  }

  .public-profile-hero {
    align-items: start;
    padding-right: 40px;
  }

  .public-profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  .public-profile-hero h2 {
    font-size: 30px;
  }

  .public-profile-actions {
    display: grid;
  }

  .social-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .chat-list-panel,
  .chat-window,
  .chat-window-inner,
  .messenger-layout {
    min-height: 0;
  }

  .messenger-layout {
    display: block;
    height: calc(var(--kc-viewport-height) - 52px);
    min-height: calc(var(--kc-viewport-height) - 52px);
  }

  .chat-list-panel,
  .chat-window,
  .chat-window-inner {
    height: calc(var(--kc-viewport-height) - 52px);
    min-height: 0;
  }

  .chat-list-panel {
    border-right: 0;
    border-bottom: 0;
  }

  .chat-window {
    display: none;
    border-bottom: 0;
    overflow: hidden;
  }

  .messenger-layout.is-chat-open .chat-list-panel {
    display: none;
  }

  .messenger-layout.is-chat-open .chat-window {
    display: grid;
  }

  .chat-back-button {
    display: inline-grid;
  }

  .chat-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 12px;
  }

  .chat-header-menu {
    align-self: center;
    margin-left: 0;
  }

  .chat-header-menu-toggle {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .chat-header-menu-panel {
    right: 0;
    min-width: min(240px, calc(100vw - 24px));
  }

  .message-list {
    min-height: 0;
    padding: 14px;
  }

  .message-bubble {
    max-width: 88%;
    -webkit-user-select: none;
    user-select: none;
  }

  .message-actions {
    position: absolute;
    top: 50%;
    bottom: auto;
    left: calc(100% + 6px);
    display: none;
    flex-direction: column;
    min-width: 156px;
    max-width: min(210px, 56vw);
    margin-top: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(73, 102, 139, 0.14);
    overflow: hidden;
    transform: translateY(-50%);
  }

  .message-bubble.is-own .message-actions {
    right: calc(100% + 6px);
    left: auto;
  }

  .message-bubble.is-selected .message-actions {
    display: flex;
  }

  .message-actions button {
    min-height: 36px;
    padding: 9px 12px;
    font-size: 12px;
    line-height: 1.2;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .message-compose {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 40;
    padding: 0;
    border-top: 0;
    background: transparent !important;
  }

  .message-compose::after {
    inset: 0;
  }

  .message-attach-button,
  .message-emoji-button,
  .message-voice-button,
  .message-send-button {
    width: 48px;
    height: 48px;
  }

  .message-compose textarea {
    min-height: 48px;
    padding-block: 10px;
  }

  .message-emoji-picker {
    right: 0;
    bottom: calc(100% + 8px);
    width: calc(100vw - 20px);
    max-height: min(360px, calc(var(--kc-viewport-height, 100vh) - 150px));
    padding: 10px;
  }

  .message-emoji-picker section div {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
  }

  .message-emoji-picker button {
    min-height: 38px;
    border-radius: 10px;
    font-size: 20px;
  }

  .cabinet-sidebar-logout {
    width: fit-content;
    margin-top: 0;
    padding: 8px 10px;
  }

  .cabinet-main {
    width: 100%;
    padding: 14px 14px 38px;
  }

  .cabinet-app-shell.is-chat-section .cabinet-main {
    gap: 0;
    padding: 0;
  }

  .cabinet-app-shell.is-chat-section .cabinet-topbar {
    min-height: 52px;
    padding: 4px 12px;
    background: var(--color-surface);
  }

  html.is-cabinet-chat-section,
  body.is-cabinet-chat-section {
    height: var(--kc-viewport-height);
    min-height: var(--kc-viewport-height);
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.is-cabinet-chat-section {
    position: fixed;
    inset: 0;
    width: 100%;
    background: var(--color-surface);
  }

  body.is-cabinet-chat-section .app-page,
  body.is-cabinet-chat-section .cabinet-app-shell {
    height: var(--kc-viewport-height);
    min-height: 0;
    background: var(--color-surface);
    overflow: hidden;
  }

  body.is-cabinet-chat-section .cabinet-main,
  body.is-cabinet-chat-section .cabinet-section-panel.is-messenger-panel {
    height: calc(var(--kc-viewport-height) - 52px);
    min-height: 0;
    background: var(--color-surface);
    overflow: hidden;
  }

  .cabinet-section-panel.is-messenger-panel,
  .messenger-layout {
    height: calc(var(--kc-viewport-height) - 52px);
    min-height: calc(var(--kc-viewport-height) - 52px);
    background: var(--color-surface);
  }

  .chat-list-panel,
  .chat-window,
  .chat-window-inner {
    height: calc(var(--kc-viewport-height) - 52px);
    background: var(--color-surface);
  }

  .chat-window-inner {
    position: relative;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .message-list {
    padding-bottom: 74px;
  }

  .verification-code {
    min-width: 0;
  }

  .cabinet-contact-grid,
  .cabinet-overview {
    grid-template-columns: 1fr;
  }

  .achievement-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .achievement-score {
    width: 100%;
    min-height: 86px;
  }

  .achievement-stats-grid,
  .achievement-hp-rules-grid,
  .achievement-awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cabinet-profile-card,
  .cabinet-side-panel,
  .cabinet-panel,
  .cabinet-panel-block {
    padding: 16px;
  }

  .profile-about-panel {
    margin-top: 12px;
  }

  .achievement-hp-rule {
    flex-direction: column;
  }

  .interest-picker {
    gap: 8px;
  }

  .interest-option span,
  .tag-row span {
    min-height: 36px;
    padding: 8px 11px;
    font-size: 13px;
    line-height: 1.2;
  }

  .cabinet-profile-card {
    min-height: 0;
    padding: 16px;
  }

  .cabinet-profile-top {
    gap: 14px;
  }

  .cabinet-avatar {
    width: 62px;
    height: 62px;
    font-size: 22px;
  }

  .cabinet-profile-card h1 {
    font-size: clamp(28px, 8.6vw, 34px);
    line-height: 1.08;
  }

  .cabinet-nickname {
    gap: 8px;
    margin-top: 8px;
    font-size: 18px;
  }

  .profile-edit-icon {
    width: 30px;
    height: 30px;
  }

  .profile-edit-icon img {
    width: 16px;
    height: 16px;
  }

  .cabinet-contact-grid div,
  .empty-state,
  .cabinet-mini-card,
  .purchase-card,
  .cabinet-panel-block {
    padding: 14px;
  }

  .cabinet-contact-grid span,
  .eyebrow {
    font-size: 11px;
  }

  .cabinet-contact-grid strong,
  .cabinet-editable-value strong {
    font-size: 16px;
  }

  .cabinet-panel-block h2,
  .section-heading h2 {
    max-width: 100%;
    font-size: clamp(22px, 6.2vw, 27px);
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  .purchase-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .purchases-heading p:not(.eyebrow),
  .purchase-card-summary,
  .purchase-card-details {
    font-size: 14px;
  }

  .purchase-card h3 {
    font-size: 20px;
  }

  .purchase-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .purchase-history {
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
  }

  .purchase-history-head h3 {
    font-size: 22px;
  }

  .cabinet-panel-block h3,
  .empty-state strong,
  .cabinet-mini-card strong {
    font-size: 16px;
    line-height: 1.25;
  }

  .cabinet-panel-block p,
  .empty-state span,
  .cabinet-mini-card span,
  .cabinet-nav button span,
  .muted-note,
  .form-status {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .cabinet-nav button strong,
  .cabinet-sidebar-logout,
  .btn {
    font-size: 13px;
  }

  .form-field span {
    font-size: 14px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 14px;
  }

  .feed-toolbar {
    gap: 12px;
  }

  .feed-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .feed-tab {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.15;
    text-align: center;
  }

  .feed-create-toggle {
    justify-self: start;
    width: 42px;
    height: 42px;
  }

  .feed-create-toggle img {
    width: 20px;
    height: 20px;
  }

  .children-picker-panel .panel-heading {
    gap: 12px;
  }

  .children-picker-panel .panel-heading .btn {
    width: 100%;
  }

  .admin-overview article,
  .cabinet-task-list article,
  .child-selector-card,
  .feed-card,
  .teaching-course-card,
  .teaching-review-card {
    min-width: 0;
    padding: 12px;
  }

  .admin-overview strong,
  .teaching-stats strong {
    font-size: 26px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .section-heading p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.4;
  }

  .cabinet-side-panel {
    max-height: none;
  }

  .confirm-dialog {
    padding: 22px;
    border-radius: 18px;
  }

  .confirm-dialog-actions {
    grid-template-columns: 1fr;
  }

  body.is-rules-open {
    overflow: hidden;
  }

  .platform-rules-overlay {
    overflow-x: hidden;
  }

  .platform-rules-screen {
    gap: 14px;
    width: 100%;
    padding: 14px 16px 34px;
  }

  .platform-rules-header {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    padding: 0 0 14px;
  }

  .platform-rules-header > div {
    gap: 10px;
  }

  .platform-rules-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .platform-rules-tab {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .platform-rules-header h1 {
    font-size: 22px;
    line-height: 1.12;
  }

  .platform-rules-header [data-platform-rules-close] {
    width: 100%;
    min-height: 36px;
  }

  .platform-rules-body {
    gap: 12px;
    max-width: 100%;
  }

  .platform-rules-body h1 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.12;
  }

  .platform-rules-body h2 {
    margin-top: 14px;
    font-size: 19px;
    line-height: 1.22;
  }

  .platform-rules-body h3 {
    margin-top: 8px;
    font-size: 16px;
  }

  .platform-rules-body p,
  .platform-rules-body li {
    font-size: 14px;
    line-height: 1.48;
  }

  .platform-rules-body ul {
    gap: 6px;
    padding-left: 18px;
  }

  .kopilka-public-shell {
    width: min(100% - 20px, 520px);
    padding: 16px 0 24px;
  }

  .kopilka-public-brand {
    margin-bottom: 14px;
  }

  .kopilka-public-card {
    gap: 16px;
    padding: 18px;
  }

  .kopilka-public-head h1 {
    font-size: 28px;
    line-height: 1.12;
  }

  .kopilka-public-description {
    font-size: 16px;
  }

  .kopilka-public-total {
    display: grid;
    gap: 4px;
  }

  .kopilka-public-total strong {
    font-size: 18px;
  }

  .kopilka-public-total span {
    font-size: 16px;
  }

  .kopilka-public-author {
    padding: 12px;
  }

  .kopilka-public-note {
    padding: 12px;
    font-size: 13px;
  }
}
