/* 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 { color: #191919; font-weight: 400; letter-spacing: normal; }
#welcome .brand b { font-size: 32px; font-weight: 700; letter-spacing: -1.5px; }
#welcome .brand span { display: inline-block; color: inherit; margin-left: 12px; font-size: 14px; letter-spacing: 2px; }
#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}

/* Keep the brand description visible on mobile login screens. */
#welcome .welcome-story > p.brand-description:not(.eyebrow){display:block;text-wrap:balance}

/* Focus the login artwork on the LISA sign, bartender and guests. */
#welcome .welcome-lisa{position:relative;aspect-ratio:2021/778}
#welcome .welcome-lisa img{position:absolute;width:265.9155%;height:auto;max-width:none;left:-109.8592%;top:-206.7279%}
@media(max-width:760px){#welcome .welcome-lisa{display:block;margin:16px 0}}

.login-legal{display:flex;flex-wrap:wrap;gap:4px 18px;margin-top:16px}.login-legal a{display:inline-flex;align-items:center;min-height:44px;color:#8c223b;text-decoration:underline;text-underline-offset:4px;font-size:14px}

#login-form .legal-consent{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.6}#login-form .legal-consent[hidden]{display:none}#login-form #legal-consent{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:2px 0;accent-color:#b52236}

/* Same wordmark sizing as the official homepage. */
@media(max-width:760px){#welcome .brand b{font-size:26px}#welcome .brand span{font-size:11px;margin-left:8px;letter-spacing:0}}

/* A single, centered entry form on desktop and mobile. */
#welcome {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
  align-content: safe center;
  gap: 0;
  padding: max(24px, 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 .login-brand { text-align: center; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
#welcome .login-brand .brand { display: inline-block; text-decoration: none; }
#welcome .login-tagline { font-size: 14px; line-height: 1.6; margin: 14px 0 0; color: var(--ink); }
#welcome .login-tagline em { color: var(--accent); font-style: normal; }

/* Localized button labels are text, not the trailing primary-action icon. */
#welcome #login-button > span{float:none}

/* The same four flags as the homepage, evenly spaced around the form's center. */
#welcome .login-language-flags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  width: min(100%, 240px);
  margin: 0 auto 24px;
}
#welcome .login-language-flags button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}
#welcome .login-language-flags button:hover { background: #f5f5f5; }
#welcome .login-language-flags button[aria-pressed='true'] {
  border-color: var(--accent);
  background: #fff4f5;
}
