/* Login (and /join, which builds on this file). Standalone pages: reset and
   theme tokens come from base.css, loaded first. The redesign's look
   (docs/design-standard.md): one card, the app's chest mark and name over a
   real title, 44px fields and buttons (16px text so iOS doesn't zoom), theme
   variables only, OLED first. */

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-login-card);
}

/* The app's mark and name, then what this page is for. */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-logo {
  width: 32px;
  height: 32px;
  flex: none;
}
.auth-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.auth-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-control, var(--border));
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-bg-strong);
}

.btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--accent-gold);
  border-radius: 10px;
  background: var(--accent-gold);
  color: var(--text-on-gold);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  margin-top: 4px;
}

.btn:hover {
  background: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
}

.btn:active {
  transform: scale(0.99);
}

/* The way in for players without an account (or a password): /join. The
   game-chat message names the site and this button, so it is a real button,
   right under Sign In, not a footnote. */
.login-join {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.login-join-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 0;
  background: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold-border);
  text-decoration: none;
}
.login-join-btn:hover {
  background: var(--accent-gold-bg);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.login-join-btn:focus-visible {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-bg-strong);
}
.login-join-hint {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Public boards: every clan's share link, under the form. A divider sets it
   apart from sign-in so it doesn't read as a second login step. */
.login-boards {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.login-boards[hidden] {
  display: none;
}
.login-boards-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.login-boards-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.login-boards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-boards-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}
.login-boards-list a:hover {
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-bg);
}
.login-boards-list a:focus-visible {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-bg-strong);
}
.login-boards-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.login-boards-arrow {
  flex: none;
  color: var(--accent-gold);
}

.login-lang {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.login-lang .lang-select {
  width: auto;
  min-height: 40px;
}

.error {
  color: var(--accent-red);
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  display: none;
  padding: 10px 12px;
  background: var(--accent-red-bg);
  border-radius: 10px;
}

@media (max-width: 420px) {
  .login-card {
    padding: 26px 18px;
    border-radius: 16px;
  }

  .auth-title {
    font-size: 21px;
  }
}
