*,
*::before {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #09111d;
  --panel: rgba(18, 31, 48, 0.96);
  --line: #344b65;
  --line-bright: #607b99;
  --text: #f4f6f8;
  --muted: #aebdcb;
  --gold: #f1c96d;
  --gold-dark: #ad7d2b;
  --focus: #ffe4a2;
  --font-sans: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  background:
    radial-gradient(circle at 15% 8%, rgba(77, 126, 168, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 92%, rgba(173, 125, 43, 0.14), transparent 28rem),
    linear-gradient(145deg, #070c14, #101e2e 55%, #080e17);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
}

.entry-shell {
  display: grid;
  min-height: 100vh;
  padding: 1.25rem;
  place-items: center;
}

.entry-card {
  width: min(100%, 32rem);
  padding: clamp(1.5rem, 6vw, 3rem);
  background: linear-gradient(145deg, var(--panel), rgba(11, 20, 32, 0.98));
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-block-end: 1.3rem;
  place-items: center;
  color: #21170a;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gold);
  border: 1px solid #ffe6a8;
  border-radius: 50%;
  box-shadow: 0 0 0 0.3rem rgba(241, 201, 109, 0.13);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

h1 {
  margin: 0.45rem 0 0.8rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.3;
}

.lead,
.notice,
.field-hint {
  color: var(--muted);
}

.lead {
  margin: 0;
}

.access-form {
  display: grid;
  gap: 1.25rem;
  margin-block-start: 2rem;
}

fieldset {
  display: grid;
  gap: 1.15rem;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  width: 100%;
  padding: 0 0 0.65rem;
  margin-block-end: 0.15rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 0.4rem;
}

label {
  font-weight: 800;
}

select,
button {
  min-height: 3.25rem;
  font: inherit;
}

select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  color: var(--text);
  background: #0b1623;
  border: 1px solid var(--line-bright);
  border-radius: 0.45rem;
  cursor: pointer;
}

select:user-invalid {
  border-color: #d97878;
}

.field-hint {
  margin: 0;
  font-size: 0.8rem;
}

.access-button {
  width: 100%;
  padding: 0.8rem 1.2rem;
  color: #21170a;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #f8d98d, #c8933c);
  border: 1px solid #ffe1a1;
  border-radius: 0.45rem;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.access-button:hover {
  filter: brightness(1.08);
}

.access-button:active {
  transform: translateY(1px);
}

:where(select, button):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.notice {
  margin: 1.4rem 0 0;
  padding: 0.8rem 0.9rem;
  font-size: 0.8rem;
  border-inline-start: 3px solid var(--gold-dark);
}

@media (max-width: 480px) {
  .entry-shell {
    padding: 0.75rem;
  }

  .entry-card {
    padding: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    transition-duration: 0.01ms !important;
  }
}
