/* «Ёлочка Be Happy» — мешок бобра, наборы по понедельникам, подарок за вход подряд (v3, часть 1, 17.11; bag.js).
   Поверх style.css: те же токены, звёзды персиковые (--peach), жёлтого и золотого нет. Мелкий текст — --ink-2 на светлом
   (на белом и персиковом #fff1ea APCA Lc 80+). В строках без стрелок: отклик наведением и нажатием.
   Анимации (звёзды в мешок, подарок) — transform и opacity, по «меньше движения» не урезаются. */
:root { --yb-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.8 3 6.5 7.1.8-5.3 4.8 1.5 7-6.3-3.6-6.3 3.6 1.5-7L1.9 9.1 9 8.3Z'/%3E%3C/svg%3E"); }
.yb-star { display: inline-block; width: .95em; height: .95em; vertical-align: -.12em; background: var(--peach); -webkit-mask: var(--yb-star) center / contain no-repeat; mask: var(--yb-star) center / contain no-repeat; }

/* ---------- мешок вверху листа «Игры» ---------- */
.yb-bag { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 0 0 10px; padding: 8px 14px 12px 8px; border-radius: 20px; background: #fff1ea; box-shadow: inset 0 -3px 0 #ffd9c9; }
.yb-bag__pic { flex: none; width: 4.2rem; height: 4.2rem; display: grid; place-items: center; }
.yb-bag__pic img, .yb-line__pic img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(29, 18, 56, .25)); transform-origin: 50% 100%; }
.yb-bag__text { flex: 1; min-width: 10rem; display: grid; gap: 2px; }
.yb-bag__text b { font-size: 1.06rem; font-weight: 800; line-height: 1.15; }
.yb-bag__text > span { font-size: .86rem; font-weight: 700; line-height: 1.25; color: var(--ink-2); }
.yb-bag__text small { font-size: .76rem; font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.yb-bag.is-full .yb-bag__line { color: #993015; }   /* «Мешок на сегодня полон» — тёплым, к фону #fff1ea APCA Lc 80 */

/* полоска: ячейка на звезду, на отметках — подарки */
.yb-strip { flex-basis: 100%; max-width: 26rem; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; padding: 8px 2px 0 8px; }
/* в широком листе (мешок в «Играх» на ноутбуке, строка мешка в итоге партии) полоске при max-width хватало места справа от
   текста и текст сжимался в колонку: отступ справа добирает её до целой строки — полоска всегда под текстом, как на телефоне */
.yb-strip { margin-right: max(0px, 100% - 26rem); }
.yb-cell { position: relative; aspect-ratio: 1; border-radius: 6px; background: #fff; box-shadow: inset 0 -2px 0 #ffd9c9; display: grid; place-items: center; }
.yb-cell::before, .yb-cell i { content: ""; grid-area: 1 / 1; width: 72%; height: 72%; -webkit-mask: var(--yb-star) center / contain no-repeat; mask: var(--yb-star) center / contain no-repeat; }
.yb-cell::before { background: #ecd9cf; }
.yb-cell i { background: var(--peach); opacity: 0; }
.yb-cell.is-on i { opacity: 1; }
.yb-cell.is-on { box-shadow: inset 0 -2px 0 #ffc7b1; }
.yb-cell.is-gift { background: none; box-shadow: none; }
.yb-cell.is-gift::before { display: none; }
.yb-cell__gift { position: absolute; left: 50%; top: 50%; width: 150%; height: 150%; object-fit: contain; transform: translate(-50%, -56%); filter: drop-shadow(0 2px 2px rgba(29, 18, 56, .3)); }
.yb-cell.is-gift:not(.is-on) .yb-cell__gift { filter: grayscale(.5) drop-shadow(0 2px 2px rgba(29, 18, 56, .2)); opacity: .72; }
.yb-cell.is-got .yb-cell__gift { filter: grayscale(.2) drop-shadow(0 2px 2px rgba(29, 18, 56, .2)); opacity: .5; }
.yb-cell.is-got::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 2px #fff1ea;
  background: var(--ok) center / 9px no-repeat 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"); }
/* только что легли: звезда влетает сверху, подарок на отметке подпрыгивает (задержка — у ячейки, bag.js) */
.yb-cell.is-new i { animation: yb-in .42s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: inherit; }
.yb-cell.is-new .yb-cell__gift { animation: yb-gift .6s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: inherit; }
.yb-cell.is-new.is-got::after { animation: yb-check .3s ease-out backwards; animation-delay: inherit; }
@keyframes yb-in { from { transform: translateY(-160%) scale(.3) rotate(-50deg); opacity: 0; } }
@keyframes yb-gift { 0% { transform: translate(-50%, -56%) scale(1); } 40% { transform: translate(-50%, -76%) scale(1.25) rotate(-8deg); } 100% { transform: translate(-50%, -56%) scale(1); } }
@keyframes yb-check { from { transform: scale(0); } }

/* строка входа подряд — под мешком */
.yb-streak { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 10px; padding: 6px 12px 8px 6px; border: 0; border-radius: 16px; background: var(--soft); box-shadow: inset 0 -3px 0 var(--line); text-align: left; transition: background .15s, transform .12s; }
.yb-streak:active { transform: translateY(2px); }
.yb-streak__pic { flex: none; width: 2.7rem; height: 2.7rem; border-radius: 12px; background: linear-gradient(180deg, #3a2470, #24153f); display: grid; place-items: center; overflow: hidden; }
.yb-streak__pic > img { width: 88%; height: 88%; object-fit: contain; }
.yb-streak__text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.yb-streak__text b { font-size: .84rem; font-weight: 800; line-height: 1.2; }
.yb-dots { display: flex; gap: 5px; }
.yb-dots i { width: 1.15rem; height: 1.15rem; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #cdbdf7; font-size: .62rem; font-style: normal; font-weight: 800; line-height: 1; color: var(--ink-2); }
.yb-dots i.is-on { background: var(--accent); color: #fff; box-shadow: none; }
.yb-dots i.is-last:not(.is-on) { box-shadow: inset 0 0 0 2px var(--peach); }

/* «Награды» внизу листа «Игры» */
.yb-awards { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 9px 12px 11px 9px; border: 0; border-radius: 20px; background: #fff; text-align: left;
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -4px 0 var(--line); transition: transform .12s, box-shadow .15s; }
.yb-awards:active { transform: translateY(2px); }
.yb-awards__pics { flex: none; position: relative; width: 3.85rem; height: 3.85rem; }
.yb-awards__pics > * { position: absolute; width: 2.5rem; height: 2.5rem; max-width: 2.5rem; max-height: 2.5rem; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(29, 18, 56, .25)); }
.yb-awards__pics > :nth-child(1) { left: 0; top: .2rem; }
.yb-awards__pics > :nth-child(2) { right: -.1rem; top: 0; }
.yb-awards__pics > :nth-child(3) { left: .7rem; bottom: -.1rem; }
.yb-awards__pics .yd-gico svg { width: 2.5rem; }
.yb-go-soft { flex: none; padding: .5em .95em .58em; 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); }
@media (hover: hover) {
  .yb-streak:hover { background: #e6dcff; }
  .yb-awards:hover { box-shadow: inset 0 0 0 2px #cdbdf7, inset 0 -4px 0 #cdbdf7; }
  .yb-awards:hover .yb-go-soft { background: #f3eeff; }
  button.yb-it:hover { box-shadow: inset 0 0 0 2px #cdbdf7, inset 0 -2px 0 #cdbdf7; }
}

/* ---------- итог партии: звёзды в мешок, подарок из мешка ---------- */
.yb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 6px 0 4px; padding: 6px 14px 12px 6px; border-radius: 18px; background: #fff1ea; box-shadow: inset 0 -3px 0 #ffd9c9; }
.yb-line__pic { flex: none; width: 3.5rem; height: 3.5rem; display: grid; place-items: center; }
.yb-line__pic.is-jig img { animation: yb-jig .2s ease-out var(--yb-t0, 0s) var(--yb-n, 1); }
.yb-line.has-gift .yb-line__pic img { animation: yb-jig .2s ease-out var(--yb-t0, 0s) var(--yb-n, 1), yb-open .55s cubic-bezier(.3, 1.6, .5, 1) calc(var(--yb-t0, 0s) + var(--yb-n, 1) * .2s + .15s); }
@keyframes yb-jig { 0%, 100% { transform: none; } 45% { transform: scale(1.08, .92); } }
@keyframes yb-open { 0% { transform: none; } 35% { transform: scale(.9, 1.12) rotate(-6deg); } 70% { transform: scale(1.06, .95) rotate(4deg); } 100% { transform: none; } }
.yb-line .yb-strip { padding-top: 6px; }
.yb-gift-title { margin: 12px 0 4px; text-align: center; font-size: 1.02rem; font-weight: 800; animation: y-pop .45s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.yb-fresh { background: var(--ok) !important; color: #fff !important; white-space: nowrap; }   /* «Новинка · Пряники»: белый на #1f7a52 — APCA Lc 77 */
/* в итоге со строкой мешка всё плотнее: «К играм» и «Ещё раз» помещаются без прокрутки (390×664 и 1366×657 — с подарком-
   игрушкой тоже: «На свою ёлку» и «Подарить» в один ряд, лист выше). Не поместилось на совсем низком экране — ряд «К играм» /
   «Ещё раз» прижат к низу листа, остальное листается под ним */
.y-sheet--prize:has(.yb-line) { max-height: 94dvh; }
.y-sheet--prize:has(.yb-line) .y-stars--big i { width: 2.9rem; height: 2.9rem; }
.y-sheet--prize:has(.yb-line) .y-score { margin-bottom: 4px; }
.y-sheet--prize:has(.yb-line) .y-col { gap: 6px; margin-top: 10px; }
.y-sheet--prize:has(.yb-line) .y-row { margin-top: 10px; }
.y-sheet--prize .yb-acts { width: 100%; }
/* липкий край считается от края содержимого листа (без его нижнего отступа 22px): bottom с минусом пускает ряд на отступ */
.y-sheet--prize:has(.yb-line) .y-sheet__body > .y-row:last-child { position: sticky; bottom: calc(-22px - var(--safe-b)); z-index: 2; margin: 4px 0 calc(-22px - var(--safe-b)); padding: 10px 0 calc(22px + var(--safe-b));
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 10px); }
.yb-line ~ .y-prizes .y-prize { max-width: 13rem; padding: 10px 8px 12px; }
.yb-line ~ .y-prizes .y-prize img, .yb-line ~ .y-prizes .y-prize .yd-gico--big { width: 4.6rem; height: 4.6rem; }
.yb-line ~ .y-prizes .y-prize .yd-gico--big svg { width: 4.6rem; }
.yb-done { margin: 6px 0 0; text-align: center; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.yb-prize--wide { max-width: 15rem; }
.y-prize .yb-pic--decor { width: 6.1rem; height: 6.1rem; object-fit: contain; }

/* окно подарка за вход */
.yb-streak-sheet .yb-dots { justify-content: center; gap: 8px; margin: 2px 0 8px; }
.yb-streak-sheet .yb-dots i { width: 2.2rem; height: 2.2rem; font-size: .9rem; overflow: hidden; }
.yb-streak-sheet .yb-dots i.is-last { background: #fff1ea; box-shadow: 0 0 0 3px var(--peach); }
.yb-streak-sheet .yb-dots i.is-last img { width: 92%; height: 92%; object-fit: contain; }
.yb-streak-sheet .y-prize img { width: 9rem; height: 6.6rem; }
.yb-next { margin: 12px 0 0; }

/* ---------- лист «Награды» по наборам ---------- */
.yb-awards-sheet .y-sheet__body { padding-bottom: 20px; }
.yb-lead { margin-bottom: 10px; font-weight: 700; }
.yb-news { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 18px; background: #fff1ea; box-shadow: inset 0 -3px 0 #ffd9c9; }
.yb-news__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.yb-news__text b { font-size: .96rem; font-weight: 800; line-height: 1.2; }
.yb-news__text span { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.yb-news__pics { flex: none; display: flex; }
.yb-news__pics > * { width: 2rem; height: 2rem; object-fit: contain; margin-left: -.35rem; }
.yb-news__pics .yd-gico svg { width: 2rem; }
.yb-set { margin: 0 0 12px; padding: 10px 10px 12px; border-radius: 20px; background: var(--soft); box-shadow: inset 0 -3px 0 var(--line); }
.yb-set__head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.yb-set__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); }
.yb-set__ico img { width: 2rem; height: 2rem; max-width: 100%; max-height: 100%; object-fit: contain; }   /* высокие картинки наборов «Лёд» и «Огоньки» выезжали за плитку (проценты высоты в сетке) */
.yb-set__title { flex: 1; min-width: 0; display: grid; }
.yb-set__title b { font-size: 1.02rem; font-weight: 800; line-height: 1.15; }
.yb-set__title span { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.yb-set__done { flex: none; padding: .2em .7em .28em; border-radius: 99px; background: var(--ok); color: #fff; font-size: .74rem; font-weight: 800; }
.yb-set.is-locked { background: #f4f1fb; }
.yb-set.is-locked .yb-set__ico img { filter: grayscale(.6); opacity: .7; }
.yb-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.yb-set--streak .yb-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.yb-it { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px 3px 7px; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 -2px 0 var(--line); text-align: center; font: inherit; color: inherit; }
button.yb-it { cursor: pointer; transition: transform .12s, box-shadow .15s; }
button.yb-it:active { transform: translateY(2px); }
.yb-it__pic { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; overflow: hidden; }
.yb-it__pic > * { max-width: 100%; max-height: 100%; }
.yb-it__pic > img { width: 100%; height: 100%; object-fit: contain; }
.yb-it__pic .yd-gico svg { width: 2.8rem; }
.yb-it:not(.is-have) .yb-it__pic > * { filter: brightness(0) opacity(.16); }
.yb-it b { min-height: 2.1em; max-width: 100%; font-size: .62rem; font-weight: 700; line-height: 1.05; color: var(--ink); overflow-wrap: break-word; hyphens: manual; -webkit-hyphens: manual; }
.yb-it:not(.is-have) b { color: var(--ink-2); font-weight: 600; }
.yb-it[data-r="rare"]:not(.is-have) b { color: var(--accent-d); }
.yb-it[data-r="special"]:not(.is-have) b { color: #b42a54; }
.yb-it.is-locked { background: #faf8ff; }
.yb-it.is-locked .yb-it__pic > * { filter: brightness(0) opacity(.08) blur(1.5px); }
.yb-foot { margin: 6px 2px 0; font-size: .82rem; font-weight: 600; line-height: 1.35; color: var(--ink-2); }
/* на ноутбуке те же пять столбцов, что на телефоне (в наборе 9–10 вещей — две строки): клетки шире, имена крупнее и целыми
   словами (в десять столбцов они рвались посреди слова: «Сне-жинка») */
@media (min-width: 720px) {
  .yb-it { padding: 8px 6px 9px; }
  .yb-it__pic { width: 3.3rem; height: 3.3rem; }
  .yb-it__pic .yd-gico svg { width: 3.2rem; }
  .yb-it b { font-size: .76rem; line-height: 1.1; }
}

/* ---------- низкий экран (телефон 390×664, ноутбук 1366×657): мешок и первые три игры видны без прокрутки листа «Игры» ---------- */
@media (max-height: 700px) {
  .yb-bag { padding: 6px 12px 10px 6px; margin-bottom: 8px; }
  .yb-bag__pic { width: 3.4rem; height: 3.4rem; }
  .yb-strip { padding-top: 6px; }
  .yb-streak { margin-bottom: 8px; padding: 5px 10px 6px 5px; }
  .yb-streak__pic { width: 2.3rem; height: 2.3rem; }
  .yb-dots i { width: 1.05rem; height: 1.05rem; }
  .y-sheet--games .y-wheelrow { margin-bottom: 8px; padding-top: 6px; padding-bottom: 8px; }
  .y-sheet--games .y-wheelrow .y-wheelbtn__disc { width: 2.9rem; height: 2.9rem; border-width: 3px; }
  .y-sheet--games .y-games { gap: 8px; }
  .y-sheet--games .y-game { padding-top: 6px; padding-bottom: 8px; }
  .y-sheet--games .y-game__pic { width: 3.2rem; height: 3.2rem; border-radius: 14px; }
  .yb-line { margin-top: 4px; padding-bottom: 10px; }
  .yb-line__pic { width: 2.9rem; height: 2.9rem; }
  .yb-gift-title { margin-top: 8px; }
  .yb-line ~ .y-prizes .y-prize { padding: 8px 6px 10px; }
  .yb-line ~ .y-prizes .y-prize img, .yb-line ~ .y-prizes .y-prize .yd-gico--big { width: 3.6rem; height: 3.6rem; }
  .yb-line ~ .y-prizes .y-prize .yd-gico--big svg { width: 3.6rem; }
}

/* лента: картинки вещей нового набора под записью «Бобёр привёз набор…» */
.yb-newsrow__pics { display: flex; gap: 2px; margin-top: 4px; }
.yb-newsrow__pics > * { width: 1.9rem; height: 1.9rem; object-fit: contain; }
.yb-newsrow__pics .yd-gico svg { width: 1.9rem; }
