.auth-gate {
  text-align: center;
  padding: 16px 14px 18px;
  margin-bottom: 12px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 12px;
}
.auth-gate.hidden { display: none !important; }

.auth-gate-title {
  font-family: "Cinzel", serif;
  color: var(--accent, #c9a227);
  font-size: 18px;
  margin: 0 0 4px;
}
.auth-gate-sub {
  color: var(--text-dim, #a09888);
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.35;
}

.auth-input {
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 8px auto;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a2e35);
  background: var(--input-bg, #0c0e10);
  color: var(--text, #e8dcc0);
  text-align: center;
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent, #c9a227);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

#btn-auth-send,
#btn-auth-verify {
  width: 100%;
  max-width: 300px;
  margin: 6px auto 0;
  display: block;
}

.auth-back {
  margin-top: 10px;
}

.auth-msg {
  min-height: 1.25em;
  font-size: 13px;
  color: var(--accent, #c9a227);
  margin: 10px 0 0;
}
.auth-msg.error { color: var(--red, #d13a35); }

.auth-setup-msg {
  color: var(--red, #d13a35);
  font-size: 12px;
  margin-top: 8px;
}
.auth-setup-msg.hidden { display: none !important; }

#auth-step-email.hidden,
#auth-step-code.hidden { display: none !important; }

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-height: 28px;
}
#auth-user-label {
  color: var(--accent, #c9a227);
  font-size: 14px;
}

button.auth-locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.35);
}

.ranking-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ranking-panel.hidden { display: none !important; }

.ranking-card {
  width: 360px;
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  background: var(--panel, #161a1f);
  border: 2px solid var(--border, #2a2e35);
  border-radius: 12px;
  padding: 14px;
}
.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent, #c9a227);
  font-family: "Cinzel", serif;
  margin-bottom: 8px;
}
.ranking-you {
  color: var(--text-dim, #a09888);
  font-size: 13px;
  margin: 0 0 8px;
}
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ranking-list li {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border, #2a2e35);
  font-size: 14px;
}
.ranking-list .rank { color: var(--accent, #c9a227); min-width: 28px; }
.ranking-list .name { flex: 1; }
.ranking-list .score { color: var(--text-dim, #a09888); }
.ranking-empty {
  color: var(--text-dim, #a09888);
  text-align: center;
  padding: 20px;
  font-style: italic;
}
