html.ap-auth-pending {
  background: #fffdf8;
}

html.ap-auth-pending body > :not(.ap-auth-gate) {
  visibility: hidden;
}

.ap-auth-gate,
.ap-auth-gate *,
.ap-auth-gate *::before,
.ap-auth-gate *::after {
  box-sizing: border-box;
}

.ap-auth-gate {
  align-items: flex-start;
  background:
    radial-gradient(circle at 82% 12%, rgba(232, 224, 211, 0.72), transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #fbf6ee 100%);
  color: #34312d;
  display: flex;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  inset: 0;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  z-index: 9999;
}

.ap-auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5d7bd;
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(95, 75, 42, 0.12);
  margin-block: auto;
  max-width: 420px;
  min-width: 0;
  padding: 32px;
  width: min(100%, 420px);
}

.ap-auth-eyebrow {
  color: #5f7f72;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
}

.ap-auth-card h1 {
  font-size: clamp(1.6rem, 4vw, 2.05rem);
  line-height: 1.35;
  margin: 0 0 12px;
  text-wrap: balance;
}

.ap-auth-card p {
  color: #746e66;
  line-height: 1.8;
  margin: 0 0 22px;
}

.ap-auth-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  min-width: 0;
}

.ap-auth-field label {
  font-weight: 800;
}

.ap-auth-field input {
  background: #fffdf8;
  border: 1px solid #d9c9aa;
  border-radius: 12px;
  color: #34312d;
  font: inherit;
  min-height: 48px;
  min-width: 0;
  padding: 10px 14px;
  width: 100%;
}

.ap-auth-field input:focus {
  border-color: #5f7f72;
  box-shadow: 0 0 0 4px rgba(95, 127, 114, 0.16);
  outline: none;
}

.ap-auth-button {
  background: #c5a45c;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  margin-top: 22px;
  min-height: 50px;
  padding: 12px 24px;
  width: 100%;
}

.ap-auth-button:focus {
  box-shadow: 0 0 0 4px rgba(197, 164, 92, 0.22);
  outline: none;
}

.ap-auth-error {
  color: #9b3b34;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 14px;
  min-height: 1.5em;
}
