:root {
  color-scheme: dark;
  --night: #081711;
  --gold: #f2ce80;
  color: #f7e7c2;
  background: var(--night);
  font-family: Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 43%, #33503c 0%, #142d23 28%, transparent 64%),
    radial-gradient(ellipse at 50% 109%, #3a2116, transparent 55%),
    var(--night);
}

.table {
  --card-width: clamp(8.7rem, min(49vw, 38svh), 16rem);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(.85rem, 3svh, 2rem);
  min-block-size: 100svh;
  padding: clamp(1.05rem, 3.5svh, 2rem) 1rem;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1;
}

.brand img {
  width: 1.08em;
  height: 1.08em;
  margin-inline-end: -.20em;
  transform: translateY(-.075em);
}

.reveal {
  min-inline-size: 0;
  min-block-size: calc(var(--card-width) * 1.5 + 8.25rem);
}

.turn {
  display: grid;
  justify-items: center;
  gap: .75rem;
  width: max-content;
  margin-inline: auto;
  padding: 0;
  border-radius: .75rem;
  list-style: none;
  cursor: pointer;
  perspective: 55rem;
  -webkit-tap-highlight-color: transparent;
}

.turn::-webkit-details-marker { display: none; }
.turn::marker { content: ""; }

.card {
  position: relative;
  display: grid;
  inline-size: var(--card-width);
  aspect-ratio: 2 / 3;
  border-radius: clamp(.55rem, 2vw, .95rem);
  box-shadow: 0 1.35rem 3.6rem #0009, 0 0 2.8rem #b68b3d26;
  transform-style: preserve-3d;
}

.face {
  grid-area: 1 / 1;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  backface-visibility: hidden;
}

.face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front { transform: rotateY(180deg); }
.reveal[open] .card { transform: rotateY(180deg); }

.turn-label {
  color: #f1dba8;
  font: 500 .9rem/1.4 system-ui, sans-serif;
}

.reveal[open] .turn-label { display: none; }

.announcement {
  display: grid;
  justify-items: center;
  gap: .65rem;
  margin-block-start: .72rem;
}

h1 {
  margin: 0;
  color: #ffebbf;
  font-size: clamp(2.15rem, 8vw, 4.1rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}

.entry {
  display: inline-grid;
  min-block-size: 2.75rem;
  place-items: center;
  padding: .6rem 1.1rem;
  border: 1px solid #f1d794;
  border-radius: 100vw;
  color: #1b1b10;
  background: var(--gold);
  font: 650 .9rem/1.2 system-ui, sans-serif;
  text-decoration: none;
}

.entry:hover { background: #ffe2a0; }
.entry:focus-visible, .turn:focus-visible { outline: 2px solid #ffe9b2; outline-offset: 5px; }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .68s cubic-bezier(.25, .6, .3, 1); }
  .reveal[open] .announcement { animation: appear .35s ease-out .29s both; }
}

@keyframes appear {
  from { opacity: 0; transform: translateY(.4rem); }
  to { opacity: 1; transform: translateY(0); }
}
