/* lobby/style.css */
:root {
  color-scheme: dark;
  --page: #0a1422;
  --paper: #142238;
  --ink: #f2f7fd;
  --muted: #bed0e3;
  --blue: #b6ddf7;
  --ice: #233b55;
  --ice-hover: #315171;
  --ice-edge: #6483a1;
  --line: #6685a373;
  --night: #071120;
  --button: #d2edfc;
  --button-hover: #ecf8ff;
  --button-ink: #112b43;
  --focus: #9fdbff;
  --error: #ffb5a6;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--page);
}
* {
  box-sizing: border-box;
}
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100svh;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(100%, clamp(720px, 68vw, 1150px));
  background:
    linear-gradient(
      180deg,
      #07112026 0%,
      #07112018 34%,
      #0a14225c 70%,
      var(--page) 99%),
    url(/lobby/snowy-village.webp) center top / cover no-repeat;
}
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 40px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .2em;
  color: var(--muted);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -.045em;
  font-weight: 550;
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
#create {
  border: 1px solid var(--ice-edge);
  border-radius: 10px;
  background: var(--ice);
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 600;
}
#create:hover {
  background: var(--ice-hover);
}
button:disabled {
  opacity: .6;
  cursor: wait;
}
.intro {
  color: var(--muted);
  font-size: 15px;
  margin: 18px 0 42px;
}
#games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 34px 24px;
}
.tile {
  min-width: 0;
}
.cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(
      ellipse at 50% 110%,
      #274b69,
      #1b334b 65%,
      var(--paper));
  text-decoration: none;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.cover:hover {
  border-color: var(--focus);
  transform: translateY(-2px);
}
.monogram {
  font-size: 54px;
  color: var(--blue);
}
.play {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 24px;
  color: var(--ink);
}
.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 0;
  min-height: 30px;
}
.name {
  text-decoration: none;
  color: inherit;
  font-size: 17px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.edit {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  padding: 3px 5px;
  border-radius: 4px;
}
.edit:hover {
  color: var(--ink);
  background: var(--ice);
}
.date {
  color: var(--muted);
  margin: 5px 2px 0;
  font-size: 12px;
}
.rename {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
}
.rename input {
  width: 100%;
  background: var(--paper);
  color: inherit;
  border: 1px solid var(--ice-edge);
  border-radius: 5px;
  padding: 6px 8px;
}
.rename button {
  background: var(--ice);
  border: 1px solid var(--ice-edge);
  color: var(--ink);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
}
#error {
  color: var(--error);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
@media (max-width: 600px) {
  main {
    padding: 36px 22px;
  }
  header {
    align-items: flex-end;
  }
  #create {
    font-size: 13px;
    padding: 10px 12px;
  }
}
.edit {
  text-decoration: none;
}
.back {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.back:hover {
  color: var(--ink);
}
.admin-header {
  margin-bottom: 44px;
}
.secondary {
  color: var(--ink);
  border: 1px solid var(--ice-edge);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.admin-section {
  max-width: 640px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  font-weight: 550;
  margin: 0 0 16px;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row input {
  flex: 1;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--ice-edge);
  border-radius: 8px;
  padding: 12px;
  color: inherit;
}
.admin-section button {
  border: 1px solid var(--ice-edge);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--ice);
}
.admin-section button.primary {
  background: var(--ice);
  border-color: var(--ice-edge);
  color: var(--ink);
  font-weight: 600;
}
.description {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 22px;
}
.feedback {
  color: var(--muted);
  font-size: 13px;
  min-height: 18px;
  margin: 14px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--night);
  color: #fff;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
.landing-page {
  -webkit-font-smoothing: antialiased;
}
.landing-main {
  max-width: 1160px;
  padding: 0 44px 44px;
}
.site-header {
  min-height: 92px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font:
    700 23px/1.15 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: block;
  height: 60px;
  width: auto;
  flex: none;
  image-rendering: pixelated;
}
.site-account {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  white-space: nowrap;
}
.site-account a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
.site-account a:hover,
.site-account .signup-link {
  color: var(--ink);
}
.site-account a:hover {
  text-decoration: underline;
}
.hero {
  padding: clamp(52px, 5.4vw, 88px) 0 68px;
  text-align: center;
  text-shadow: 0 4px 22px #071120c9;
}
.hero h1 {
  max-width: 920px;
  margin: 0 auto;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.09;
  letter-spacing: -.058em;
  font-weight: 620;
  text-wrap: balance;
}
.hero h1 span {
  white-space: nowrap;
}
.hero em {
  color: var(--blue);
  font-family:
    Georgia,
    "Times New Roman",
    serif;
  font-size: 1.07em;
  font-weight: 400;
  letter-spacing: -.065em;
}
.hero-subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.45;
}
.landing-page #create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 24px;
  min-height: 58px;
  padding: 16px 25px;
  border: 1px solid #ecf8ff;
  border-radius: 10px;
  background: var(--button);
  color: var(--button-ink);
  text-shadow: none;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--night), 0 7px 18px #030c1b59;
  transition:
    background .15s,
    transform .15s,
    box-shadow .15s;
}
.landing-page #create:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--night), 0 9px 20px #030c1b66;
}
.landing-page #create:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--night);
}
.landing-page #error {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #975b62;
  border-radius: 8px;
  color: var(--error);
  background: #311e2b;
  font-size: 14px;
  text-align: center;
}
.examples-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.examples-heading h2 {
  color: var(--ink);
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.examples-heading > span {
  color: var(--muted);
  font-size: 12px;
}
.examples-heading > span span {
  margin-left: 6px;
}
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.game-example {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121f32f5;
  box-shadow: 0 8px 26px #040d1a55;
}
.game-example:hover {
  border-color: var(--ice-edge);
}
.game-example:focus-visible {
  outline-color: var(--blue);
}
.example-image {
  height: clamp(175px, 25vh, 235px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: var(--ice);
}
.example-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.racing-image img {
  object-position: 50% 48%;
}
.adventure-image img {
  object-position: 50% 56%;
}
.example-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 7px;
  color: #fff;
  background: #14283eeb;
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 550;
  box-shadow: 0 2px 8px #0002;
}
.game-example:hover img {
  transform: scale(1.025);
}
.game-example:hover .example-play {
  background: var(--button);
  color: var(--button-ink);
}
.example-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 16px;
}
.example-caption h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.025em;
}
.example-caption p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 5px 0 0;
}
.example-arrow {
  color: var(--blue);
  font-size: 23px;
  line-height: 1;
  transition: color .15s;
}
.game-example:hover .example-arrow {
  color: var(--button);
}
.landing-page a:focus-visible,
.landing-page button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
@media (max-width: 750px) {
  body::before {
    height: min(100%, clamp(700px, 100svh, 900px));
    background-position: center top, 28% top;
  }
  .landing-main {
    padding-inline: 24px;
  }
  .site-header {
    min-height: 84px;
  }
  .wordmark {
    font-size: 21px;
  }
  .hero {
    padding: 45px 0 50px;
  }
  .hero h1 {
    font-size: clamp(36px, 7.6vw, 54px);
  }
  .hero h1 span {
    white-space: normal;
  }
  .example-grid {
    gap: 20px;
  }
  .example-image {
    height: 180px;
  }
  .example-caption p {
    font-size: 11px;
  }
  .example-play {
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
  }
}
@media (max-width: 520px) {
  .landing-page::before {
    height: min(100%, 620px);
    background-position: center top, 8% top;
  }
  .account-page::before {
    background-position: center top, 11% top;
    background-size: auto, auto 113%;
  }
  .landing-main {
    padding-inline: 21px;
  }
  .site-header {
    min-height: 76px;
    flex-wrap: wrap;
    gap: 0 12px;
    padding: 8px 0;
  }
  .wordmark {
    gap: 8px;
    font-size: 19px;
  }
  .brand-mark {
    height: 52px;
  }
  .site-account {
    gap: 12px;
  }
  .site-account a {
    font-size: 12px;
  }
  .hero {
    padding: 38px 0 140px;
  }
  .hero h1 {
    font-size: clamp(35px, 9vw, 47px);
    line-height: 1.1;
  }
  .landing-page #create {
    width: 100%;
    max-width: 310px;
    min-height: 56px;
    font-size: 15px;
    padding: 15px 20px;
    gap: 23px;
  }
  .examples-heading {
    margin-bottom: 14px;
  }
  .examples-heading h2 {
    font-size: 13px;
  }
  .examples-heading > span {
    display: none;
  }
  .example-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .example-image {
    height: auto;
    aspect-ratio: 1.9;
  }
  .example-caption {
    padding: 12px 14px 14px;
  }
  .example-caption h3 {
    font-size: 17px;
  }
  .example-caption p {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page *,
  .landing-page *::before,
  .landing-page *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.account-main {
  max-width: 520px;
  padding: 46px 24px;
}
.account-main > .wordmark {
  display: flex;
  width: max-content;
  margin: 0 auto 30px;
}
.account-card {
  background:
    linear-gradient(
      145deg,
      #1b2d45f7,
      #112033fa);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 16px 48px #030b18a6, inset 0 1px #d4e8fa12;
}
.account-card h1 {
  font-size: 30px;
  line-height: 1.12;
}
.account-subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin: 16px 0 28px;
}
.account-card form label {
  display: block;
  font-size: 14px;
  margin-bottom: 9px;
  font-weight: 550;
}
.account-card input {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ice-edge);
  border-radius: 8px;
  color: var(--ink);
  background: #0d192b;
  padding: 12px;
  font-size: 17px;
}
.account-card .login-code {
  font-family: ui-monospace, monospace;
  font-size: 26px;
  letter-spacing: .35em;
}
.account-primary {
  width: 100%;
  margin-top: 18px;
  min-height: 50px;
  border: 1px solid #ecf8ff;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  padding: 12px 16px;
}
.account-primary:hover:not(:disabled) {
  background: var(--button-hover);
}
.account-card a {
  color: var(--blue);
}
.account-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.account-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  text-decoration: underline;
}
.account-note,
.account-switch {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 24px 0 0;
}
#account-error {
  color: var(--error);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 0;
}
.account-signout {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
  margin-top: 24px;
}
.site-header .account-signout {
  margin: 0;
  color: var(--muted);
}
.account-page :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
@media (max-width: 520px) {
  .account-main {
    padding: 28px 18px;
  }
  .account-card {
    padding: 26px 22px;
  }
}
