/* W47: ачивки — значки, блок на карточке человека, окно ачивки, каталог, торжественный показ. С ach.js (lazy) */
.ach-art { --mb: #2346D5; --mb-d: #1B37B0; --mb-l: #5B78F0; --ma: #FFB020; --ma-d: #D98A00; --mi: #1b1f3b; --mw: #fff;
  --a-night: #1b1f3b; --a-mono: #1b1f3b; --a-mono-e: transparent; --a-bg: rgba(35,70,213,.07); --a-sh: rgba(27,31,59,.09); display: inline-block; flex: none; line-height: 0; }
:root[data-theme="dark"] .ach-art { --mb: #3D5BF0; --mb-d: #2D47C9; --mb-l: #7C93FF; --a-night: #11131f; --a-mono: #0d0e17; --a-mono-e: #4a4f6e;
  --a-bg: rgba(143,165,255,.08); --a-sh: rgba(0,0,0,.35); }
.ach-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ach-art text { font-family: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ach-s .ach-fine { display: none; }
.ach-lock svg { filter: grayscale(1); opacity: .38; }
:root[data-theme="dark"] .ach-lock svg { opacity: .3; }

/* ---- карточка человека ---- */
.ach-sec .hsec-h { margin-bottom: var(--sp-3); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: var(--sp-2); }
.ach-tile { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border: 0; border-radius: var(--r-l);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.ach-tile:hover { background: var(--hover); }
.ach-tile:hover .ach-b svg { transform: translateY(-2px) rotate(-3deg); }
.ach-b svg { transition: transform .25s var(--ease-out); }
.ach-tt { display: flex; flex-direction: column; min-width: 0; }
.ach-name { font-weight: 600; line-height: var(--lh-page); }
.ach-when { color: var(--muted); font-size: var(--fs-s); line-height: var(--lh-page-s); font-variant-numeric: tabular-nums; }
.ach-more { margin-top: var(--sp-2); }
/* ГД: одна строка значков в шапке карточки */
.ach-strip { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-3); }
.ach-chip { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-full); background: transparent; cursor: pointer; }
.ach-chip:hover { background: var(--hover); }
.ach-chip:has(svg > rect:first-child) { border-radius: 34%; }   /* 3.1.6 (TRACKER-550/461): значок-плитка (achTile) — подсветка и рамка фокуса плиткой, по скруглению значка; медаль и грань — кругом */

/* ---- окно ачивки ---- */
.ach-mt { margin: 0; }
.ach-view { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ach-big { width: 200px; height: 200px; margin: var(--sp-2) 0 var(--sp-4); }
.ach-big.wide { width: min(320px, 100%); height: auto; aspect-ratio: 4 / 3; margin-bottom: var(--sp-3); }
.ach-text { margin: 0; max-width: 46ch; line-height: var(--lh-text); text-wrap: pretty; }
.ach-note { margin: var(--sp-3) 0 0; max-width: 46ch; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-m); background: var(--panel2); line-height: var(--lh-page); }
.ach-meta { margin: var(--sp-3) 0 0; color: var(--muted); font-size: var(--fs-s); line-height: var(--lh-page-s); font-variant-numeric: tabular-nums; }
.ach-early { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-s); }
.ach-step { display: inline-flex; align-items: center; gap: var(--sp-1); }
.ach-take { color: var(--danger); }
.ach-pick { display: flex; align-items: center; gap: var(--sp-3); } .ach-pick p { margin: 0; color: var(--muted); line-height: var(--lh-page); }

/* ---- каталог ---- */
.ach-cat { display: grid; gap: var(--sp-4); max-width: 1600px; }
.ach-group .hsec-h { margin-bottom: var(--sp-2); }
.ach-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-1) var(--sp-4); }
.ach-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2); }
.ach-it { min-width: 0; }
.ach-it h3 { margin: 4px 0 2px; font-size: var(--fs-m); line-height: var(--lh-page); font-weight: 600; }
.ach-item:not(.have) .ach-it h3 { color: var(--muted); }
.ach-it p { margin: 0; line-height: var(--lh-page); text-wrap: pretty; }
.ach-it .ach-meta { margin-top: var(--sp-1); display: flex; align-items: center; gap: 2px; }
.ach-item.have .ach-meta { color: var(--done); }
/* стаж — ступенями в ряд: значок, «N лет», есть ли */
.ach-items.steps { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.ach-items.steps .ach-item { flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); }
.ach-items.steps .ach-it p:not(.ach-meta) { display: none; }
.ach-items.steps .ach-it h3 { margin: 0; }
.ach-items.steps .ach-meta { justify-content: center; }
.ach-admin { font-size: var(--fs-s); }

/* ---- торжественный показ ---- */
.ach-party { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--sp-5); }
.ach-party .ach-big.wide { margin: 0; }
.ach-party h2 { margin: var(--sp-2) 0 var(--sp-2); font-size: var(--fs-xl); line-height: 28px; text-wrap: balance; }
.ach-say { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.ach-say .onb-m { width: 48px; height: 48px; }
.ach-bub { position: relative; margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-l); background: var(--primary-soft); color: var(--text); font-weight: 600; line-height: var(--lh-page); }
.ach-bub::before { content: ""; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.ach-acts { justify-content: center; gap: var(--sp-2); margin-top: var(--sp-5); }
.ach-early.center { margin-top: var(--sp-3); }
.ach-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: var(--z-1); }
.ach-ov .modal { position: relative; z-index: var(--z-2); }
.ach-confetti i { position: absolute; top: -16px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0;
  transform: scale(var(--s)); animation: ach-fall 2.6s cubic-bezier(.25, .6, .4, 1) var(--d) forwards; }
.ach-confetti i:nth-child(3n) { width: 10px; height: 10px; border-radius: 50%; }
@keyframes ach-fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(var(--s)); } 85% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc((var(--s) - 1) * 160px), 105vh) rotate(calc(var(--r) * 3)) scale(var(--s)); } }
/* монолит пилится: пила туда-обратно, модуль подпрыгивает, искры мерцают — только на торжественном экране */
.ach-party .a-saw { animation: ach-saw .32s ease-in-out 8 alternate; }
.ach-party .a-pop { animation: ach-pop 1.4s var(--ease-out) .3s both; transform-box: fill-box; }
.ach-party .a-tw { transform-box: fill-box; transform-origin: center; animation: ach-tw 1.2s ease-in-out .2s 3 both; }
@keyframes ach-saw { from { transform: translateX(-7px); } to { transform: translateX(7px); } }
@keyframes ach-pop { from { opacity: 0; translate: -9px 12px; } }
@keyframes ach-tw { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5) rotate(20deg); } }
.ach-party .ach-big:not(.wide) svg { animation: ach-in .7s var(--ease-out) both; }
@keyframes ach-in { from { transform: scale(.6) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.06) rotate(3deg); opacity: 1; } }

@media (max-width: 600px) {
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .ach-tile { flex-direction: column; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2); }
  .ach-items { grid-template-columns: 1fr; }
  .ach-items.steps { grid-template-columns: repeat(3, 1fr); }
  .ach-acts { flex-direction: column-reverse; align-items: stretch; width: 100%; } .ach-acts .btn { justify-content: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ach-confetti { display: none; }
  .ach-party :is(.a-saw, .a-pop, .a-tw), .ach-party .ach-big svg, .ach-b svg { animation: none; transition: none; }
  .ach-tile:hover .ach-b svg { transform: none; }
}
