/* Know It — printed board game on a phone.
   Cream card stock, black ink outlines, hard offset shadows, and four
   game-piece colours. Fonts are self-hosted: see /fonts/fonts.css. */

:root {
  --paper: #f1e9da;
  --card: #fffcf5;
  --ink: #1c1a17;
  --ink-soft: #5e574c;
  --rule: rgba(28, 26, 23, 0.14);

  --red: #d7372b;
  --blue: #1e4fd8;
  --mustard: #f2b705;
  --green: #22875a;

  --line: 2.5px solid var(--ink);
  --lift: 4px 4px 0 var(--ink);
  --r: 9px;

  --display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { min-height: 100dvh; }

#app {
  max-width: 540px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .5rem; }
h1 { font-size: 3rem; letter-spacing: -.01em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
b { font-weight: 700; }

.pad { padding: 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.av { display: block; flex: none; overflow: visible; }

/* the rule behind a screen, for whoever wants it: small, at the bottom */
.fine { margin: 26px 0 0; font-size: .82rem; color: var(--ink-soft); text-align: center; }

/* ---------------------------------------------------------------- controls */

button, .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--lift);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .06s ease, box-shadow .06s ease;
}
button:active:not(:disabled), .btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}
/* waiting, not broken: a dashed outline rather than a faded colour */
button:disabled {
  background: transparent;
  color: var(--ink-soft);
  border-style: dashed;
  box-shadow: none;
  cursor: default;
}
button.tile:disabled { background: var(--cat); color: var(--cat-ink); border-style: solid; opacity: .5; }
button.primary, .btn.primary { background: var(--red); color: #fff; }
button.primary:disabled { background: transparent; color: var(--ink-soft); }
button.big { min-height: 66px; font-size: 1.25rem; }
button.ghost { background: transparent; box-shadow: none; }
button.ghost:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: none; }
button.link {
  width: auto; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
  font: 700 .95rem var(--body); color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
}
button.back { width: auto; min-height: 40px; padding: 0 12px; border: 0; box-shadow: none; background: none; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font: 600 1.15rem var(--body);
}
input::placeholder { color: var(--ink-soft); opacity: .6; font-weight: 400; }
input:focus { outline: none; box-shadow: var(--lift); }
input.code {
  text-transform: uppercase;
  letter-spacing: .15em;
  text-align: center;
  font-family: var(--display);
  font-size: 2rem;
  min-height: 76px;
}
input.code::placeholder { letter-spacing: .15em; opacity: .3; }
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }

.card {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 16px;
}

.error { color: var(--red); font-weight: 700; min-height: 1.4em; margin: 10px 0; }

/* ---------------------------------------------------------------- the three counters */

.pips { display: inline-flex; gap: 8px; }
.pips i { width: 22px; height: 22px; border-radius: 50%; border: var(--line); display: block; }
.pips i:nth-child(1) { background: var(--red); }
.pips i:nth-child(2) { background: var(--blue); }
.pips i:nth-child(3) { background: var(--mustard); }

/* ---------------------------------------------------------------- home */

.home { padding-top: 2vh; }
/* this phone's language, top right of the home screen */
.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.lang-switch button { width: auto; min-height: 34px; padding: 0 10px; font-size: .8rem; border-width: 2px; box-shadow: none; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.brand .pips { margin-bottom: 10px; }
.brand h1 { font-size: clamp(2.5rem, 12.5vw, 3.4rem); margin: 0; white-space: nowrap; }
.brand h1 span { color: var(--red); }
.home .tag { font-size: 1.05rem; color: var(--ink-soft); margin: 10px 0 28px; }
.home footer { margin-top: 36px; color: var(--ink-soft); font-size: .95rem; text-align: center; }

.me-card { text-align: center; margin-bottom: 8px; }
.me-card label { text-align: left; margin-top: 22px; }
.face-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.face {
  position: relative; width: auto; min-height: 0; padding: 6px;
  border: 0; background: none; box-shadow: none;
}
.face:active:not(:disabled) { transform: scale(.97); box-shadow: none; }
.face .pen {
  position: absolute; right: -6px; bottom: 2px;
  font-size: .8rem; padding: 3px 9px; border: 2px solid var(--ink); border-radius: 99px;
  background: var(--card); box-shadow: 2px 2px 0 var(--ink);
}

.editor { margin-top: 14px; text-align: left; }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding-bottom: 8px; }
.tabs button { min-height: 40px; padding: 0 1px; font-size: .72rem; box-shadow: none; border-width: 2px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 10px; }
.options button { min-height: 68px; padding: 4px; box-shadow: none; border: 2px solid var(--rule); background: transparent; }
.options .part { display: block; overflow: visible; }
/* swatch rows (skin, hair colour, top) are small dots, eight to a row */
.options.k, .options.a, .options.c { grid-template-columns: repeat(8, 1fr); gap: 5px; }
.options.k { grid-template-columns: repeat(6, 1fr); }
.options.k button, .options.a button, .options.c button { min-height: 42px; padding: 2px; }
.options.k .part, .options.a .part, .options.c .part { width: 28px; height: 28px; }
.opt-label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin: 4px 0 4px; }
.options button[aria-pressed="true"] { background: var(--card); border: 3px solid var(--ink); box-shadow: var(--lift); }

.join-box { margin-top: 18px; }
.join-box h2 { font-size: 2.2rem; }
.joining-as { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 30px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- game chrome */

.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
}
.bar .logo {
  width: auto; min-height: 38px; padding: 0 12px 0 9px; gap: 7px;
  font-size: .9rem; border-width: 2px; box-shadow: 2px 2px 0 var(--ink);
}
.bar .logo .pips { gap: 3px; }
.bar .logo .pips i { width: 10px; height: 10px; border-width: 2px; }
.bar .spacer { flex: 1; }
.bar .round { font-family: var(--display); font-size: .95rem; }
.bar .me { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-variant-numeric: tabular-nums; }
.secs { font-family: var(--display); font-variant-numeric: tabular-nums; }

.timer {
  height: 12px;
  border: var(--line);
  border-radius: 99px;
  background: var(--card);
  overflow: hidden;
  margin-bottom: 14px;
}
.timer i { display: block; height: 100%; background: var(--mustard); border-right: 2px solid var(--ink); transition: width .2s linear; }
.timer.low i { background: var(--red); }

/* where we are in the round */
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 4px; font-size: .78rem; font-weight: 700; }
.steps li { flex: 1; text-align: center; padding: 5px 0 4px; border-bottom: 3px solid var(--rule); color: var(--ink-soft); }
.steps li.done { border-color: var(--ink-soft); }
.steps li.now { border-color: var(--red); color: var(--ink); }

.banner {
  background: var(--red);
  color: #fff;
  border: var(--line);
  border-radius: var(--r);
  font-family: var(--display);
  text-align: center;
  padding: 8px;
  margin-bottom: 12px;
}

.modal {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 20px;
  background: rgba(28, 26, 23, .5);
}
.modal .card { width: 100%; max-width: 400px; }

/* categories: game-piece colours instead of icons */
.cat-people { --cat: var(--red); --cat-ink: #fff; }
.cat-world { --cat: var(--blue); --cat-ink: #fff; }
.cat-works { --cat: var(--mustard); --cat-ink: var(--ink); }
.cat-events { --cat: var(--green); --cat-ink: #fff; }

.prompt { margin-bottom: 16px; }
.prompt .cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}
.prompt .cat::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--cat, var(--ink));
}
.prompt h2 { font-size: 2rem; }
.inline-face { display: inline-block; vertical-align: -6px; margin-right: 8px; }
.inline-face .av { display: inline-block; }

.ask { font-family: var(--display); font-size: 1.35rem; margin: 6px 0 12px; }
.locked { text-align: center; }
.locked h3 { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }

.waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.waiting .label { font-size: .85rem; font-weight: 700; color: var(--ink-soft); margin-right: 2px; }
.waiting .chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 700;
  padding: 3px 11px 3px 4px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
}
.waiting .chip.done { background: var(--ink); color: var(--paper); }
.waiting .chip.away { opacity: .5; }
.hurry { margin-top: 16px; }

/* ---------------------------------------------------------------- lobby */

.room-code {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(2.6rem, 12vw, 3.6rem);
  letter-spacing: .06em;
  white-space: nowrap;
  line-height: 1;
  background: var(--mustard);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 10px 18px 8px;
  margin: 6px 0 12px;
  transform: rotate(-1.5deg);
}
.share { margin-bottom: 18px; }

.tokens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 8px; }
.tokens li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
/* the shoulders run to the bottom edge of the avatar: give the name room */
.tokens li .av { margin-bottom: 8px; }
.tokens .name { font-weight: 700; font-size: .95rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tokens .tag { font-size: .75rem; color: var(--ink-soft); font-weight: 600; margin-top: -4px; }
.tokens .tag.is-ready { color: var(--green); font-weight: 800; }
.tokens .away { opacity: .45; }
.tokens .kick {
  position: absolute; top: -4px; right: 6px;
  width: 28px; min-height: 28px; padding: 0; border-radius: 50%;
  border-width: 2px; box-shadow: none; font-size: .8rem;
}
button.is-ready { background: var(--green); color: #fff; }

/* game length: one clear phrase, stepped with arrows */
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: stretch; }
.stepper button { min-height: 60px; padding: 0; font-size: 1.6rem; box-shadow: 2px 2px 0 var(--ink); }
.stepper .value {
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  border: var(--line); border-radius: var(--r); background: var(--paper); padding: 6px 8px;
}
.stepper .value b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; line-height: 1.1; }
.stepper .value small { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }

.seg { display: flex; gap: 8px; }
.seg button { min-height: 46px; padding: 0 6px; font-size: .95rem; min-width: 0; box-shadow: 2px 2px 0 var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.rules .rule + .rule, .rules .more .rule { margin-top: 16px; }
.rules .more { margin-top: 16px; border-top: 2px solid var(--rule); padding-top: 12px; }
.rules .more summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); }

.how { border: 2px dashed var(--ink-soft); border-radius: var(--r); padding: 14px 16px 4px; }
.how h3 { font-size: 1rem; }
.how ol { margin: 0 0 10px; padding-left: 1.2em; }
.how li { margin-bottom: 6px; font-size: .95rem; }

/* ---------------------------------------------------------------- choosing */

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }

.tile {
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 1.15rem;
  background: var(--cat);
  color: var(--cat-ink);
}

.level { justify-content: space-between; min-height: 74px; text-align: left; }
.level b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.level span {
  font-family: var(--display);
  font-size: 1rem;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.level.l3 span { background: var(--red); color: #fff; }
.level.l2 span { background: var(--blue); color: #fff; }
.level.l1 span { background: var(--mustard); color: var(--ink); }

.badge {
  display: inline-block;
  font-family: var(--display);
  font-size: .7rem;
  line-height: 1;
  padding: 4px 7px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  white-space: nowrap;
  vertical-align: 2px;
}
.badge.l3 { background: var(--red); color: #fff; }
.badge.l2 { background: var(--blue); color: #fff; }
.badge.l1 { background: var(--mustard); color: var(--ink); }

.bet-one { text-align: center; }
.bet-one .av { margin: 0 auto 10px; }
.bet-one h2 { font-size: 1.8rem; }
.yes-no { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.yes-no button { min-height: 76px; font-size: 1.3rem; color: #fff; }
.yes-no .yes { background: var(--green); }
.yes-no .no { background: var(--red); }

.bet-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px solid var(--rule);
}
.bet-row:last-child { border-bottom: 0; }
.bet-row .who { font-weight: 700; line-height: 1.2; }
.bet-row .who small { display: block; font-weight: 500; font-size: .8rem; color: var(--ink-soft); }
.bet-row button { min-height: 50px; width: 56px; padding: 0; font-size: 1.4rem; box-shadow: 3px 3px 0 var(--ink); color: #fff; }
.bet-row button.yes { background: var(--green); }
.bet-row button.no { background: var(--red); }

/* ---------------------------------------------------------------- clues */

.clue {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 12px 16px 14px;
  margin-bottom: 12px;
}
.clue.deal { animation: deal .3s ease both; }
.clue .n {
  display: inline-block;
  font-family: var(--display);
  font-size: .75rem;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 5px;
}
.clue.c3 .n { background: var(--red); color: #fff; }
.clue.c2 .n { background: var(--blue); color: #fff; }
.clue.c1 .n { background: var(--mustard); color: var(--ink); }
.clue p { margin: 8px 0 0; font-size: 1.15rem; line-height: 1.4; font-weight: 500; }
.clue.pending { background: transparent; border-style: dashed; box-shadow: none; padding: 8px 14px; }
.clue.pending .n { background: transparent; color: var(--ink-soft); border-color: var(--ink-soft); }

.answer-box { margin-top: 16px; }
.answer-box .ask { margin-bottom: 0; }
.clues + p, .clues + .locked, .clues + .answer-box { margin-top: 16px; }

@keyframes deal { from { opacity: 0; transform: translateY(10px) rotate(-1deg); } }

/* ---------------------------------------------------------------- reveal */

.result {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 1.5rem;
  border: var(--line); border-radius: var(--r); box-shadow: var(--lift);
  padding: 12px 18px; margin-bottom: 18px;
}
.result b { font-weight: 400; display: block; }
.result small { display: block; font-family: var(--body); font-weight: 600; font-size: .85rem; opacity: .85; margin-top: 2px; }
.result.good { background: var(--green); color: #fff; }
.result.bad { background: var(--card); }

.it-was { text-align: center; margin: 4px 0 20px; }
.it-was .label { font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.it-was .answer {
  display: inline-block;
  font-family: var(--display);
  font-size: 2.1rem;
  line-height: 1.1;
  background: var(--mustard);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 10px 18px;
  transform: rotate(-1.5deg);
}
.it-was .answer.deal { animation: deal .35s ease both; }
.it-was .also { margin-top: 10px; }

.results { list-style: none; margin: 0; padding: 4px 14px; }
.results li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 2px solid var(--rule); }
.results li:last-child { border-bottom: 0; }
.results .who { font-weight: 700; }
.results .said-cell { color: var(--ink-soft); overflow-wrap: anywhere; }
.results .said-cell.ok { color: var(--green); font-weight: 700; }
.results .said-cell.no { text-decoration: line-through; text-decoration-thickness: 2px; }

/* the host's verdict switch: says what it is, and that it can be flipped */
.judge { width: auto; min-height: 38px; margin-top: 8px; padding: 0 12px; gap: 6px; font-size: .88rem; box-shadow: 2px 2px 0 var(--ink); color: #fff; }
.judge.ok { background: var(--green); }
.judge.no { background: var(--red); }
.judge-note { font-size: .88rem; color: var(--ink-soft); background: var(--card); border: 2px dashed var(--ink-soft); border-radius: var(--r); padding: 10px 12px; margin: 0 0 12px; }
.judge-note b { color: var(--ink); }
.results .delta { width: 2.2em; text-align: right; font-family: var(--display); font-size: 1.2rem; white-space: nowrap; }
.results .delta.up { color: var(--green); }
.results .delta.down { color: var(--red); }
.betline { font-size: .85rem; color: var(--ink-soft); }

.standings { list-style: none; padding: 0; margin: 0; }
.standings li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px solid var(--rule); }
.standings li:last-child { border-bottom: 0; }
.standings .pos { width: 1.3em; font-family: var(--display); color: var(--ink-soft); }
.standings .name { flex: 1; font-weight: 700; min-width: 0; }
.standings .pts { font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.standings .me .name { color: var(--red); }
.standings.card { padding: 6px 16px; }

.meter { height: 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); margin-top: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--red); }

/* ---------------------------------------------------------------- podium */

.podium-wrap { position: relative; padding-top: 6px; overflow: hidden; }
.final { font-size: 2.2rem; margin-bottom: 10px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; min-height: 330px; border-bottom: var(--line); }
.step { flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; }
.step .who { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 8px; text-align: center; max-width: 100%; }
.step .who .av { margin-bottom: 8px; }
.step .who b { font-size: 1rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .who span { font-family: var(--display); font-size: .9rem; }
.step .block {
  width: 100%;
  border: var(--line);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  box-shadow: 4px 0 0 var(--ink);
  display: flex; justify-content: center; padding-top: 10px;
  font-family: var(--display); font-size: 2.2rem;
  transform-origin: bottom;
}
.step.s1 .block { height: 160px; background: var(--mustard); }
.step.s2 .block { height: 115px; background: var(--blue); color: #fff; }
.step.s3 .block { height: 80px; background: var(--red); color: #fff; }
.podium + * { margin-top: 0; }

/* the reveal: third, then second, then the winner, then confetti */
.step.s3 { --at: .3s; }
.step.s2 { --at: 1.3s; }
.step.s1 { --at: 2.4s; }
.play .step .block { animation: rise .55s cubic-bezier(.3, 1.4, .6, 1) var(--at) both; }
.play .step .who { animation: drop .45s ease calc(var(--at) + .45s) both; }
.play .final { animation: fade .4s ease 3.2s both; }
.after.play { animation: fade .5s ease 3.4s both; }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes drop { from { opacity: 0; transform: translateY(-40px); } }
@keyframes fade { from { opacity: 0; } }

.confetti { position: absolute; inset: 0; pointer-events: none; display: none; }
.play .confetti { display: block; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px;
  background: var(--c); border: 2px solid var(--ink); border-radius: 2px;
  animation: fall 2.4s ease-in calc(3s + var(--d)) both;
}
@keyframes fall {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--x), 420px) rotate(540deg); opacity: 0; }
}

/* ---------------------------------------------------------------- toast */

#toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  opacity: 0;
  visibility: hidden;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--r);
  max-width: calc(100% - 32px);
  transition: transform .2s ease, opacity .2s ease, visibility .2s;
  z-index: 30;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .play .confetti { display: none; }
}

.ico {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
}
