/* Login-only styles keep the in-game HUD independent. */
#welcome {
  --ink: #191919;
  --paper: #ffffff;
  --muted: #606060;
  --line: #dedede;
  --accent: #d6001c;
  color-scheme: light;
  color: var(--ink);
  background: #fafafa;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 460px);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: 40px max(28px, calc((100vw - 1240px) / 2));
  overscroll-behavior: contain;
}
#welcome .welcome-art {
  background: none; min-height: 0; padding: 0; gap: 30px; align-self: stretch;
}
#welcome .brand { font-size: 20px; letter-spacing: -.6px; }
#welcome .brand span { color: #d6001c; }
#welcome .welcome-story { display: block; margin: auto 0; }
#welcome .welcome-story > .eyebrow { color: #666666; font-size: 11px; }
#welcome h1 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.22; letter-spacing: -2px; margin: 20px 0; }
#welcome h1 em { font-style: normal; color: #d6001c; }
#welcome .welcome-story > p:not(.eyebrow) { color: #666666; line-height: 1.9; font-size: 14px; }
#welcome .welcome-scene { overflow: hidden; border-radius: 2px; margin: 30px 0 22px; border: 1px solid #dedede; background: #f2f2f2; }
#welcome .welcome-scene img { display: block; width: 100%; margin: 0; border-radius: 0; transform: none; box-shadow: none; }
#welcome .welcome-tags { display: flex; gap: 24px; color: #555555; font-size: 12px; }
#welcome .welcome-tags span::before { content: '✦'; color: #d6001c; margin-right: 7px; }
#welcome .welcome-art > a:last-child { display: block; padding: 10px 0; width: fit-content; }
#welcome .welcome-form {
  color: #191919; background: #ffffff; border: 1px solid #dedede; border-radius: 2px;
  width: 100%; max-width: 460px; padding: 30px; margin: auto;
  box-shadow: none;
}
#welcome .welcome-form > .eyebrow { color: #666666; margin: 0 0 10px; letter-spacing: 3px; }
#welcome h2 { font-size: 26px; letter-spacing: -.8px; margin: 0 0 8px; }
#welcome .muted { font-size: 13px; line-height: 1.6; margin: 0; color: #666666; }
#welcome #heroes { margin: 24px 0 20px; gap: 8px; }
#welcome #heroes legend { font-weight: 650; margin-bottom: 10px; }
#welcome #heroes legend span { font-weight: 400; color: #666666; font-size: 10px; margin-left: 8px; }
#welcome #heroes button {
  position: relative; border: 2px solid transparent; background: #f4f4f4; border-radius: 4px;
  padding: 10px 2px 8px; color: #555555; font-size: 11px; transition: border-color .15s, background .15s;
}
#welcome #heroes button[aria-pressed='true'] { border-color: #c9001b; background: #fff0f2; color: #a60016; }
#welcome #heroes button[aria-pressed='true']::after {
  content: '✓'; position: absolute; right: 5px; top: 4px; background: #c9001b;
  color: white; width: 17px; height: 17px; line-height: 17px; border-radius: 50%; font-size: 10px;
}
#welcome #heroes img { height: 63px; margin-bottom: 6px; }
#welcome #login-options { margin: 0; padding: 0; border: 0; }
#welcome .mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 18px; background: #f0f0f0; border-radius: 4px; }
#welcome .mode-options label { position: relative; cursor: pointer; text-align: center; padding: 11px 6px; border-radius: 2px; color: #666666; font-size: 13px; }
#welcome .mode-options label:has(input:checked) { background: #d6001c; color: #ffffff; font-weight: 700; box-shadow: none; }
#welcome .mode-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#welcome .mode-options label:has(input:focus-visible) { outline: 2px solid #c9001b; }
#welcome #login-form > label { margin-top: 14px; color: #333333; font-weight: 600; }
#welcome #login-form > label > input {
  min-height: 48px; background: #ffffff; border: 1px solid #cccccc; border-radius: 4px;
  padding: 12px 14px; color: #191919; font-size: 16px; font-weight: 400;
}
#welcome input::placeholder { color: #777777; font-size: 13px; }
#welcome #login-button { min-height: 52px; background: #d6001c; border-radius: 11px; text-align: center; font-size: 16px; font-weight: 700; box-shadow: 0 4px 0 #a60016; margin: 22px 0 6px; }
#welcome #login-button:hover:not(:disabled) { background: #b90018; }
#welcome #login-button:active:not(:disabled) { background: #a60016; transform: none; box-shadow: none; }
#welcome .small { color: #666666; font-size: 11px; line-height: 1.7; }
#welcome #login-status { color: #b40018; margin: 8px 0; }
#welcome #login-status:empty { display: none; }
#welcome .scope { text-align: center; border-color: #dedede; margin: 12px 0 0; padding-top: 12px; }
@media (max-width: 760px) {
  #welcome { display: block; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  #welcome .welcome-art { max-width: 460px; margin: 0 auto 22px; display: block; }
  #welcome .brand { font-size: 17px; }
  #welcome .welcome-story { margin-top: 18px; }
  #welcome .welcome-story > .eyebrow, #welcome .welcome-story > p:not(.eyebrow), #welcome .welcome-tags, #welcome .welcome-art > a:last-child { display: none; }
  #welcome h1 { font-size: 27px; margin: 0; line-height: 1.35; letter-spacing: -.8px; }
  #welcome h1 br { display: none; }
  #welcome h1 em { margin-left: 4px; }
  #welcome .welcome-scene { display: none; }
  #welcome .welcome-form { padding: 24px 20px; border-radius: 2px; }
  #welcome h2 { font-size: 23px; }
  #welcome #heroes { margin-top: 20px; }
  #welcome #heroes img { height: 54px; }
}
@media (max-height: 500px) and (min-width: 761px) {
  #welcome { align-items: start; padding-top: 24px; padding-bottom: 24px; gap: 28px; grid-template-columns: 1fr 1fr; }
  #welcome .welcome-art { gap: 20px; }
  #welcome h1 { font-size: 34px; }
  #welcome .welcome-form { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  #welcome #heroes button { transition: none; }
}

#welcome #login-button{color:#fff;border-radius:2px;box-shadow:none}
#welcome a{color:inherit}
#welcome input:focus-visible{outline:2px solid #d6001c;outline-offset:2px}

/* Explicit light form states; do not inherit in-game palette or browser autofill colors. */
#welcome .mode-options label:hover:not(:has(input:checked)){background:#e5e5e5;color:#191919}
#welcome #heroes button:hover:not([aria-pressed='true']){background:#eaeaea;border-color:#b5b5b5}
#welcome #login-form > label > input:focus{border-color:#d6001c}
#welcome #login-form > label > input:disabled{background:#eeeeee;color:#666666;opacity:1}
#welcome #login-form > label > input{caret-color:#191919;-webkit-text-fill-color:#191919}
#welcome #login-form > label > input:-webkit-autofill{box-shadow:0 0 0 1000px #ffffff inset;-webkit-text-fill-color:#191919}
#welcome #login-button:disabled{background:#e2e2e2;color:#595959;opacity:1;box-shadow:none;cursor:wait}
#welcome button:focus-visible,#welcome a:focus-visible{outline:2px solid #d6001c;outline-offset:3px}
#welcome .scope{border-color:#dedede}

/* Match the homepage: black brand, red actions with white labels. */
#welcome .welcome-art > .brand{color:#191919}
#welcome .mode-options label:has(input:checked){background:#d6001c;color:#ffffff;box-shadow:none}
#welcome #heroes button[aria-pressed='true']{color:#191919}
#welcome #heroes button[aria-pressed='true']::after{background:#d6001c;color:#ffffff}
#welcome #login-button{background:#d6001c;color:#ffffff;border:1px solid #d6001c}
#welcome #login-button:hover:not(:disabled){background:#b90018;color:#ffffff;border-color:#b90018}
#welcome #login-button:active:not(:disabled){background:#a60016;color:#ffffff;border-color:#a60016}
#welcome #login-button:disabled{background:#e2e2e2;color:#595959;border-color:#cccccc}

/* Black opening line with red emphasis. */
#welcome .welcome-art h1{color:#191919}
#welcome .welcome-art h1 em{color:#d6001c}
