.site-header {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    var(--chrome-bg);
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
  box-shadow:
    0 22px 56px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 1px 0 rgba(225, 38, 47, 0.08);
}

:root[data-theme="dark"] .site-header {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(22, 22, 22, 0.82), rgba(5, 5, 5, 0.56)),
    var(--chrome-bg);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 0 rgba(225, 38, 47, 0.08);
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56)),
    var(--chrome-bg);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  box-shadow:
    0 -18px 46px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

:root[data-theme="dark"] footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(22, 22, 22, 0.8), rgba(5, 5, 5, 0.58)),
    var(--chrome-bg);
  box-shadow:
    0 -18px 46px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-header .container {
  width: 100%;
  padding-inline: 26px;
}

.header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 136px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-logo-dark,
:root[data-theme="dark"] .brand-logo-light {
  display: none;
}

:root[data-theme="dark"] .brand-logo-dark {
  display: block;
}

.header-title {
  flex: 1;
  min-width: 180px;
}

.header-title strong {
  display: block;
  color: var(--chrome-text);
  font-size: 16px;
  line-height: 1.2;
}

.header-title span {
  display: block;
  color: var(--chrome-muted, var(--muted));
  font-size: 12px;
  line-height: 1.3;
}

.nav-actions,
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-action-button,
.auth-button {
  min-height: 40px;
  border-radius: 999px;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(225, 38, 47, 0.16);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(225, 38, 47, 0.24);
  filter: saturate(1.08) brightness(1.03);
}

.auth-button:active:not(:disabled),
.auth-button.is-pressed:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(90, 12, 12, 0.28);
}

.auth-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex: 0 0 auto;
}

.nav-action-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(247, 247, 247, 0.82);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  backdrop-filter: blur(14px) saturate(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.16);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

.nav-action-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(242, 106, 33, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.nav-action-button:active:not(:disabled),
.nav-action-button.is-pressed:not(:disabled) {
  transform: translateY(0) scale(0.96);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.14);
}

.nav-action-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex: 0 0 auto;
}

:root[data-theme="dark"] .nav-action-button {
  background: rgba(17, 17, 17, 0.82);
}

:root[data-theme="dark"] .nav-action-button:hover:not(:disabled) {
  background: rgba(17, 17, 17, 0.94);
}

@media (max-width: 820px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    margin-top: 8px;
    border-radius: 24px;
  }

  .site-header .container {
    padding-inline: 14px;
  }

  .header-inner {
    min-height: 0;
    display: flex;
    gap: 6px 10px;
    padding: 8px 5px;
  }

  .brand-block {
    flex-direction: row;
    justify-content: flex-start;
    width: auto;
    flex: 1;
  }

  .brand-logo {
    width: 104px;
  }

  .header-title {
    min-width: 0;
    width: auto;
  }

  .header-title strong,
  .header-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-title strong {
    font-size: 14px;
  }

  .header-title span {
    font-size: 11px;
  }

  .nav-actions,
  .actions {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    padding-inline: 12px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 7px 12px 8px;
  }

  .brand-block {
    display: contents;
  }

  .brand-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    width: 116px;
  }

  .nav-actions,
  .actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: auto;
  }

  .header-title {
    grid-column: 1 / -1;
    grid-row: 2;
    display: block;
    width: 100%;
    min-width: 0;
    padding-top: 5px;
    border-top: 1px solid rgba(225, 38, 47, 0.12);
    text-align: center;
  }

  .header-title strong,
  .header-title span {
    display: inline;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .header-title strong::after {
    content: " ";
  }

  .auth-button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    gap: 0;
  }

  .auth-button span {
    display: none;
  }

  .auth-button svg {
    width: 19px;
    height: 19px;
  }
}
