:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #fff5d9;
  background: #191333;
  --background: #191333;
  --cream: #fff5d9;
  --accent: #ffd457;
  --muted: #d4c8ea;
  --edge: #584673;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 48% 0%, #382658, transparent 42rem);
}

button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; }
a { color: inherit; }
:focus-visible { outline: 3px solid #ff97c6; outline-offset: 4px; }

.layout {
  width: min(100% - 2rem, 48rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 5vh, 3rem) 2rem;
}

.heading { margin-block-end: 1.25rem; }

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.55rem);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .95;
  text-wrap: balance;
}

h1 span { color: var(--accent); }
.heading p { margin: .7rem 0 0; color: var(--muted); }

.cabinet {
  padding: clamp(.4rem, 1.5vw, .85rem);
  background: #17112c;
  border: 1px solid var(--edge);
  border-radius: 1rem;
  box-shadow: 0 .5rem 0 #0f0b1e, 0 1.3rem 2.8rem #10092280;
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 550 / 400;
  overflow: hidden;
  border-radius: .55rem;
  background: #fff;
}

.game, .game > *, .cover { width: 100%; height: 100%; }
.game > * { display: block; }

.cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 44%, #51346d80, transparent 17rem),
    radial-gradient(#bda0e13c 1px, transparent 1px) center / 15px 15px,
    #221836;
}

.question-mark {
  display: block;
  margin-block: -.1em .12em;
  color: #f7acd3;
  font-size: clamp(5.2rem, 24vw, 12.5rem);
  font-weight: 900;
  line-height: .9;
  text-shadow: .045em .045em #a45b9a, .07em .08em #251435;
  transform: rotate(-12deg);
  user-select: none;
}

.play {
  min-height: 3rem;
  padding: .7rem 1.5rem;
  border: 1px solid #ffe494;
  border-radius: .45rem;
  background: var(--accent);
  color: #21162c;
  font-weight: 850;
  box-shadow: 0 .22rem 0 #a0742a;
}

.play:hover:not(:disabled) { background: #ffe18e; }
.play:active:not(:disabled) { transform: translateY(.15rem); }
.message { margin: 0; color: var(--muted); text-align: center; }
.message:not(:empty) { margin: .85rem .5rem 0; }

.controls {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding-block-start: .65rem;
}

.controls button {
  min-height: 2.75rem;
  padding: .4rem .8rem;
  border: 1px solid var(--edge);
  border-radius: .4rem;
  background: #322346;
  color: var(--cream);
}

.controls button:hover { background: #483262; }

.cabinet:fullscreen {
  display: grid;
  align-content: center;
  justify-items: center;
  border: 0;
  border-radius: 0;
  background: var(--background);
}

.cabinet:fullscreen .screen, .cabinet:fullscreen .controls {
  width: min(100%, calc((100dvh - 5rem) * 1.375));
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  color: var(--muted);
  font-size: .875rem;
  padding-block-start: 1.4rem;
}

.sources a { text-underline-offset: .22em; }
.sources a:hover { color: var(--cream); }
