/* ============================================
   Дизайн-система «Через корпуса: МГТУ»
   ============================================ */

@font-face {
  font-family: "Gamestation";
  src:
    url("../assets/fonts/Gamestation-Text.woff2") format("woff2"),
    url("../assets/fonts/Gamestation-Text.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gamestation Display";
  src:
    url("../assets/fonts/Gamestation-Display.woff2") format("woff2"),
    url("../assets/fonts/Gamestation-Display.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-active: #1d4ed8;
  --secondary-color: #3b82f6;
  --secondary-hover: #2563eb;
  --gold-color: #c6a14a;
  --gold-hover: #b38e3a;
  --gold-active: #9c7b30;
  --gold-light: #d4b45e;
  --gold-light-hover: #c5a54e;
  --gold-soft: rgba(198, 161, 74, 0.14);
  --accent-color: #0ea5e9;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --card-color: #ffffff;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #16a34a;
  --warning-color: #d97706;
  --error-color: #dc2626;
  --info-color: #0284c7;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --font-family: "Gamestation", system-ui, -apple-system, sans-serif;
  --font-display: "Gamestation Display", "Gamestation", system-ui, sans-serif;
  --transition: 200ms ease;
  --container: 1140px;
  --header-height: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fcf5e6;
  background-image: url("../assets/images/site-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body > .header {
  flex-shrink: 0;
}

body > main {
  flex: 1 0 auto;
}

body > .footer {
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.25;
  font-family: var(--font-display);
  font-weight: 400;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1rem; }

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  max-width: 720px;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.42);
}

.section--compact {
  padding: 3rem 0;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section__header--left {
  text-align: left;
  margin-left: 0;
}

.section__title {
  color: var(--text-color);
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0;
}

/* ============================================
   Кнопки
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    opacity var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-color);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn--primary {
  background: var(--gold-color);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--gold-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--primary:active:not(:disabled) {
  background: var(--gold-active);
  transform: translateY(0);
}

.btn--secondary {
  background: var(--gold-light);
  color: #fff;
}

.btn--secondary:hover:not(:disabled) {
  background: var(--gold-light-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--gold-hover);
  border-color: var(--gold-color);
}

.btn--outline:hover:not(:disabled) {
  border-color: var(--gold-hover);
  background: var(--gold-soft);
  color: var(--gold-hover);
}

.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  font-size: 1.5rem;
}

.btn--icon:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Header
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 245, 230, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-color);
  font-family: var(--font-display);
  font-weight: 400;
}

.header__logo:hover {
  color: var(--primary-color);
}

.header__logo-img {
  width: auto;
  height: 80px;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.header__logo-text {
  font-size: 1.5rem;
  line-height: 1.2;
  white-space: nowrap;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger__line {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--text-color);
  transition: transform var(--transition), opacity var(--transition);
}

.burger[aria-expanded="true"] .burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__link {
  color: var(--text-color);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
}

.nav__link:hover {
  color: var(--primary-color);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav__actions .btn {
  font-size: 0.95rem;
  min-width: 0;
  height: 2.1rem;
  padding: 0 0.9rem;
  line-height: 1;
}

.header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.header-auth-btn__avatar {
  width: 22px;
  height: 22px;
  max-width: none;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--gold-soft);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding-top: 4rem;
  padding-bottom: 1.5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  align-items: center;
}

.hero__content {
  max-width: 36rem;
}

.hero__title {
  white-space: nowrap;
}

.hero__text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero__actions .btn {
  padding: 1.15rem 2.4rem;
  font-size: 1.75rem;
  font-weight: 500;
  min-width: 11rem;
  border-radius: var(--radius-md);
}

.hero__image {
  width: 100%;
  height: auto;
  background: transparent;
}

/* ============================================
   Карточки
   ============================================ */

.card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--compact {
  padding: 1.25rem;
}

.card__image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.card__image-wrap--award {
  aspect-ratio: 10 / 7;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem;
}

.card__title {
  margin-bottom: 0.35rem;
}

.card__role {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.card__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card__roles .card__role {
  display: inline-block;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.card__date {
  display: block;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.card--team .card__image-wrap {
  aspect-ratio: 1;
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
}

.cards-grid--contributors,
.cards-grid--news,
.cards-grid--achievements {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cards-grid--team {
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
}

.card--team .card__title {
  font-size: 0.9375rem;
  line-height: 1.35;
}

.card--team .card__body {
  padding: 1rem;
}

.card--team .card__text {
  font-size: 0.875rem;
}

.card--contributor {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card--contributor .card__image-wrap {
  aspect-ratio: 1;
}

.card--news-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.card--news-link:hover {
  color: inherit;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.card--news-link:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.card__more {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--primary-color);
}

.person-profile {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

.person-profile__photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.person-profile__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.person-profile__role {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.person-profile__block + .person-profile__block {
  margin-top: 2rem;
}

.person-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.person-photos__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.person-photos__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 768px) {
  .person-profile {
    grid-template-columns: 1fr;
  }

  .person-profile__photo {
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ============================================
   О проекте и преимущества
   ============================================ */

.section--about {
  padding-top: 0.75rem;
  padding-bottom: 4rem;
  background: transparent;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.features__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.features__icon-image {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  box-shadow: var(--shadow-soft);
}

.features__icon-image--lg {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  object-position: top;
}

.features__icon-image--center {
  object-position: center;
}

.features__icon-image--right {
  object-position: right center;
}

.features__icon-image--contain {
  height: auto;
  aspect-ratio: 15 / 8;
  object-fit: contain;
  object-position: center;
  background: #f4f7fb;
}

.features__link--image-only .features__title {
  margin-top: 0.9rem;
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.3;
}

.features__title {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.features__more {
  display: block;
  text-align: center;
  color: var(--gold-hover);
  font-size: 0.9375rem;
  font-weight: 500;
}

.features__text {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.features--nav .features__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  position: relative;
  border: 2px solid var(--gold-color);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.features--nav .features__link:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-hover);
}

.features--nav .features__link:hover .features__more {
  color: var(--gold-active);
}

.features--nav .features__link:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.features__arrow {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* ============================================
   Внутренние страницы
   ============================================ */

.page-hero {
  padding: 3rem 0 2rem;
  background: rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid var(--border-color);
}

.page-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111111;
}

.page-hero__back:hover {
  color: var(--gold-hover);
}

.page-hero__title {
  margin-bottom: 0.75rem;
}

.page-hero__lead {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0;
}

.page-hero--mechanics {
  background: transparent;
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.page-hero--mechanics .page-hero__back {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111111;
}

.page-hero--mechanics .page-hero__back:hover {
  color: var(--gold-hover);
}

.page-hero--mechanics .page-hero__title {
  text-align: center;
  margin-bottom: 0;
}

.page-game-mechanics main > .section,
.page-game-testing main > .section,
.page-info main > .section,
.page-campus-tour main > .section,
.page-about-us-known main > .section,
.page-achievements main > .section,
.page-assistants main > .section,
.page-news main > .section,
.page-news-article main > .section {
  padding-top: 1.5rem;
}

.page-game-mechanics .subsection__title,
.page-game-testing .subsection__title,
.page-campus-tour .subsection__title,
.page-info .subsection__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-game-mechanics .subsection__text,
.page-game-testing .subsection__text,
.page-campus-tour .subsection__text,
.page-info .subsection__text {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: #111111;
}

.game-test-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 22rem;
  max-height: min(72vh, 52rem);
  border-radius: var(--radius-lg, 1rem);
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow-md, 0 10px 30px rgba(15, 23, 42, 0.12));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.game-test-frame__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.game-test-frame__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: #f8fafc;
  background:
    linear-gradient(160deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98)),
    url("../assets/images/Game-testing.png") center / cover no-repeat;
}

.game-test-frame__placeholder-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.game-test-frame__placeholder-text {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.9);
}

.game-test-frame__hint {
  margin: 0.85rem 0 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.game-link-modal__text {
  text-align: center;
}

.guest-game-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.guest-game-actions--stack .btn {
  width: 100%;
}

.modal--game-link {
  z-index: 220;
}

.page-info .subsection__text + .subsection__text,
.page-info .subsection__text + .subsection__list {
  margin-top: 0.85rem;
}

.page-info .subsection__list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #111111;
}

.page-info .subsection__list li + li {
  margin-top: 0.4rem;
}

.page-info .subsection__text a,
.page-info .subsection__list a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.page-info .subsection__meta {
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.policy-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.policy-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.policy-table th,
.policy-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  width: 12.5rem;
  background: var(--background-color);
  font-weight: 600;
  color: #111111;
}

.policy-table td {
  color: #111111;
}

.policy-table ul {
  margin: 0;
  padding-left: 1.15rem;
}

.policy-table li + li {
  margin-top: 0.35rem;
}

.achievement-entry {
  overflow: hidden;
  max-width: 52rem;
}

.achievement-entry:first-child {
  margin-inline: auto;
}

.achievement-entry__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8eef5;
}

.achievement-entry__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.achievement-entry__body {
  padding: 1.5rem 1.75rem 1.85rem;
}

.achievement-entry__date {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.achievement-entry__title {
  margin-bottom: 0.75rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--text-color);
}

.achievement-entry__text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.page-game-mechanics .tech-stack__item {
  font-size: 1rem;
  padding: 0.6rem 1.15rem;
}

.page-game-mechanics .code-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  width: calc(100% + 3rem);
  margin-inline: -1.5rem;
}

.page-game-mechanics .code-gallery__item img {
  aspect-ratio: 16 / 10;
  min-height: 0;
  object-fit: contain;
  background: #111827;
}

.page-game-mechanics .code-gallery__caption {
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--text-color);
  text-align: center;
  padding: 1rem 1.15rem;
  font-weight: 500;
}

.page-game-mechanics .story__role {
  font-size: 0.9375rem;
}

.page-game-mechanics .story__title {
  font-size: 1.25rem;
}

.page-game-mechanics .story__text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-color);
}

.page-game-mechanics .join-team__list {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-color);
}

.subsection {
  margin-bottom: 3rem;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection__title {
  margin-bottom: 1rem;
}

.subsection__text {
  color: var(--text-muted);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.tech-stack__item {
  padding: 0.5rem 1rem;
  background: rgba(30, 58, 138, 0.08);
  color: var(--primary-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.code-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.code-gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.code-gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.code-gallery__caption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface-color);
}

.stories {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.story {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--secondary-color);
}

.story__role {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary-color);
}

.story__title {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.story__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.join-team {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(59, 130, 246, 0.08));
  border: 1px solid var(--border-color);
}

.join-team__list {
  margin: 1rem 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  list-style: disc;
}

.join-team__list li + li {
  margin-top: 0.35rem;
}

.join-team__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  margin-top: 0.85rem;
  width: fit-content;
  max-width: 100%;
}

.join-team__actions .btn {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  white-space: nowrap;
  text-align: center;
}

.join-team__copy-status {
  margin: 0.6rem 0 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.coming-soon {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 520px;
  margin: 0 auto;
}

.coming-soon__icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.coming-soon__title {
  margin-bottom: 0.75rem;
}

.coming-soon__text {
  color: var(--text-color);
  margin-bottom: 2rem;
  text-align: left;
}

.venues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.venue {
  overflow: hidden;
}

.venue__image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.venue__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue__body {
  padding: 1.25rem;
}

.venue__type {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-color);
}

.venue__title {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.venue__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.venue--empty {
  border-style: dashed;
  background: var(--background-color);
}

.venue__body--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
}

.venue__empty-text {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tour-launch {
  text-align: left;
  padding: 3rem 2rem;
}

.tour-launch__text {
  max-width: none;
  margin: 0 0 2rem;
  font-size: 1.1875rem;
  line-height: 1.75;
  color: #111111;
}

.tour-launch__preview {
  max-width: 420px;
  width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: #000;
}

.coming-soon__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.page-hero--mechanics .news-article__meta {
  display: block;
  text-align: center;
  margin: 0.85rem 0 0;
}

.news-article__meta {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
}

.news-article__cover {
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.news-article__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-article__content {
  max-width: 720px;
}

.news-article__content--wide {
  max-width: none;
}

.news-article__content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.news-article__content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.news-article__content ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  list-style: disc;
}

.news-article__content li + li {
  margin-top: 0.35rem;
}

.news-article__articles {
  margin: 0 0 1.25rem;
  padding-left: 0;
  list-style: none;
}

.news-article__articles li + li {
  margin-top: 0.75rem;
}

.news-article__articles a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-article__media {
  margin: 2rem 0;
}

.news-article__media-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.news-article__video {
  width: 100%;
  max-height: min(70vh, 720px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #000;
  box-shadow: var(--shadow-sm);
}

.news-article__presentation {
  margin-top: 2rem;
}

.news-article__presentation-frame {
  display: block;
  width: 100%;
  min-height: min(75vh, 720px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--surface-color);
}

.news-article__presentation-note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   Игра
   ============================================ */

.game-section {
  background: rgba(255, 255, 255, 0.28);
}

.game-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.game-section__text {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.game-section__modes {
  margin: 1.5rem 0 2rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--text-muted);
}

.game-section__modes li + li {
  margin-top: 0.35rem;
}

.game-section__preview {
  display: block;
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.game-section__preview:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.game-section__preview:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.game-section__preview-placeholder {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  transition: background var(--transition);
}

.game-section__preview-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.game-section__preview:hover .game-section__preview-placeholder {
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
}

.game-section__preview-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* ============================================
   Контакты и формы
   ============================================ */

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.contacts__label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contacts__link {
  font-size: 1.0625rem;
  font-weight: 600;
}

.contacts__block + .contacts__block {
  margin-top: 2rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social--footer .social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.social--footer .social__link:hover {
  background: var(--text-color);
  color: #fff;
}

.form {
  padding: 1.5rem;
}

.form__title {
  margin-bottom: 0.5rem;
}

.form__hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.form__group {
  margin-bottom: 1rem;
}

.form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9375rem;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-color);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--gold-color);
  box-shadow: 0 0 0 3px rgba(198, 161, 74, 0.22);
}

.form__input:invalid:not(:placeholder-shown),
.form__textarea:invalid:not(:placeholder-shown) {
  border-color: var(--error-color);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.form__input--password {
  padding-right: 6.5rem;
  width: 100%;
}

.form__password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gold-color);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.form__password-toggle:hover {
  color: var(--gold-hover);
  background: var(--gold-soft);
}

.form__password-toggle:focus-visible {
  outline: 2px solid var(--gold-color);
  outline-offset: 2px;
}

.form__status {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.form__status--success { color: var(--success-color); }
.form__status--error { color: var(--error-color); }
.form__status--info { color: var(--info-color); }

.auth-panel {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.75rem;
}

.auth-panel--logged {
  text-align: center;
}

.auth-panel__welcome {
  margin-bottom: 0.5rem;
}

.auth-panel__hint {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.auth-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.auth-tabs__btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.auth-tabs__btn:hover {
  color: var(--gold-hover);
}

.auth-tabs__btn.is-active {
  color: var(--gold-hover);
  background: var(--gold-soft);
}

.auth-form[hidden] {
  display: none;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-form__forgot {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-color);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.auth-form__forgot:hover {
  color: var(--gold-hover);
}

.modal--auth .modal__content--auth {
  max-width: 28rem;
  padding: 1.75rem;
  overflow: auto;
}

#forgot-password-modal {
  z-index: 220;
}

.modal--auth .modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 1.25rem;
}

.modal--auth .modal__title {
  margin: 0;
  padding: 0 2.75rem;
  font-size: 1.75rem;
  line-height: 1.25;
  text-align: center;
}

.modal--auth .modal__close {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.modal--auth .modal__text {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal--guest-game {
  z-index: 210;
}

.modal--guest-game .modal__overlay {
  cursor: default;
}

.modal--guest-game .modal__content--auth {
  max-width: 38rem;
  padding: 2.75rem 2.75rem 2rem;
}

.modal--guest-game .modal__header {
  position: static;
  min-height: 0;
  margin-bottom: 1.5rem;
}

.modal--guest-game .modal__title {
  padding: 0 1.5rem;
}

.modal--guest-game .modal__close {
  top: 0.85rem;
  right: 0.85rem;
  transform: none;
}

.guest-game-modal__title {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 500;
}

.guest-game-timer {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 1.5rem;
}

.guest-game-timer__count {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold-color);
  border-radius: 50%;
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  background: var(--gold-soft);
}

.guest-game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.guest-game-actions .btn {
  flex: 0 1 auto;
  min-height: 0;
  padding: 0.4rem 1.2rem;
  font-size: 1.2rem;
  justify-content: center;
}

/* Страница смены пароля по ссылке из письма */
.reset-password-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #4a4a4a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.reset-password-page__main {
  width: 100%;
  max-width: 56rem;
}

.reset-password-page__card {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
}

.reset-password-page__title {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1.35rem;
  text-align: center;
}

.reset-password-page__lead {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.reset-password-page__status {
  text-align: center;
  margin-top: 1rem;
}

.reset-password-page__status.form__status--success,
.reset-password-page__status.form__status--error,
.reset-password-page__status.form__status--info {
  color: #fff;
}

.reset-password-page__back {
  margin: 1.5rem 0 0;
  text-align: center;
}

.reset-password-page__back a {
  color: #b8e986;
}

.reset-password-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  justify-content: center;
}

.reset-password-form__field {
  flex: 1 1 12rem;
  min-width: 10rem;
  background: #b8e986;
  padding: 0.35rem;
  border-radius: 4px;
}

.reset-password-form__input {
  width: 100%;
  border: 0;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.reset-password-form__submit {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 2.75rem;
  padding: 0.65rem 1.5rem;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.reset-password-form__submit:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .reset-password-form__row {
    flex-direction: column;
  }

  .reset-password-form__submit {
    width: 100%;
  }

  .sitemap {
    grid-template-columns: 1fr;
  }
}

.form__required {
  color: var(--error-color);
}

.form__hint--inline {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* Опрос обратной связи */
.feedback-form {
  padding: 2rem;
}

.feedback-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.feedback-fieldset legend {
  margin-bottom: 0.75rem;
}

.feedback-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feedback-rating__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-rating__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-color);
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.feedback-rating__input:focus-visible + .feedback-rating__btn {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.feedback-rating__input:checked + .feedback-rating__btn {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.feedback-rating__item:hover .feedback-rating__btn {
  border-color: var(--secondary-color);
}

.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feedback-chip__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-chip {
  position: relative;
  cursor: pointer;
}

.feedback-chip__label {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--surface-color);
  color: var(--text-color);
  font-size: 0.9375rem;
  font-weight: 500;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.feedback-chip__input:focus-visible + .feedback-chip__label {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.feedback-chip__input:checked + .feedback-chip__label {
  background: rgba(30, 58, 138, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.feedback-chip:hover .feedback-chip__label {
  border-color: var(--secondary-color);
}

.feedback-recommend {
  display: block;
  cursor: pointer;
}

.feedback-recommend__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-recommend__box {
  display: block;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--background-color);
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.feedback-recommend__input:focus-visible + .feedback-recommend__box {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.feedback-recommend__input:checked + .feedback-recommend__box {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.06);
}

/* Ссылки админ-панели — только для role=admin (управляется в auth.js) */
.admin-only-link {
  display: none !important;
}

.admin-only-link.is-visible {
  display: inline-flex !important;
}

/* Админ-панель */
.admin-gate {
  padding: 2rem;
  text-align: center;
}

.admin-gate__text {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.admin-panel__user {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tabs__btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--surface-color);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.admin-tabs__btn.is-active,
.admin-tabs__btn:hover {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.08);
  color: var(--primary-color);
}

.admin-tab-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-weight: 600;
  color: var(--primary-color);
}

.admin-table td:last-child {
  white-space: nowrap;
}

.admin-subtabs,
.survey-folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.admin-subtabs__btn,
.survey-folder-tabs__btn {
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--surface-color);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.admin-subtabs__btn.is-active,
.admin-subtabs__btn:hover,
.survey-folder-tabs__btn.is-active,
.survey-folder-tabs__btn:hover {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.08);
  color: var(--primary-color);
}

.subsection__title--sm {
  font-size: 1.125rem;
  margin-top: 1.5rem;
}

.survey-questions-list,
.survey-responses-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.survey-question-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.survey-question-editor__order-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.survey-question-editor__drag {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: grab;
  padding: 0.15rem 0.35rem;
}

.survey-question-editor__drag:active {
  cursor: grabbing;
}

.survey-question-editor.is-dragging {
  opacity: 0.55;
  border-color: var(--primary-color);
}

.survey-question-editor__reorder {
  display: inline-flex;
  gap: 0.35rem;
}

.survey-question-editor__order {
  font-weight: 700;
  color: var(--primary-color);
}

.survey-question-editor__active,
.survey-question-editor__required {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.survey-question-editor__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.form__group--inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: end;
}

.survey-response-card__head {
  margin-bottom: 0.75rem;
}

.survey-response-card__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.survey-response-card__author {
  font-weight: 600;
}

.survey-response-card__answers {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9375rem;
}

.survey-response-card__folders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.survey-response-card__folders-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.survey-folder-btn.is-active {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.12);
}

.survey-completed {
  padding: 2rem;
  text-align: center;
}

.survey-completed .form__title {
  margin-bottom: 0.75rem;
}

.survey-completed .btn {
  margin-top: 1rem;
}

.survey-completed__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.survey-completed__actions .btn {
  margin-top: 0;
}

/* ============================================
   Страница профиля
   ============================================ */

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.75rem;
  align-items: center;
  padding: 1.75rem 2rem;
  background: rgba(252, 248, 239, 0.94);
  border: 1px solid rgba(198, 161, 74, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-card__photo-wrap {
  width: 148px;
  height: 148px;
  flex-shrink: 0;
}

.profile-card__photo,
.profile-card__photo-placeholder {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 3px solid rgba(198, 161, 74, 0.45);
  background: #f3ead4;
}

.profile-card__photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.profile-card__name {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--text-color);
}

.profile-card__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  color: var(--primary-color);
  font-size: 1.02rem;
}

.profile-card__meta svg {
  flex-shrink: 0;
  color: var(--gold-color);
}

.profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}

.profile-card__photo-btn {
  cursor: pointer;
  gap: 0.45rem;
}

.profile-card__camera {
  flex-shrink: 0;
}

.profile-card .profile-avatar__hint {
  margin: 0.45rem 0 0;
  max-width: 28rem;
  line-height: 1.35;
}

.profile-progress {
  text-align: center;
  min-width: 9.5rem;
}

.profile-progress__chart {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.profile-progress__chart svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.profile-progress__track,
.profile-progress__bar {
  fill: none;
  stroke-width: 8;
}

.profile-progress__track {
  stroke: rgba(30, 58, 138, 0.12);
}

.profile-progress__bar {
  stroke: var(--gold-color);
  stroke-linecap: round;
  transition: stroke-dasharray 400ms ease;
}

.profile-progress__value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--primary-color);
  line-height: 1;
}

.profile-progress__label {
  margin: 0.6rem 0 0;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.profile-page-panels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.profile-achievements {
  padding: 1.5rem 1.75rem 1.65rem;
  background: rgba(252, 248, 239, 0.94);
  border: 1px solid rgba(198, 161, 74, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-achievements__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-color);
}

.profile-achievements__trophy {
  flex-shrink: 0;
  color: var(--gold-color);
}

.profile-achievements__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.profile-achv-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 12.25rem;
  padding: 1.15rem 0.85rem 1rem;
  border: 2px dashed rgba(198, 161, 74, 0.48);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

.profile-achv-card:hover {
  border-color: var(--gold-color);
  box-shadow: var(--shadow-sm);
}

.profile-achv-card:not(.is-empty):not(.has-meter) {
  border-style: solid;
  border-color: rgba(198, 161, 74, 0.32);
  background: #fffdf8;
  align-items: stretch;
  text-align: left;
}

.profile-achv-card.has-meter {
  border-style: solid;
  border-color: rgba(198, 161, 74, 0.32);
  background: #fffdf8;
}

.profile-achv-card__icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.85rem;
  border-radius: var(--radius-full);
  background: var(--gold-soft);
  color: var(--gold-hover);
}

.profile-achv-card__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-color);
}

.profile-achv-card__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

#profile-explore-rating-text {
  margin: 0.45rem 0 0;
}

#profile-explore-rating-text:empty {
  display: none;
}

.profile-achv-card .profile-game-list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-achv-card .profile-rating-summary {
  margin: 0;
  font-weight: 400;
}

.profile-achv-card.is-empty .profile-game-list__empty,
.profile-achv-card.is-empty .profile-rating-summary {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.profile-achv-meter {
  width: 100%;
  max-width: 12.5rem;
  margin: 0.15rem auto 0;
}

.profile-achv-meter__track {
  height: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(198, 161, 74, 0.16);
}

.profile-achv-meter__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--gold-color);
  transition: width 400ms ease;
}

.profile-achv-meter__value {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--primary-color);
}

.profile-achv-link {
  display: flex;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.profile-achv-link .profile-achv-card {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.profile-achv-link:hover .profile-achv-card,
.profile-achv-link:focus-visible .profile-achv-card {
  border-color: var(--gold-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.profile-achv-link:focus-visible {
  outline: none;
}

/* ============================================
   Страница игровых достижений
   ============================================ */

.game-achv-board {
  padding: 1.75rem 1.75rem 1.85rem;
  background: #fff;
  border: 1px solid rgba(198, 161, 74, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.game-achv-board__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}

.page-game-specialties .game-achv-board__head {
  align-items: flex-start;
}

.game-achv-board__title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--text-color);
}

.game-achv-board__trophy {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-full);
  background: rgba(30, 58, 138, 0.1);
  color: var(--primary-color);
}

.game-achv-board__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.game-achv-board__progress {
  min-width: 12.5rem;
  text-align: right;
}

.game-achv-board__count {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.game-achv-board__meter {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.12);
}

.game-achv-board__meter-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--primary-color);
  transition: width 400ms ease;
}

.game-achv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.game-achv-filters__btn {
  padding: 0.42rem 1rem;
  border: 1px solid rgba(198, 161, 74, 0.45);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.game-achv-filters__btn:hover {
  border-color: var(--gold-color);
  color: var(--gold-hover);
}

.game-achv-filters__btn.is-active {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: #fff;
}

.game-achv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-achv-empty {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.game-achv-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 17.5rem;
  padding: 1.35rem 1rem 1.2rem;
  text-align: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #f8fafc;
}

.game-achv-item--gold.is-earned {
  background: #fff8e8;
  border-color: rgba(198, 161, 74, 0.28);
}

.game-achv-item--navy.is-earned {
  background: #eef3ff;
  border-color: rgba(30, 58, 138, 0.18);
}

.game-achv-item--teal.is-earned {
  background: #eefaf6;
  border-color: rgba(13, 148, 136, 0.22);
}

.game-achv-item__lock {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  color: #94a3b8;
}

.game-achv-item__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 6.4rem;
  height: 6.4rem;
  margin: 0.15rem 0 0.95rem;
  border-radius: var(--radius-full);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.game-achv-item.is-earned .game-achv-item__icon::before,
.game-achv-item.is-earned .game-achv-item__icon::after {
  content: "";
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 1px;
  background: var(--gold-color);
  transform: rotate(45deg);
}

.game-achv-item.is-earned .game-achv-item__icon::before {
  top: 0.35rem;
  right: 0.55rem;
}

.game-achv-item.is-earned .game-achv-item__icon::after {
  bottom: 0.45rem;
  left: 0.4rem;
  width: 0.28rem;
  height: 0.28rem;
  background: var(--accent-color);
}

.game-achv-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.game-achv-item.is-locked .game-achv-item__icon {
  background: #eef2f7;
  color: #94a3b8;
  box-shadow: none;
}

.game-achv-item.is-locked .game-achv-item__icon img {
  filter: grayscale(1) opacity(0.55);
}

.game-achv-item__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--text-color);
}

.game-achv-item__desc {
  margin: 0 0 0.95rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.game-achv-item__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: auto 0 0;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #7a5a12;
  background: #f3d27a;
}

.game-achv-item--navy.is-earned .game-achv-item__badge {
  color: #1e3a8a;
  background: #c7d4f8;
}

.game-achv-item--teal.is-earned .game-achv-item__badge {
  color: #0f766e;
  background: #bfeee3;
}

.game-achv-item__date {
  display: block;
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-spec-back {
  display: inline-block;
  margin: 0 0 0.55rem;
  color: var(--text-color);
  font-size: 0.92rem;
  text-decoration: none;
}

.game-spec-back:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

.page-game-specialties .game-achv-board__title,
.page-game-specialties .game-spec-card__title {
  color: var(--text-color);
}

.page-game-specialties .game-spec-back {
  color: var(--text-color);
}

.page-game-specialties .game-spec-back:hover {
  color: var(--gold-hover);
}

.page-game-specialties .game-achv-filters__btn {
  border-color: rgba(198, 161, 74, 0.45);
  color: var(--text-color);
}

.page-game-specialties .game-achv-filters__btn:hover {
  border-color: var(--gold-color);
  color: var(--gold-hover);
}

.page-game-specialties .game-achv-filters__btn.is-active {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: #fff;
}

.page-game-specialties .game-achv-board__title {
  align-items: flex-start;
}

.page-game-specialties .game-achv-board__title span:last-child {
  flex: 1;
  min-width: 0;
}

.page-game-specialties .game-achv-board__trophy {
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.game-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-spec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 1.25rem 1.1rem 1.15rem;
  text-align: center;
  border: 1px solid rgba(198, 161, 74, 0.22);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  box-shadow: var(--shadow-sm);
}

.game-spec-card--faculty {
  cursor: pointer;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.game-spec-card--faculty:hover,
.game-spec-card--faculty:focus-visible {
  border-color: var(--gold-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.game-spec-card.is-completed {
  background: #fff8e8;
  border-color: rgba(198, 161, 74, 0.32);
}

.game-spec-card.is-progress {
  background: #eef3ff;
  border-color: rgba(30, 58, 138, 0.18);
}

.game-spec-card__mark {
  position: absolute;
  top: 0.9rem;
  left: 0.95rem;
  color: #94a3b8;
}

.game-spec-card.is-completed .game-spec-card__mark {
  color: var(--gold-color);
}

.game-spec-card.is-progress .game-spec-card__mark {
  color: var(--primary-color);
}

.game-spec-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 6.4rem;
  height: 6.4rem;
  margin: 0.35rem auto 0.85rem;
  border-radius: var(--radius-full);
  background: #eef2f7;
  box-shadow: none;
}

.game-spec-card.is-completed .game-spec-card__icon,
.game-spec-card.is-progress .game-spec-card__icon {
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.game-spec-card--faculty.is-progress .game-spec-card__icon {
  background: #eef2f7;
  box-shadow: none;
}

.game-spec-card.is-completed .game-spec-card__icon::before,
.game-spec-card.is-completed .game-spec-card__icon::after,
.game-spec-card--specialty.is-progress .game-spec-card__icon::before,
.game-spec-card--specialty.is-progress .game-spec-card__icon::after {
  content: "";
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 1px;
  transform: rotate(45deg);
}

.game-spec-card.is-completed .game-spec-card__icon::before,
.game-spec-card.is-completed .game-spec-card__icon::after {
  background: var(--gold-color);
}

.game-spec-card.is-progress .game-spec-card__icon::before,
.game-spec-card.is-progress .game-spec-card__icon::after {
  background: var(--accent-color);
}

.game-spec-card__icon::before {
  top: 0.35rem;
  right: 0.55rem;
}

.game-spec-card__icon::after {
  bottom: 0.45rem;
  left: 0.4rem;
  width: 0.28rem;
  height: 0.28rem;
}

.game-spec-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-full);
  filter: grayscale(1) opacity(0.72);
}

.game-spec-card--specialty.is-completed .game-spec-card__icon img,
.game-spec-card--specialty.is-progress .game-spec-card__icon img,
.game-spec-card--faculty.is-completed .game-spec-card__icon img {
  filter: none;
}

.game-spec-card__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-color);
}

.game-spec-card__faculty {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.game-spec-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 0 auto 0.85rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #64748b;
  background: #e8eef6;
}

.game-spec-card.is-completed .game-spec-card__badge {
  color: #7a5a12;
  background: #f3d27a;
}

.game-spec-card.is-progress .game-spec-card__badge {
  color: var(--text-color);
  background: #e8eef6;
}

.game-spec-card__progress {
  margin: 0 0 0.75rem;
  text-align: left;
}

.game-spec-card__progress-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.game-spec-card__bar {
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.12);
}

.game-spec-card__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #cbd5e1;
  transition: width 400ms ease;
}

.game-spec-card.is-completed .game-spec-card__bar span {
  background: var(--gold-color);
}

.game-spec-card.is-progress .game-spec-card__bar span {
  background: var(--primary-color);
}

.game-spec-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.game-spec-card__stats strong {
  color: var(--text-color);
}

.game-spec-card__date {
  display: block;
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-spec-card .game-spec-card__btn {
  width: 100%;
  margin-top: auto;
}

.page-game-buildings .game-achv-board__head {
  align-items: flex-start;
}

.page-game-buildings .game-achv-board__title,
.page-game-buildings .game-bldg-card__title {
  color: var(--text-color);
}

.page-game-buildings .game-achv-filters__btn {
  border-color: rgba(198, 161, 74, 0.45);
  color: var(--text-color);
}

.page-game-buildings .game-achv-filters__btn:hover {
  border-color: var(--gold-color);
  color: var(--gold-hover);
}

.page-game-buildings .game-achv-filters__btn.is-active {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: #fff;
}

.game-bldg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-bldg-card {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 0.85rem 0.85rem 1.1rem;
  text-align: center;
  border: 1px solid rgba(198, 161, 74, 0.22);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  box-shadow: var(--shadow-sm);
}

.game-bldg-card.is-completed {
  background: #fff8e8;
  border-color: rgba(198, 161, 74, 0.32);
}

.game-bldg-card.is-progress {
  background: #eef3ff;
  border-color: rgba(30, 58, 138, 0.18);
}

.game-bldg-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0 0 0.85rem;
  overflow: hidden;
  border-radius: 14px;
  background: #0b1220;
}

.game-bldg-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-bldg-card__photo-color {
  opacity: 0;
  transition: opacity 400ms ease;
}

.game-bldg-card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-color);
}

.game-bldg-card__address {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.game-bldg-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 0 auto 0.85rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #64748b;
  background: #e8eef6;
}

.game-bldg-card.is-completed .game-bldg-card__badge {
  color: #7a5a12;
  background: #f3d27a;
}

.game-bldg-card.is-progress .game-bldg-card__badge {
  color: var(--text-color);
  background: #e8eef6;
}

.game-bldg-card__progress {
  margin: 0 0 0.75rem;
  text-align: left;
}

.game-bldg-card__progress-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.game-bldg-card__bar {
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.12);
}

.game-bldg-card__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #cbd5e1;
  transition: width 400ms ease;
}

.game-bldg-card.is-completed .game-bldg-card__bar span {
  background: var(--gold-color);
}

.game-bldg-card.is-progress .game-bldg-card__bar span {
  background: var(--primary-color);
}

.game-bldg-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.game-bldg-card__stats strong {
  color: var(--text-color);
}

.profile-rating {
  padding: 1.5rem 1.5rem 1.6rem;
  background: rgba(252, 248, 239, 0.94);
  border: 1px solid rgba(198, 161, 74, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-rating__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-color);
}

.profile-rating__icon {
  flex-shrink: 0;
  color: var(--gold-color);
}

.profile-rating__score {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
}

.profile-rating__label {
  color: var(--gold-color);
  margin-right: 0.35rem;
}

.profile-rating__value {
  font-weight: 600;
  color: var(--gold-color);
}

.profile-rating__place {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.profile-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(15.5rem, 0.9fr);
  gap: 1.15rem;
  margin-top: 1.15rem;
  align-items: start;
}

.profile-fold-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.profile-fold-bar .profile-fold__toggle {
  flex: 1 1 12rem;
}

.profile-fold {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.profile-fold__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--gold-color);
  border-radius: var(--radius-sm);
  background: var(--surface-color);
  color: var(--text-color);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.profile-fold__toggle:hover {
  border-color: var(--gold-hover);
  color: var(--gold-hover);
  box-shadow: var(--shadow-sm);
}

.profile-fold__toggle[aria-expanded="true"] {
  background: var(--gold-soft);
  border-color: var(--gold-hover);
  color: var(--gold-hover);
}

.profile-fold__panel {
  width: 100%;
}

/* Профиль — модальное окно */
.modal--profile {
  z-index: 210;
}

.modal__content--profile {
  width: min(96vw, 1100px);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.5rem 1.5rem;
}

.profile-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
}

.profile-modal__title {
  font-size: 1.375rem;
  margin: 0;
}

.profile-modal__logout {
  margin-left: auto;
  margin-right: 0.35rem;
}

.modal--profile .modal__close {
  color: var(--text-color);
  background: var(--background-color);
}

.profile-modal__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-avatar {
  text-align: center;
}

.profile-avatar__img,
.profile-avatar__placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.profile-avatar__placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: var(--text-muted);
  font-weight: 600;
}

.profile-avatar__upload {
  display: inline-block;
  cursor: pointer;
}

.profile-avatar__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.profile-avatar__status {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.profile-modal__panels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-panel {
  padding: 1.25rem 1.5rem;
}

.profile-panel__title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.profile-panel__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: -0.25rem 0 1rem;
}

.profile-panel__hint--lg {
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--text-color);
  margin: 0 0 1.1rem;
}

.profile-game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-game-block {
  padding: 1rem;
  background: var(--background-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

a.profile-game-block {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color var(--transition), box-shadow var(--transition);
}

a.profile-game-block:hover {
  border-color: var(--gold-color);
  box-shadow: var(--shadow-sm);
}

.profile-game-block--wide {
  grid-column: 1 / -1;
}

.profile-game-block .profile-achv-meter {
  margin-left: 0;
}

.profile-game-block__title {
  font-size: 0.9375rem;
  margin-bottom: 0.65rem;
  color: var(--primary-color);
}

.profile-game-list {
  font-size: 0.875rem;
  color: var(--text-color);
}

.profile-game-list li + li {
  margin-top: 0.35rem;
}

.profile-game-list__empty {
  color: var(--text-muted);
  font-style: italic;
}

.profile-rating-summary {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.profile-leaderboard {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-leaderboard li.is-you,
.profile-person.is-you {
  font-weight: 600;
}

.profile-leaderboard__empty,
.profile-members__empty {
  list-style: none;
  color: var(--text-muted);
  font-style: italic;
}

.profile-members {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.profile-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-color);
}

.profile-person__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gold-soft);
}

.profile-person__avatar--empty {
  display: inline-block;
}

.profile-person__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-person__name {
  font-size: 0.9rem;
  line-height: 1.3;
}

.profile-person__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  display: block;
  background: var(--gold-soft);
}

.admin-user-avatar--empty {
  display: inline-block;
}

.profile-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-form__full {
  grid-column: 1 / -1;
}

.profile-form__actions {
  margin-top: 1.15rem;
}

.profile-password-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--background-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.profile-password-tabs__btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.profile-password-tabs__btn:hover {
  color: var(--gold-hover);
}

.profile-password-tabs__btn.is-active {
  color: var(--gold-hover);
  background: var(--gold-soft);
}

.profile-password-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-password-form .btn--primary,
.profile-password-form__submit {
  align-self: flex-start;
  min-height: 3.35rem;
  padding: 1rem 1.85rem;
  font-size: 1.2rem;
}

.profile-save-status {
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: #efe6d4;
  color: var(--text-color);
  margin-bottom: 0;
}

.footer a {
  color: var(--text-color);
}

.footer a:hover {
  color: #000;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-color);
}

.footer__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer__label {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  color: #8a7350;
}

.footer__links li + li {
  margin-top: 0.35rem;
}

.footer__bottom {
  border-top: 1px solid rgba(138, 115, 80, 0.22);
  padding: 1rem 0;
  font-size: 0.875rem;
  color: #6e5a3e;
}

.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.footer__credit {
  margin: 0;
}

.footer__credit a {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer__credit a:hover {
  color: #000;
}

.legal {
  max-width: 760px;
}

.legal h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal p + p {
  margin-top: 0.85rem;
}

.legal ul,
.legal ol {
  margin: 0.65rem 0 1rem;
  padding-left: 1.35rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.legal__meta {
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.sitemap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.sitemap__group {
  padding: 1.25rem 1.35rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sitemap__title {
  margin: 0 0 0.85rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-color);
}

.sitemap__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap__list li + li {
  margin-top: 0.55rem;
}

.sitemap__list a {
  color: var(--primary-color);
  text-decoration: none;
  line-height: 1.45;
}

.sitemap__list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.sitemap__list a[aria-current="page"] {
  color: var(--text-color);
  font-weight: 600;
}

/* ============================================
   Модальное окно
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.modal[hidden] {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.modal__content {
  position: relative;
  width: min(92vw, 900px);
  max-height: 90vh;
  padding: 1rem;
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

/* ============================================
   Страница рейтинга прохождения
   ============================================ */

.page-game-rating {
  --container: 1360px;
}

.rating-board {
  padding: 1.75rem 1.75rem 1.85rem;
  background: #fff;
  border: 1px solid rgba(198, 161, 74, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.rating-board__head {
  margin-bottom: 1.5rem;
}

.rating-board__title {
  margin: 0;
  color: #111111;
}

.rating-board__grid {
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.rating-me,
.rating-leaders {
  min-width: 0;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid rgba(198, 161, 74, 0.22);
  border-radius: var(--radius-md);
  background: #fffdf8;
}

.rating-me__title,
.rating-leaders__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: #111111;
}

.rating-me__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rating-me__place {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: var(--gold-hover);
}

.rating-me__person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 7rem;
  text-align: center;
}

.rating-me__avatar {
  width: 88px;
  height: 88px;
}

.rating-me__avatar,
.rating-podium__avatar,
.rating-table__avatar {
  flex-shrink: 0;
  max-width: none;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid rgba(198, 161, 74, 0.45);
  background: #f4ead0;
}

.rating-me__avatar--empty,
.rating-podium__avatar--empty,
.rating-table__avatar--empty {
  display: inline-block;
  background: linear-gradient(135deg, #f4ead0, #e8d7a8);
}

.rating-me__name {
  margin: 0;
  max-width: 10rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111111;
  overflow-wrap: anywhere;
}

.rating-me__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.rating-me__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.7rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 161, 74, 0.28);
  background: #fff;
  text-align: center;
}

.rating-me__stat-icon {
  color: var(--gold-hover);
}

.rating-me__stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  color: #111111;
}

.rating-me__stat span:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rating-me__gap {
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(198, 161, 74, 0.12);
}

.rating-me__gap-text {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #111111;
}

.rating-me__meter {
  height: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(198, 161, 74, 0.18);
}

.rating-me__meter-bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--gold-color);
  transition: width 400ms ease;
}

.rating-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.rating-tabs__btn {
  min-height: 2.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(198, 161, 74, 0.45);
  border-radius: var(--radius-full);
  background: #fff;
  color: #111111;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.rating-tabs__btn:hover {
  border-color: var(--gold-hover);
  color: var(--gold-hover);
}

.rating-tabs__btn.is-active {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: #fff;
}

.rating-podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: end;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.rating-podium__place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  text-align: center;
}

.rating-podium__place--1 { grid-column: 2; }
.rating-podium__place--2 { grid-column: 1; grid-row: 1; }
.rating-podium__place--3 { grid-column: 3; grid-row: 1; }

.rating-podium__medal {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: var(--radius-full);
  background: #c0c7d1;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.rating-podium__place--1 .rating-podium__medal { background: var(--gold-color); }
.rating-podium__place--2 .rating-podium__medal { background: #b8b8b8; }
.rating-podium__place--3 .rating-podium__medal { background: #c0894a; }

.rating-podium__avatar-wrap {
  display: grid;
  place-items: center;
}

.rating-podium__place--1 .rating-podium__avatar {
  width: 88px;
  height: 88px;
  border-width: 3px;
  border-color: var(--gold-color);
}

.rating-podium__place--2 .rating-podium__avatar,
.rating-podium__place--3 .rating-podium__avatar {
  width: 68px;
  height: 68px;
}

.rating-podium__name,
.rating-podium__score {
  margin: 0;
  max-width: 100%;
}

.rating-podium__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #111111;
  white-space: nowrap;
}

.rating-podium__score {
  font-size: 0.8rem;
  color: var(--gold-hover);
  font-weight: 600;
}

.rating-table-wrap {
  overflow-x: auto;
}

.rating-table {
  width: 100%;
  min-width: 52rem;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rating-table th,
.rating-table td {
  padding: 0.7rem 0.7rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid rgba(198, 161, 74, 0.18);
  color: #111111;
}

.rating-table th:nth-child(1),
.rating-table td:nth-child(1) {
  width: 4.75rem;
}

.rating-table th:nth-child(2),
.rating-table td:nth-child(2) {
  width: 46%;
  min-width: 16rem;
  text-align: left;
  padding-left: 1rem;
}

.rating-table th:nth-child(n + 3),
.rating-table td:nth-child(n + 3) {
  width: 8.5rem;
}

.rating-table th {
  font-size: 0.78rem;
  font-weight: 600;
  color: #111111;
}

.rating-table tr.is-you {
  background: var(--gold-soft);
}

.rating-table__person {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.rating-table__person span {
  white-space: nowrap;
}

.rating-table__avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.rating-empty {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

.rating-leaders__more {
  width: 100%;
  margin-top: 1rem;
}

.page-game-rating .rating-board__title,
.page-game-rating .rating-me__title,
.page-game-rating .rating-leaders__title {
  color: #111111;
}

/* ============================================
   Placeholder для отсутствующих изображений
   ============================================ */

img[src*="assets/images/"]:not(.header__logo-img):not(.hero__image):not(.rating-me__avatar):not(.rating-podium__avatar):not(.rating-table__avatar) {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* ============================================
   Адаптивность
   ============================================ */

@media (max-width: 1100px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .sitemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .header__logo-text {
    font-size: 1.3rem;
  }

  .profile-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-card__actions,
  .profile-card__meta {
    justify-content: center;
  }

  .profile-dashboard {
    grid-template-columns: 1fr;
  }

  .game-achv-grid,
  .game-spec-grid,
  .game-bldg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-board__grid {
    grid-template-columns: 1fr;
  }

  .hero__grid,
  .game-section__inner,
  .contacts__grid,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-game-mechanics .code-gallery {
    grid-template-columns: 1fr;
    width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 84px;
  }

  .header__logo {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header__logo-img {
    height: 64px;
    max-width: 160px;
  }

  .header__logo-text {
    max-width: 10.5rem;
    font-size: 1.05rem;
    white-space: normal;
  }

  body {
    background-attachment: scroll;
  }

  .hero__title {
    font-size: clamp(1.25rem, 7.2vw, 2rem);
    white-space: normal;
  }

  .hero__content,
  .hero__text {
    max-width: none;
  }

  .hero__text {
    font-size: 1rem;
  }

  .hero__visual {
    min-width: 0;
  }

  .hero__image {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .features__icon-image--lg,
  .features__icon-image--contain {
    width: 100%;
    height: 200px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: top;
    background: transparent;
  }

  .features__icon-image--center {
    object-position: center;
  }

  .features__link--image-only .features__title,
  .features__text {
    overflow-wrap: anywhere;
  }

  .cards-grid--team {
    max-width: 22rem;
    margin-inline: auto;
  }

  .card--team .card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .card--team .card__title,
  .card--team .card__text {
    overflow-wrap: anywhere;
  }

  .contacts__link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .contacts .social .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .modal--guest-game .modal__content--auth {
    width: min(92vw, 38rem);
    padding: 2rem 1.15rem 1.5rem;
  }

  .guest-game-modal__title {
    font-size: 1.05rem;
  }

  .guest-game-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .guest-game-actions .btn {
    width: auto;
    min-width: 13.5rem;
    max-width: 100%;
    min-height: 0;
    padding: 0.38rem 1.1rem;
    font-size: 1.2rem;
  }

  .profile-modal__layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .profile-card__actions {
    justify-content: center;
  }

  .profile-avatar__img,
  .profile-avatar__placeholder {
    width: 140px;
    height: 140px;
  }

  .profile-achievements__grid,
  .profile-game-grid,
  .profile-form__grid,
  .game-achv-grid,
  .game-spec-grid,
  .game-bldg-grid {
    grid-template-columns: 1fr;
  }

  .rating-board {
    padding: 1.1rem 0.75rem 1.2rem;
  }

  .rating-me,
  .rating-leaders {
    padding: 0.95rem 0.8rem 1rem;
  }

  .rating-me__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
  }

  .rating-me__person {
    min-width: 0;
    width: 100%;
  }

  .rating-me__avatar,
  .rating-me__avatar--empty {
    width: 80px;
    height: 80px;
  }

  .rating-me__name {
    max-width: 16rem;
  }

  .rating-me__place {
    font-size: 1.55rem;
  }

  .rating-me__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .rating-me__stat {
    min-width: 0;
    padding: 0.6rem 0.25rem;
  }

  .rating-me__stat span:last-child {
    overflow-wrap: anywhere;
  }

  .rating-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .rating-tabs__btn {
    width: 100%;
    min-height: 2.55rem;
  }

  .rating-podium {
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 0.4rem;
    align-items: start;
  }

  .rating-podium__place--1 {
    grid-column: 2;
    grid-row: 1;
  }

  .rating-podium__place--2 {
    grid-column: 1;
    grid-row: 1;
  }

  .rating-podium__place--3 {
    grid-column: 3;
    grid-row: 1;
  }

  .rating-podium__place--1 .rating-podium__avatar {
    width: 72px;
    height: 72px;
  }

  .rating-podium__place--2 .rating-podium__avatar,
  .rating-podium__place--3 .rating-podium__avatar {
    width: 58px;
    height: 58px;
  }

  .rating-podium__name,
  .rating-podium__score {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .rating-table-wrap {
    overflow-x: visible;
  }

  .rating-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .rating-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .rating-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .rating-table tr {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.55rem;
    padding: 0.7rem 0.6rem;
    border: 1px solid rgba(198, 161, 74, 0.22);
    border-radius: var(--radius-sm);
    background: #fff;
  }

  .rating-table tr.is-you {
    background: var(--gold-soft);
  }

  .rating-table th,
  .rating-table td {
    width: auto;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    white-space: normal;
    text-align: left;
    vertical-align: middle;
  }

  .rating-table td:nth-child(1) {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold-hover);
    text-align: center;
  }

  .rating-table td:nth-child(n + 3):not(:last-child) {
    display: none;
  }

  .rating-table td:last-child {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
  }

  .rating-table td:last-child::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
  }

  .rating-table__person {
    gap: 0.55rem;
  }

  .rating-table__person span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }

  .rating-table__avatar,
  .rating-table__avatar--empty {
    width: 36px;
    height: 36px;
  }

  .profile-card__photo-wrap,
  .profile-card__photo,
  .profile-card__photo-placeholder {
    width: 132px;
    height: 132px;
    max-width: 132px;
    flex-shrink: 0;
  }

  .game-achv-board {
    padding: 1.2rem 1rem 1.35rem;
  }

  .game-achv-board__head {
    flex-direction: column;
    align-items: stretch;
  }

  .game-achv-board__progress {
    text-align: left;
    min-width: 0;
  }

  .profile-fold__toggle {
    width: 100%;
  }

  .profile-fold-bar .profile-fold__toggle {
    width: auto;
    flex: 1 1 9rem;
  }

  .profile-password-form__submit {
    width: 100%;
    justify-content: center;
  }

  .profile-game-block--wide {
    grid-column: auto;
  }

  .section {
    padding: 3.5rem 0;
  }

  .page-game-mechanics main > .section,
  .page-game-testing main > .section,
  .page-info main > .section,
  .page-campus-tour main > .section,
  .page-about-us-known main > .section,
  .page-achievements main > .section,
  .page-assistants main > .section,
  .page-profile main > .section,
  .page-news main > .section,
  .page-news-article main > .section {
    padding-top: 1.25rem;
  }

  .game-test-frame {
    aspect-ratio: 4 / 5;
    min-height: 18rem;
    max-height: none;
  }

  .hero {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
  }

  .section--about {
    padding-top: 0.25rem;
    padding-bottom: 2.5rem;
  }

  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .cards-grid--team {
    grid-template-columns: 1fr;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav__link {
    display: block;
    padding: 0.75rem 0;
  }

  .nav__actions {
    flex-direction: column;
  }

  .nav__actions .btn {
    width: 100%;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .header__logo-text {
    max-width: 8.6rem;
    white-space: normal;
    font-size: 1rem;
  }

  .rating-me__avatar,
  .rating-me__avatar--empty {
    width: 72px;
    height: 72px;
  }

  .rating-podium__place--1 .rating-podium__avatar {
    width: 64px;
    height: 64px;
  }

  .rating-podium__place--2 .rating-podium__avatar,
  .rating-podium__place--3 .rating-podium__avatar {
    width: 52px;
    height: 52px;
  }

  .rating-table tr {
    column-gap: 0.4rem;
    padding: 0.65rem 0.5rem;
  }

  .profile-card__photo-wrap,
  .profile-card__photo,
  .profile-card__photo-placeholder {
    width: 116px;
    height: 116px;
    max-width: 116px;
  }
}
