.auth-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.auth-login {
  position: relative;
  z-index: 1;
  border-color: rgba(88, 197, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(17, 33, 49, 0.95), rgba(5, 12, 22, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.auth-login:hover {
  color: var(--text-bright);
  transform: none;
  border-color: rgba(137, 229, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(22, 44, 67, 0.98), rgba(7, 16, 29, 0.95));
  box-shadow:
    0 0 0 1px rgba(155, 238, 255, 0.1),
    0 0 24px rgba(72, 207, 255, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.user-box {
  position: relative;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 4px;
  border: 1px solid rgba(88, 197, 255, 0.32);
  background: rgba(8, 18, 32, 0.92);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(88, 197, 255, 0.08),
    0 0 22px rgba(88, 197, 255, 0.12);
  cursor: pointer;
}

.avatar-button img,
.user-menu__head img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(88, 197, 255, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(87, 196, 255, 0.08), transparent 38%),
    rgba(3, 10, 18, 0.98);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(88, 197, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 25;
}

.dark-settings {
  border-color: rgba(88, 197, 255, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 197, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(7, 15, 27, 0.98), rgba(1, 5, 12, 0.98));
}

.user-menu__head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(88, 197, 255, 0.12);
}

.dark-settings__hero {
  padding: 0 0 18px;
}

.dark-settings__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(143, 231, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.user-menu__head img {
  width: 56px;
  height: 56px;
  padding: 4px;
  border: 1px solid rgba(88, 197, 255, 0.2);
  background: rgba(8, 18, 32, 0.84);
}

.user-menu__head strong,
.user-menu__head span,
.skin-form label,
.auth-form label,
.auth-panel h2,
.auth-tab,
.auth-message {
  color: var(--text-main);
}

.user-menu__head span {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.skin-form,
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skin-form {
  gap: 12px;
}

.dark-settings__section {
  padding: 16px;
  border: 1px solid rgba(88, 197, 255, 0.14);
  border-radius: 18px;
  background: rgba(9, 20, 35, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.skin-form input,
.auth-form input {
  padding: 12px 14px;
  border: 1px solid rgba(88, 197, 255, 0.18);
  color: var(--text-bright);
  font: inherit;
  background: rgba(8, 18, 31, 0.72);
  outline: none;
  border-radius: 14px;
}

.skin-form input:focus,
.auth-form input:focus {
  border-color: rgba(137, 229, 255, 0.52);
  box-shadow: 0 0 0 1px rgba(137, 229, 255, 0.16);
}

.user-menu__button,
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(137, 229, 255, 0.5);
  color: #031019;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #9beeff 0%, #48cfff 100%);
  cursor: pointer;
  border-radius: 16px;
}

.user-menu__button--ghost {
  color: var(--text-main);
  background: rgba(8, 18, 31, 0.92);
  border-color: rgba(88, 197, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dark-settings__logout {
  margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(13, 26, 43, 0.98), rgba(6, 13, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 22px rgba(0, 0, 0, 0.2);
}

.auth-modal[hidden],
.user-box[hidden],
.user-menu[hidden] {
  display: none !important;
}

.auth-entry > [hidden],
.auth-entry .action-button[hidden],
.site-header .auth-entry > [hidden] {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: authOverlayFade 0.28s ease;
}

@media (max-width: 600px) {
  .auth-modal {
    align-items: flex-start;
    padding: 12px;
  }
  .auth-modal__dialog {
    padding: 22px 16px !important;
    padding-top: 64px !important;
    border-radius: 18px !important;
    max-width: 100% !important;
    margin: 0 auto;
  }
  .auth-modal__close {
    top: 12px !important;
    right: 12px !important;
    width: 38px !important;
    height: 38px !important;
  }
  .auth-modal__tabs {
    gap: 8px;
    margin-bottom: 18px;
  }
  .auth-tab {
    padding: 12px 10px;
    font-size: 13px;
  }
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.auth-modal__dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  padding-top: 78px;
  overflow: hidden;
  border: 1px solid rgba(88, 197, 255, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(87, 196, 255, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(7, 15, 27, 0.98), rgba(1, 5, 12, 0.98));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.48),
    0 0 36px rgba(88, 197, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 1;
  animation: authDialogIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 197, 255, 0.22);
  border-radius: 14px;
  color: var(--text-main);
  line-height: 1;
  background: rgba(8, 18, 31, 0.92);
  cursor: pointer;
}

.auth-modal__tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 16px 18px;
  border: 1px solid rgba(88, 197, 255, 0.2);
  border-radius: 18px;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(8, 18, 31, 0.78);
  cursor: pointer;
}

.auth-tab.is-active {
  color: #02121a;
  border-color: rgba(137, 229, 255, 0.7);
  background: linear-gradient(180deg, #9beeff 0%, #56d4ff 100%);
  box-shadow:
    0 0 0 1px rgba(155, 238, 255, 0.16),
    0 0 24px rgba(72, 207, 255, 0.18);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-panel h2 {
  margin-bottom: 18px;
  color: var(--text-bright);
  font-size: 1.55rem;
  text-align: center;
  text-transform: uppercase;
}

.auth-message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.92rem;
  text-align: center;
}

.auth-form label {
  margin-top: 6px;
  margin-bottom: 2px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.auth-form input {
  min-height: 48px;
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(9, 20, 35, 0.82);
}

.auth-submit,
.auth-modal__close,
.auth-tab,
.user-menu__button,
.avatar-button {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.auth-submit:hover,
.user-menu__button:hover,
.avatar-button:hover,
.auth-modal__close:hover {
  transform: none;
  box-shadow:
    0 0 0 1px rgba(155, 238, 255, 0.14),
    0 0 20px rgba(72, 207, 255, 0.16);
}

.auth-submit {
  min-height: 52px;
  border-radius: 16px;
  margin-top: 14px;
  box-shadow:
    0 0 0 1px rgba(155, 238, 255, 0.12),
    0 14px 30px rgba(0, 0, 0, 0.28);
}

.skin-form .user-menu__button {
  margin-top: 2px;
}

#logout-button {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .auth-entry {
    justify-content: center;
  }

  .auth-entry .action-button,
  .auth-entry .user-box {
    width: 100%;
  }

  .avatar-button {
    width: 100%;
    max-width: 160px;
    height: 60px;
    margin: 0 auto;
  }

  .user-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Horror auth overrides */
.auth-login {
  border-color: rgba(129, 25, 39, 0.42);
  background: linear-gradient(180deg, rgba(23, 10, 15, 0.96), rgba(8, 4, 7, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.auth-login:hover {
  border-color: rgba(178, 40, 63, 0.62);
  background: linear-gradient(180deg, rgba(36, 11, 18, 0.98), rgba(10, 4, 8, 0.96));
  box-shadow:
    0 0 0 1px rgba(139, 24, 42, 0.1),
    0 0 22px rgba(88, 9, 23, 0.16),
    0 18px 34px rgba(0, 0, 0, 0.38);
}

.avatar-button,
.user-menu__head img {
  border-color: rgba(129, 25, 39, 0.3);
  background: rgba(18, 10, 14, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(129, 25, 39, 0.08),
    0 0 22px rgba(88, 9, 23, 0.12);
}

.dark-settings,
.auth-modal__dialog {
  border-color: rgba(129, 25, 39, 0.24);
  background:
    radial-gradient(circle at top, rgba(108, 10, 26, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(13, 9, 13, 0.98), rgba(4, 3, 5, 0.99));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.46),
    0 0 34px rgba(88, 9, 23, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dark-settings__eyebrow,
.user-menu__head span,
.auth-message {
  color: #b36b7b;
}

.dark-settings__section {
  border-color: rgba(129, 25, 39, 0.16);
  background: rgba(18, 10, 14, 0.72);
}

.skin-form input,
.auth-form input {
  border-color: rgba(129, 25, 39, 0.18);
  background: rgba(15, 8, 12, 0.84);
}

.skin-form input:focus,
.auth-form input:focus {
  border-color: rgba(178, 40, 63, 0.4);
  box-shadow: 0 0 0 1px rgba(139, 24, 42, 0.14);
}

.auth-tab {
  border-color: rgba(129, 25, 39, 0.2);
  background: rgba(18, 10, 14, 0.8);
}

.auth-tab.is-active {
  color: #f9edf0;
  border-color: rgba(178, 40, 63, 0.58);
  background: linear-gradient(180deg, #66101d 0%, #2a070e 100%);
  box-shadow:
    0 0 0 1px rgba(148, 31, 50, 0.16),
    0 0 22px rgba(82, 9, 20, 0.14);
}

.user-menu__button,
.auth-submit {
  color: #ffeef2;
  border-color: rgba(148, 31, 50, 0.5);
  background: linear-gradient(180deg, #64101d 0%, #29070e 100%);
}

.user-menu__button--ghost,
.dark-settings__logout {
  color: #dcc9cf;
  border-color: rgba(129, 25, 39, 0.22);
  background: linear-gradient(180deg, rgba(21, 10, 15, 0.98), rgba(8, 4, 7, 0.98));
}

.auth-submit:hover,
.user-menu__button:hover,
.avatar-button:hover,
.auth-modal__close:hover {
  box-shadow:
    0 0 0 1px rgba(148, 31, 50, 0.14),
    0 0 20px rgba(82, 9, 20, 0.16);
}

.auth-modal__close {
  border-color: rgba(129, 25, 39, 0.24);
  background: rgba(18, 10, 14, 0.94);
}

/* Auth redesign */
.auth-modal__dialog {
  width: min(960px, calc(100% - 24px));
  padding: 22px;
  padding-top: 22px;
  border-radius: 30px;
  overflow: hidden;
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
  align-items: stretch;
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  min-height: 100%;
  padding: 28px 24px;
  overflow: hidden;
  border: 1px solid rgba(129, 25, 39, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(124, 18, 35, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 10, 14, 0.96), rgba(7, 4, 7, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.24);
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(176, 39, 62, 0.72), transparent);
}

.auth-story__tag {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(129, 25, 39, 0.26);
  border-radius: 999px;
  color: #d48c9b;
  background: rgba(43, 12, 18, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-story__title {
  color: var(--text-bright);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.auth-story__lead {
  margin-top: 0;
  color: rgba(226, 214, 218, 0.78);
  line-height: 1.8;
  font-size: 1rem;
}

.auth-story__notes {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.auth-story__notes div {
  padding: 14px 14px 13px;
  border: 1px solid rgba(129, 25, 39, 0.14);
  border-radius: 16px;
  background: rgba(15, 8, 12, 0.78);
}

.auth-story__notes strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-bright);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-story__notes span {
  color: rgba(214, 196, 202, 0.72);
  line-height: 1.65;
  font-size: 0.94rem;
}

.auth-workspace {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(129, 25, 39, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(14, 8, 12, 0.98), rgba(5, 3, 5, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.2);
}

.auth-story {
  animation: authStoryFloat 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal__tabs {
  padding: 6px;
  border: 1px solid rgba(129, 25, 39, 0.14);
  border-radius: 20px;
  background: rgba(21, 10, 15, 0.76);
}

.auth-tab {
  min-height: 52px;
  border-radius: 14px;
  border-color: transparent;
  color: rgba(222, 201, 207, 0.74);
  background: transparent;
  transform: translateY(0);
  transition:
    color 0.28s ease,
    background 0.32s ease,
    border-color 0.28s ease,
    box-shadow 0.32s ease,
    transform 0.28s ease;
}

.auth-tab.is-active {
  color: #fff2f5;
  border-color: rgba(176, 39, 62, 0.5);
  background: linear-gradient(180deg, #731322 0%, #320811 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.auth-tab:hover {
  color: #f5dbe2;
  transform: translateY(-1px);
  border-color: rgba(129, 25, 39, 0.24);
  background: rgba(34, 12, 18, 0.42);
}

.auth-tab.is-active:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 26px rgba(0, 0, 0, 0.26),
    0 0 22px rgba(82, 9, 20, 0.12);
}

.auth-panel {
  display: none;
  padding: 22px 8px 0;
  animation: authPanelFade 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-panel.is-active {
  display: block;
}

.auth-panel__header {
  margin-bottom: 18px;
}

.auth-panel__eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #c37686;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-panel h2 {
  margin-bottom: 10px;
  text-align: left;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1;
}

.auth-panel__header p {
  color: rgba(220, 210, 215, 0.72);
  line-height: 1.75;
  font-size: 0.98rem;
}

.auth-form {
  gap: 12px;
}

.auth-form label {
  margin-top: 0;
  margin-bottom: 0;
  color: #d8b5be;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(129, 25, 39, 0.18);
  border-radius: 16px;
  background: rgba(14, 7, 11, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.auth-form input::placeholder {
  color: rgba(180, 139, 148, 0.42);
}

.auth-field {
  position: relative;
  width: 100%;
}

.auth-field--password input {
  padding-right: 102px;
}

.auth-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid rgba(129, 25, 39, 0.24);
  border-radius: 12px;
  color: #e4c8cf;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(37, 13, 19, 0.84);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease,
    box-shadow 0.24s ease;
}

.auth-toggle:hover {
  border-color: rgba(176, 39, 62, 0.34);
  color: #fff0f4;
  background: rgba(54, 14, 22, 0.92);
  box-shadow: 0 0 18px rgba(82, 9, 20, 0.12);
}

.auth-toggle.is-active {
  border-color: rgba(176, 39, 62, 0.42);
  color: #fff1f5;
  background: linear-gradient(180deg, rgba(117, 23, 39, 0.92), rgba(51, 9, 18, 0.96));
}

.auth-link {
  align-self: center;
  margin-top: 4px;
  padding: 0;
  border: 0;
  color: #c37a89;
  font: inherit;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

.auth-link:hover {
  color: #f0d5dc;
  text-shadow: 0 0 14px rgba(82, 9, 20, 0.16);
}

.auth-submit {
  min-height: 56px;
  margin-top: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, #7e1727 0%, #360913 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 32px rgba(0, 0, 0, 0.3);
}

.auth-submit:hover {
  background: linear-gradient(180deg, #8d1b2d 0%, #430b17 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 34px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(82, 9, 20, 0.12);
}

.auth-message {
  min-height: 24px;
  margin-top: 16px;
  padding: 12px 14px 4px;
  text-align: left;
  color: #c37a89;
}

.auth-modal__close {
  top: 18px;
  right: 18px;
  z-index: 2;
}

@keyframes authOverlayFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes authDialogIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes authPanelFade {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 900px) {
  .auth-modal__dialog {
    width: min(560px, calc(100% - 20px));
    padding: 16px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-story {
    padding: 22px 18px;
  }

  .auth-workspace {
    padding: 14px;
  }

  .auth-panel {
    padding: 18px 2px 0;
  }

  .auth-modal__close {
    top: 14px;
    right: 14px;
  }
}

/* Header auth redesign */
.auth-login {
  min-width: 150px;
  border-radius: 16px;
  border-color: rgba(148, 31, 50, 0.32);
  color: #f3e6e9;
  letter-spacing: 0.16em;
  background:
    linear-gradient(180deg, rgba(35, 12, 18, 0.98), rgba(12, 5, 8, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(148, 31, 50, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.auth-login:hover {
  color: #fff5f7;
  border-color: rgba(179, 44, 66, 0.52);
  background:
    linear-gradient(180deg, rgba(55, 16, 26, 0.98), rgba(18, 7, 11, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(82, 9, 20, 0.16);
}

.avatar-button {
  width: 58px;
  height: 58px;
  padding: 5px;
  border-radius: 18px;
  border-color: rgba(148, 31, 50, 0.32);
  background: linear-gradient(180deg, rgba(33, 12, 18, 0.98), rgba(11, 5, 8, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(148, 31, 50, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.avatar-button:hover {
  border-color: rgba(179, 44, 66, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(82, 9, 20, 0.14);
}

@media (max-width: 900px) {
  .auth-login {
    min-width: 0;
    width: 100%;
  }

  .site-header .auth-entry {
    justify-content: center;
  }

  .site-header .auth-entry .user-box {
    display: flex;
    justify-content: center;
    width: auto;
  }

  .avatar-button {
    width: 100%;
    max-width: none;
    height: 58px;
  }

  .site-header .avatar-button {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 58px;
    margin: 0 auto;
    padding: 5px;
    border-radius: 18px;
    align-self: center;
    flex: 0 0 58px;
  }
}

/* Hide the site header while the login modal is open */
body.modal-open:not(.update-modal-open) .site-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================
   Login modal — left panel: "what awaits you" feature highlights
   (scoped to #auth-modal so other modals are unaffected)
   ============================================================ */
#auth-modal .auth-story--brand {
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

#auth-modal .auth-story--brand .auth-story__title {
  margin-bottom: 4px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

#auth-modal .auth-feats {
  display: grid;
  gap: 12px;
}

#auth-modal .auth-feat {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid rgba(129, 25, 39, 0.16);
  border-radius: 16px;
  background: rgba(15, 8, 12, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

#auth-modal .auth-feat:hover {
  transform: translateX(3px);
  border-color: rgba(176, 39, 62, 0.36);
  background: rgba(28, 11, 16, 0.82);
}

#auth-modal .auth-feat__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(176, 39, 62, 0.3);
  border-radius: 13px;
  color: #e6a6b2;
  background:
    radial-gradient(circle at 50% 30%, rgba(143, 24, 44, 0.5), transparent 65%),
    linear-gradient(180deg, rgba(40, 13, 19, 0.95), rgba(12, 6, 9, 0.98));
  box-shadow: inset 0 0 14px rgba(173, 42, 64, 0.22);
}

#auth-modal .auth-feat__icon svg {
  width: 23px;
  height: 23px;
}

#auth-modal .auth-feat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-bright);
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

#auth-modal .auth-feat span {
  color: rgba(214, 196, 202, 0.74);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* forgot-password as a link */
a.auth-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* "Забыли пароль?" — support link styled as a soft button */
#auth-modal .auth-forgot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  align-self: center;
  margin-top: 6px;
  padding: 11px 18px;
  border: 1px solid rgba(129, 25, 39, 0.28);
  border-radius: 14px;
  color: #d8b5be;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: rgba(21, 10, 15, 0.7);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

#auth-modal .auth-forgot:hover {
  color: #fff2f5;
  border-color: rgba(88, 101, 242, 0.6);
  background: rgba(36, 16, 22, 0.85);
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.22);
}

#auth-modal .auth-forgot__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #8b93f0;
}
