/* Раздел «Задачи»: доска слева, управление справа; на телефоне столбиком, главное действие над доской */
.pz { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0 0; display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 400px); grid-template-rows: auto 1fr;
  grid-template-areas: 'play head' 'play more'; column-gap: clamp(32px, 5vw, 72px); justify-content: center; align-items: start; }
.pz-head { grid-area: head; display: grid; gap: 12px; align-content: start; }
.pz-play { grid-area: play; }
.pz-more { grid-area: more; display: grid; gap: 12px; align-content: start; margin-top: 28px; }
.pz h1 { font-size: clamp(40px, 4.4vw, 56px); letter-spacing: -.03em; margin-bottom: 8px; }
.pz-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pz-head .btn, .pz-more > .btn { width: 100%; max-width: none; } /* .lg в shop.css — форма входа шириной 420, кнопкам .btn.lg она не нужна */
.pz-note { min-height: 26px; margin-top: 14px; font-weight: 600; text-align: center; }
.pz-lbl { font-size: 14px; font-weight: 600; color: var(--muted); }

/* доска: ход перетаскиванием не листает страницу; верный и неверный ход — короткая подсветка рамки */
.pz-board { transition: box-shadow .25s; }
.pz-board.play { touch-action: none; }
.pz-board.ok { box-shadow: 0 0 0 4px #4f9a68; }
.pz-board.bad { box-shadow: 0 0 0 4px #d4524b; }

.pz-seg { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg2); }
.pz-seg button { flex: 1; min-height: 44px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.pz-seg [aria-checked=true] { background: var(--ink); color: var(--bg); }

.pz-stats { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.pz-time { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.pz-time.low { color: #c0392b; }
.pz-lives { display: flex; gap: 2px; }
.pz-lives svg { width: 34px; height: 34px; transition: opacity .3s; }
.pz-lives .off { opacity: .16; }
.pz-n { margin-left: auto; color: var(--muted); font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.pz-n b { color: var(--ink); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }

.pz-rec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border-radius: 16px; overflow: hidden; }
.pz-rec > div { background: var(--bg2); padding: 12px 12px 10px; }
.pz-rec dt { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pz-rec dd { margin: 0; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pz-rec.one { grid-template-columns: 1fr; }
.pz-rec.one > div { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px; }
.pz-rec.one dd { font-size: 22px; }
.pz-recbox { display: grid; gap: 12px; }
.pz-recbox:empty { display: none; }
.pz-in { width: 100%; }

.pz-miss { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.pz-mini { display: grid; gap: 6px; font-size: 13px; line-height: 1.3; color: var(--muted); text-align: left; }
.pz-mini .cb { border-radius: 8px; transition: box-shadow .2s; }
.pz-mini .cb-sq i { display: none; }
.pz-mini[aria-pressed=true] .cb { box-shadow: 0 0 0 3px var(--ink); }
.pz-mini[aria-pressed=true] { color: var(--ink); }

.pz-lv { display: flex; align-items: center; gap: 14px; }
.pz-lv .lvl { width: 52px; height: 52px; border-radius: 14px; }
.pz-lv .lvl svg { width: 40px; height: 40px; }
.pz-sub { color: var(--muted); margin: -4px 0 8px; }
.pz-cs { display: grid; gap: 8px; }
.pz-c { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s; }
.pz-c:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.pz-c > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pz-c b { font-weight: 600; line-height: 1.3; }
.pz-c small { font-size: 14px; color: var(--muted); }
.pz-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

/* уровень: доска не нужна, один столбец */
.pz[data-s=level] { grid-template-columns: minmax(0, 560px); grid-template-areas: 'head' 'more'; }
.pz[data-s=level] .pz-play { display: none; }

@media (max-width: 860px) {
  .pz { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: 'head' 'play' 'more'; align-content: start; padding-top: calc(20px + env(safe-area-inset-top)); }
  .pz[data-s=level] { grid-template-columns: minmax(0, 1fr); }
  .pz-head { margin-bottom: 16px; gap: 10px; }
  .pz h1 { font-size: 38px; margin-bottom: 4px; }
  .pz-more { margin-top: 18px; }
  .pz-note { margin-top: 10px; }
  .pz-stats { min-height: 44px; gap: 12px; }
  .pz-time { font-size: 34px; }
  .pz-lives svg { width: 28px; height: 28px; }
  .pz-n b { font-size: 26px; }
  .pz-rec > div { padding: 10px 10px 8px; }
  .pz-rec dd { font-size: 22px; }
  .pz[data-s=run] .pz-head, .pz[data-s=assess] .pz-head { margin-bottom: 10px; }
  .pz[data-s=assess] h1 { font-size: 28px; }
  .pz h1.pz-lv { font-size: min(30px, 7.4vw); white-space: nowrap; gap: 12px; }
  .pz-lv .lvl { width: 40px; height: 40px; border-radius: 11px; }
  .pz-lv .lvl svg { width: 30px; height: 30px; }
  .pz-acts { grid-template-columns: 1fr; }
}
