:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #14111b;
  color: #fff4df;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 209, 88, .28), transparent 24%),
    radial-gradient(circle at 88% 80%, rgba(255, 72, 86, .18), transparent 28%),
    linear-gradient(145deg, #15111c, #222332 52%, #101016);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-150%);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #14111b;
  background: #ffe16a;
  font-weight: 900;
  text-decoration: none;
  transition: transform .15s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.portal-bar {
  width: min(1240px, calc(100vw - 24px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.brand,
.portal-bar nav a,
footer nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: #fff4df;
  font-weight: 900;
  text-decoration: none;
}

.brand {
  color: #ffe16a;
  font-size: 20px;
}

.portal-bar nav,
footer nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-bar nav a,
footer nav a {
  padding: 0 11px;
  background: rgba(255, 255, 255, .1);
}

.shell {
  width: min(1240px, calc(100vw - 24px));
  min-height: calc(100vh - 170px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

.game {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(12,13,20,.82);
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
}

.hud {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(255, 218, 96, .2);
}
.hud div { padding: 10px 12px; background: rgba(20,20,30,.96); min-width: 0; }
.hud span { display: block; color: #b8c7d9; font-size: 12px; }
.hud strong { display: block; margin-top: 2px; color: #fff4df; font-size: clamp(16px, 2vw, 21px); }

canvas { display: block; width: 100%; aspect-ratio: 3 / 2; background: #171b2b; }
button {
  border: 0;
  border-radius: 8px;
  min-height: 50px;
  padding: 0 18px;
  color: #321b0c;
  background: linear-gradient(#ffe16a, #ff8f2f);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
  background: rgba(15,15,24,.78);
}
.overlay.hidden { display: none; }
.cover-art {
  width: min(540px, 86vw);
  aspect-ratio: 16 / 9;
  justify-self: center;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}
.overlay h1 { margin: 0; color: #ffe16a; font-size: clamp(38px, 7vw, 78px); line-height: .95; }
.overlay p { width: min(660px, 88vw); margin: 0 auto; color: #fff4df; font-size: 18px; line-height: 1.45; }
.overlay button { width: min(260px, 80vw); justify-self: center; box-shadow: 0 8px 0 #9e3e16; }

aside {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border-left: 1px solid rgba(255,255,255,.16);
  padding: 18px;
}
aside h2 { margin: 0; color: #ffe16a; }
aside p { margin: 0; color: #dce2ee; line-height: 1.45; }
.touch { display: none; }

footer {
  width: min(1240px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 26px;
  color: #dce2ee;
  text-align: center;
  font-weight: 900;
}

footer p {
  margin: 0 0 10px;
}

footer nav {
  justify-content: center;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; align-content: start; }
  .hud { grid-template-columns: repeat(2, 1fr); }
  aside { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .touch {
    display: grid;
    grid-template-columns: repeat(4, 54px);
    gap: 8px;
    justify-content: center;
    padding: 12px;
    background: rgba(20,20,30,.96);
  }
  .touch button { width: 54px; height: 46px; padding: 0; }
}
