:root {
  --bg: #030706;
  --bg-soft: rgba(6, 14, 12, 0.86);
  --panel: rgba(5, 15, 13, 0.76);
  --panel-strong: rgba(4, 11, 10, 0.94);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4fbfb;
  --muted: #b3c5c7;
  --muted-2: #789095;
  --cyan: #12c99b;
  --cyan-2: #08705d;
  --green: #7fdc6a;
  --amber: #ffc24b;
  --red: #ff5d57;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --header-h: 78px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #020404;
}

.site-bg::before,
.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-bg::before {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 35%, rgba(18, 201, 155, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(1, 12, 9, 0.34) 42%, rgba(0, 0, 0, 0.9)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(1, 20, 15, 0.18) 48%, rgba(0, 0, 0, 0.74));
}

.site-bg::after {
  z-index: 3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.32;
}

.site-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  filter: saturate(0.82) contrast(1.08) brightness(0.74);
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 8, 0.74);
  backdrop-filter: blur(18px);
}

.site-header__inner,
.site-footer__inner,
.wrap {
  width: calc(100% - 36px);
  max-width: 1180px;
  margin-inline: auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(18, 201, 155, 0.34));
}

.brand__text {
  display: grid;
  line-height: 1.05;
}

.brand__name {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand__sub {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.nav-link,
.dropdown__button,
.auth-button,
.profile-chip,
.mobile-toggle,
.button,
.icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.nav-link,
.dropdown__button {
  padding: 10px 13px;
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown:hover .dropdown__button,
.dropdown__button:focus-visible {
  border-color: rgba(18, 201, 155, 0.28);
  background: rgba(18, 201, 155, 0.08);
  color: var(--text);
}

.dropdown {
  position: relative;
}

.dropdown__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dropdown__button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.dropdown__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.dropdown__menu a:hover,
.dropdown__menu a.is-active {
  background: rgba(18, 201, 155, 0.1);
  color: var(--text);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.profile-menu {
  position: relative;
}

.auth-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-color: rgba(18, 201, 155, 0.42);
  background: rgba(18, 201, 155, 0.11);
  color: #f7ffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover,
.auth-button:hover,
.profile-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 201, 155, 0.72);
  background: rgba(18, 201, 155, 0.17);
}

.button--solid {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #041010;
}

.button--danger {
  border-color: rgba(255, 93, 87, 0.42);
  background: rgba(255, 93, 87, 0.12);
}

.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button:disabled,
.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  max-width: 230px;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.profile-chip[aria-expanded="true"] {
  border-color: rgba(18, 201, 155, 0.72);
  background: rgba(18, 201, 155, 0.15);
}

.profile-chip__avatar,
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(18, 201, 155, 0.42);
  background: #061010;
}

.profile-chip__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip__chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.8;
  transform: rotate(45deg) translateY(-2px);
}

.profile-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.profile-menu.is-open .profile-menu__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-menu__dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
}

.profile-menu__dropdown a:hover,
.profile-menu__dropdown a:focus-visible {
  background: rgba(18, 201, 155, 0.1);
  color: var(--text);
  outline: none;
}

.profile-menu__logout {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  color: #e05555;
  font-weight: 900;
  font-size: inherit;
  font-family: inherit;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.profile-menu__logout:hover,
.profile-menu__logout:focus-visible {
  background: rgba(224, 85, 85, 0.1);
  color: #ff6b6b;
  outline: none;
}

.mobile-toggle {
  display: none;
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

main {
  min-height: calc(100vh - var(--header-h));
}

.hero {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  padding: clamp(52px, 8vw, 96px) 0 clamp(38px, 7vw, 82px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: end;
  gap: clamp(28px, 7vw, 86px);
}

.eyebrow,
.section-kicker {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__logo {
  width: min(480px, 76vw);
  margin-bottom: 12px;
  filter: drop-shadow(0 30px 56px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 28px rgba(18, 201, 155, 0.24));
}

.hero h1,
.page-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.hero p,
.page-hero p,
.section-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.hero__actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.stats-panel {
  display: grid;
  gap: 12px;
}

.stat-card,
.content-card,
.rule-card,
.application-card,
.team-card,
.profile-panel,
.admin-box,
.empty-state,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stat-card {
  padding: 22px 22px 24px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.stat-card__label {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.stat-card__value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  font-weight: 950;
  color: var(--text);
}

.stat-card__sub {
  color: var(--muted);
  font-weight: 950;
  font-size: inherit;
  line-height: 1;
}

.page-hero {
  padding: clamp(72px, 12vw, 132px) 0 clamp(36px, 6vw, 68px);
}

.page-hero__inner {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.content-section {
  padding: clamp(36px, 6vw, 72px) 0;
}

.content-section--tight {
  padding-top: 12px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.content-card {
  padding: clamp(20px, 4vw, 34px);
  min-width: 0;
}

.content-card h3,
.rule-card h3,
.application-card h3,
.team-card h3,
.admin-box h3 {
  margin: 0 0 10px;
  line-height: 1.12;
}

.feature-list,
.rule-card ul,
.terms-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.feature-list li,
.rule-card li,
.terms-list li {
  margin: 7px 0;
}

.media-strip {
  min-height: 440px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.58)), url("../assets/images/image.png");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.rules-grid,
.application-grid,
.team-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule-card,
.application-card,
.team-card {
  padding: 20px;
}

.rule-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rule-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}


.rule-card__category,
.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(18, 201, 155, 0.32);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(18, 201, 155, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rule-card__new {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 214, 102, 0.45);
  border-radius: 6px;
  color: #ffe9a8;
  background: rgba(255, 194, 75, 0.14);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag--closed {
  border-color: rgba(255, 93, 87, 0.38);
  color: #ffc6c3;
  background: rgba(255, 93, 87, 0.1);
}

.tag--open {
  border-color: rgba(121, 216, 102, 0.38);
  color: #d6ffd0;
  background: rgba(121, 216, 102, 0.1);
}

.tag--locked {
  border-color: rgba(255, 194, 75, 0.38);
  color: #ffe4a2;
  background: rgba(255, 194, 75, 0.1);
}

.application-card {
  display: grid;
  gap: 14px;
}

.application-card p,
.team-card p,
.content-card p,
.notice p,
.empty-state p,
.admin-box p {
  color: var(--muted);
}

.application-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.application-card__actions {
  margin-top: auto;
}

.application-card__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.application-card--readonly .application-card__note strong {
  color: var(--cyan);
}

body[data-page="rules"] .rules-grid .rule-card,
body[data-page="applications"] .application-grid .application-card,
body[data-page="faq"] .faq-item {
  transition: outline 0.15s ease, outline-offset 0.15s ease;
}

body[data-page="rules"] .rules-grid .rule-card:hover,
body[data-page="applications"] .application-grid .application-card:hover,
body[data-page="faq"] .faq-item:hover {
  outline: 2px solid rgba(18, 201, 155, 0.9);
  outline-offset: 3px;
}

.faq-grid {
  display: grid;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.faq-item h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.faq-item a {
  color: var(--cyan);
  font-weight: 800;
}

.admin-row--clickable {
  grid-template-columns: 1fr;
  cursor: pointer;
}

.admin-row--clickable:hover {
  border-color: rgba(18, 201, 155, 0.35);
}

.team-card {
  min-height: 280px;
  display: grid;
  align-content: end;
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.88)),
    var(--team-image, url("../assets/images/logo.png"));
  background-position: center;
  background-size: cover;
  opacity: 0.92;
  z-index: -1;
}

.team-card__position {
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
}

.team-card__avatar {
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 2px solid rgba(18, 201, 155, 0.62);
  background: #061010;
  object-fit: cover;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.auth-required,
.notice,
.empty-state {
  padding: clamp(22px, 4vw, 34px);
}

.notice {
  margin-bottom: 18px;
  border-color: rgba(255, 194, 75, 0.32);
  background: rgba(26, 20, 9, 0.72);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-panel {
  padding: clamp(22px, 4vw, 34px);
}

.profile-identity {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.profile-identity .avatar {
  width: 92px;
  height: 92px;
}

.profile-identity h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.profile-list div {
  display: grid;
  gap: 3px;
}

.profile-list dt {
  color: var(--muted-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-tabs {
  display: grid;
  gap: 8px;
  position: sticky;
  top: calc(var(--header-h) + 18px);
}

.admin-tab {
  width: 100%;
  justify-content: flex-start;
}

.admin-tab.is-active {
  border-color: rgba(18, 201, 155, 0.55);
  background: rgba(18, 201, 155, 0.15);
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: grid;
  gap: 16px;
}

.admin-box {
  padding: 20px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-weight: 900;
  font-size: 0.86rem;
}

.form-help {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.92rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 108px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(18, 201, 155, 0.62);
  box-shadow: 0 0 0 3px rgba(18, 201, 155, 0.12);
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.admin-row strong {
  display: block;
}

.admin-row span {
  color: var(--muted);
}

.admin-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-row--submission {
  align-items: start;
}

.admin-row--submission .field {
  margin-top: 12px;
}

.submission-answers {
  display: grid;
  gap: 4px 12px;
  margin: 12px 0 0;
  color: var(--muted);
}

.submission-answers dt {
  color: var(--text);
  font-weight: 900;
}

.submission-answers dd {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.legal {
  max-width: 880px;
}

.legal h2 {
  margin-top: 34px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(1, 5, 4, 0.9);
  backdrop-filter: blur(18px);
}

.site-footer__inner {
  display: grid;
  gap: 24px;
  padding: 28px 0 18px;
  color: var(--muted);
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr);
  gap: clamp(28px, 8vw, 96px);
  align-items: start;
}

.footer-brand {
  max-width: 430px;
}

.footer-brand__head {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 950;
}

.footer-brand__head img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(18, 201, 155, 0.32));
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 430px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.2;
}

.footer-links a {
  width: fit-content;
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--cyan);
  outline: none;
}

.site-footer__bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 0.92rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.modal[hidden] {
  display: none !important;
}

.modal__panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal__head h2 {
  margin: 0;
}

.modal__body {
  padding: 18px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(18, 201, 155, 0.32);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 920px) {
  .site-header__inner {
    grid-template-columns: auto auto 1fr;
  }

  .mobile-toggle {
    display: inline-block;
    order: 2;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 16px 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 7, 8, 0.97);
  }

  body.menu-open .site-nav {
    display: flex;
  }

  .nav-link,
  .dropdown__button {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown__menu {
    position: static;
    min-width: 0;
    margin-top: 6px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.035);
  }

  .header-actions {
    justify-self: end;
    order: 3;
  }

  .brand {
    order: 1;
  }

  .hero__grid,
  .split,
  .profile-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-grid,
  .application-grid,
  .team-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 70px;
  }

  .site-header__inner,
  .site-footer__inner,
  .wrap {
    width: calc(100% - 24px);
  }

  .brand__text {
    display: none;
  }

  .brand__mark {
    width: 42px;
    height: 42px;
  }

  .profile-chip {
    max-width: 140px;
  }

  .profile-menu__dropdown {
    min-width: 164px;
    max-width: calc(100vw - 24px);
  }

  .auth-button {
    padding-inline: 12px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.2rem, 13vw, 3.7rem);
  }

  .rules-grid,
  .application-grid,
  .team-grid,
  .info-grid,
  .form-grid,
  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-row__actions {
    justify-content: flex-start;
  }

  .site-footer__inner {
    padding: 26px 0 18px;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
