:root {
  color-scheme: dark;
  --shade-0: #0f380f;
  --shade-1: #306230;
  --shade-2: #8bac0f;
  --shade-3: #9bbc0f;
  font-family: 'Courier New', monospace;
  background: var(--shade-0);
  color: var(--shade-3);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 56px);
  background-color: var(--shade-0);
  background-image:
    linear-gradient(90deg, #30623018 1px, transparent 1px),
    linear-gradient(#30623018 1px, transparent 1px);
  background-size: 24px 24px;
}

button, input { font: inherit; }

.login-shell {
  width: min(100%, 980px);
  min-height: min(640px, calc(100svh - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  border: 2px solid var(--shade-2);
  background: var(--shade-1);
  box-shadow: 8px 8px 0 #071f08, 0 0 0 8px #0f380f;
}

.story-panel, .form-panel { position: relative; padding: clamp(26px, 5vw, 58px); }
.story-panel {
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--shade-0);
  border-right: 2px solid var(--shade-2);
}

.topline { display: flex; justify-content: space-between; color: var(--shade-2); font-size: 10px; letter-spacing: .16em; }
.eyebrow { margin: 0; color: var(--shade-2); font-size: 10px; font-weight: 700; letter-spacing: .2em; }

.sun-seal {
  position: relative;
  width: 94px;
  height: 94px;
  margin: clamp(38px, 7vh, 78px) 0 28px;
  border: 2px solid var(--shade-2);
  transform: rotate(45deg);
  box-shadow: 0 0 0 8px #0f380f, 0 0 0 10px var(--shade-1);
}
.seal-cross, .seal-core { position: absolute; display: block; background: var(--shade-3); }
.seal-cross { width: 62%; height: 8px; top: calc(50% - 4px); left: 19%; }
.seal-cross::after { content: ''; position: absolute; width: 8px; height: 62px; left: calc(50% - 4px); top: -27px; background: var(--shade-3); }
.seal-core { width: 22px; height: 22px; top: calc(50% - 11px); left: calc(50% - 11px); border: 5px solid var(--shade-0); }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: var(--shade-3); font-size: clamp(34px, 6vw, 58px); line-height: .98; letter-spacing: -.08em; }
.subtitle { margin-bottom: 24px; color: var(--shade-2); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.story-copy { color: var(--shade-3); font-size: 13px; line-height: 1.8; }

.party-strip { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 36px; }
.hero-mark {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--shade-2);
  color: var(--shade-0);
  background: var(--shade-3);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--shade-1);
}
.mage { transform: translateY(-4px); }
.rogue { height: 26px; }
.cleric { transform: translateY(-2px); }
.party-caption { margin-left: 6px; color: var(--shade-2); font-size: 9px; letter-spacing: .12em; }
.version { margin: 28px 0 0; color: var(--shade-2); font-size: 9px; letter-spacing: .14em; }

.form-panel { display: flex; flex-direction: column; justify-content: center; background: var(--shade-0); }
.form-heading { margin-bottom: 34px; }
h2 { margin: 12px 0 9px; color: var(--shade-3); font-size: clamp(25px, 3vw, 34px); letter-spacing: -.06em; }
.form-heading > p:last-child { margin-bottom: 0; color: var(--shade-3); font-size: 12px; line-height: 1.6; }

form { display: flex; flex-direction: column; }
label { margin: 0 0 8px; color: var(--shade-3); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
input {
  width: 100%;
  height: 48px;
  margin-bottom: 22px;
  padding: 0 13px;
  border: 2px solid var(--shade-2);
  border-radius: 0;
  outline: 0;
  color: var(--shade-3);
  background: var(--shade-0);
  font-size: 15px;
  caret-color: var(--shade-3);
}
input:focus-visible { border-color: var(--shade-3); box-shadow: 0 0 0 3px var(--shade-2); }

button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 2px solid var(--shade-0);
  border-radius: 0;
  color: var(--shade-0);
  background: var(--shade-3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  box-shadow: 4px 4px 0 var(--shade-0);
}
button:hover { background: var(--shade-2); }
button:focus-visible { outline: 3px solid var(--shade-3); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .65; }
.button-arrow { font-size: 21px; }
.message { min-height: 20px; margin: 15px 0 0; color: var(--shade-3); font-size: 12px; line-height: 1.5; }
.message[data-kind='error'] { padding-left: 10px; border-left: 3px solid var(--shade-3); }
.access-note { display: flex; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--shade-2); }
.note-mark { flex: 0 0 20px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--shade-2); color: var(--shade-3); font-size: 12px; font-weight: 700; }
.access-note p { margin: 0; color: var(--shade-3); font-size: 10px; line-height: 1.6; }
.rune-line { display: flex; align-items: center; gap: 12px; margin-top: 30px; color: var(--shade-2); }
.rune-line span { height: 1px; flex: 1; background: var(--shade-2); }
.rune-line b { font-size: 11px; }
.footer-note { margin: 12px 0 0; color: var(--shade-2); font-size: 10px; text-align: center; }

@media (max-width: 720px) {
  body { display: block; padding: 16px; }
  .login-shell { width: min(100%, 520px); min-height: 0; margin: 12px auto; grid-template-columns: 1fr; }
  .story-panel { min-height: 0; padding: 26px; border-right: 0; border-bottom: 2px solid var(--shade-2); }
  .sun-seal { width: 56px; height: 56px; margin: 34px 0 20px; }
  .seal-cross { height: 5px; top: calc(50% - 2px); }
  .seal-cross::after { width: 5px; height: 36px; left: calc(50% - 2px); top: -16px; }
  .seal-core { width: 14px; height: 14px; top: calc(50% - 7px); left: calc(50% - 7px); border-width: 3px; }
  h1 { font-size: 38px; }
  .party-strip { padding-top: 22px; }
  .version { margin-top: 20px; }
  .form-panel { padding: 30px 26px; }
}

@media (max-width: 380px) {
  body { padding: 8px; }
  .story-panel, .form-panel { padding: 22px 18px; }
  .party-caption { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
