/* Утверждённые действия ручного калькулятора; карточка шага 1 не меняется. */
html body :is(#manual,#goalkeeper) .tool-button,html body :is(#manual,#goalkeeper) .row-actions .icon-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:32px;min-width:30px;min-height:32px;padding:5px;border:1px solid #a0b9ed!important;border-radius:6px!important;background:#e7efff!important;color:#245bd6!important;box-shadow:none;font:600 12px/1 system-ui,sans-serif;cursor:pointer}
html body :is(#manual,#goalkeeper) .tool-button.primary{background:#245bd6!important;color:#fff!important;border-color:#245bd6!important}
html body :is(#manual,#goalkeeper) :is(.tool-button.danger,.row-actions .remove){background:#fff0f0!important;border-color:#e6aab3!important;color:#b32e43!important}
html body :is(#manual,#goalkeeper) :is(.tool-button,.row-actions .icon-btn):hover{filter:brightness(.94)}
html body :is(#manual,#goalkeeper) :is(.tool-button,.row-actions .icon-btn):disabled{opacity:.4;cursor:not-allowed;filter:none}
html body :is(#manual,#goalkeeper) .tool-button[hidden]{display:none!important}
html body :is(#manual,#goalkeeper) .tool-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body :is(#manual,#goalkeeper) .card-head-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
html body :is(#manual,#goalkeeper) .plan-save-slot{display:inline-flex;width:30px;min-width:30px;height:32px}
html body :is(#manual,#goalkeeper) .plan-save-slot [data-save-training]:not(.primary){visibility:hidden}
html body :is(#manual,#goalkeeper) .pc-plan-panel .card-head-actions:has([data-save-training]:not(.primary)){position:relative;isolation:isolate;background:transparent;border-color:transparent}
html body :is(#manual,#goalkeeper) .pc-plan-panel .card-head-actions:has([data-save-training]:not(.primary))::before{content:"";position:absolute;inset:-1px -1px -1px 35px;z-index:-1;border:1px solid #b5c7e3;border-radius:8px;background:#e9eff8;pointer-events:none}
html body :is(#manual,#goalkeeper) .plan-status{font:400 11px/1.3 system-ui,sans-serif;max-width:230px;color:#5d7186}
html body :is(#manual,#goalkeeper) .plan-status.dirty{color:#976000}
html body :is(#manual,#goalkeeper) .plan-status[hidden]{display:none!important}
html body :is(#manual,#goalkeeper) [data-save-training][data-saved=true]{opacity:1!important}
html body :is(#manual,#goalkeeper) .reference-name{font:600 11px/1.25 system-ui,sans-serif!important;color:#fff!important;white-space:normal!important;padding:6px 8px!important;min-height:28px!important;height:auto!important}
html body :is(#manual,#goalkeeper) .reference-table th{position:sticky;top:0;z-index:1}
html body :is(#manual,#goalkeeper) .reference-table .manual-selected-exercise td{background:#e5edff!important}
html body :is(#manual,#goalkeeper) .manual-empty-search{padding:14px;font-size:11px;color:#5d7186}
html body :is(#manual,#goalkeeper) .calculator-name-error{display:block;color:#b32e43;font-size:11px;line-height:1.25}
html body :is(#manual,#goalkeeper) input[aria-invalid=true]{border-color:#b32e43!important;outline:1px solid #b32e43}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .calc-player-link{display:flex!important;align-items:center;gap:6px!important;flex-wrap:nowrap!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .calc-player-link[hidden]{display:none!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .linked-chip{display:inline-flex;align-items:center;min-height:28px;max-width:180px;padding:4px 8px!important;border:1px solid #a0b9ed!important;border-radius:6px!important;background:#e7efff!important;color:#245bd6!important;font:600 11px/1.3 system-ui,sans-serif!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .calc-unlink{border:0!important;background:transparent!important;color:#245bd6!important;text-decoration:underline;font:400 11px/1.3 system-ui,sans-serif!important;padding:4px!important;cursor:pointer}
.card-save-status[hidden]{display:none!important}
html body :is(#manual,#goalkeeper) .pc-actions [data-pc-save]:not(.is-dirty):not([data-saved=true]){visibility:hidden}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .pc-actions:has([data-pc-save]:not([hidden]):not(.is-dirty):not([data-saved=true])){position:relative;isolation:isolate;background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html body :is(#manual,#goalkeeper) .pc-actions:has([data-pc-save]:not([hidden]):not(.is-dirty):not([data-saved=true]))::before{content:"";position:absolute;inset:-1px -1px -1px 35px;z-index:-1;border:1px solid #b5c7e3;border-radius:8px;background:#e9eff8;pointer-events:none}
html body #accountPage#accountPage#accountPage .pc-actions [data-account-action=save][data-saved]{opacity:1!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions [data-pc-save][data-saved=true]{opacity:1!important}
html body #clubTraining{position:fixed!important;inset:auto!important;left:50%!important;top:var(--training-center,50%)!important;transform:translate(-50%,-50%)!important;margin:0!important;width:min(700px,calc(100% - 32px))!important;max-width:700px!important;max-height:var(--training-height,85dvh)!important;padding:0!important;border:1px solid #90a2b5!important;border-radius:10px!important;background:#f7f9fc!important;box-shadow:0 18px 55px #10243f44!important;overflow:hidden!important;color:#213143!important}
html body #clubTraining[open]{display:flex!important;flex-direction:column}
html body #clubTraining::backdrop{background:#243c58bb}
html body #clubTraining>.dialog-head{flex:0 0 auto!important;height:auto!important;min-height:64px!important;max-height:none!important;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px!important;background:#cddcf2!important;border-bottom:1px solid #90a2b5!important;margin:0!important}
html body #clubTrainingTitle{font:600 16px/1.2 system-ui,sans-serif!important;margin:0!important}
html body #clubTrainingContent{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px!important;font:400 12px/1.6 system-ui,sans-serif}
html body #clubTraining [data-close]{flex-shrink:0}
/* Ошибка имени показана внутри поля без изменения геометрии карточки. */
html body :is(#manual,#goalkeeper) input[aria-invalid=true]::placeholder{color:#b32e43;opacity:1}
html body :is(#manual,#goalkeeper) .player-card-unified .card-head>div:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body :is(#manual,#goalkeeper) .player-card-unified .card-head .eyebrow{flex-basis:100%}
.card-save-status{font:400 11px/1.3 system-ui,sans-serif;color:#35752b;max-width:260px}.card-save-status.error{color:#b32e43}
html body :is(#manual,#goalkeeper) :is(.card-head-actions,.row-actions){padding:5px;border:1px solid #b5c7e3;border-radius:8px;background:#e9eff8}
html body :is(#manual,#goalkeeper) .pc-plan-panel .ex-row .row-actions{box-sizing:border-box}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions{display:flex!important;gap:5px!important;padding:5px!important;border:1px solid #b5c7e3!important;border-radius:8px!important;background:#e9eff8!important;max-width:100%;flex-wrap:wrap}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px!important;width:30px!important;min-width:30px!important;height:32px!important;padding:5px!important;border:1px solid #a0b9ed!important;border-radius:6px!important;background:#e7efff!important;color:#245bd6!important;box-shadow:none!important;cursor:pointer}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions :is([data-pc-save],[data-account-action=save]){background:#245bd6!important;border-color:#245bd6!important;color:#fff!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions :is([data-pc-delete],[data-account-action=delete]){background:#fff0f0!important;border-color:#e6aab3!important;color:#b32e43!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions button:hover{filter:brightness(.94)}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions button:disabled{opacity:.4;cursor:not-allowed;filter:none}
html body :is(#manual,#goalkeeper) .reference-legend{overflow:visible!important;padding:4px!important}
html body :is(#manual,#goalkeeper) .skill-filter:focus{outline:2px solid #245bd6!important;outline-offset:-3px!important;border-color:#245bd6!important}
.duplicate-player-dialog{position:fixed!important;inset:auto!important;left:50%!important;top:var(--training-center,50%)!important;transform:translate(-50%,-50%)!important;margin:0!important;max-height:var(--training-height,85dvh)!important;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;width:min(520px,calc(100% - 32px));border:1px solid #90a2b5;border-radius:10px;background:#f4f7fb;color:#213143;padding:22px;font:13px/1.5 system-ui,sans-serif}.duplicate-player-dialog::backdrop{background:#152a4566}.duplicate-player-dialog h3{margin-top:0}.duplicate-player-dialog select{width:100%;padding:8px;margin:12px 0;border:1px solid #90a2b5;border-radius:6px;background:#e9eff5;color:#213143}.duplicate-player-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.duplicate-player-actions button{padding:8px 10px;border:1px solid #a0b9ed;border-radius:6px;background:#e7efff;color:#245bd6;cursor:pointer}.duplicate-player-actions button:hover{background:#dce8fc}.duplicate-player-actions button:focus-visible{outline:2px solid #245bd6;outline-offset:2px}

html body :is(#manual,#goalkeeper) .pc-name-row .calculator-name-error{grid-column:2;grid-row:2;min-width:0;width:100%;margin:3px 0 0;white-space:normal;font:400 11px/1.25 system-ui,sans-serif;color:#b32e43}
html body :is(#manual,#goalkeeper) .pc-name-row:has(.calculator-name-error){height:auto!important;max-height:none!important;align-items:center;row-gap:0}
html body :is(#manual,#goalkeeper) .pc-identity-block:has(.calculator-name-error){grid-template-rows:minmax(34px,auto) 34px!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px 8px!important;align-items:start!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar>.field{display:contents!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar label{grid-column:1/-1;grid-row:1;margin:0!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar select{grid-column:1;grid-row:2;min-width:0!important;width:100%!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar>button{grid-column:2;grid-row:2}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar .exercise-preview{grid-column:1/-1;grid-row:3}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar :is(select,button){height:34px!important;min-height:34px!important;max-height:34px!important;box-sizing:border-box!important;margin-top:0!important;margin-bottom:0!important;font:400 11px/1.25 system-ui,sans-serif!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .plan-toolbar button{font-weight:600!important;align-self:flex-start!important}
html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper,#accountPage#accountPage#accountPage) .pc-actions svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round}
html body :is(#manual,#goalkeeper) .pc-card-header>div:first-child:has(h2){display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
html body :is(#manual,#goalkeeper) .pc-card-header>div:first-child:has(h2) .eyebrow{flex-basis:100%}
/* Поиск остаётся внутри строки легенды и переносится целиком, если места мало. */
html body :is(#manual,#goalkeeper) .reference-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;box-sizing:border-box}
html body :is(#manual,#goalkeeper) .reference-legend .skill-filter{flex:0 1 220px;width:220px;max-width:100%;min-width:0;margin-left:auto;box-sizing:border-box}
/* Заголовок и справка не должны разъезжаться на две строки. */
html body :is(#manual,#goalkeeper) .reference-skills th:last-child{white-space:nowrap;min-width:100px;vertical-align:middle}
html body :is(#manual,#goalkeeper) .reference-skills th .abs-help{display:inline-flex;vertical-align:middle;margin:0 0 0 4px}
/* Четыре кнопки по 30px + три промежутка по 4px. Общие колонки для шапки и строк. */
html body :is(#manual,#goalkeeper) .pc-plan-panel :is(.plan-columns,.ex-row){grid-template-columns:14px minmax(70px,1fr) 58px 52px 54px 48px 144px!important;min-width:576px;align-items:center}
html body :is(#manual,#goalkeeper) .pc-plan-panel .ex-row .row-actions{display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-end;gap:4px;width:144px;min-width:144px;grid-column:7;grid-row:1}
html body :is(#manual,#goalkeeper)>.layout.pc-workspace>.pc-plan-panel .plan-table-scroll .exercise-list{min-width:576px}
@media(max-width:480px){html body :is(#manual,#goalkeeper) .reference-legend .skill-filter{flex:1 1 100%;width:100%;max-width:none;margin-left:0}}
@media(max-width:700px){html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .pc-plan-panel>.card-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important}html body :is(#manual#manual#manual,#goalkeeper#goalkeeper#goalkeeper) .pc-plan-panel>.card-head>.card-head-actions{position:static!important;width:100%!important;max-width:100%!important;justify-content:flex-end!important}html body :is(#manual,#goalkeeper) .pc-plan-panel>.card-head>div:first-child{flex-basis:100%!important;max-width:none!important}html body :is(#manual,#goalkeeper) .pc-plan-panel>.card-head h2{max-width:none!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}html body :is(#manual,#goalkeeper) .pc-plan-panel>.card-head{flex-wrap:wrap;gap:10px}html body :is(#manual,#goalkeeper) .plan-status{max-width:170px;font-size:10px}}
