/* Модуль «Доступ в клуб»: схема прохода (распознавание → облако → турникет, лента, пульт) и мини-виджеты.
   Разметка — resources/views/site/modules/access.blade.php, сценарий — access.js. Палитра — как у 3D-сцены главной */
.ac, .acf {
    --ac-ease: cubic-bezier(.2, .7, .2, 1);
    --ac-spring: cubic-bezier(.3, 1.6, .5, 1);
    --ac-ok: #22a35a; --ac-bad: #d64545; --ac-idle: #5b82ec;
    --ac-graph: #2a2b2f;
}
.ac-head { max-width: 800px; }
.ac-head .lead { margin-top: 18px; }

/* ── Окно ── */
.ac-app {
    position: relative; margin-top: 44px; border: 1px solid var(--line-card); border-radius: 16px; overflow: hidden; user-select: none; font-size: 13px;
    background: radial-gradient(120% 90% at 40% 30%, #fbfbfa 0%, #f3f3f1 55%, #ecece9 100%);
    box-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 30px 80px rgba(20, 20, 19, .10);
}
.ac-bar { height: 50px; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.ac-crumb { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; min-width: 0; }
.ac-crumb b { color: var(--ink); font-weight: 600; }
.ac-crumb i { font-style: normal; color: var(--ph); }
.ac-inside { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; white-space: nowrap; }
.ac-inside i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-ok); animation: ac-pulse 1.6s infinite; }
.ac-inside b { font-variant-numeric: tabular-nums; }
.ac-inside.is-bump b { animation: ac-bump .5s var(--ac-ease); display: inline-block; }
@keyframes ac-bump { 40% { transform: translateY(-3px) scale(1.15); } }
@keyframes ac-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 163, 90, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 163, 90, 0); } }
.ac-clock { margin-left: auto; font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.ac-body {
    display: grid; gap: 14px; padding: 14px;
    grid-template-columns: 260px minmax(0, 1fr) 300px; grid-template-rows: 384px 262px;
    grid-template-areas: 'id cloud gate' 'feed feed con';
}
.ac-p { position: relative; min-width: 0; background: rgba(255, 255, 255, .92); border: 1px solid var(--line-card); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(20, 20, 19, .03), 0 10px 26px rgba(20, 20, 19, .05); overflow: hidden; }
.ac-id { grid-area: id; } .ac-cloud { grid-area: cloud; } .ac-gate { grid-area: gate; } .ac-feed { grid-area: feed; } .ac-con { grid-area: con; }
.ac-cap { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 0 10px; white-space: nowrap; }
.ac-cap small { font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ac-n { width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; }
.ac-rt { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--ok) !important; }
.ac-rt i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-ok); animation: ac-pulse 1.6s infinite; }

/* Стрелки-потоки между блоками (широкий режим) */
.ac-id::after, .ac-cloud::after { content: none; }
.ac-flow { display: none; }

/* ── Распознавание ── */
.ac-modes { margin-left: auto; display: inline-flex; padding: 2px; border-radius: 8px; background: var(--chip); }
.ac-modes span { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.ac-id[data-mode='face'] [data-m='face'], .ac-id[data-mode='qr'] [data-m='qr'], .ac-id[data-mode='pay'] [data-m='qr'] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 19, .1); }
.ac-dev { position: relative; height: calc(100% - 32px); display: grid; place-items: center; }
.ac-term, .ac-phone { grid-area: 1 / 1; transition: opacity .35s, transform .5s var(--ac-ease); }
.ac-id[data-mode='face'] .ac-phone, .ac-id:not([data-mode='face']) .ac-term { opacity: 0; transform: scale(.92) translateY(8px); pointer-events: none; }

.ac-term { width: 176px; padding: 10px 10px 12px; border-radius: 20px; background: var(--ac-graph); box-shadow: 0 16px 34px rgba(20, 20, 19, .25), inset 0 0 0 1px #3a3b40; text-align: center; }
.ac-term-scr { position: relative; height: 210px; border-radius: 12px; overflow: hidden; background: radial-gradient(90% 70% at 50% 40%, #23314f, #0f1424 75%); }
.ac-face { position: absolute; left: 50%; top: 14px; width: 132px; margin-left: -66px; }
.ac-oval { fill: none; stroke: rgba(160, 190, 255, .55); stroke-width: 1.4; stroke-dasharray: 5 4; }
.ac-head { fill: #2c3a5e; }
.ac-shoulders { fill: #24304f; }
.ac-mesh circle { fill: #8fb0ff; opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; transition: opacity .25s, transform .3s var(--ac-spring); transition-delay: calc(var(--k) * 45ms); }
.ac-mesh path { fill: none; stroke: rgba(143, 176, 255, .55); stroke-width: .8; opacity: 0; transition: opacity .4s .35s; }
.ac-scanline { fill: #8fb0ff; opacity: 0; filter: drop-shadow(0 0 4px #8fb0ff); }
.ac-id.is-scan .ac-scanline { animation: ac-scan 1.1s var(--ac-ease) 2; }
@keyframes ac-scan { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(120px); } }
.ac-id.is-mesh .ac-mesh circle { opacity: 1; transform: none; }
.ac-id.is-mesh .ac-mesh path { opacity: 1; }
.ac-id.is-mesh .ac-oval { stroke: rgba(34, 200, 110, .8); stroke-dasharray: none; }
.ac-live { position: absolute; left: 50%; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(34, 163, 90, .92); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; transform: translate(-50%, 10px); opacity: 0; transition: opacity .3s, transform .45s var(--ac-spring); }
.ac-live.is-scan { background: rgba(91, 130, 236, .9); }
.ac-live.is-on { opacity: 1; transform: translate(-50%, 0); }
.ac-term-name { display: block; margin-top: 9px; color: #fff; font-size: 13px; font-weight: 600; min-height: 18px; opacity: 0; transition: opacity .3s; }
.ac-term-name.is-on { opacity: 1; }

.ac-phone { position: relative; width: 168px; height: 266px; padding: 7px; border-radius: 28px; background: #141413; box-shadow: 0 16px 34px rgba(20, 20, 19, .22); }
.ac-phone::before { content: ''; position: absolute; left: 50%; top: 13px; width: 46px; height: 13px; margin-left: -23px; border-radius: 999px; background: #000; z-index: 2; }
.ac-ph-qr, .ac-ph-pay { position: absolute; inset: 7px; border-radius: 22px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 12px 12px; transition: opacity .3s, transform .4s var(--ac-ease); }
.ac-ph-pay { opacity: 0; transform: translateY(12px); background: #fbfbfa; text-align: center; }
.ac-id[data-mode='pay'] .ac-ph-pay { opacity: 1; transform: none; }
.ac-id[data-mode='pay'] .ac-ph-qr { opacity: 0; }
.ac-qr { width: 112px; height: 112px; border-radius: 6px; }
.ac-qr rect { fill: var(--ink); }
.ac-qr.is-new { animation: ac-qrflip .45s var(--ac-ease); }
@keyframes ac-qrflip { 0% { transform: rotateY(90deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.ac-ttl { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.ac-ttl svg, .acf-ttl svg { width: 26px; height: 26px; transform: rotate(-90deg); }
.ac-ttl .t, .acf-ttl .t { fill: none; stroke: var(--chip); stroke-width: 4; }
.ac-ttl .v, .acf-ttl .v { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; }
.ac-ttl span { font-size: 12px; color: var(--ink-2); }
.ac-ttl b { font-variant-numeric: tabular-nums; }
.ac-ph-qr small { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.ac-pay-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); transition: background .3s, color .3s; }
.ac-ph-pay b { margin-top: 10px; font-size: 14px; }
.ac-ph-pay p { margin-top: 4px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
.ac-pay-btn { position: relative; margin-top: 14px; align-self: stretch; display: grid; place-items: center; height: 36px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 600; font-size: 12.5px; transition: background .3s, transform .12s; }
.ac-pay-btn.is-press { transform: scale(.94); }
.ac-pay-btn.is-wait span { opacity: 0; }
.ac-pay-btn.is-wait::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: ac-spin .7s linear infinite; }
.ac-pay-btn.is-ok { background: var(--ok); }
.ac-id.is-paid .ac-pay-ico { background: var(--ok-soft); color: var(--ok); }
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ── Облако: проверки ── */
.ac-cloud { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .94)); }
.ac-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ac-ck { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 24px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; transition: background .25s, border-color .25s, opacity .3s; }
.ac-ck-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--chip); color: var(--ph); transition: background .25s, color .25s; }
.ac-ck-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ac-ck-t b { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ac-ck-t small { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .25s; }
.ac-ck-ms { font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--faint); opacity: 0; transition: opacity .25s; }
.ac-ck-st { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed #d2d2cc; }
.ac-ck-st i { position: absolute; inset: -1.5px; border-radius: 50%; display: grid; place-items: center; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--ac-spring); }
.ac-ck-st .ok { background: var(--ac-ok); }
.ac-ck-st .bad { background: var(--ac-bad); }
.ac-ck.is-run { background: var(--accent-soft); }
.ac-ck.is-run .ac-ck-st { border: 2px solid #c6d3f5; border-top-color: var(--accent); animation: ac-spin .6s linear infinite; }
.ac-ck.is-run .ac-ck-ico { background: #fff; color: var(--accent); }
.ac-ck.is-ok .ac-ck-ico { background: var(--ok-soft); color: var(--ok); }
.ac-ck.is-ok .ac-ck-t b, .ac-ck.is-bad .ac-ck-t b { color: var(--ink); }
.ac-ck.is-ok .ac-ck-t small, .ac-ck.is-bad .ac-ck-t small, .ac-ck.is-ok .ac-ck-ms { opacity: 1; }
.ac-ck.is-ok .ac-ck-st { border-color: transparent; }
.ac-ck.is-ok .ok { opacity: 1; transform: none; }
.ac-ck.is-bad { background: var(--bad-soft); border-color: #f0cccc; }
.ac-ck.is-bad .ac-ck-ico { background: #fff; color: var(--bad); }
.ac-ck.is-bad .ac-ck-t small { color: var(--bad); font-weight: 500; }
.ac-ck.is-bad .ac-ck-st { border-color: transparent; }
.ac-ck.is-bad .bad { opacity: 1; transform: none; }
.ac-ck.is-skip { opacity: .4; }
.ac-ck.is-skip .ac-ck-t small { opacity: 1; }
.ac-dec { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--row); }
.ac-dec-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.ac-dec-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--ac-ok)); transform-origin: left; }
.ac-dec.is-bad .ac-dec-bar i { background: linear-gradient(90deg, var(--accent), var(--ac-bad)); }
.ac-dec span { color: var(--muted); white-space: nowrap; }
.ac-dec b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Турникет ── */
.ac-gate { background: linear-gradient(180deg, #fff 0%, #f6f6f4 100%); }
.ac-gate-scene { position: relative; height: calc(100% - 30px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ac-disp { position: relative; z-index: 2; min-width: 190px; padding: 8px 12px; margin-bottom: 4px; border-radius: 10px; background: #15161a; color: #fff; text-align: center; box-shadow: 0 8px 20px rgba(20, 20, 19, .2); transition: background .3s; }
.ac-disp::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 4px; height: 14px; margin-left: -2px; background: #9a9da4; }
.ac-disp b { display: block; font-size: 13px; font-weight: 600; min-height: 18px; }
.ac-disp small { display: block; font-size: 11px; opacity: .75; min-height: 0; }
.ac-gate[data-st='open'] .ac-disp { background: #136b3a; }
.ac-gate[data-st='deny'] .ac-disp { background: #8f2626; }
.ac-gsvg { width: 100%; max-width: 300px; height: auto; display: block; }
.ac-led { fill: var(--ac-idle); filter: drop-shadow(0 0 4px rgba(91, 130, 236, .9)); transition: fill .25s, filter .25s; }
.ac-gate[data-st='open'] .ac-led { fill: var(--ac-ok); filter: drop-shadow(0 0 5px rgba(34, 163, 90, .95)); }
.ac-gate[data-st='deny'] .ac-led { fill: var(--ac-bad); filter: drop-shadow(0 0 5px rgba(214, 69, 69, .95)); }
.ac-flap { transform-box: fill-box; transition: transform .55s var(--ac-ease); }
.ac-flap-l { transform-origin: 0 50%; }
.ac-flap-r { transform-origin: 100% 50%; }
.ac-gate[data-st='open'] .ac-flap { transform: scaleX(.06); }
.ac-gate[data-st='deny'] .ac-gsvg { animation: ac-shake .4s 2; }
@keyframes ac-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.ac-person { opacity: 0; transform-box: view-box; transform-origin: 120px 168px; transform: scale(.7); transition: opacity .4s, transform .4s; }
.ac-person.is-on { opacity: 1; }
.ac-person.is-walk { animation: ac-walk 1.3s var(--ac-ease) forwards; }
@keyframes ac-walk { 0% { opacity: 1; transform: scale(.7); } 70% { opacity: 1; transform: translateY(40px) scale(1.15); } 100% { opacity: 0; transform: translateY(60px) scale(1.3); } }

/* ── Лента ── */
.ac-rows { list-style: none; margin: 0; padding: 0; }
.ac-row { display: grid; grid-template-columns: 44px 26px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; height: 36px; padding: 0 6px; border-bottom: 1px solid var(--row); }
.ac-row:nth-child(n+6) { display: none; }
.ac-row.is-new { animation: ac-rowin .55s var(--ac-ease); }
@keyframes ac-rowin { 0% { opacity: 0; transform: translateY(-14px); background: var(--accent-soft); } 60% { opacity: 1; transform: none; background: var(--accent-soft); } 100% { background: transparent; } }
.ac-row time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.ac-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 60% 90%); }
.ac-row > b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meth { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 11.5px; white-space: nowrap; }
.ac-res { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--ok-soft); color: var(--ok); }
.ac-row[data-r='deny'] .ac-res { background: var(--bad-soft); color: var(--bad); }

/* ── Пульт ── */
.ac-con { background: #fff; }
.ac-calm { transition: opacity .3s, transform .4s var(--ac-ease); }
.ac-calm-t { display: flex; align-items: center; gap: 7px; color: var(--ok); font-weight: 600; margin-bottom: 8px; }
.ac-calm dl { margin: 0; }
.ac-calm dl div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--row); }
.ac-calm dt { color: var(--muted); }
.ac-calm dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ac-alert { position: absolute; left: 12px; right: 12px; top: 42px; bottom: 12px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid #f0cccc; box-shadow: inset 4px 0 0 var(--ac-bad), 0 14px 30px rgba(178, 58, 58, .14); opacity: 0; transform: translateX(110%); transition: opacity .3s, transform .6s var(--ac-ease), border-color .3s, box-shadow .3s; }
.ac-con.is-alert .ac-alert { opacity: 1; transform: none; }
.ac-con.is-alert .ac-calm { opacity: .25; }
.ac-al-h { display: flex; align-items: center; gap: 7px; }
.ac-al-h span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); }
.ac-al-h b { color: var(--bad); }
.ac-al-h time { margin-left: auto; color: var(--muted); font-size: 12px; }
.ac-al-who { margin-top: 8px; font-weight: 600; }
.ac-al-r { color: var(--ink-2); font-size: 12.5px; }
.ac-al-sent { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--accent); font-size: 12px; }
.ac-al-btns { display: flex; gap: 6px; margin-top: 10px; }
.ac-al-btns span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ac-al-ok { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 9px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ac-ease); }
.ac-con.is-ok .ac-alert { border-color: #c4e3cf; box-shadow: inset 4px 0 0 var(--ac-ok), 0 14px 30px rgba(31, 122, 69, .12); }
.ac-con.is-ok .ac-al-h span { background: var(--ok-soft); color: var(--ok); }
.ac-con.is-ok .ac-al-ok { opacity: 1; transform: none; }

/* ── Шаги ── */
.ac-ctl { display: flex; align-items: flex-start; gap: 24px; margin-top: 18px; }
.ac-steps { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ac-steps button { position: relative; width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 14px; border-radius: 10px; text-align: left; transition: background .2s; }
.ac-steps button:hover { background: var(--hover-soft); }
.ac-st-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--ink-2); transition: background .25s, color .25s; }
.ac-st-t { min-width: 0; }
.ac-st-t b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ac-st-t small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.ac-st-bar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ac-st-bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.ac-steps button[data-st='on'] .ac-st-n { background: var(--ink); color: #fff; }
.ac-steps button[data-st='done'] .ac-st-n { background: var(--ok-soft); color: var(--ok); }
.ac-steps button[data-st='done'] .ac-st-bar i { transform: none; background: var(--ok); }
.ac-ctl-btns { display: flex; gap: 8px; padding-top: 6px; }
.ac-ctl-btns .btn { gap: 6px; }

@media (max-width: 1279px) {
    .ac-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 330px auto 250px; grid-template-areas: 'id gate' 'cloud cloud' 'feed con'; }
    .ac-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ac-app { margin-top: 28px; border-radius: 14px; }
    .ac-bar { padding: 0 12px; gap: 8px; }
    .ac-crumb > span:last-child, .ac-crumb > i { display: none; }
    .ac-body { padding: 10px; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 300px auto auto 230px; grid-template-areas: 'id gate' 'cloud cloud' 'feed feed' 'con con'; }
    .ac-p { padding: 10px; }
    .ac-cap { font-size: 12px; gap: 6px; }
    .ac-cap small, .ac-modes { display: none; }
    .ac-term { width: 138px; padding: 8px; }
    .ac-term-scr { height: 170px; }
    .ac-face { width: 108px; margin-left: -54px; }
    .ac-phone { width: 140px; height: 236px; }
    .ac-qr { width: 92px; height: 92px; }
    .ac-disp { min-width: 0; width: 100%; padding: 6px 8px; }
    .ac-disp b { font-size: 11.5px; }
    .ac-ck { grid-template-columns: 26px minmax(0, 1fr) 22px; gap: 8px; padding: 5px 6px; }
    .ac-ck-ico { width: 26px; height: 26px; }
    .ac-ck-ms { display: none; }
    .ac-ck-st { width: 22px; height: 22px; }
    .ac-row { grid-template-columns: 38px 24px minmax(0, 1fr) auto; gap: 7px; padding: 0 2px; }
    .ac-meth { display: none; }
    .ac-res { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
    .ac-av { width: 24px; height: 24px; }
    .ac-steps { grid-template-columns: 1fr; gap: 0; }
    .ac-steps button { padding: 9px 6px 12px; align-items: center; }
    .ac-st-t { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
    .ac-ctl { flex-direction: column; gap: 10px; }
    .ac-ctl-btns { width: 100%; }
    .ac-ctl-btns .btn { flex: 1; }
}

/* ── Особенности: мини-виджеты ── */
.acf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.acf-card { border: 1px solid var(--line-card); border-radius: 16px; background: #fff; overflow: hidden; padding-bottom: 22px; }
.acf-manual { grid-column: span 2; }
.acf-card h3 { display: flex; align-items: center; gap: 8px; margin: 20px 20px 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.acf-card h3 .i { color: var(--accent); flex: none; }
.acf-card > p { margin: 0 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.acf-vis {
    position: relative; height: 200px; padding: 18px; overflow: hidden; border-bottom: 1px solid var(--line);
    background-color: #fafaf9; background-image: radial-gradient(circle, #e0e0db 1px, transparent 1.3px); background-size: 16px 16px;
}
.acf .acf-vis *, .acf .acf-vis *::before, .acf .acf-vis *::after { animation-play-state: paused; }
.acf.is-on .acf-vis *, .acf.is-on .acf-vis *::before, .acf.is-on .acf-vis *::after { animation-play-state: running; }

/* QR */
.acf-qr .acf-vis { display: flex; align-items: center; justify-content: center; gap: 16px; }
.acf-qrbox { position: relative; width: 120px; height: 120px; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 6px 18px rgba(20, 20, 19, .06); overflow: hidden; }
.acf-qrsvg { width: 100%; height: 100%; }
.acf-qrsvg rect { fill: var(--ink); }
.acf-qrsvg.is-new { animation: ac-qrflip .45s var(--ac-ease); }
.acf-sweep { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(transparent, rgba(47, 91, 216, .22)); border-bottom: 2px solid var(--accent); animation: acf-sweep 2.4s ease-in-out infinite; }
@keyframes acf-sweep { 0% { transform: translateY(-100%); } 100% { transform: translateY(380%); } }
.acf-ttl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.acf-ttl svg { width: 42px; height: 42px; }
.acf-ttl small { font-size: 11px; color: var(--muted); text-align: center; max-width: 80px; line-height: 1.25; }
.acf-ttl b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* Живое лицо */
.acf-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 100%; }
.acf-fc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line-card); }
.acf-fc > svg { width: 64px; height: 76px; }
.acf-fc .o { fill: none; stroke-width: 2; stroke-dasharray: 5 4; animation: acf-spin 6s linear infinite; transform-box: fill-box; transform-origin: center; }
.acf-fc.is-ok .o { stroke: var(--ac-ok); }
.acf-fc.is-bad .o { stroke: var(--ac-bad); }
.acf-fc .h { fill: #c9cfdc; }
.acf-fc.is-ok .h { fill: #d2a284; }
.acf-fc .scr { fill: #eef1f7; stroke: #c9cfdc; }
.acf-fc b { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.acf-fc.is-ok b { background: var(--ok-soft); color: var(--ok); }
.acf-fc.is-bad b { background: var(--bad-soft); color: var(--bad); }
.acf-fc.is-bad { animation: acf-deny 3s infinite; }
@keyframes acf-spin { to { transform: rotate(360deg); } }
@keyframes acf-deny { 0%, 70%, 100% { transform: none; } 74% { transform: translateX(-3px); } 78% { transform: translateX(3px); } 82% { transform: translateX(-2px); } }

/* Шкафчики */
.acf-lock .acf-vis { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.acf-lockers { display: grid; grid-template-columns: repeat(6, 30px); gap: 4px; }
.acf-lockers i { height: 30px; border-radius: 6px; background: #fff; border: 1px solid var(--line-card); display: grid; place-items: center; position: relative; }
.acf-lockers i::after { content: ''; position: absolute; right: 5px; top: 50%; width: 3px; height: 8px; margin-top: -4px; border-radius: 2px; background: #d2d2cc; }
.acf-lockers i.is-busy { background: #ecece8; }
.acf-lockers i.is-pick { color: #fff; animation: acf-pick 4s infinite; }
.acf-lockers i.is-pick::after { display: none; }
@keyframes acf-pick { 0%, 20% { background: #fff; color: transparent; transform: none; } 30% { transform: scale(1.18); } 36%, 85% { background: var(--accent); color: #fff; transform: none; border-color: var(--accent); } 100% { background: #fff; color: transparent; } }
.acf-pick, .acf-night { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.acf-pick { background: var(--accent-soft); color: var(--accent); animation: acf-fade 4s infinite; }
.acf-night { background: #23243a; color: #d9dcf5; font-weight: 500; }
@keyframes acf-fade { 0%, 30% { opacity: 0; transform: translateY(4px); } 38%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Гость */
.acf-guest .acf-vis { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.acf-inv { width: 100%; max-width: 220px; padding: 12px 14px; border-radius: 14px; color: #fff; background: linear-gradient(150deg, #6a4fd0, #3f2d96); box-shadow: 0 10px 24px rgba(63, 45, 150, .28); display: flex; flex-direction: column; gap: 2px; animation: acf-tilt 5s ease-in-out infinite; }
.acf-inv small { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; opacity: .85; }
.acf-inv b { font-size: 16px; letter-spacing: .02em; }
.acf-inv span { font-size: 11.5px; opacity: .85; }
@keyframes acf-tilt { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(1deg) translateY(-3px); } }
.acf-gpass { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; animation: acf-fade 5s infinite; }

/* Ручной проход: журнал */
.acf-manual .acf-vis { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.acf-log { display: flex; flex-direction: column; gap: 6px; }
.acf-lr { display: grid; grid-template-columns: 40px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line-card); font-size: 12.5px; position: relative; animation: acf-row 7s infinite; animation-delay: calc(var(--k) * .5s); opacity: 0; }
.acf-lr:not(:last-child)::after { content: ''; position: absolute; right: 30px; bottom: -8px; height: 10px; border-left: 1.5px dashed #c6d3f5; }
.acf-lr time { font-variant-numeric: tabular-nums; color: var(--muted); }
.acf-li { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--chip); color: var(--ink-2); }
.acf-lr > span:nth-child(3) { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.acf-lr small { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acf-hash { font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); font-style: normal; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); }
@keyframes acf-row { 0% { opacity: 0; transform: translateY(-6px); } 6%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.acf-chain { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11.5px; color: var(--accent); font-weight: 500; }

/* Тренер */
.acf-trn .acf-vis { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.acf-tc { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.acf-tav { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; }
.acf-tc > b { font-size: 13.5px; }
.acf-tst { position: relative; display: block; width: 160px; height: 24px; }
.acf-tst > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.acf-tst .a { background: var(--ok-soft); color: var(--ok); animation: acf-ta 6s infinite; }
.acf-tst .b { background: var(--bad-soft); color: var(--bad); opacity: 0; animation: acf-tb 6s infinite; }
@keyframes acf-ta { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes acf-tb { 0%, 45% { opacity: 0; } 50%, 95% { opacity: 1; } 100% { opacity: 0; } }
.acf-tgate { display: flex; gap: 3px; }
.acf-tgate i { width: 40px; height: 22px; border-radius: 4px; background: #cfe0ff; border: 1px solid #9fb4ec; transition: none; animation: acf-gl 6s infinite; }
.acf-tgate i:first-child { transform-origin: left; }
.acf-tgate i:last-child { transform-origin: right; }
@keyframes acf-gl { 0%, 8% { transform: none; } 14%, 38% { transform: scaleX(.1); } 44%, 100% { transform: none; } }

/* Активация */
.acf-act .acf-vis { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acf-mcard { flex: 1; min-width: 0; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 6px 18px rgba(20, 20, 19, .06); }
.acf-mcard > b { display: block; font-size: 14px; }
.acf-st { position: relative; display: block; height: 22px; margin-top: 8px; }
.acf-st > span { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.acf-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.acf-st .a { background: var(--warn-soft); color: var(--warn); animation: acf-ta 5s infinite; }
.acf-st .b { background: var(--ok-soft); color: var(--ok); opacity: 0; animation: acf-tb 5s infinite; }
.acf-beam { position: absolute; left: 50%; right: 70px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); opacity: .5; display: none; }
.acf-turn { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ac-graph); color: #8fb0ff; animation: acf-tn 5s infinite; }
@keyframes acf-tn { 0%, 40% { box-shadow: 0 0 0 0 rgba(34, 163, 90, 0); color: #8fb0ff; } 48% { box-shadow: 0 0 0 8px rgba(34, 163, 90, .25); color: #6fe09e; } 60%, 100% { box-shadow: 0 0 0 0 rgba(34, 163, 90, 0); color: #8fb0ff; } }

@media (max-width: 1279px) {
    .acf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .acf-grid { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
    .acf-manual { grid-column: auto; }
    .acf-manual .acf-vis { height: auto; }
    .acf-hash { display: none; }
    .acf-lr { grid-template-columns: 36px 26px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .acf-vis *, .acf-vis *::before, .acf-vis *::after, .ac-inside i, .ac-rt i { animation: none !important; }
    .acf-lr, .acf-pick, .acf-gpass { opacity: 1; }
    .acf-lockers i.is-pick { background: var(--accent); color: #fff; border-color: var(--accent); }
    .acf-st .a, .acf-tst .b { opacity: 0; }
    .acf-st .b { opacity: 1; }
    .acf-tst .a { opacity: 1; }
    .acf-sweep { display: none; }
}
