:root {
  --bg: #f1ede4;
  --card: #ffffff;
  --ink: #1c1a16;
  --soft: #857f73;
  --accent: #e8590c;
  --got: #12915c;
  --again: #b3541e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(60% 50% at 15% 0%, #fffdf8, transparent 70%),
    radial-gradient(50% 45% at 100% 100%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 16px;
  overflow: hidden;
}

.fc { position: relative; width: min(286px, 100%); }
.fc__head { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4px; }
.fc__head span { display: block; font-size: 10.5px; line-height: 14px; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase; color: var(--soft); }
.fc__head h1 { font-size: 19px; line-height: 23px; font-weight: 720; font-stretch: 108%; letter-spacing: -0.02em; }
.fc__left { font-size: 12px; font-weight: 560; color: var(--soft); line-height: 20px; }
.fc__left strong { display: inline-block; color: var(--ink); font-weight: 720; }

.deck { position: relative; height: min(196px, 46vh); margin-top: min(12px, 2.6vh); }
.deck__under, .card { position: absolute; inset: 0; border-radius: 24px; background: var(--card); }
.deck__under { box-shadow: 0 0 0 1px rgba(28, 26, 22, 0.06), 0 10px 20px -14px rgba(28, 26, 22, 0.3); transform-origin: 50% 100%; }
.card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  width: 100%;
  padding: 18px 20px 16px;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(28, 26, 22, 0.06), 0 2px 4px rgba(28, 26, 22, 0.05), 0 22px 40px -20px rgba(28, 26, 22, 0.32);
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.card__tag { position: absolute; top: 13px; left: 16px; padding: 0 9px; height: 22px; line-height: 22px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 11%, #ffffff); color: var(--accent); font-size: 11px; font-weight: 680; transition: background-color 0.35s ease, color 0.35s ease; }
.card.is-open .card__tag { background: color-mix(in srgb, var(--got) 12%, #ffffff); color: var(--got); }
.card__q { font-size: min(27px, 6.4vh); line-height: 1.15; font-weight: 720; font-stretch: 110%; letter-spacing: -0.025em; }
.card__rule { width: 46%; height: 2px; margin: min(10px, 2.2vh) 0 min(8px, 1.8vh); overflow: visible; }
.card__rule path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.card__a { font-size: min(18px, 4.4vh); line-height: 1.2; font-weight: 600; color: color-mix(in srgb, var(--ink) 80%, #ffffff); }
.card__hint { position: absolute; left: 0; right: 0; bottom: 12px; font-size: 11px; font-weight: 540; color: var(--soft); }
.card__stamp { position: absolute; top: 12px; right: 14px; padding: 0 9px; height: 24px; line-height: 24px; border-radius: 8px; font-size: 11.5px; font-weight: 720; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; }

.piles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: min(14px, 3vh); }
.pile { display: flex; align-items: center; gap: 7px; height: min(46px, 11vh); padding: 0 8px 0 13px; border: 0; border-radius: 16px; background: #ffffff; box-shadow: 0 0 0 1px rgba(28, 26, 22, 0.07), 0 8px 16px -12px rgba(28, 26, 22, 0.35); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 660; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pile svg { width: 16px; height: 16px; flex: none; }
.pile path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pile span { flex: 1; text-align: left; }
.pile b { flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 10px; overflow: hidden; font-weight: 720; line-height: 28px; text-align: center; }
.pile i { display: block; font-style: normal; }
.pile--again svg { color: var(--again); }
.pile--again b { background: color-mix(in srgb, var(--again) 12%, #ffffff); color: var(--again); }
.pile--got svg { color: var(--got); }
.pile--got b { background: color-mix(in srgb, var(--got) 12%, #ffffff); color: var(--got); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

/* big in the poster and on a desk, unchanged in the phone's box */
@media (min-width: 700px) and (min-height: 500px) {
  .fc { zoom: 1.25; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .fc { zoom: 1.7; }
}
