.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;
}

.profile-card {
  margin: 28px 0 56px;
  background: #141820;
  border: 1px solid #2a3140;
  border-radius: 16px;
  padding: 28px 24px 32px;
}

.profile-card .kicker {
  color: #f5c518;
}

.profile-card h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.15;
}

.profile-card p {
  margin: 0;
  max-width: 62ch;
  color: #a7b0be;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.profile-actions .btn {
  border: 0;
  cursor: pointer;
}

body.auth-open { overflow: hidden; }

.auth-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: rgba(8, 10, 14, 0.78);
}

.auth-layer.is-open { display: flex; }

.auth-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(280px, 1fr);
  width: min(860px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  background: #fff;
  color: #1c212b;
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f5f8;
  color: #2a3140;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover,
.auth-close:focus-visible {
  background: #e6e9ee;
}

.auth-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 22px 22px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 78% 70%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(165deg, #ffd24a 0%, #f5c518 42%, #e3a90a 100%);
}

.auth-art img {
  width: 168px;
  height: auto;
  background: #0c0e12;
  border-radius: 8px;
}

.auth-art h2 {
  margin: 0;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.auth-art p {
  margin: 10px 0 0;
  max-width: 22ch;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.auth-panel {
  padding: 28px 26px 22px;
  background: #fff;
}

.auth-switch {
  margin: 0 36px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #3c4452;
}

.auth-switch button {
  border: 0;
  padding: 0;
  background: none;
  color: #e0a100;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-switch button:hover,
.auth-switch button:focus-visible {
  text-decoration: underline;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.auth-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: #eceff3;
  color: #66707c;
  padding: 12px 8px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  background: #f5c518;
  color: #1a1404;
}

.auth-field[hidden],
#pane-login[hidden],
#pane-register[hidden] {
  display: none !important;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid #e1e5ec;
  border-radius: 10px;
  background: #f7f8fa;
  padding: 0 12px;
}

.auth-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1c212b;
  padding: 14px 0;
  outline: none;
}

.auth-field input::placeholder { color: #8b95a3; }

.dial {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid #e1e5ec;
  color: #1c212b;
  font-weight: 700;
}

.flag {
  width: 18px;
  height: 12px;
  border-radius: 1px;
  background: linear-gradient(#ff9933 33%, #fff 33% 66%, #138808 66%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  flex: 0 0 auto;
}

.flag::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  border: 1px solid #1a3c8b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.auth-eye {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #66707c;
  cursor: pointer;
  padding: 0;
}

.auth-forgot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 0;
  color: #66707c;
  font-size: 14px;
}

.auth-forgot a {
  color: #e0a100;
  font-weight: 800;
  text-decoration: none;
}

.auth-forgot a:hover,
.auth-forgot a:focus-visible { text-decoration: underline; }

.auth-submit {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background: #eceff3;
  color: #8b95a3;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 14px 12px;
  cursor: pointer;
}

.auth-form:valid .auth-submit {
  background: #f5c518;
  color: #1a1404;
}

.auth-form.is-register:valid .auth-submit {
  background: #2fbf4a;
  color: #fff;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  filter: brightness(0.97);
}

.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #9aa3ad;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-or::before,
.auth-or::after {
  content: "";
  height: 1px;
  background: #e4e7ec;
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
}

.auth-google:hover,
.auth-google:focus-visible { background: #1669d6; }

.auth-note {
  margin: 14px 0 0;
  color: #66707c;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 720px) {
  .auth-dialog { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .profile-card h1 { font-size: 28px; }
}
