* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #121826;
  color: #f8fafc;
  font-family: Arial, sans-serif;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.shell {
  width: min(100vw, 720px);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.heading {
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 7vw, 3.5rem);
}

p {
  margin: 0;
  color: #cbd5e1;
}

#fifteen-wrap {
  width: min(calc(100vw - 96px), 460px);
  height: min(calc(100vw - 96px), 460px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

#fifteen {
  transform-origin: center center;
}

.slot {
  display: grid;
  place-items: center;
  border: 2px solid #0f172a;
  border-radius: 16px;
  background: linear-gradient(145deg, #38bdf8, #2563eb);
  color: #f8fafc;
  cursor: pointer;
  font-size: clamp(1.4rem, 8vw, 4rem);
  font-weight: 800;
  transition-property: left, top, transform, box-shadow;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(15, 23, 42, 0.32);
  user-select: none;
}

.slot:hover {
  transform: translateY(-2px);
}

#status {
  min-height: 1.4em;
  text-align: center;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: #facc15;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

@media (max-height: 360px) {
  .shell {
    padding: 8px;
  }

  .panel {
    gap: 8px;
    padding: 10px;
  }

  .heading,
  #status {
    display: none;
  }

  #fifteen-wrap {
    width: min(calc(100vw - 32px), calc(100vh - 78px), 260px);
    height: min(calc(100vw - 32px), calc(100vh - 78px), 260px);
  }

  button {
    padding: 6px 14px;
  }
}
