:root {
  --asphalt: #26292E;
  --asphalt-2: #30343A;
  --asphalt-3: #3B4047;
  --grit: #454A52;
  --yellow: #F2C230;
  --plate: #F5F5EF;
  --ink: #15171A;
  --eu: #1E4BB0;
  --red: #E5352B;
  --text: #ECEDEA;
  --muted: #9AA0A8;
  --plate-font: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --ui-font: 'Familjen Grotesk', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--asphalt);
  /* finom aszfaltszemcse */
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px),
    radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.4px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================= Rendszámtábla ================= */
.plate {
  --h: 44px;
  display: inline-flex;
  align-items: stretch;
  height: var(--h);
  background: var(--plate);
  color: var(--ink);
  border: calc(var(--h) * .055) solid var(--ink);
  border-radius: calc(var(--h) * .14);
  box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 calc(var(--h) * .03) #cfd0c8;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--plate-font);
  font-weight: 800;
  line-height: 1;
}
.plate .eu {
  width: calc(var(--h) * .42);
  background: var(--eu);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: calc(var(--h) * .08);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: calc(var(--h) * .3);
  position: relative;
}
.plate .eu::before { /* csillagkör jelzés */
  content: '';
  position: absolute;
  top: calc(var(--h) * .1);
  width: calc(var(--h) * .26);
  height: calc(var(--h) * .26);
  border-radius: 50%;
  border: calc(var(--h) * .035) dotted var(--yellow);
}
.plate .txt {
  display: flex;
  align-items: center;
  padding: 0 calc(var(--h) * .22) 0 calc(var(--h) * .18);
  font-size: calc(var(--h) * .74);
  letter-spacing: .02em;
}
.plate .txt .gap { display: inline-block; width: calc(var(--h) * .16); }
.plate .txt .dash { margin: 0 calc(var(--h) * .05); }
.plate.ghost { background: transparent; color: var(--muted); border-style: dashed; border-color: var(--grit); box-shadow: none; }
.plate.ghost .eu { background: var(--asphalt-3); color: var(--muted); }
.plate.ghost .eu::before { border-color: var(--muted); }

/* ================= Kapu & profilválasztó ================= */
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + var(--safe-b));
  text-align: center;
}
.gate .plate { --h: min(18vw, 96px); margin-bottom: 28px; }
.gate h1 {
  font-family: var(--plate-font);
  font-weight: 900;
  font-size: clamp(40px, 9vw, 72px);
  line-height: .95;
  margin: 0 0 10px;
  letter-spacing: .01em;
}
.gate p.lead { color: var(--muted); margin: 0 0 28px; max-width: 34ch; }
.gate form { display: flex; flex-direction: column; gap: 12px; width: min(340px, 100%); }

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 136px));
  justify-content: center;
  gap: 22px;
  width: min(720px, 100%);
  margin-bottom: 36px;
}
.ptile {
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.ptile .av {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: var(--c, var(--yellow));
  border: 3px solid transparent;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.ptile:hover .av, .ptile:focus-visible .av { border-color: var(--plate); transform: scale(1.04); }
.ptile:hover, .ptile:focus-visible { color: var(--text); outline: none; }
.ptile .name { font-weight: 600; font-size: 17px; }
.ptile .lock { position: absolute; right: 6px; bottom: 4px; font-size: 18px; }
.ptile.add .av { background: transparent; border: 3px dashed var(--grit); color: var(--muted); font-size: 48px; }
.ptile .edit-badge {
  position: absolute; inset: 0; border-radius: 11px;
  background: rgba(20,22,25,.55); display: grid; place-items: center; font-size: 34px;
}

/* PIN */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 6px 0 22px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots span.on { background: var(--yellow); border-color: var(--yellow); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.pin-pad button {
  height: 64px; border-radius: 12px; border: 0;
  background: var(--asphalt-3); font-size: 26px; font-weight: 600;
}
.pin-pad button:active { background: var(--grit); }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

/* ================= Gombok, mezők ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 10px; border: 0;
  background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 16px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: var(--asphalt-3); color: var(--text); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--grit); }
.btn.danger { background: transparent; color: #ff8a80; border: 1px solid #6b3330; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field > label, .field > .lbl { font-size: 14px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--grit);
  background: var(--asphalt-2);
  font-size: 16px;
}
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--yellow); outline: none; }
.err { color: #ff8a80; font-size: 14px; min-height: 1.2em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--grit); background: transparent; color: var(--text);
  font-size: 14px; display: inline-flex; align-items: center; gap: 7px;
}
.chip[aria-pressed="true"] { background: var(--plate); color: var(--ink); border-color: var(--plate); font-weight: 600; }
.chip .sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.3); }

/* ================= Keret ================= */
.shell { padding-bottom: calc(92px + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: rgba(38,41,46,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--asphalt-3);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.topbar .brand .plate { --h: 30px; }
.topbar nav { display: none; gap: 4px; margin-left: 12px; }
.topbar nav a {
  color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.topbar nav a.on { color: var(--text); background: var(--asphalt-3); }
.topbar nav a.cta { background: var(--yellow); color: var(--ink); margin-left: 6px; }
.topbar .me {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; color: var(--text); font-weight: 600; padding: 4px;
}
.mini-av {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  font-size: 20px; background: var(--c, var(--yellow)); flex: none;
}
.mini-av.sm { width: 26px; height: 26px; font-size: 15px; border-radius: 6px; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: rgba(30,33,37,.97);
  border-top: 1px solid var(--asphalt-3);
}
.bottombar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; padding: 6px 0;
}
.bottombar a .ic { font-size: 21px; line-height: 1; filter: grayscale(1); opacity: .8; }
.bottombar a.on { color: var(--text); }
.bottombar a.on .ic { filter: none; opacity: 1; }
.bottombar a.snap .ic {
  width: 58px; height: 58px; margin-top: -26px; border-radius: 16px;
  background: var(--yellow); display: grid; place-items: center; font-size: 28px; filter: none; opacity: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.bottombar a.snap { color: var(--yellow); }

main { max-width: 1080px; margin: 0 auto; padding: 22px 16px; }
h2.title {
  font-family: var(--plate-font); font-weight: 900; font-size: 40px; line-height: 1;
  margin: 6px 0 18px; letter-spacing: .01em;
}
h3.sub { font-size: 18px; margin: 34px 0 14px; }
.muted { color: var(--muted); }

@media (min-width: 820px) {
  .topbar nav { display: flex; }
  .bottombar { display: none; }
  .shell { padding-bottom: 40px; }
  main { padding: 32px 24px; }
}

/* ================= Főoldal: számláló + út ================= */
.hero { padding: 8px 0 6px; }
.count-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.count-big {
  font-family: var(--plate-font); font-weight: 900; line-height: .8;
  font-size: clamp(110px, 30vw, 210px); color: var(--plate); letter-spacing: -.01em;
}
.count-of { padding-bottom: 6px; }
.count-of b { display: block; font-family: var(--plate-font); font-weight: 900; font-size: clamp(44px, 11vw, 76px); line-height: .9; color: var(--muted); }
.count-of p { margin: 6px 0 0; color: var(--muted); }

.road {
  margin: 26px 0 10px; position: relative; height: 54px;
  background: #1d1f23; border-radius: 6px; overflow: hidden;
  border-top: 3px solid #d9d9d4; border-bottom: 3px solid #d9d9d4;
}
.road::before { /* felfestetlen szaggatott vonal */
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(242,194,48,.16) 0 28px, transparent 28px 46px);
}
.road .paint {
  position: absolute; left: 0; top: 50%; height: 6px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--yellow) 0 28px, transparent 28px 46px);
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
}
.road .car { position: absolute; top: 50%; transform: translate(-60%, -54%) scaleX(-1); font-size: 28px; transition: left 1.2s cubic-bezier(.2,.8,.2,1); }
.road-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.stat { background: var(--asphalt-2); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-family: var(--plate-font); font-size: 34px; line-height: 1; font-weight: 800; }
.stat span { font-size: 13px; color: var(--muted); }

/* ================= Hírfolyam ================= */
.feed { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .feed { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .feed { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: var(--asphalt-2); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card .ph {
  position: relative; aspect-ratio: 4/3; background: #1d1f23; border: 0; padding: 0; width: 100%;
  display: block;
}
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.card .ph .plate { position: absolute; left: 12px; bottom: 12px; --h: 34px; }
.tag {
  position: absolute; top: 12px; left: 12px;
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  background: rgba(20,22,25,.8); color: var(--text);
}
.tag.new { background: var(--red); color: #fff; box-shadow: 0 0 18px rgba(229,53,43,.6); }
.tag.sp { left: auto; right: 12px; background: var(--yellow); color: var(--ink); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.who { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.who b { font-weight: 600; }
.who .when { margin-left: auto; color: var(--muted); font-size: 13px; }
.meta { color: var(--muted); font-size: 14px; }
.meta .note { color: var(--text); }
.reacts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.react {
  border: 1px solid var(--grit); background: transparent; border-radius: 999px;
  min-height: 34px; padding: 0 10px; font-size: 15px; display: inline-flex; gap: 5px; align-items: center;
}
.react.on { border-color: var(--yellow); background: rgba(242,194,48,.14); }
.react .n { font-size: 13px; font-weight: 600; }
.react.more { margin-left: auto; border: 0; color: var(--muted); }
.pts { font-weight: 700; color: var(--yellow); font-size: 14px; }

.empty {
  border: 2px dashed var(--grit); border-radius: 14px; padding: 32px 20px; text-align: center; color: var(--muted);
}
.empty .btn { margin-top: 14px; }

/* ================= Dex ================= */
.dex-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; text-decoration: none; color: var(--muted); font-family: var(--plate-font); font-weight: 800;
  font-size: 18px; padding: 4px 10px; border-radius: 6px; background: var(--asphalt-2);
}
.jump a small { font-family: var(--ui-font); font-size: 11px; font-weight: 600; margin-left: 4px; }
.dex-block { scroll-margin-top: 70px; }
.dex-block h4 {
  display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px;
  font-family: var(--plate-font); font-weight: 800; font-size: 24px;
}
.dex-block h4 span { font-family: var(--ui-font); font-size: 13px; font-weight: 500; color: var(--muted); }
.dex {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px;
}
@media (min-width: 560px) { .dex { grid-template-columns: repeat(10, 1fr); } }
.cell {
  position: relative; height: 40px; border-radius: 6px; border: 0; padding: 0;
  font-family: var(--plate-font); font-weight: 800; font-size: 22px; letter-spacing: .02em;
  display: grid; place-items: center;
}
.cell.got {
  background: var(--plate); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: inset 0 -4px 0 var(--c, var(--yellow));
  padding-left: 8px;
}
.cell.got::before {
  content: ''; position: absolute; left: 2px; top: 2px; bottom: 6px; width: 7px; border-radius: 2px; background: var(--eu);
}
.cell.miss { background: transparent; color: #5d636b; border: 1.5px dashed #4b5058; }
.cell.miss:hover { color: var(--text); border-color: var(--muted); }
.cell .star { position: absolute; top: 1px; right: 4px; font-size: 10px; color: var(--yellow); }
.cell.mine { outline: 2px solid var(--c); outline-offset: 1px; }
@media (min-width: 820px) { .dex { max-width: 860px; } .cell { height: 44px; font-size: 24px; } }

/* ================= Beküldés ================= */
.form { display: grid; gap: 20px; max-width: 620px; }
.plate-input { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.plate.big { --h: clamp(64px, 17vw, 96px); }
.plate.big input {
  width: 2.1em; border: 0; background: transparent; padding: 0; margin: 0;
  font: inherit; color: var(--ink); letter-spacing: .02em; caret-color: var(--red);
}
.plate.big input::placeholder { color: #c3c4bd; }
.plate.big input:focus { outline: none; }
.plate-status { font-weight: 600; min-height: 1.5em; }
.plate-status.new { color: var(--yellow); }

.drop {
  display: grid; place-items: center; text-align: center;
  min-height: 190px; border-radius: 14px; border: 2px dashed var(--grit);
  background: var(--asphalt-2); color: var(--muted); padding: 18px; cursor: pointer; position: relative; overflow: hidden;
}
.drop:hover, .drop.over { border-color: var(--yellow); color: var(--text); }
.drop .big-ic { font-size: 40px; display: block; margin-bottom: 6px; }
.drop img { max-height: 360px; border-radius: 8px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* ================= Ranglista ================= */
.board { display: grid; gap: 10px; max-width: 720px; }
.brow {
  display: grid; grid-template-columns: 44px 44px 1fr auto; align-items: center; gap: 14px;
  background: var(--asphalt-2); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--text);
}
.brow .rk { font-family: var(--plate-font); font-weight: 900; font-size: 34px; color: var(--muted); text-align: center; }
.brow.r1 .rk { color: var(--yellow); }
.brow .nm { font-weight: 700; font-size: 17px; }
.brow .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.brow .sc { font-family: var(--plate-font); font-weight: 900; font-size: 34px; text-align: right; line-height: 1; }
.brow .sc small { display: block; font-family: var(--ui-font); font-size: 12px; color: var(--muted); font-weight: 500; }
.brow .mini-av { width: 44px; height: 44px; font-size: 26px; border-radius: 10px; }
.rules { margin-top: 30px; max-width: 720px; color: var(--muted); font-size: 14px; }
.rules table { border-collapse: collapse; width: 100%; margin-top: 8px; }
.rules td { padding: 7px 0; border-bottom: 1px solid var(--asphalt-3); }
.rules td:last-child { text-align: right; color: var(--text); font-weight: 600; }

/* ================= Profil ================= */
.phead { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; flex-wrap: wrap; }
.phead .mini-av { width: 84px; height: 84px; font-size: 48px; border-radius: 16px; }
.phead h2.title { margin: 0; }
.phead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { background: var(--asphalt-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.badge .bi { font-size: 30px; line-height: 1; }
.badge b { font-size: 15px; }
.badge span { font-size: 13px; color: var(--muted); }
.badge.locked { opacity: .38; }
.badge.locked .bi { filter: grayscale(1); }

/* ================= Lap (modal) ================= */
.sheet-bg {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,11,13,.66);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--asphalt-2); width: min(640px, 100%); max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 22px 20px calc(24px + var(--safe-b));
}
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }
.sheet h3 { margin: 0 0 16px; font-size: 22px; }
.sheet .close { float: right; background: none; border: 0; font-size: 26px; color: var(--muted); line-height: 1; padding: 2px 6px; }
.sheet .stack { display: grid; gap: 14px; }
.av-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.av-pick button { aspect-ratio: 1; border-radius: 8px; border: 2px solid transparent; background: var(--asphalt-3); font-size: 22px; padding: 0; }
.av-pick button[aria-pressed="true"] { border-color: var(--yellow); }
.col-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.col-pick button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; }
.col-pick button[aria-pressed="true"] { border-color: var(--plate); }
.hist { display: grid; gap: 14px; }
.hist .item img { border-radius: 10px; width: 100%; }

/* ================= Import ================= */
.imp-list { display: grid; gap: 10px; margin: 18px 0; }
.imp {
  display: grid; grid-template-columns: 74px 92px 1fr 1fr 36px; gap: 10px; align-items: center;
  background: var(--asphalt-2); padding: 8px; border-radius: 10px;
}
.imp img, .imp .noph { width: 74px; height: 56px; object-fit: cover; border-radius: 6px; background: #1d1f23; display: grid; place-items: center; color: var(--muted); font-size: 22px; }
.imp .input { min-height: 40px; padding: 7px 10px; font-size: 15px; }
.imp .x { background: none; border: 0; color: var(--muted); font-size: 22px; }
.imp.done { opacity: .5; }
.imp.bad { outline: 2px solid var(--red); }
.imp .numin { font-family: var(--plate-font); font-weight: 800; font-size: 20px; text-align: center; }
@media (max-width: 640px) {
  .imp { grid-template-columns: 64px 1fr 36px; }
  .imp img, .imp .noph { width: 64px; height: 48px; }
  .imp .owner, .imp .date { grid-column: 1 / -1; }
}

/* ================= Ünneplés: tábla "beütése" ================= */
.celebrate {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 20px;
  background: radial-gradient(circle at 50% 42%, #4a4126, #1b1d20 62%);
}
.celebrate .plate { --h: min(20vw, 120px); animation: stamp .55s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate h2 { font-family: var(--plate-font); font-weight: 900; font-size: clamp(38px, 9vw, 64px); margin: 0; line-height: 1; animation: rise .4s .35s both; }
.celebrate p { margin: 0; color: var(--muted); animation: rise .4s .45s both; }
.celebrate .pts-big { color: var(--yellow); font-family: var(--plate-font); font-weight: 900; font-size: 44px; animation: rise .4s .5s both; }
.celebrate .btn { animation: rise .4s .6s both; }
@keyframes stamp { 0% { transform: scale(2.6) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-2deg); } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

#toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--plate); color: var(--ink); padding: 11px 18px; border-radius: 10px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 90; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); color: #fff; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--grit); border-top-color: var(--yellow); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
