#achievementsView {
  --ach-line: #425362;
  background: #152632;
  container-type: inline-size;
}
#achievementsView .achievement-summary {
  padding: 15px 18px 12px;
  background: #152c3b;
  border-bottom: 1px solid var(--ach-line);
}
.achievement-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: #d6e0de;
  font-size: 14px;
  font-weight: 650;
}
#achievementsView .achievement-summary b { color: #f2d9a2; font-size: 19px; }
#achievementsView .achievement-summary p { margin: 5px 0 0; color: #a5b7c0; font-size: 11px; }
.ach-readout {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  padding: 6px 17px;
  background: #1d3342;
  border-bottom: 1px solid #566773;
  box-shadow: 0 2px 4px #07121bbb;
}
.ach-readout span, .ach-readout small { display: block; overflow-wrap: anywhere; }
.ach-readout span { color: #eee3ce; font-size: 13px; font-weight: 700; }
.ach-readout small { color: #b4c8d2; font-size: 11px; }
.ach-collection { padding: 0 15px 19px; }
.ach-collection h3 {
  font-size: 15px;
  color: #dcd5c6;
  padding: 15px 0 7px;
  margin: 0;
  border-bottom: 1px solid var(--ach-line);
}
.ach-row { margin: 0; padding: 8px 0 7px; border-bottom: 1px solid #283a47; }
.ach-row h4 {
  margin: 0 0 5px;
  color: #c8d5d7;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ach-row h4 small { color: #91a4af; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 400; }
.ach-tray {
  --ach-cols: 16;
  display: grid;
  grid-template-columns: repeat(var(--ach-cols), minmax(0, 1fr));
  gap: 3px;
}
@container (max-width: 475px) { .ach-tray { --ach-cols: 8; } }
@container (max-width: 295px) { .ach-tray { --ach-cols: 6; } }
:is(#achievementsView, #notifications) .achievement {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  min-height: 0;
  max-width: 48px;
  overflow: hidden;
  border: 1px solid #354553;
  border-radius: 2px;
  padding: 2px 3px 3px;
  background: #10212d;
  opacity: 1;
  box-shadow: inset 0 1px 2px #07111b66;
  isolation: isolate;
}
:is(#achievementsView, #notifications) .achievement.won {
  border-color: #635e54;
  background: linear-gradient(150deg, #384249, #243540 58%, #202d35);
  box-shadow: inset 1px 1px #80909c32, inset -1px -1px #0c192680;
}
#achievementsView .achievement:is(:hover, :focus-visible) { border-color: #e7c57e; filter: none; background-color: #2a404d; }
#achievementsView .achievement:focus-visible { outline-offset: 0; }
:is(#achievementsView, #notifications) .achievement .achievement-sprite {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  font-size: 0;
  object-fit: contain;
  box-shadow: none;
  filter: grayscale(1) brightness(.78);
  opacity: .48;
}
:is(#achievementsView, #notifications) .achievement.won .achievement-sprite { filter: var(--ach-tone); opacity: 1; }
:is(#achievementsView, #notifications) .achievement .achievement-sprite img,
:is(#achievementsView, #notifications) .achievement .achievement-sprite svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
:is(#achievementsView, #notifications) .achievement .cursor-icon svg { fill: #35ade3; stroke: #cee5ed; }
:is(#achievementsView, #notifications) .achievement .tibo-face { width: 85%; height: 85%; align-self: center; }
:is(#achievementsView, #notifications) .achievement.won .tibo-face { filter: none; border: 2px solid var(--ach-grade); }
.ach-cosmic { border-radius: 50%; background: url('./tibo-robot.png') center/cover no-repeat; }
.ach-stamp {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  background: #52616a;
  opacity: .46;
  box-shadow: inset 1px 1px #ffffff55, 1px 1px #0d1824;
}
.won .ach-stamp { background: var(--ach-grade); opacity: 1; }
.ach-stamp.rivet { border-radius: 50%; }
.ach-stamp.bar { width: 7px; height: 4px; border-radius: 1px; }
.ach-stamp.diamond { transform: rotate(-45deg); width: 5px; height: 5px; }
.ach-stamp.level {
  width: 9px; height: 7px;
  clip-path: polygon(0 0,32% 40%,50% 0,69% 40%,100% 0,85% 100%,15% 100%);
}
.won .ach-stamp.level { background: #f2d584; }
.ach-strikes {
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 2px;
  height: 4px;
  background: #83909a;
}
.won .ach-strikes { background: var(--ach-grade); }
.ach-strikes.c2 { width: 4px; }
.ach-strikes.c3 { width: 6px; }
.ach-undiscovered { margin: 8px 0; font-size: 11px; color: #93a7b4; }

#notifications .achievement-toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 9px 13px;
}
#notifications .achievement-toast .achievement { width: 34px; }
