/* «Ёлочка Авангарда» — достижения (сборка C, SPEC-C F5; ach.js). Поверх style.css и bag.css: те же токены. Жёлтого и
   золотого нет: новое — персиковая рамка, полученное — зелёная галочка, полоса — персиковая, снежинка — фиолетовая.
   Мелкий текст — --ink-2 на белом и на --soft (APCA Lc 75+). Строки не кликаются — стрелок нет. Анимации по «меньше
   движения» не урезаются. */
:root {
  --ya-fl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.2v19.6M9.2 4.4 12 7l2.8-2.6M9.2 19.6 12 17l2.8 2.6'/%3E%3Cpath transform='rotate(60 12 12)' d='M12 2.2v19.6M9.2 4.4 12 7l2.8-2.6M9.2 19.6 12 17l2.8 2.6'/%3E%3Cpath transform='rotate(120 12 12)' d='M12 2.2v19.6M9.2 4.4 12 7l2.8-2.6M9.2 19.6 12 17l2.8 2.6'/%3E%3C/svg%3E");
  --ya-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}
/* снежинка — цвет текста (currentColor) по маске */
.ya-fl { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -.14em; background: currentColor; font-style: normal;
  -webkit-mask: var(--ya-fl) center / contain no-repeat; mask: var(--ya-fl) center / contain no-repeat; }
.ya-medal { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 35% 30%, #a78bfa 0%, var(--accent) 55%, var(--accent-d) 100%); box-shadow: inset 0 -3px 0 rgba(29, 18, 56, .25), 0 2px 3px rgba(29, 18, 56, .2); }
.ya-medal .ya-fl { width: 58%; height: 58%; vertical-align: 0; }
.y-news__pic .ya-medal { width: 40px; height: 40px; margin: 3px; color: #fff; }   /* .y-news span красит текст в --ink-2 */

/* ---------- раздел «Достижения» в «Наградах» ---------- */
.ya-sec { margin: 0 0 12px; padding: 10px 10px 12px; border-radius: 20px; background: var(--soft); box-shadow: inset 0 -3px 0 var(--line); }
.ya-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.ya-head__ico { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 14px; background: #fff; box-shadow: inset 0 -2px 0 var(--line); }
.ya-head__ico .ya-medal { width: 2rem; height: 2rem; }
/* шапка одной строкой «Достижения · 12 из 53 · получено ❄ 140»; на ширине до 430 px — двумя (F5) */
.ya-head__title { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .4em; }
.ya-head__title b { font-size: 1.02rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.ya-head__sub { font-size: .84rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ya-head__sub::before { content: "· "; }
.ya-head__got:not(:empty)::before { content: " · "; white-space: pre; }
.ya-head__got .ya-fl { color: var(--accent); }
@media (max-width: 430px) {
  .ya-head__title { display: grid; }
  .ya-head__sub { font-size: .8rem; }
  .ya-head__sub::before { content: none; }
}

/* полоса групп: «Все» и шесть групп; не помещается — листается вбок (на телефоне всегда) */
.ya-groups { display: flex; gap: 6px; margin: 0 -10px 8px; padding: 2px 10px 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding: 0 10px; }
.ya-groups::-webkit-scrollbar { display: none; }
.ya-group { flex: none; min-height: 34px; padding: .32em .85em .4em; border: 0; border-radius: 99px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 800; line-height: 1.1; white-space: nowrap;
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -3px 0 var(--line); transition: background .15s, transform .12s; }
.ya-group:active { transform: translateY(1px); }
.ya-group.is-on { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-d); }

/* строки */
.ya-list { display: grid; gap: 6px; }
.ya-row { display: flex; align-items: center; gap: 10px; min-height: 3.6rem; padding: 7px 10px 8px 7px; border-radius: 16px; background: #fff; box-shadow: inset 0 -2px 0 var(--line); }
.ya-row.is-new { background: #fff1ea; box-shadow: inset 0 0 0 2px var(--peach), inset 0 -3px 0 #ffd9c9; animation: ya-in .5s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.ya-ico { flex: none; position: relative; width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 12px; background: var(--soft); overflow: hidden; }
.ya-row.is-new .ya-ico:not(.ya-ico--sky) { background: #fff; }
.ya-ico__img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(29, 18, 56, .2)); }
.ya-row.is-none .ya-ico > * { opacity: .38; filter: grayscale(.85); }   /* не начатое — бледный значок */
.ya-ico--fl { color: var(--accent); }
.ya-ico--fl > .ya-fl { width: 64%; height: 64%; vertical-align: 0; }
.ya-ico--fl > .ya-medal { width: 80%; height: 80%; }
/* плитки букв: одна — крупно, две — рядом, три-четыре — в ряд мельче (как плитки лотка надписи) */
.ya-ico--tiles { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; }
.ya-tile { flex: none; display: grid; place-items: center; width: 1.45rem; height: 1.6rem; border-radius: 6px; background: #fff; color: var(--accent-d); font-size: 1rem; font-weight: 800; line-height: 1;
  box-shadow: inset 0 0 0 1.5px var(--line), inset 0 -2px 0 #cdbdf7; }
.ya-ico--tiles[data-n="1"] .ya-tile { width: 1.9rem; height: 2.1rem; font-size: 1.3rem; }
.ya-ico--tiles[data-n="3"], .ya-ico--tiles[data-n="4"] { flex-wrap: wrap; align-content: center; gap: 2px; padding: 0 3px; }   /* три-четыре — квадратом 2×2 */
.ya-ico--tiles[data-n="3"] .ya-tile, .ya-ico--tiles[data-n="4"] .ya-tile { width: calc(50% - 1px); height: calc(50% - 4px); border-radius: 4px; font-size: .66rem; }
/* кусочек неба с надписью */
.ya-ico--sky { background: radial-gradient(circle at 70% 20%, #4b2f8f 0%, var(--night-2) 45%, var(--night) 100%); }
.ya-ico--sky::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1px 1px at 20% 25%, #fff 99%, transparent), radial-gradient(1px 1px at 78% 70%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 60% 18%, #dcd3ff 99%, transparent); }
.ya-ico--sky b { position: relative; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-shadow: 0 0 6px rgba(167, 139, 250, .9); white-space: nowrap; }

.ya-row__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ya-row__name { display: flex; align-items: center; gap: 6px; font-size: .92rem; font-weight: 800; line-height: 1.2; }
.ya-row__name > span { min-width: 0; }
.ya-new { flex: none; padding: .12em .5em .18em; border-radius: 99px; background: var(--peach); color: #3d1206; font-size: .66rem; font-style: normal; font-weight: 800; line-height: 1.1; }
.ya-row__cond { font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.ya-row__got { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: .74rem; font-weight: 800; color: var(--ok); }
.ya-check { flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--ok) center / 10px no-repeat var(--ya-check); }
.ya-row__bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ya-bar { position: relative; flex: 1; height: 7px; border-radius: 99px; background: var(--soft); box-shadow: inset 0 1px 0 var(--line); overflow: hidden; }
.ya-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 7px; border-radius: 99px; background: var(--peach); }
.ya-bar__fill[style*="width: 0%"] { display: none; }
.ya-row__bar small { flex: none; font-size: .72rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.ya-prize { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: .22em .55em .28em; border-radius: 99px; background: #fff; color: var(--ink); font-size: .78rem; font-weight: 800; line-height: 1.1; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px #ffd9c9; }
.ya-prize .ya-fl { color: var(--accent); }
.ya-row.is-none .ya-prize { color: var(--ink-2); }

.ya-more-wrap:empty { display: none; }
.ya-more { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: .5em 1em .58em; border: 0; border-radius: 99px; background: #fff; color: var(--accent); font-size: .88rem; font-weight: 800;
  box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); transition: transform .12s, background .15s; }
.ya-more:active { transform: translateY(2px); }
.ya-wait { margin: 6px 4px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.ya-err { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 -2px 0 var(--line);
  font-size: .9rem; font-weight: 700; }
.ya-err .y-btn { flex: none; }

/* ---------- строка «Достижения 12 из 53» в «Наградах» листа «Игры» ---------- */
.ya-rowtext { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ya-nw { white-space: nowrap; }
.ya-dot { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

/* ---------- блок в итоге партии и сводная запись ---------- */
.ya-block, .ya-sum { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; padding: 7px 8px 8px 7px; border-radius: 18px; background: #fff1ea; text-align: left;
  box-shadow: inset 0 0 0 2px var(--peach), inset 0 -3px 0 #ffd9c9; animation: ya-in .5s cubic-bezier(.3, 1.5, .5, 1) var(--ya-t0, 0s) backwards; }
.ya-block__pic { flex: none; width: 2.6rem; height: 2.6rem; animation: ya-medal .7s cubic-bezier(.3, 1.6, .5, 1) calc(var(--ya-t0, 0s) + .15s) backwards; }
.ya-block__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ya-block__text b { font-size: .9rem; font-weight: 800; line-height: 1.2; }
.ya-block__text > span:not(.ya-prize) { font-size: .78rem; font-weight: 700; line-height: 1.25; color: #6b2a14; }   /* на #fff1ea APCA Lc 80+ */
.ya-prize--soft { justify-self: start; }
.ya-go { flex: none; min-height: 40px; padding: .45em .95em .52em; border: 0; border-radius: 99px; background: #fff; color: var(--accent); font-size: .86rem; font-weight: 800; white-space: nowrap;
  box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); transition: transform .12s, background .15s; }
.ya-go:active { transform: translateY(2px); }
/* в листе итога: блок плотнее, кнопки «К играм» / «Ещё раз» помещаются без прокрутки */
.y-sheet--prize .ya-block { margin: 6px 0 2px; padding-top: 5px; padding-bottom: 6px; }
.y-sheet--prize .ya-block__pic { width: 2.3rem; height: 2.3rem; }
@keyframes ya-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes ya-medal { 0% { transform: scale(.4) rotate(-25deg); } 60% { transform: scale(1.15) rotate(8deg); } 100% { transform: none; } }

@media (hover: hover) {
  .ya-group:not(.is-on):hover { background: #f3eeff; }
  .ya-more:hover, .ya-go:hover { background: #f3eeff; }
}
@media (min-width: 720px) {
  .ya-row { padding: 8px 12px 9px 8px; }
  .ya-ico { width: 3rem; height: 3rem; }
  .ya-row__name { font-size: .96rem; }
  /* на ноутбуке все семь групп помещаются в ряд, без листания */
  .ya-groups { gap: 5px; }
  .ya-group { padding-left: .7em; padding-right: .7em; font-size: .78rem; }
}
