/* Шифър: a dossier on a desk at night. Warm plum-black desk, cream index
   cards, a green "cleared" stamp for found agents, wax red for assassins and
   lamplight gold for whatever needs your attention right now. */

:root {
  --night: #1a1418;
  --desk: #231b20;
  --raised: #302529;
  --line: #43353b;
  --ink: #f4ecdf;
  --muted: #a89b93;
  --lamp: #e9b957;
  --lamp-ink: #2a1d05;
  --agent: #3aa96a;
  --agent-deep: #17563a;
  --agent-ink: #dff5e7;
  --assassin: #d9475a;
  --assassin-deep: #7a1a26;
  --byst: #b98b5e;
  --byst-line: #7d5a37;
  --cream: #f3e9d4;
  --cream-2: #e3d5b7;
  --card-ink: #2a2017;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Noto Serif', 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.2, 1.4, 0.4, 1);
  --bar-h: 132px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  /* A desk lamp somewhere above the phone. */
  background-image: radial-gradient(120% 55% at 50% -12%, rgba(233, 185, 87, 0.13), transparent 60%);
  background-repeat: no-repeat;
}

/* Scaled and shaken things must never widen the page: a phone browser would
   zoom out to fit them. clip, not hidden, so nothing becomes a scroll container. */
html,
body,
main {
  overflow-x: clip;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(var(--bar-h) + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
}

main.landing {
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

p {
  margin: 6px 0;
}

a.link {
  color: var(--lamp);
}

:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
}

/* ---- landing ------------------------------------------------------------- */

.hero {
  padding: 34px 0 10px;
}

.hero h1 {
  font: 400 clamp(52px, 17vw, 72px) / 1 var(--serif);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--cream);
}

.hero .tagline {
  font: italic 400 19px/1.3 var(--serif);
  color: var(--lamp);
  margin: 8px 0 0 2px;
}

.lead {
  color: var(--muted);
  max-width: 34em;
  margin: 10px 0 22px;
}

.sheet label {
  display: block;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink);
}

.sheet label small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: var(--desk);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  min-height: 46px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--lamp);
  box-shadow: 0 0 0 3px rgba(233, 185, 87, 0.18);
}

textarea {
  resize: vertical;
  min-height: 78px;
}

button {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, background 0.2s, box-shadow 0.2s;
}

button:active {
  transform: scale(0.97);
}

button.primary {
  background: var(--lamp);
  border-color: var(--lamp);
  color: var(--lamp-ink);
  font-weight: 700;
  box-shadow: 0 6px 18px -8px rgba(233, 185, 87, 0.7);
}

button.big {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
}

/* ---- rules and history ----------------------------------------------------- */

details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--muted);
  font: 400 17px/1.3 var(--serif);
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease-out);
  margin-right: 2px;
}

details[open] > summary::before {
  transform: rotate(45deg);
}

.rules ol {
  margin: 4px 0 8px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
}

.rules li {
  margin: 6px 0;
  padding-left: 4px;
}

.rules li::marker {
  color: var(--lamp);
  font-family: var(--serif);
}

details.log ul {
  list-style: none;
  margin: 2px 0 8px;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

details.log li {
  margin: 4px 0;
}

details.log li.l-clue {
  color: var(--ink);
}

details.log li.l-g {
  color: var(--agent);
}

details.log li.l-a {
  color: var(--assassin);
}

details.log li.l-sudden {
  color: var(--lamp);
}

/* ---- game header ------------------------------------------------------------ */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.brand {
  font: 400 22px/1 var(--serif);
  letter-spacing: -0.01em;
  color: var(--cream);
}

.who {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 60%;
}

.who .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who .dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.4s;
}

.who.on .dot {
  background: var(--agent);
}

.who.on .dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--agent);
  animation: breathe 3.2s ease-out infinite;
}

.who.off .dot {
  background: var(--assassin);
}

.who.off {
  color: var(--muted);
}

.who.joined {
  animation: joined 0.9s var(--ease-spring);
}

@keyframes breathe {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  60%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes joined {
  0% {
    transform: translateX(16px);
    opacity: 0;
    color: var(--agent);
  }
  60% {
    color: var(--agent);
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* ---- invitation --------------------------------------------------------------- */

.invite {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px dashed rgba(233, 185, 87, 0.55);
  border-radius: 12px;
  background: linear-gradient(0deg, rgba(233, 185, 87, 0.05), rgba(233, 185, 87, 0.05));
  animation: enter 0.5s var(--ease-out) backwards;
}

.invite[hidden] {
  display: none;
}

.invite p:first-child {
  margin-top: 0;
  color: var(--ink);
}

.share {
  display: flex;
  gap: 8px;
}

.share input {
  margin: 0;
  font-size: 14px;
  min-width: 0;
  color: var(--muted);
}

.share button {
  flex: none;
}

.waiting {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.waiting i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lamp);
  animation: blink 1.4s infinite;
}

.waiting i:nth-child(2) {
  animation-delay: 0.2s;
}

.waiting i:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 6px;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* ---- the stage: what is happening right now ------------------------------------- */

.stage {
  min-height: 76px;
  margin: 12px 0 10px;
  padding: 4px 0;
}

.stage h2 {
  font: 400 22px/1.2 var(--serif);
  margin: 0;
  color: var(--cream);
}

.stage p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 5px 0 0;
}

.stage .waiting-clue .ellipsis {
  display: inline-block;
  width: 1em;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.8s steps(4, end) infinite;
}

@keyframes dots {
  from {
    width: 0;
  }
  to {
    width: 1.1em;
  }
}

.stage h2.sudden {
  color: var(--assassin);
}

.stage .clue {
  font: 400 clamp(34px, 11vw, 48px) / 1.05 var(--serif);
  letter-spacing: -0.015em;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.stage .clue .cw {
  color: var(--lamp);
}

.stage .clue .cn {
  font-weight: 400;
}

.stage.enter {
  animation: enter 0.45s var(--ease-out) both;
}

/* The clue lands like a stamp: big, then settles. */
.stage.clue-in .clue {
  animation: stamp 0.7s var(--ease-spring) both;
  transform-origin: 0 60%;
}

.stage.clue-in .tally {
  animation: enter 0.5s 0.3s var(--ease-out) both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: scale(1.3) rotate(-3deg);
    filter: blur(2px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: none;
  }
}

.stage .result {
  font-size: clamp(40px, 13vw, 56px);
  line-height: 1;
}

.stage .result.won {
  color: var(--agent);
  animation: stamp 0.8s var(--ease-spring) both;
}

.stage .result.lost {
  color: var(--assassin);
  animation: lostIn 1.1s var(--ease-out) both;
}

@keyframes lostIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    letter-spacing: 0.2em;
  }
  100% {
    opacity: 1;
    transform: none;
    letter-spacing: -0.015em;
  }
}

/* ---- the board ------------------------------------------------------------------ */

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  perspective: 900px;
}

.cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 0.84;
  border-radius: 9px;
  --cell-font: clamp(11px, 3.6vw, 17px);
  font-size: var(--cell-font);
  font-weight: 700;
  line-height: 1.08;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 2px;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s, filter 0.5s;
}

.board.dealing .cell {
  animation: deal 0.55s var(--ease-out) backwards;
  animation-delay: calc(var(--i) * 32ms);
}

@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(-26px) rotate(-5deg) scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cell .flip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.3, 0.9, 0.25, 1);
}

.cell.found .flip {
  transform: rotateY(180deg);
}

.cell .face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
  overflow: hidden;
}

/* An index card: cream paper with a faint grain and a soft bottom edge. */
.cell .front {
  background: linear-gradient(170deg, var(--cream) 0%, var(--cream-2) 100%);
  color: var(--card-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 6px -2px rgba(0, 0, 0, 0.6);
}

.cell .front::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.cell .word,
.cell .back b {
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

/* --fit is set per cell by fitWords() when a word is too wide for its card. */
.cell .word {
  position: relative;
  z-index: 1;
  font-size: calc(var(--fit, 1) * 1em);
}

.cell .back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 20%, #2f8c5a, var(--agent-deep) 75%);
  color: var(--agent-ink);
  box-shadow: inset 0 0 0 2px rgba(223, 245, 231, 0.25);
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 7px;
}

.cell .back .glyph {
  position: absolute;
  inset: 8% 24% 32%;
  color: #0f3b26;
  opacity: 0.6;
}

.cell .back .glyph svg {
  width: 100%;
  height: 100%;
}

.cell .back b {
  position: relative;
  font-size: calc(var(--fit, 1) * 0.74em);
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.cell.can {
  cursor: pointer;
}

.cell.can:active {
  transform: scale(0.95);
}

/* My key, shown on my own board: my agents and assassins. */
.cell.k-g .front {
  box-shadow: inset 0 0 0 2.5px var(--agent), 0 2px 6px -2px rgba(0, 0, 0, 0.6);
}

.cell.k-a .front {
  box-shadow: inset 0 0 0 2.5px var(--assassin), 0 2px 6px -2px rgba(0, 0, 0, 0.6);
}

.cell .mark {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 15px;
  height: 15px;
  color: var(--assassin);
  z-index: 1;
}

.cell.sel {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 0 3px var(--lamp), 0 12px 24px -8px rgba(0, 0, 0, 0.8), 0 0 24px -4px rgba(233, 185, 87, 0.6);
  z-index: 2;
}

/* Found: a pop and a short glow, on top of the flip. */
.cell.reveal {
  animation: reveal 0.9s var(--ease-spring);
  z-index: 1;
}

@keyframes reveal {
  0% {
    transform: none;
  }
  45% {
    transform: translateY(-6px) scale(1.1);
    box-shadow: 0 0 0 3px rgba(58, 169, 106, 0.6), 0 14px 26px -8px rgba(0, 0, 0, 0.8);
  }
  100% {
    transform: none;
    box-shadow: none;
  }
}

/* Bystander tokens: one for each key the word was tried against. */
.cell .tok {
  position: absolute;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d4a978, var(--byst) 65%);
  border: 1.5px solid var(--byst-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.cell .tok.mine {
  left: 3px;
}

.cell .tok.theirs {
  right: 3px;
}

.cell .tok.land {
  animation: land 0.5s var(--ease-spring) backwards;
}

@keyframes land {
  from {
    transform: translateY(-18px) scale(2.2);
    opacity: 0;
    box-shadow: 0 14px 14px rgba(0, 0, 0, 0.4);
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.cell.dead .front {
  background: linear-gradient(170deg, #776d75, #5c535b);
  color: #cfc6cc;
}

.cell.boom .front {
  background: radial-gradient(circle at 50% 40%, #ff8b93, var(--assassin) 70%);
  color: #3a0a10;
}

.cell.boom {
  animation: boom 1.2s var(--ease-out);
  box-shadow: 0 0 0 2px var(--assassin), 0 0 30px -4px var(--assassin);
}

@keyframes boom {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(217, 71, 90, 0.8), 0 0 60px 10px rgba(217, 71, 90, 0.9);
  }
  100% {
    transform: none;
  }
}

.board.quake {
  animation: quake 0.65s linear;
}

@keyframes quake {
  10%,
  90% {
    transform: translate(-2px, 1px);
  }
  20%,
  80% {
    transform: translate(4px, -1px);
  }
  30%,
  50%,
  70% {
    transform: translate(-7px, 2px);
  }
  40%,
  60% {
    transform: translate(7px, -2px);
  }
}

body.flash::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: var(--assassin);
  animation: flash 0.9s ease-out forwards;
}

@keyframes flash {
  0% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
  }
}

/* Revealed at the end: the partner's agents and assassins. */
.cell.their-g .front::before,
.cell.their-a .front::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 6px;
  border: 2px dashed var(--agent);
  animation: enter 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i) * 25ms);
  z-index: 1;
}

.cell.their-a .front::before {
  border-color: var(--assassin);
}

main.lost .board .cell:not(.boom) {
  filter: saturate(0.5) brightness(0.8);
}

/* ---- meters --------------------------------------------------------------------- */

.meters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 2px;
  font-size: 13px;
  color: var(--muted);
}

.meter.agents .num {
  display: inline-block;
  font: 400 18px/1 var(--serif);
  color: var(--cream);
  margin-right: 2px;
}

.meter.agents .num.tick {
  animation: tick 0.5s var(--ease-spring);
}

@keyframes tick {
  0% {
    transform: translateY(8px);
    opacity: 0;
    color: var(--agent);
  }
  60% {
    color: var(--agent);
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.turns {
  display: flex;
  gap: 5px;
}

.turns i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 6px -1px rgba(233, 185, 87, 0.8);
  transition: background 0.5s, box-shadow 0.5s, transform 0.5s;
}

.turns i.used {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.turns i.spend {
  animation: spend 0.7s var(--ease-out);
}

@keyframes spend {
  0% {
    transform: scale(1);
    background: var(--lamp);
  }
  30% {
    transform: scale(1.7);
    background: var(--cream);
    box-shadow: 0 0 12px 2px rgba(233, 185, 87, 0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* ---- legend ---------------------------------------------------------------------- */

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.legend b {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: -2px;
  margin-right: 5px;
  background: var(--cream);
}

.legend .sw-g {
  box-shadow: inset 0 0 0 2px var(--agent);
}

.legend .sw-a {
  box-shadow: inset 0 0 0 2px var(--assassin);
}

.legend .sw-b {
  background: var(--byst);
  border-radius: 50%;
}

.legend .sw-t {
  background: none;
  border: 1.5px dashed var(--agent);
}

.legend .their {
  display: none;
}

.legend.over .their {
  display: inline;
}

/* ---- the action bar ------------------------------------------------------------------ */

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: rgba(26, 20, 24, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
}

.bar-body {
  max-width: 560px;
  margin: 0 auto;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row input {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.bar .hint {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0;
  flex: 1;
}

.counts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 8px;
}

.counts button {
  min-height: 40px;
  padding: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  border-radius: 8px;
}

.counts button.on {
  background: var(--lamp);
  border-color: var(--lamp);
  color: var(--lamp-ink);
  font-weight: 700;
}

.row.confirm {
  min-height: 50px;
}

.row.confirm .big {
  flex: 1;
  width: auto;
}

.row.confirm .big span {
  max-width: 55vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row.confirm .stop {
  flex: none;
  min-height: 50px;
}

.pop {
  animation: pop 0.35s var(--ease-spring) both;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* ---- toast and confetti ------------------------------------------------------------- */

#toast {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  transform: translate(-50%, -150%);
  opacity: 0;
  background: var(--cream);
  color: var(--card-ink);
  border-radius: 10px;
  padding: 10px 16px;
  z-index: 40;
  font-size: 14px;
  font-weight: 600;
  max-width: 90vw;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

#toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  animation: toastIn 0.5s var(--ease-spring);
}

@keyframes toastIn {
  from {
    transform: translate(-50%, -150%);
  }
  to {
    transform: translate(-50%, 0);
  }
}

canvas.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

/* ---- wider screens -------------------------------------------------------------------- */

@media (min-width: 640px) {
  .board {
    gap: 8px;
  }
  .cell {
    --cell-font: 19px;
    border-radius: 11px;
  }
  .cell .mark {
    width: 18px;
    height: 18px;
    top: 5px;
    right: 5px;
  }
  .stage {
    margin-top: 18px;
  }
  .bar {
    border-top-color: transparent;
    background: linear-gradient(to top, rgba(26, 20, 24, 0.98), rgba(26, 20, 24, 0.85));
  }
  .counts button {
    min-height: 42px;
  }
}

/* ---- motion off ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body.flash::after {
    display: none;
  }
}
