:root {
    --bg: #0d120f;
    --panel: #151c17;
    --panel-hover: #1a231c;
    --border: #29332b;
    --text: #e6ece2;
    --muted: #859182;
    --accent: #c4f37c;
    --amber: #e9b76c;
    --danger: #e58d88;
    --sidebar: 238px;
    font-family: Inter,'Segoe UI',Arial,sans-serif;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

button,input,select,textarea {
    font: inherit;
}

button,a,input,textarea,select {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: .5;
}

button,a {
    transition: background .16s,color .16s,border-color .16s,opacity .16s;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button:focus-visible,a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

button {
    border: 0;
    background: none;
}

h1,h2,h3,p {
    margin: 0;
}

input,select,textarea {
    color: var(--text);
    background: #101712;
    border: 1px solid #344033;
    outline: none;
    border-radius: 7px;
    min-height: 40px;
    padding: 9px 12px;
    max-width: 100%;
}

input:focus,select:focus,textarea:focus {
    border-color: #99bd69;
    box-shadow: 0 0 0 3px #c4f37c0b;
}

input::placeholder,textarea::placeholder {
    color: #6b776b;
}

input[type=checkbox] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    min-height: 0;
    cursor: pointer;
    flex-shrink: 0;
}

input[type=color] {
    padding: 4px;
    width: 100%;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

select {
    cursor: pointer;
    padding-right: 28px;
}

small {
    font-size: 11px;
}

b,strong {
    font-weight: 600;
}

svg {
    flex-shrink: 0;
}

.muted {
    color: var(--muted);
}

.accent {
    color: var(--accent);
}

.full {
    width: 100%;
}



.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    border: 1px solid #364135;
    border-radius: 7px;
    padding: 9px 14px;
    color: #cbd5c5;
    font-weight: 500;
    font-size: 12px;
    background: #1b251c;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:hover {
    background: #273327;
    border-color: #52634b;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a2813;
    font-weight: 650;
    box-shadow: 0 0 14px #b4ed5d06;
}

.btn-primary:hover {
    background: #d2ff91;
    border-color: #d2ff91;
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
}

.btn-ghost:hover {
    background: #ffffff07;
    border-color: transparent;
}

.btn-danger {
    background: #3b2522;
    border-color: #66403a;
    color: #efa9a0;
}

.btn-danger:hover {
    background: #502c27;
    border-color: #8e5047;
}

.icon-button {
    width: 30px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #899682;
    padding: 0;
}

.icon-button:hover {
    color: var(--text);
    background: #ffffff07;
}

.text-danger {
    color: #bc7b72;
    display: inline-flex;
    align-items: center;
}

.more-link {
    color: var(--accent);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.more-link:hover {
    color: #e1ffb6;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 10px;
    line-height: 1.5;
    border-radius: 4px;
    background: #293229;
    color: #adb7a8;
    border: 1px solid #3a4433;
    font-weight: 500;
    white-space: nowrap;
}

.pill.lime {
    background: #c4f37c0c;
    color: #b5d990;
    border-color: #b5d99025;
}

.pill.blue {
    background: #92adf70c;
    color: #a3b7e9;
    border-color: #92adf72b;
}

.pill.red {
    background: #e58d880c;
    color: #e59d94;
    border-color: #e58d8826;
}
.tiny-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tiny-dot.lime {
    background: var(--accent);
}
.tiny-dot.amber {
    background: var(--amber);
}
.tiny-dot.gray {
    background: #606f60;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: color-mix(in srgb,var(--av) 12%,#172018);
    border: 1px solid color-mix(in srgb,var(--av) 22%,transparent);
    color: var(--av);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: .3px;
}

.avatar.small {
    width: 29px;
    height: 29px;
    border-radius: 7px;
    font-size: 9px;
}

.avatar.large {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    font-size: 18px;
}

.progress {
    height: 4px;
    background: #2b3629;
    border-radius: 5px;
    overflow: hidden;
}

.progress>span {
    height: 100%;
    display: block;
    border-radius: 5px;
    background: #b3d98d;
    transition: width .3s;
}

.boot {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    color: var(--muted);
}

.boot h2 {
    color: var(--text);
    letter-spacing: 2px;
}

.boot h2 span {
    color: var(--accent);
}

.boot p {
    max-width: 550px;
    text-align: center;
    padding: 0 20px;
}

.boot .brand-mark {
    width: 58px;
    height: 58px;
    font-size: 37px;
}

.brand-mark {
    width: 35px;
    height: 40px;
    background: var(--accent);
    color: #1a2813;
    font-size: 27px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0,100% 23%,100% 77%,50% 100%,0 77%,0 23%);
    font-style: italic;
    letter-spacing: -3px;
    padding-right: 3px;
}

.sidebar {
    position: fixed;
    width: var(--sidebar);
    height: 100dvh;
    background: #111713;
    border-right: 1px solid var(--border);
    padding: 29px 17px 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
    top: 0;
    left: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
}

.brand b {
    font-weight: 400;
    color: var(--accent);
}

.brand small {
    display: block;
    font-size: 7.5px;
    color: #72846c;
    letter-spacing: 2.1px;
    margin-top: 6px;
    font-weight: 500;
}

.clan-switch {
    margin: 31px 0 28px;
    padding: 11px 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a221b;
    border: 1px solid #303c2e;
    border-radius: 8px;
    text-align: left;
    width: 100%;
}

.clan-switch:hover {
    background: #232f23;
}

.clan-switch>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.clan-switch b {
    font-size: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-switch small {
    font-size: 10px;
    color: #8a9a83;
    display: block;
    margin-top: 3px;
}

.clan-switch>svg {
    color: #8d9a85;
}

.clan-emblem {
    width: 34px;
    height: 34px;
    background: #b8d69b0b;
    border: 1px solid #b8d69b25;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #bdd9a2;
}

.nav-label {
    color: #667660;
    font-size: 8px;
    letter-spacing: 1.7px;
    padding: 0 12px;
    margin-bottom: 13px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #93a08d;
    text-align: left;
    padding: 12px 11px;
    position: relative;
    min-height: 43px;
}

.nav-item svg {
    stroke-width: 1.6;
}

.nav-item:hover {
    background: #1c251d;
    color: #d2deca;
}

.nav-item.active {
    background: #c4f37c0d;
    border-color: #bbec7b23;
    color: #d0f59e;
}

.nav-item.active:before {
    content: '';
    position: absolute;
    left: -18px;
    height: 22px;
    width: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-item span {
    flex: 1;
}

.nav-item small {
    font-family: monospace;
    font-size: 9px;
    color: #8c9b83;
    background: #ffffff05;
    border-radius: 4px;
    padding: 1px 5px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 28px;
}

.account {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 17px -17px 0;
    padding: 20px 19px;
    border-top: 1px solid var(--border);
}

.account>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.account .account-nickname { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.account .icon-button { flex-shrink:0; }

.account b {
    font-size: 10px;
}

.account small {
    display: block;
    font-size: 9px;
    color: #74856b;
    margin-top: 3px;
}

.account>svg {
    color: #73876b;
}

.main {
    margin-left: var(--sidebar);
    min-height: 100vh;
}

.mobile-menu {
    display: none;
}

.content {
    padding: 27px 30px 0;
    max-width: 1650px;
    margin: 0 auto;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 23px;
}

.section-heading h1 {
    font-size: 29px;
    letter-spacing: -.8px;
    font-weight: 600;
    line-height: 1.25;
}

.section-heading p {
    font-size: 11px;
    margin-top: 8px;
    color: #7e8d74;
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-banner {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid #adcd7b20;
    background: #aecf7705;
    border-radius: 6px;
    color: #899d75;
    font-size: 10px;
    margin-bottom: 22px;
}

.demo-banner>svg {
    color: #94ae76;
}

.demo-banner button {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: #b8ce99;
    white-space: nowrap;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric {
    padding: 18px 19px 17px;
    background: linear-gradient(120deg,#1a231a90,#151c17);
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.metric-top {
    display: flex;
    justify-content: space-between;
    color: #94a089;
    font-size: 10px;
    align-items: center;
}

.metric-top svg {
    color: #9bac8c;
    stroke-width: 1.4;
}

.metric-value {
    font-size: 32px;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-top: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.metric-value small {
    font-size: 12px;
    letter-spacing: 0;
    color: #7d8e70;
    font-weight: 400;
    margin-left: 7px;
}

.metric-meta {
    font-size: 9px;
    color: #7e9270;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.metric-meta .tiny-dot {
    width: 3px;
    height: 3px;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0,1.9fr) minmax(260px,1fr);
    gap: 20px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.panel-head {
    padding: 19px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 550;
    letter-spacing: .05px;
}

.panel-title>span {
    font-size: 9px;
    color: #718364;
    font-weight: 400;
    padding-left: 10px;
    border-left: 1px solid #34402f;
    white-space: nowrap;
}

.panel-head>svg {
    color: #7b8e6f;
    stroke-width: 1.5;
}

.panel-head h3 {
    font-size: 12px;
    font-weight: 500;
}

.chart-legend {
    margin-left: auto;
    display: flex;
    align-items: center;
    font-size: 9px;
    color: #899a7a;
    gap: 6px;
}

.chart-legend i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.chart {
    padding: 5px 18px 2px;
    min-height: 180px;
}

.chart svg {
    width: 100%;
    display: block;
    min-height: 170px;
}

.performance .empty {
    padding: 25px;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #6e8361;
    font-size: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #111a12;
    padding: 10px 19px;
    border-top: 1px solid #263125;
    border-bottom: 1px solid #263125;
}

td {
    padding: 13px 19px;
    border-bottom: 1px solid #263125;
    font-size: 11px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #202b1d44;
}

th:first-child,td:first-child {
    padding-left: 20px;
}

th:last-child,td:last-child {
    padding-left: 0;
    padding-right: 14px;
}

td.number {
    font-family: 'Segoe UI',sans-serif;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.player-name {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 0;
    white-space: nowrap;
}

.player-name b {
    display: block;
    font-size: 10px;
    letter-spacing: .1px;
}

.player-name small {
    font-size: 8px;
    color: #6f8361;
    display: block;
    margin-top: 4px;
}

.crown {
    color: #d6b778;
    margin-left: 3px;
}

.role-text {
    font-size: 9px;
    color: #91a283;
}

.attendance-stat {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    color: #a3b693;
}

.attendance-stat .progress {
    width: 44px;
    height: 3px;
}

.top-players th {
    padding-left: 10px;
    padding-right: 10px;
}

.top-players td {
    padding-left: 10px;
    padding-right: 10px;
}

.top-players td:first-child,.top-players th:first-child {
    padding-left: 20px;
}

.top-players .panel-head {
    padding-bottom: 17px;
}

.teaser-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 190px;
    gap: 20px;
    padding: 0 20px 20px;
}

.mini-map {
    min-height: 160px;
    position: relative;
    overflow: hidden;
    border: 1px solid #394931;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: #101912;
}

.mini-map>span {
    position: absolute;
    bottom: 7px;
    left: 8px;
    font-size: 7px;
    letter-spacing: .6px;
    color: #a3b88e;
    background: #0b120dc9;
    padding: 3px 6px;
    border: 1px solid #bacfa52b;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 3px;
}

.mini-map .tactical-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teaser-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 9px 0 8px;
}

.teaser-info p {
    font-size: 9px;
    line-height: 1.9;
    color: #7e9270;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teaser-info .btn {
    font-size: 9px;
    margin-top: 12px;
    padding: 6px 10px;
    min-height: 30px;
}

.teaser-info .pill {
    font-size: 8px;
}

.recent-list {
    padding: 0 18px 9px;
}

.recent-match {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 12px 0;
    border-top: 1px solid #2b3828;
}

.result-icon {
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #53653d44;
    background: #a8cf7f06;
    border-radius: 6px;
    color: #a9c58c;
}

.result-icon.loss {
    color: #b7786d;
    background: #d0928a05;
    border-color: #b7786d33;
}

.recent-match>span:nth-child(2) {
    flex: 1;
}

.recent-match b {
    font-size: 10px;
    display: block;
    font-weight: 500;
}

.recent-match small {
    display: block;
    color: #758868;
    font-size: 8px;
    margin-top: 3px;
}

.recent-match strong {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.recent-match strong>span {
    color: #5f7552;
    font-size: 11px;
}

.recent-match>svg {
    color: #657d57;
}

.page-footer {
    margin-top: 37px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #243020;
    padding: 19px 0 22px;
    color: #566e48;
    font-size: 8px;
}

.page-footer>span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.page-footer>span:first-child {
    letter-spacing: .5px;
}

.page-footer b {
    font-weight: 400;
    color: #85986e;
}

.page-footer i {
    height: 3px;
    width: 3px;
    border-radius: 50%;
    background: #536748;
    margin: 0 3px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar select {
    font-size: 11px;
    min-height: 38px;
    background: #151d16;
    border-color: #303e2b;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #151d16;
    border: 1px solid #303e2b;
    border-radius: 7px;
    padding: 0 11px;
    color: #718664;
    max-width: 260px;
}

.search-field input {
    border: 0;
    background: transparent;
    padding: 9px 0;
    min-height: 36px;
    font-size: 11px;
    width: 100%;
    box-shadow: none;
}

.filter-count {
    font-size: 10px;
    color: #718565;
    margin-left: auto;
}

.empty {
    padding: 45px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 160px;
}

.empty-icon {
    height: 52px;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #45593a;
    border-radius: 14px;
    color: #a5c58c;
    margin-bottom: 17px;
    background: #9bd07107;
}

.empty h3 {
    font-size: 17px;
    font-weight: 500;
}

.empty p {
    font-size: 12px;
    color: #819572;
    max-width: 360px;
    margin-top: 7px;
    line-height: 1.8;
}

.empty .btn {
    margin-top: 20px;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}

.gear-card {
    padding: 17px;
}

.gear-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.gear-card-head>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.gear-card-head b {
    display: block;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gear-card-head small {
    display: block;
    font-size: 9px;
    color: #7c926c;
    margin-top: 3px;
}

.gear-card>.btn {
    font-size: 10px;
    min-height: 35px;
}

.squad-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}

.squad-card {
    padding: 20px 17px 0;
    border-top: 2px solid var(--squad-color);
}

.squad-card.drop-ready {
    border-style: dashed;
    border-color: var(--squad-color);
}

.squad-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.squad-icon {
    background: color-mix(in srgb,var(--squad-color) 7%,transparent);
    border: 1px solid color-mix(in srgb,var(--squad-color) 24%,transparent);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--squad-color);
}

.squad-head>div {
    flex: 1;
}

.squad-head h2 {
    font-size: 16px;
    font-weight: 500;
}

.squad-head small {
    font-size: 9px;
    color: #748969;
}

.squad-card>.progress {
    height: 3px;
    margin-bottom: 17px;
}

.squad-member {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: grab;
    background: #111a12;
    border: 1px solid #293a24;
    border-radius: 6px;
    padding: 10px 6px;
}

.squad-member>button:first-of-type {
    flex: 1;
    text-align: left;
    padding: 0;
    min-width: 0;
}

.squad-member b {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.squad-member b svg {
    color: var(--squad-color);
}

.squad-member small {
    font-size: 8px;
    color: #718a61;
    display: block;
    margin-top: 2px;
}

.squad-member>.icon-button {
    width: 20px;
    height: 20px;
}

.drag-grip {
    color: #4c6340;
    font-size: 16px;
}

.reserve-panel {
    margin-top: 24px;
}

.reserve-list {
    padding: 0 20px 20px;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 13px;
}

.reserve-member {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #2d3e26;
    background: #111a12;
    padding: 10px;
    border-radius: 6px;
    cursor: grab;
}

.reserve-member>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.reserve-member b {
    font-size: 10px;
}

.reserve-member small {
    font-size: 8px;
    color: #7d976b;
    display: block;
}

.reserve-member select {
    max-width: 115px;
    font-size: 9px;
    padding: 5px;
    min-height: 29px;
}

.reserve-list>p {
    grid-column: 1/-1;
    font-size: 11px;
}

.tactics-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 22px;
}

.tactic-preview {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1.65;
    overflow: hidden;
    text-align: left;
    background: #101a13;
}

.tactical-svg {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
    user-select: none;
}

.tactic-preview .tactical-svg {
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.tactic-preview:hover .tactical-svg {
    transform: scale(1.025);
}

.tactic-card-content {
    padding: 20px;
}

.tactic-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tactic-card-title h2 {
    font-size: 18px;
    font-weight: 500;
}

.tactic-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #789764;
    font-size: 10px;
    margin-top: 9px;
}

.tactic-meta>span+span:before {
    content: '·';
    margin-right: 14px;
}

.tactic-card-content p {
    font-size: 11px;
    line-height: 1.8;
    margin: 15px 0 20px;
    color: #8aa377;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.tactic-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tactic-actions .btn {
    font-size: 10px;
    min-height: 34px;
}

.match-score {
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    font-weight: 600;
}

.match-score>span {
    color: #637f50;
    font-weight: 400;
}

.row-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(280px,1fr);
    gap: 24px;
    align-items: start;
}

.settings-panel>form {
    padding: 0 22px 22px;
}

.settings-panel .panel-head {
    padding: 22px;
}

.settings-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-panel>p {
    padding: 0 22px;
    color: #819b6f;
    font-size: 11px;
    line-height: 1.8;
}

.settings-buttons {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.settings-buttons .btn {
    font-size: 10px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: #050a07c9;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    padding: 28px;
    overflow-y: auto;
}

.modal {
    width: 600px;
    max-width: 100%;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    background: #151e16;
    border: 1px solid #425738;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 30px 120px #0007;
}

.modal.wide {
    width: 1020px;
}

.modal>header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 22px;
    border-bottom: 1px solid #2e4026;
    margin-bottom: 22px;
}

.modal header h2 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.3px;
}

.modal header p {
    font-size: 11px;
    color: #789869;
    margin-top: 6px;
}

.modal>header>.btn {
    padding: 3px;
    min-height: 28px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
    min-width: 0;
}

.field>span {
    font-size: 11px;
    color: #a8c096;
    font-weight: 500;
}

.field small {
    font-size: 10px;
    color: #6e8c5b;
}
.field > .secret-input-wrap {
    position: relative;
    display: block;
    min-width: 0;
}
.field .secret-input {
    padding-right: 88px;
}
.secret-input[data-secret-mask="css"] {
    -webkit-text-security: disc;
}
.secret-input[data-secret-mask="css"][data-secret-visible="true"] {
    -webkit-text-security: none;
}
.secret-input-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 6px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.secret-input-toggle:hover,
.secret-input-toggle:focus-visible {
    color: var(--accent);
    background: var(--panel-hover);
}

.field input,.field select,.field textarea {
    width: 100%;
    font-size: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 17px;
}

.form-divider {
    border-top: 1px solid #30452a;
    margin: 5px 0 18px;
    padding-top: 18px;
    font-size: 12px;
    color: #b1c89f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #2d4225;
    margin-top: 20px;
    padding-top: 20px;
}

.form-footer .muted {
    margin-right: auto;
    font-size: 10px;
}

.form-error {
    font-size: 12px;
    color: #eda29b;
    background: #9a52421f;
    border: 1px solid #9a524244;
    padding: 10px;
    border-radius: 5px;
    margin-top: 12px;
}

.member-picker {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #2c4324;
    border-radius: 6px;
    margin: 0 0 19px;
}

.picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-bottom: 1px solid #293f21;
    cursor: pointer;
}

.picker-row:last-child {
    border-bottom: 0;
}

.picker-row>span:nth-of-type(2) {
    flex: 1;
}

.picker-row b {
    font-size: 11px;
    display: block;
}

.picker-row small {
    font-size: 9px;
    color: #6b8959;
    display: block;
    margin-top: 2px;
}

.picker-row.disabled {
    opacity: .4;
    cursor: default;
}

.match-input {
    max-height: 380px;
    border: 1px solid #2e4226;
    border-radius: 6px;
}

.match-input input[type=number] {
    width: 72px;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
}

.match-input td {
    padding: 9px 15px;
}

.match-input th {
    font-size: 9px;
}

.profile-header {
    display: flex;
    gap: 15px;
    align-items: center;
}

.profile-header>div {
    flex: 1;
}

.profile-header h2 {
    font-size: 21px;
    font-weight: 500;
}

.profile-header p {
    font-size: 11px;
    color: #7e9c6b;
    margin-top: 4px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    padding: 20px 0;
    margin: 20px 0;
    border-top: 1px solid #2e4424;
    border-bottom: 1px solid #2e4424;
}

.profile-stats>div {
    text-align: center;
    border-right: 1px solid #2e4424;
}

.profile-stats>div:last-child {
    border: 0;
}

.profile-stats strong {
    display: block;
    font-size: 21px;
    font-weight: 500;
    color: #c4e6a7;
}

.profile-stats span {
    font-size: 9px;
    color: #74945e;
    display: block;
    margin-top: 5px;
}

.confirm-text {
    font-size: 13px;
    line-height: 1.9;
    color: #9cb989;
}

.toast {
    position: fixed;
    bottom: 28px;
    left: calc(50% + 119px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #263d1f;
    border: 1px solid #6d9452;
    border-radius: 8px;
    padding: 13px 20px;
    box-shadow: 0 10px 40px #0007;
    color: #c8e9ad;
    font-size: 12px;
    max-width: calc(100vw - 40px);
    z-index: 110;
    animation: toast-in .18s ease-out;
}

.toast.error {
    background: #40271f;
    border-color: #a7654c;
    color: #f0bcaa;
}

.toast span {
    overflow-wrap: anywhere;
}

@keyframes toast-in {
    from {
        opacity: 0;
        bottom: 18px;
    }
    to {
        opacity: 1;
        bottom: 28px;
    }
}



.tool {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #7f9d6a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool:hover {
    background: #22341b;
    color: #b8d69f;
}

.tool.active {
    background: #c4f37c1c;
    color: #cef19e;
}

.color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    padding: 0;
}

.color.selected {
    outline: 1px solid #c7dfab;
    outline-offset: 3px;
}

.tactical-svg.crosshair {
    cursor: crosshair;
}

@media (min-width:1600px) {
    :root {
        --sidebar: 255px;
    }
    .content {
        padding: 35px 40px 0;
    }
    .section-heading h1 {
        font-size: 33px;
    }
    .metric {
        padding: 22px 24px;
    }
    .metric-value {
        font-size: 38px;
    }
    .chart {
        padding-top: 20px;
    }
    .chart svg {
        max-height: 260px;
    }
    .top-players td {
        padding-top: 17px;
        padding-bottom: 17px;
    }
    .sidebar {
        padding-top: 32px;
    }
    .nav-item {
        font-size: 12px;
        min-height: 46px;
    }
    .toast {
        left: calc(50% + 127px);
    }
}

@media (max-width:1200px) {
    :root {
        --sidebar: 210px;
    }
    .sidebar {
        padding-left: 12px;
        padding-right: 12px;
    }
    .brand {
        font-size: 15px;
        gap: 8px;
        padding-left: 5px;
    }
    .brand small {
        font-size: 6px;
        letter-spacing: 1.9px;
    }
    .nav-item {
        font-size: 10px;
        gap: 10px;
        padding: 10px;
    }
    .nav-label {
        font-size: 7px;
    }
    .clan-switch {
        padding: 10px 7px;
    }
    .clan-switch b {
        font-size: 11px;
    }
    .account {
        margin-left: -12px;
        margin-right: -12px;
        padding: 17px 14px;
    }
    .content {
        padding: 24px 22px 0;
    }
    .overview-grid {
        grid-template-columns: minmax(0,1.65fr) minmax(260px,1fr);
        gap: 16px;
    }
    .metrics {
        gap: 12px;
    }
    .metric {
        padding: 16px 14px;
    }
    .metric-top {
        font-size: 9px;
    }
    .metric-value {
        font-size: 30px;
    }
    .metric-meta {
        font-size: 8px;
    }
    .panel-head {
        padding: 17px 15px;
    }
    .panel-title {
        font-size: 11px;
        gap: 7px;
    }
    .panel-title>span {
        font-size: 8px;
        padding-left: 7px;
    }
    .top-players .panel-head>.more-link {
        font-size: 9px;
    }
    .top-players .role-text {
        font-size: 8px;
    }
    .top-players td {
        padding: 11px 8px;
    }
    .top-players .avatar {
        width: 28px;
        height: 28px;
    }
    .top-players .player-name {
        gap: 7px;
    }
    .top-players .player-name b {
        font-size: 9px;
    }
    .top-players .attendance-stat .progress {
        display: none;
    }
    .top-players td:first-child {
        padding-left: 15px;
    }
    .top-players th:first-child {
        padding-left: 15px;
    }
    .teaser-content {
        padding: 0 15px 15px;
        gap: 14px;
    }
    .teaser-info p {
        font-size: 8.5px;
    }
    .teaser-info h3 {
        font-size: 12px;
    }
    .recent-list {
        padding: 0 14px 10px;
    }
    .recent-match {
        gap: 8px;
    }
    .gear-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .squad-grid {
        gap: 12px;
    }
    .squad-card {
        padding-left: 12px;
        padding-right: 12px;
    }
    .squad-member {
        gap: 5px;
    }
    .squad-member .avatar {
        width: 25px;
        height: 25px;
        font-size: 8px;
    }
    .squad-member b {
        font-size: 8px;
    }
    .squad-member small {
        font-size: 7px;
    }
    .squad-member .drag-grip {
        display: none;
    }
    .reserve-list {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .toast {
        left: calc(50% + 105px);
    }
}

@media (max-width:980px) {
    :root {
        --sidebar: 190px;
    }
    .content {
        padding: 22px 18px 0;
    }
    .overview-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .metrics {
        gap: 10px;
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .metric-value {
        font-size: 33px;
    }
    .tactics-teaser .mini-map {
        min-height: 220px;
    }
    .teaser-info h3 {
        font-size: 17px;
    }
    .teaser-info p {
        font-size: 11px;
    }
    .teaser-info .btn {
        margin-top: 20px;
    }
    .teaser-content {
        grid-template-columns: 1.1fr 1fr;
        padding: 0 20px 20px;
        gap: 20px;
    }
    .tactics-teaser .panel-head {
        padding-left: 20px;
        padding-right: 20px;
    }
    .recent-match {
        padding: 14px 0;
    }
    .recent-match b {
        font-size: 12px;
    }
    .recent-match small {
        font-size: 10px;
    }
    .recent-match strong {
        font-size: 17px;
    }
    .section-heading h1 {
        font-size: 26px;
    }
    .section-heading p {
        font-size: 10px;
    }
    .heading-actions .btn {
        font-size: 10px;
        padding: 8px 10px;
    }
    .brand {
        font-size: 13px;
    }
    .brand-mark {
        width: 30px;
        height: 35px;
        font-size: 23px;
    }
    .brand small {
        font-size: 5.5px;
        letter-spacing: 1.4px;
    }
    .clan-switch .clan-emblem {
        width: 28px;
        height: 30px;
    }
    .clan-switch b {
        font-size: 10px;
    }
    .nav-item {
        font-size: 9px;
        gap: 8px;
    }
    .nav-item svg {
        width: 16px;
    }
    .nav-label {
        font-size: 6px;
        letter-spacing: 1.5px;
    }
    .account {
        gap: 7px;
    }
    .account b {
        font-size: 8px;
    }
    .account small {
        font-size: 7px;
    }
    .account>.avatar {
        width: 25px;
        height: 25px;
    }
    .account>svg {
        width: 12px;
    }
    .demo-banner {
        font-size: 9px;
        flex-wrap: wrap;
        gap: 7px;
    }
    .demo-banner button {
        font-size: 9px;
    }
    .gear-grid {
        gap: 14px;
    }
    .gear-card {
        padding: 13px;
    }
    .gear-card-head b {
        font-size: 10px;
    }
    .gear-card-head small {
        font-size: 8px;
    }
    .gear-card-head .avatar {
        width: 28px;
        height: 28px;
    }
    .squad-grid {
        grid-template-columns: 1fr 1fr;
    }
    .squad-member b {
        font-size: 10px;
    }
    .squad-member small {
        font-size: 8px;
    }
    .squad-head h2 {
        font-size: 15px;
    }
    .squad-card {
        padding-left: 15px;
        padding-right: 15px;
    }
    .tactics-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .modal {
        padding: 22px;
    }
    .modal-backdrop {
        padding: 22px;
    }
    .modal {
        max-height: calc(100dvh - 44px);
    }
}

@media (max-width:760px) {
    :root {
        --sidebar: 0px;
    }
    .sidebar {
        width: 235px;
        transform: translateX(-100%);
        transition: transform .2s;
        padding: 25px 17px 0;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar .brand {
        font-size: 17px;
        gap: 12px;
    }
    .sidebar .brand-mark {
        width: 35px;
        height: 40px;
        font-size: 28px;
    }
    .sidebar .brand small {
        font-size: 7px;
        letter-spacing: 2.2px;
    }
    .sidebar .clan-switch b {
        font-size: 12px;
    }
    .sidebar .clan-switch {
        margin-top: 25px;
    }
    .sidebar .clan-emblem {
        width: 34px;
        height: 34px;
    }
    .sidebar .nav-item {
        font-size: 11px;
        gap: 12px;
        padding: 12px;
    }
    .sidebar .nav-item svg {
        width: 18px;
    }
    .sidebar .nav-label {
        font-size: 8px;
        letter-spacing: 1.8px;
    }
    .sidebar .account {
        margin-left: -17px;
        margin-right: -17px;
        padding: 18px;
    }
    .sidebar .account b {
        font-size: 10px;
    }
    .sidebar .account small {
        font-size: 9px;
    }
    .sidebar .account>.avatar {
        width: 29px;
        height: 29px;
    }
    .sidebar-shade {
        position: fixed;
        inset: 0;
        background: #0009;
        backdrop-filter: blur(3px);
        z-index: 35;
    }
    .main {
        margin-left: 0;
    }
    .mobile-menu {
        display: flex;
    }
    .content {
        padding: 23px 20px 0;
    }
    .section-heading {
        gap: 15px;
        align-items: flex-start;
    }
    .section-heading h1 {
        font-size: 28px;
    }
    .section-heading p {
        max-width: 320px;
    }
    .heading-actions {
        gap: 8px;
        padding-top: 3px;
    }
    .heading-actions .btn {
        font-size: 11px;
        min-height: 36px;
    }
    .demo-banner {
        padding: 10px;
    }
    .demo-banner button {
        margin-left: 24px;
    }
    .metrics {
        gap: 12px;
    }
    .metric {
        padding: 17px;
    }
    .metric-top {
        font-size: 10px;
    }
    .metric-value {
        font-size: 34px;
        margin-top: 12px;
    }
    .metric-meta {
        font-size: 9px;
    }
    .overview-grid {
        gap: 18px;
    }
    .chart {
        padding: 5px 10px;
    }
    .panel-head {
        padding: 17px;
    }
    .panel-title {
        font-size: 12px;
    }
    .panel-title>span {
        font-size: 9px;
    }
    .top-players .role-text {
        font-size: 9px;
    }
    .top-players td {
        padding: 12px 9px;
    }
    .top-players .avatar {
        width: 32px;
        height: 32px;
    }
    .top-players .player-name b {
        font-size: 10px;
    }
    .gear-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .gear-card-head b {
        font-size: 11px;
    }
    .gear-card-head {
        gap: 7px;
    }
    .gear-card-head small {
        font-size: 8px;
    }
    .filter-bar {
        gap: 8px;
    }
    .filter-bar select {
        font-size: 10px;
    }
    .search-field {
        flex: 1;
        min-width: 160px;
        max-width: none;
    }
    .filter-count {
        font-size: 9px;
    }
    .settings-grid {
        gap: 18px;
    }
    .toast {
        left: 50%;
        width: max-content;
        font-size: 11px;
    }
    .page-footer {
        font-size: 7px;
        gap: 15px;
    }
    .page-footer>span:last-child {
        font-size: 7px;
    }
    .form-grid {
        gap: 0 13px;
    }
    .modal-backdrop {
        padding: 12px;
    }
    .modal {
        padding: 18px;
        max-height: calc(100dvh - 24px);
        border-radius: 9px;
    }
    .modal>header {
        margin-bottom: 18px;
        padding-bottom: 17px;
    }
    .modal header h2 {
        font-size: 18px;
    }
    .tool {
        width: 27px;
        height: 29px;
    }
    .tool svg {
        width: 15px;
    }
    .form-footer>.muted {
        font-size: 8px;
    }
    .profile-header {
        gap: 12px;
    }
    .profile-header h2 {
        font-size: 18px;
    }
    .profile-stats strong {
        font-size: 19px;
    }
    .profile-stats span {
        font-size: 8px;
    }
}

@media (max-width:480px) {
    .content {
        padding: 20px 15px 0;
    }
    .section-heading h1 {
        font-size: 25px;
    }
    .section-heading p {
        font-size: 9px;
        max-width: 230px;
        line-height: 1.8;
        margin-top: 6px;
    }
    .heading-actions .btn {
        font-size: 9px;
        gap: 5px;
        padding: 8px 9px;
        min-height: 33px;
    }
    .heading-actions .btn>svg {
        width: 13px;
    }
    .heading-actions .btn:not(.btn-primary) {
        display: none;
    }
    .heading-actions {
        padding-top: 2px;
    }
    .demo-banner {
        font-size: 8px;
        gap: 6px;
        align-items: flex-start;
    }
    .demo-banner>svg {
        width: 13px;
        height: 13px;
    }
    .demo-banner>span {
        flex: 1;
    }
    .demo-banner button {
        font-size: 8px;
        margin-left: 19px;
    }
    .metrics {
        gap: 10px;
        margin-bottom: 17px;
    }
    .metric {
        padding: 14px;
    }
    .metric-top {
        font-size: 9px;
    }
    .metric-top svg {
        width: 16px;
    }
    .metric-value {
        font-size: 30px;
    }
    .metric-value small {
        font-size: 10px;
        margin-left: 5px;
    }
    .metric-meta {
        font-size: 7px;
        gap: 4px;
        margin-top: 10px;
    }
    .panel-head {
        padding: 16px 14px;
        gap: 9px;
    }
    .panel-title {
        font-size: 11px;
        gap: 7px;
    }
    .panel-title>span {
        font-size: 7px;
        padding-left: 6px;
    }
    .chart-legend {
        font-size: 7px;
    }
    .chart {
        padding: 12px 10px 0;
        min-height: 150px;
    }
    .chart svg {
        min-height: 140px;
    }
    .top-players .panel-head .more-link {
        font-size: 9px;
    }
    .top-players .role-text {
        font-size: 8px;
    }
    .top-players .player-name b {
        font-size: 9px;
    }
    .top-players .player-name small {
        font-size: 7px;
    }
    .top-players .player-name {
        gap: 7px;
    }
    .top-players .avatar {
        height: 27px;
        width: 27px;
        font-size: 8px;
    }
    .top-players td {
        padding: 11px 7px;
    }
    .top-players th {
        padding: 9px 7px;
        font-size: 7px;
    }
    .top-players td:first-child,.top-players th:first-child {
        padding-left: 14px;
    }
    .top-players td:nth-child(2),.top-players th:nth-child(2) {
        display: none;
    }
    .top-players td:last-child {
        padding-right: 8px;
    }
    .top-players .attendance-stat {
        font-size: 9px;
    }
    .top-players .crown {
        display: none;
    }
    .teaser-content {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 16px 16px;
    }
    .tactics-teaser .mini-map {
        min-height: 190px;
    }
    .teaser-info h3 {
        font-size: 16px;
    }
    .teaser-info p {
        font-size: 10px;
    }
    .teaser-info .btn {
        margin-top: 12px;
        font-size: 10px;
    }
    .teaser-info .pill {
        font-size: 8px;
    }
    .tactics-teaser .panel-head {
        padding-left: 16px;
        padding-right: 16px;
    }
    .gear-grid {
        grid-template-columns: 1fr;
    }
    .gear-card {
        padding: 17px;
    }
    .gear-card-head b {
        font-size: 12px;
    }
    .gear-card-head small {
        font-size: 9px;
    }
    .gear-card-head .avatar {
        width: 34px;
        height: 34px;
    }
    .squad-grid {
        grid-template-columns: 1fr;
    }
    .squad-card {
        padding: 20px 18px 0;
    }
    .squad-member {
        padding: 10px;
    }
    .squad-member .avatar {
        width: 29px;
        height: 29px;
    }
    .squad-member b {
        font-size: 11px;
    }
    .squad-member small {
        font-size: 9px;
    }
    .squad-member .drag-grip {
        display: block;
    }
    .squad-member>button:first-of-type {
        margin-left: 3px;
    }
    .squad-head h2 {
        font-size: 18px;
    }
    .squad-head small {
        font-size: 10px;
    }
    .reserve-list {
        grid-template-columns: 1fr;
        padding: 0 15px 15px;
    }
    .reserve-member b {
        font-size: 11px;
    }
    .reserve-member small {
        font-size: 9px;
    }
    .reserve-member select {
        font-size: 10px;
        padding: 5px;
        min-height: 32px;
    }
    .tactic-card-content {
        padding: 17px;
    }
    .tactic-card-title h2 {
        font-size: 17px;
    }
    .tactic-meta {
        font-size: 9px;
        gap: 8px;
    }
    .tactic-meta>span+span:before {
        margin-right: 8px;
    }
    .tactic-card-content p {
        font-size: 10px;
    }
    .filter-count {
        margin-left: auto;
        font-size: 8px;
    }
    .filter-bar select {
        font-size: 9px;
        min-height: 35px;
    }
    .search-field {
        min-width: 100%;
        height: 37px;
    }
    .search-field input {
        font-size: 10px;
    }
    .page-footer {
        margin-top: 26px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 15px;
    }
    .settings-panel>form {
        padding: 0 17px 17px;
    }
    .settings-panel .panel-head {
        padding: 18px;
    }
    .settings-panel>p {
        padding: 0 18px;
        font-size: 10px;
    }
    .settings-buttons {
        padding: 16px 18px 18px;
    }
    .field>span {
        font-size: 10px;
    }
    .field input,.field select,.field textarea {
        font-size: 11px;
        padding: 9px 10px;
    }
    .form-grid {
        gap: 0 12px;
    }
    .modal {
        padding: 17px;
    }
    .modal-backdrop {
        padding: 8px;
    }
    .modal {
        max-height: calc(100dvh - 16px);
    }
    .modal header h2 {
        font-size: 17px;
    }
    .form-footer .btn {
        font-size: 10px;
        padding: 8px 10px;
    }
    .profile-header>.avatar {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    .profile-header h2 {
        font-size: 16px;
    }
    .profile-header p {
        font-size: 9px;
    }
    .profile-header {
        gap: 9px;
    }
    .profile-stats strong {
        font-size: 18px;
    }
    .picker-row {
        padding: 9px 10px;
        gap: 8px;
    }
    .picker-row b {
        font-size: 10px;
    }
    .picker-row small {
        font-size: 8px;
    }
    .confirm-text {
        font-size: 12px;
    }
    .tool {
        width: 28px;
        height: 28px;
    }
    .color {
        width: 12px;
        height: 12px;
    }
    .tactic-editor .form-footer {
        gap: 5px;
    }
    .form-footer>.muted {
        font-size: 7px;
    }
    .tactic-editor .form-footer .btn {
        font-size: 9px;
    }
    .toast {
        font-size: 10px;
        padding: 12px 15px;
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

img {
    max-width: 100%;
}

button {
    font-family: inherit;
}

a.btn {
    display: inline-flex;
}

.hidden,[hidden] {
    display: none !important;
}

#page-content {
    min-width: 0;
}

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

input[type=checkbox] {
    padding: 0;
}

.panel-head h2 {
    font-size: 12px;
}

.modal-backdrop {
    overflow: auto;
}

.modal button:disabled {
    pointer-events: none;
}
.item-art { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 80px; height: 76px; min-width: 0; }
.item-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 3px 4px #0007); }
.item-no-image { color: #677383; font-size: 9px; line-height: 1.5; text-align: center; max-width: 65px; }
.empty-art .item-no-image { color: #4e5968; font-size: 18px; }
.loadout-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.loadout-metric { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; padding: 12px; border: 1px solid #4c3740; background: #21191e; border-radius: 3px; color: #e5a3aa; }
.loadout-metric.speed { color: #86ced9; background: #122326; border-color: #2d4b54; }
.loadout-metric > svg { grid-row: 1 / 3; align-self: center; }
.loadout-metric > span { color: #b3bdb7; font-size: 10px; }
.loadout-metric strong { font-size: 21px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.equipment-readonly { display: grid; min-width: 0; }
.equipment-read-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; min-width: 0; border-bottom: 1px solid var(--border); }
.equipment-read-row .item-art { width: 64px; height: 52px; }
.equipment-read-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.equipment-read-name small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 1px; }
.equipment-read-name b { color: var(--item-color); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.equipment-read-row.is-empty .equipment-read-name b { color: #6d7d71; font-size: 11px; font-weight: 400; }
.equipment-level { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #91c8ed; padding: 3px 7px; background: #152536; border: 1px solid #314d66; border-radius: 2px; }
.profile .equipment-readonly { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-bottom: 20px; }
.gear-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); align-items: start; }
.loadout-card .loadout-metrics { margin: 15px 0 7px; }
.loadout-card > .btn { margin-top: 18px; }
.loadout-player-link { padding: 0; margin: 0; display: block; max-width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.loadout-player-link:hover { color: var(--accent); }
/* Быстрое редактирование ячеек и каталог с предпросмотром. */
.equipment-read-row { padding: 0; }
.equipment-cell { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; text-align: left; padding: 8px 0; background: transparent; border: 0; color: inherit; border-radius: 2px; }
.equipment-cell:hover { background: #b7d6f509; }
.equipment-level { cursor: pointer; }
.equipment-level:hover { background: #243c56; border-color: #5e96bd; }
.loadout-metric { width: 100%; font-family: inherit; text-align: left; cursor: pointer; }
.loadout-metric:hover { filter: brightness(1.16); }
.table-scroll td.metric-table-cell { padding: 0; }
.equipment-cell:focus-visible, .equipment-level:focus-visible, .loadout-metric:focus-visible{ outline: 2px solid #76acf0; outline-offset: -2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.modal.catalog-modal { width: 920px; padding: 0; background: #07090c; border: 1px solid #234367; border-radius: 0; overflow: hidden; }
.modal.catalog-modal > header { display: none; }
.equipment-picker { position: relative; display: flex; flex-direction: column; height: min(750px, calc(100dvh - 64px)); min-height: 360px; min-width: 0; color: #d8dde5; background: #07090c; }
.equipment-picker::before, .equipment-picker::after { content: ''; position: absolute; width: 11px; height: 11px; pointer-events: none; border-color: #499bff; z-index: 1; }
.equipment-picker::before { top: 0; left: 0; border-top: 1px solid #499bff; border-left: 1px solid #499bff; }
.equipment-picker::after { bottom: 0; right: 0; border-bottom: 1px solid #499bff; border-right: 1px solid #499bff; }
.item-picker-head { flex-shrink: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 23px 27px 19px; border-bottom: 1px solid #151a21; }
.picker-kicker { display: flex; align-items: center; gap: 12px; font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: 4px; line-height: 1.6; color: #8d939e; white-space: nowrap; }
.picker-kicker::before, .picker-kicker::after { content: ''; height: 1px; width: 22px; background: #20252c; }
.item-picker-head h3 { margin: 8px 0 0; font-size: 23px; color: #f0f2f7; font-weight: 700; letter-spacing: -.7px; }
.picker-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid #1a2028; color: #939ba8; border-radius: 0; }
.picker-close:hover { color: #d9e9ff; border-color: #465e7b; background: #111925; }
.item-picker-columns { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.item-picker-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: 20px; border-right: 1px solid #161b23; }
.item-picker-search { display: flex; flex-shrink: 0; align-items: center; gap: 11px; min-width: 0; min-height: 40px; padding: 0 11px; border: 1px solid #1b2029; background: transparent; color: #939ba8; }
.item-picker-search:focus-within { border-color: #3e6497; }
.item-picker-search input { flex: 1; width: 100%; min-width: 0; min-height: 38px; padding: 9px 0; background: transparent; color: #d9e5f5; border: 0; border-radius: 0; font: 10px ui-monospace, monospace; letter-spacing: 1px; }
.item-picker-search input::placeholder { color: #6e7581; }
.item-picker-search input:focus { outline: 0; box-shadow: none; }
.item-picker-list { flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 7px; padding: 1px 7px 1px 1px; scrollbar-width: thin; scrollbar-color: #284d7a #080c12; }
.catalog-item { position: relative; display: flex; align-items: center; gap: 9px; flex-shrink: 0; width: 100%; min-width: 0; min-height: 66px; padding: 9px 11px; text-align: left; border: 1px solid #171d25; border-radius: 0; background: #080a0d; color: var(--item-color); }
.catalog-item:hover { background: #0e141d; border-color: #334760; }
.catalog-item.is-previewed { background: #0d1624; border-color: #4289e7; box-shadow: inset 0 0 0 1px #4289e714; }
.catalog-item .item-art { width: 42px; height: 42px; margin: 0 3px 0 0; background: #080b10; border: 1px solid #191f29; }
.catalog-item .item-no-image { font-size: 7px; }
.catalog-rank-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--item-color); flex-shrink: 0; }
.catalog-item > b { min-width: 0; font-size: 12px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.catalog-equipped { display: inline-flex; align-items: center; color: #789dbd; margin-left: auto; padding-left: 5px; }
.item-preview { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; padding: 21px 20px 20px; }
.item-preview > .picker-kicker::after { flex: 1; width: auto; }
.item-preview-summary { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 16px 0 12px; min-height: 56px; }
.item-preview-summary > .item-art { width: 56px; height: 56px; border: 1px solid #1c232e; background: #090b10; }
.item-preview-summary > span:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.item-preview-summary small { color: #8e94a0; text-transform: uppercase; font: 8px ui-monospace, monospace; letter-spacing: 2px; }
.item-preview-summary b { color: var(--item-color); font-size: 15px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.preview-placeholder { color: #7f8998; font-size: 12px; line-height: 1.8; }
.item-preview-scroll { min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding-right: 7px; scrollbar-width: thin; scrollbar-color: #284d7a #080c12; }
.preview-base-note { margin: 0 0 7px; color: #596a81; font: 8px ui-monospace, monospace; line-height: 1.7; }
.item-preview-stats { margin: 0; }
.item-preview-stats > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; padding: 9px 0; border-bottom: 1px solid #151a21; }
.item-preview-stats dt { color: #929aa7; font: 10px ui-monospace, monospace; line-height: 1.7; overflow-wrap: anywhere; }
.item-preview-stats dd { max-width: 125px; margin: 0; color: #c5d1df; font: 600 11px ui-monospace, monospace; line-height: 1.7; text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; }
.item-preview-stats dd.stat-positive { color: #33cea4; }
.item-preview-stats dd.stat-negative { color: #fc657e; }
.item-preview-footer { display: flex; gap: 8px; padding-top: 17px; }
.picker-confirm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-width: 0; min-height: 44px; padding: 12px; border: 1px solid #7db3ff; border-radius: 0; background: #408bfa; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.picker-confirm:hover:not(:disabled) { background: #579bff; }
.picker-confirm:disabled { opacity: .35; cursor: default; }
.picker-remove { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; min-height: 44px; border: 1px solid #49313b; border-radius: 0; color: #b58091; background: #1d141a; }
.picker-remove:hover { background: #32202b; color: #f49cae; }
.item-picker-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; flex: 1; padding: 30px 18px; text-align: center; color: #7187a1; }
.item-picker-empty h4 { font-size: 15px; color: #bdcce0; margin: 12px 0 7px; }
.item-picker-empty p { max-width: 470px; font-size: 11px; line-height: 1.8; margin-bottom: 15px; }
.catalog-item:focus-visible, .picker-close:focus-visible, .picker-confirm:focus-visible, .picker-remove:focus-visible { outline: 2px solid #7fb9ee; outline-offset: -2px; }
@media (max-width: 760px) {
    .profile .equipment-readonly { grid-template-columns: minmax(0, 1fr); }
    .item-picker-columns { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .item-picker-left, .item-preview { padding: 15px 12px; }
    .picker-kicker { font-size: 7px; letter-spacing: 2.5px; gap: 8px; }
    .picker-kicker::before, .picker-kicker::after { width: 15px; }
}
@media (max-width: 620px) {
    .equipment-picker { height: calc(100dvh - 58px); min-height: 410px; }
    .item-picker-head { padding: 15px 17px; }
    .item-picker-head h3 { font-size: 20px; }
    .item-picker-columns { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(140px, .9fr) minmax(180px, 1fr); }
    .item-picker-left { border-right: 0; border-bottom: 1px solid #1c2634; padding: 12px; gap: 8px; }
    .catalog-item { min-height: 52px; padding: 7px 10px; }
    .catalog-item .item-art { width: 34px; height: 34px; }
    .catalog-item > b { font-size: 11px; }
    .item-preview { padding: 12px; grid-template-columns: minmax(0, 1fr); }
    .item-preview-summary { min-height: 40px; margin: 9px 0; }
    .item-preview-summary > .item-art { width: 40px; height: 40px; }
    .item-preview-summary b { font-size: 13px; }
    .item-preview-footer { padding-top: 9px; }
    .picker-confirm, .picker-remove { min-height: 38px; padding: 8px; }
}
@media (max-width: 480px) {
    .loadout-metric { padding: 10px 8px; column-gap: 6px; }
    .loadout-metric > span { font-size: 9px; }
    .loadout-metric strong { font-size: 19px; }
}
@media (max-height: 520px) {
    .equipment-picker { height: calc(100dvh - 64px); min-height: 0; }
    .item-picker-head { padding: 10px 17px; }
    .item-picker-head h3 { font-size: 18px; margin-top: 4px; }
    .item-picker-columns { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
    .item-picker-left, .item-preview { padding: 10px; }
    .item-picker-left { border-right: 1px solid #161b23; border-bottom: 0; }
    .item-preview-summary { margin: 8px 0; min-height: 35px; }
    .item-preview-summary > .item-art { width: 35px; height: 35px; }
    .picker-kicker { font-size: 7px; letter-spacing: 1.5px; }
    .picker-kicker::before, .picker-kicker::after { width: 12px; }
    .item-preview-footer { padding-top: 8px; }
}
.squad-name-button { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; }
.squad-name-button:hover { color: var(--squad-color); }
.squad-head > div { min-width: 0; }
.squad-picker-count { margin-left: auto; color: #b5d296; font-variant-numeric: tabular-nums; }
.overview-squad-list { padding: 0 20px 13px; }
.overview-squad-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.overview-squad-row:last-child { border-bottom: 0; }
.overview-squad-row > i { width: 5px; height: 29px; border-radius: 2px; flex-shrink: 0; }
.overview-squad-row > span { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.overview-squad-row b { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.overview-squad-row small { font-size: 9px; color: var(--muted); }
.overview-squad-row > strong { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: #bbd7a4; }
.overview-squad-row:hover b { color: var(--accent); }
.squad-name-button:focus-visible, .overview-squad-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Состав: звания, статистика и подтверждаемое удаление. */
.members-roster-table { min-width: 1320px; }
.members-roster-table th { padding-left: 12px; padding-right: 12px; line-height: 1.7; }
.members-roster-table td { padding-left: 12px; padding-right: 12px; }
.members-roster-table th:first-child, .members-roster-table td:first-child { padding-left: 20px; }
.members-roster-table th:last-child, .members-roster-table td:last-child { width: 38px; padding-left: 0; padding-right: 14px; text-align: right; }
.members-roster-table th:nth-child(n+3):not(:last-child), .members-roster-table td.number { text-align: center; }
.members-roster-table .player-name { min-width: 140px; }
.members-roster-table .role-text { font-size: 11px; }
.delete-member-button { color: #bb8188; }
.delete-member-button:hover { color: #ff9aab; background: #3b202a; }
.delete-member-button:focus-visible { outline: 2px solid #e79ba9; outline-offset: 2px; }

/* Окно статистики и данные бойца. */
.overview-grid > .top-players { grid-column: 1 / -1; }
.profile-editor .profile-identity { min-width: 0; }
.profile-editor [data-profile-avatar] { flex-shrink: 0; }
.profile-name-field, .profile-rank-field { display: block; }
.profile-name-field .profile-name-input { width: 100%; min-width: 0; padding: 3px 7px; border: 1px solid transparent; border-bottom-color: #34452e; border-radius: 3px; background: transparent; font-size: 21px; font-weight: 500; }
.profile-rank-field select { min-height: 31px; max-width: 100%; margin-top: 4px; padding: 3px 26px 3px 7px; border: 1px solid transparent; border-bottom-color: #34452e; border-radius: 3px; background-color: transparent; color: #93b17f; font-size: 11px; }
.profile-name-field .profile-name-input:hover, .profile-rank-field select:hover { border-color: #455a39; background-color: #111a1266; }
.profile-name-field .profile-name-input:focus, .profile-rank-field select:focus { border-color: var(--accent); background-color: #111a12; }
@media (max-width: 480px) {
    .profile-name-field .profile-name-input { font-size: 17px; }
    .profile-editor [data-profile-avatar] .avatar { width: 45px; height: 45px; font-size: 14px; }
}

/* Таблица состава и аналитика в палитре штаба. */
.stat-green { --stat-tone: #b4d995; color: var(--stat-tone); }
.stat-red { --stat-tone: #de9697; color: var(--stat-tone); }
.stat-cyan { --stat-tone: #8bc9cb; color: var(--stat-tone); }
.stat-amber { --stat-tone: #dfba7c; color: var(--stat-tone); }
.stat-purple { --stat-tone: #b9a0d4; color: var(--stat-tone); }
.stat-blue { --stat-tone: #9db7dc; color: var(--stat-tone); }
.metric-green { --metric-tone: #b4d995; }
.metric-cyan { --metric-tone: #8bc9cb; }
.metric-amber { --metric-tone: #dfba7c; }
.metric-purple { --metric-tone: #b9a0d4; }
.metric-blue { --metric-tone: #9db7dc; }
.metric-red { --metric-tone: #de9697; }
.metric[class*="metric-"] { border-top-color: color-mix(in srgb, var(--metric-tone) 40%, var(--border)); background: linear-gradient(115deg, color-mix(in srgb, var(--metric-tone) 5%, var(--panel)), var(--panel)); }
.metric[class*="metric-"] .metric-value, .metric[class*="metric-"] .metric-top svg { color: var(--metric-tone); }
.metric[class*="metric-"] .tiny-dot { background: var(--metric-tone); }
.members-roster-table th { font-size: 9px; letter-spacing: .35px; }
.members-roster-table th button { display: inline-flex; align-items: center; gap: 5px; max-width: 105px; padding: 4px 0; text-align: inherit; white-space: normal; color: inherit; font: inherit; text-transform: inherit; }
.members-roster-table th button span { opacity: .45; font-size: 12px; }
.members-roster-table th[aria-sort="ascending"], .members-roster-table th[aria-sort="descending"] { background: #1e2b1c; }
.members-roster-table th[aria-sort="ascending"] button span, .members-roster-table th[aria-sort="descending"] button span { opacity: 1; }
.members-roster-table tbody tr:hover { background: #bddf8e07; }

.squad-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 16px; }
.squad-workspace .squad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.squad-workspace .reserve-panel { margin-top: 0; position: sticky; top: 20px; min-width: 0; }
.squad-stat-row:hover { background: #b2d38a06; }
.squad-stat-row .drag-grip { font-size: 13px; }
.squad-stat-row .squad-remove { width: 18px; height: 20px; opacity: .45; }
.squad-stat-row .squad-remove:hover, .squad-stat-row .squad-remove:focus-visible { opacity: 1; }
.squad-workspace .reserve-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 0 13px 14px; }
.squad-workspace .reserve-member { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 10px; }
.reserve-name { min-width: 0; text-align: left; padding: 0; }
.reserve-name b { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.reserve-name:hover b { color: var(--accent); }
.reserve-name small { display: block; font-size: 9px; color: #839975; }
.squad-workspace .reserve-member select { grid-column: 1 / -1; width: 100%; min-height: 30px; margin: 0; padding: 5px 24px 5px 8px; font-size: 10px; }

.trend-chart { padding: 0 16px; }
.trend-chart svg { display: block; width: 100%; height: auto; min-height: 120px; }
.chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; padding: 6px 0 10px; color: #8fa382; font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; }
.chart-explanation { padding: 0 22px 18px; margin: 0; color: #7c9071; font-size: 9px; line-height: 1.7; }
.comparison-bars { display: flex; flex-direction: column; gap: 16px; padding: 0 20px 12px; }
.comparison-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 7px; }
.comparison-row b { font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.comparison-row span { font-size: 9px; color: #809775; flex-shrink: 0; }
.comparison-row strong { color: #bad99c; font-size: 10px; }
.result-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #283424; }
.result-bar i { display: block; height: 100%; }
.result-win { background: #97bd79; }
.result-loss { background: #b67273; }
.result-draw { background: #a9a07a; }

.profile-stat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.profile-stat-heading h3 { font-size: 11px; font-weight: 500; color: #91ab7d; text-transform: uppercase; letter-spacing: .7px; margin: 0; }
.profile-stat-heading select { min-height: 29px; font-size: 10px; padding: 4px 25px 4px 8px; }
.profile-editor .profile-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 20px; padding: 0; border: 0; }
.profile-editor .profile-stats > div { min-width: 0; border: 1px solid #30422a; border-radius: 5px; padding: 11px 5px; background: #111a1266; }
.profile-editor .profile-stats strong { color: var(--stat-tone, var(--accent)); font-size: 18px; }
.profile-editor .profile-stats span { font-size: 9px; }
.profile-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.profile-history-heading h4 { margin: 0; font-size: 12px; font-weight: 500; }
.profile-history-heading > span { color: #829874; font-size: 9px; }
.profile-history-table { max-height: 280px; border: 1px solid #2d3e27; border-radius: 4px; }
.profile-history-table td { padding: 10px; font-size: 10px; }
.profile-history-table th { font-size: 8px; padding: 9px 10px; position: sticky; top: 0; z-index: 1; }
.profile-history-table td small { display: block; color: #819775; font-size: 9px; margin-top: 3px; }
.profile-editor > .form-footer { position: sticky; bottom: 0; z-index: 3; background: var(--panel); padding: 15px 0; box-shadow: 0 -12px 16px -12px #0d120f; }
@media (max-width: 1500px) {
    .squad-workspace { grid-template-columns: minmax(0, 1fr); }
    .squad-workspace .reserve-panel { position: static; }
    .squad-workspace .reserve-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .squad-workspace .reserve-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .squad-workspace .squad-grid { grid-template-columns: minmax(0, 1fr); }
    .squad-workspace .reserve-list { grid-template-columns: minmax(0, 1fr); }
    .comparison-bars { padding: 0 16px 12px; }
    .members-roster-table th button { max-width: 85px; }
    .profile-editor .profile-stats { gap: 5px; }
    .profile-editor .profile-stats strong { font-size: 16px; }
    .profile-editor .profile-stats span { font-size: 8px; }
}

/* Расширенная таблица: средние показатели и исходные данные матча. */
.members-table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.members-roster-table th:first-child, .members-roster-table td:first-child { position: sticky; left: 0; z-index: 1; background: #151c17; box-shadow: 5px 0 7px -7px #000; }
.members-roster-table th:first-child { z-index: 2; background: #111a12; }
.members-roster-table tbody tr:hover td:first-child { background: #1a2519; }
.members-roster-table th[aria-sort="ascending"]:first-child, .members-roster-table th[aria-sort="descending"]:first-child { background: #1e2b1c; }
.members-roster-table .player-name { max-width: 210px; }
.members-roster-table .player-name > span { min-width: 0; }
.members-roster-table .player-name b, .members-roster-table .player-name small { overflow: hidden; text-overflow: ellipsis; }
.match-input input[name="score"] { width: 110px; }

/* Отпуска и ежедневные отсутствия учитываются отдельно от назначений. */
.squad-stat-row.is-absent > button:first-of-type b { color: #bba39b; }
.squad-stat-row .absence-tag, .picker-row .absence-tag { display: block; margin-top: 3px; font-size: 8px; color: #cf9391; }




/* Отпуска заполняются списком бойцов, как состав отряда. */
.leave-card { --squad-color: #dc9ba9; padding: 15px 15px 0; border-color: #68454d; }
.leave-card .squad-head { gap: 8px; margin-bottom: 14px; }
.leave-card .squad-icon { width: 30px; height: 30px; }
.leave-card .squad-head h2 { font-size: 14px; }
.leave-card .squad-head small { font-size: 9px; }
.leave-members { display: grid; gap: 8px; padding-bottom: 15px; }
.leave-member { padding: 9px 6px; border-color: #563d43; background: #241a1d66; }
.leave-member b { color: #d8b3bc; }
.leave-member small { font-size: 9px; }
.leave-history { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #30422a; }
.leave-history summary { cursor: pointer; color: #8fa47c; font-size: 11px; }
.leave-history > div { max-height: 180px; overflow-y: auto; margin-top: 10px; }
.leave-history p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid #2b3b25; font-size: 10px; }
.leave-history b { color: #bfd0ac; overflow-wrap: anywhere; }
.leave-history span { color: #8fa47c; flex-shrink: 0; }

/* Порядок внутри отряда определяет лидера. */
.squad-stat-row { position: relative; }
.squad-stat-row.is-dragging, .reserve-member.is-dragging, .leave-member.is-dragging { opacity: .4; }
.squad-stat-row.drop-insert-before::before, .squad-stat-row.drop-insert-after::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--squad-color, var(--accent)); box-shadow: 0 0 5px #c4f37c44; z-index: 2; pointer-events: none; }
.squad-stat-row.drop-insert-before::before { top: -1px; }
.squad-stat-row.drop-insert-after::after { bottom: -1px; }
.squad-card.is-drop-target, #reserve.is-drop-target, #today-absences.is-drop-target { outline: 2px solid var(--squad-color, var(--accent)); outline-offset: -2px; }
.squad-card.is-drop-blocked { outline: 2px solid #d18b8e; outline-offset: -2px; }

/* Карточки снаряжения: две брони и четыре универсальные строки оружия. */
.gear-filter .search-field { flex: 1; width: 100%; max-width: none; }
.gear-filter .search-field input { font-size: 13px; min-height: 42px; }
.loadout-card { padding: 18px; border-radius: 10px; }
.loadout-card .gear-card-head { align-items: flex-start; gap: 12px; }
.loadout-card .loadout-player-link { flex: 1; min-width: 0; font-size: 27px; line-height: 1.25; padding: 4px 0; }
.gear-card-actions { display: flex; gap: 5px; flex-shrink: 0; }
.gear-card-actions .icon-button { width: 32px; height: 34px; border: 1px solid var(--border); border-radius: 6px; }
.loadout-metric { display: flex; align-items: center; gap: 10px; cursor: text; min-width: 0; }
.loadout-metric .inline-loadout-input { flex: 1; width: 100%; min-width: 0; min-height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 25px; font-weight: 600; line-height: 1.3; box-shadow: none; }
.loadout-metric .inline-loadout-input::placeholder { color: currentColor; opacity: .6; }
.loadout-metric small { font-size: 13px; opacity: .7; }
.loadout-metric.unset { border-color: #3a4b32; background: #182219; color: #9caf91; }
.loadout-metric:focus-within { outline: 1px solid currentColor; outline-offset: -1px; }
.loadout-metric .inline-loadout-input:focus { outline: none; box-shadow: none; }
.equipment-level.inline-loadout-input { box-sizing: border-box; width: calc(3ch + 20px); min-width: calc(3ch + 20px); max-width: calc(3ch + 20px); flex: 0 0 auto; height: 32px; min-height: 32px; padding: 5px 8px; text-align: center; font: 600 12px/20px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; cursor: text; }
.inline-loadout-input:user-invalid { border-color: #df8f92; }
.loadout-layout, .profile .equipment-readonly.loadout-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 14px 0 0; }
.loadout-layout .equipment-read-row { position: relative; gap: 8px; border-bottom: 1px solid var(--border); }
.loadout-layout .equipment-read-name small { display: none; }
.loadout-layout .equipment-read-name b { font-size: 12px; line-height: 1.4; }
.loadout-layout .armor-slot { align-items: stretch; border-top: 1px solid var(--border); }
.loadout-layout .armor-slot + .armor-slot { border-left: 1px solid var(--border); }
.loadout-layout .armor-slot .equipment-cell { flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 12px 8px 36px; text-align: center; min-height: 204px; }
.loadout-layout .armor-slot .equipment-read-name { flex: none; width: 100%; min-height: 34px; justify-content: center; }
.loadout-layout .armor-slot .item-art { width: 100%; height: 112px; }
.loadout-layout .armor-slot .equipment-level { position: absolute; right: 10px; bottom: 10px; }
.loadout-layout .weapon-slot { grid-column: 1 / -1; min-height: 78px; }
.loadout-layout .weapon-slot .equipment-cell { align-self: stretch; padding: 8px 0; gap: 12px; }
.loadout-layout .weapon-slot .item-art { width: 78px; height: 60px; }
.loadout-layout .weapon-slot .equipment-level { margin-right: 5px; }
.loadout-layout .weapon-slot:last-child { border-bottom: 0; }
.profile-copy-nick { margin-left: auto; flex-shrink: 0; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; }

@media (max-width: 480px) {
    .loadout-card { padding: 14px; }
    .loadout-card .loadout-player-link { font-size: 24px; }
    .gear-card-actions { gap: 3px; }
    .gear-card-actions .icon-button { width: 29px; height: 32px; }
    .loadout-metric { gap: 7px; padding: 10px 8px; }
    .loadout-metric .inline-loadout-input { font-size: 22px; }
    .loadout-layout .armor-slot .equipment-cell { padding-left: 5px; padding-right: 5px; }
    .loadout-layout .weapon-slot .item-art { width: 64px; }
    .loadout-layout .weapon-slot .equipment-cell { gap: 8px; }
}

/* Заголовки страниц без верхней панели и служебных подписей. */
.section-heading { flex-wrap: wrap; }
.heading-actions:empty { display: none; }
.page-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title h1 { margin: 0; }
.page-title .mobile-menu { flex-shrink: 0; }
.heading-actions { flex-wrap: wrap; }
.member-filter .search-field { flex: 1 1 260px; max-width: none; min-width: 0; }
.member-filter .search-field input { min-height: 38px; }
.member-filter .filter-count { white-space: nowrap; }
/* Количество колонок зависит от доступной ширины, включая широкие экраны. */
body[data-page="gear"] .content { max-width: none; }
.gear-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
/* Одинаковый отступ справа у заточки брони и всех строк оружия. */
.equipment-level.inline-loadout-input { width: 46px; min-width: 46px; max-width: 46px; }
.loadout-layout .armor-slot .equipment-level { right: 8px; }
.loadout-layout .weapon-slot { display: grid; grid-template-columns: minmax(0, 1fr) 46px; column-gap: 10px; padding-right: 8px; }
.loadout-layout .weapon-slot .equipment-level { margin: 0; justify-self: end; }
@media (max-width: 480px) {
    .member-filter .search-field { flex-basis: 100%; width: 100%; }
    .page-title { gap: 8px; }
}

/* Отряд занимает строку из пяти карточек бойцов. */
body[data-page="squads"] .content { max-width: none; }
.squad-workspace { display: flex; flex-direction: column; min-width: 0; gap: 18px; }
.squad-workspace .squad-grid { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 18px; }
.squad-horizontal { min-width: 0; padding: 15px 14px 14px; }
.squad-horizontal .squad-head, .squad-support .squad-head { gap: 9px; margin-bottom: 14px; }
.squad-horizontal .squad-head h2, .squad-support .squad-head h2 { flex: 1; min-width: 0; margin: 0; }
.squad-horizontal .squad-icon { width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0; }
.squad-size { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.squad-card-scroll { overflow-x: auto; padding: 5px 4px; margin: -5px -4px; scrollbar-width: thin; }
.squad-member-cards { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; }
.squad-fighter-card.squad-stat-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; border: 1px solid #34472e; border-radius: 8px; background: #151e16; cursor: grab; }
.squad-fighter-card.squad-stat-row:hover { background: #19231a; border-color: #546d47; }
.fighter-card-head { display: flex; align-items: center; gap: 5px; min-height: 58px; padding: 10px 8px; border-bottom: 1px solid #30422a; }
.fighter-name { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; padding: 0; text-align: left; }
.fighter-name b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fighter-name:hover b { color: var(--accent); }
.fighter-name svg { flex-shrink: 0; color: var(--squad-color); }
.fighter-card-head .drag-grip { font-size: 12px; }
.squad-fighter-card .squad-remove { flex-shrink: 0; }
.fighter-card-body { flex: 1; display: flex; flex-direction: column; gap: 13px; min-width: 0; padding: 12px 10px; }
.fighter-gear { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fighter-gear-cell { position: relative; display: block; aspect-ratio: 1; min-width: 0; border: 1px solid #364b2e; background: #0f1710; border-radius: 4px; }
.fighter-gear-cell .item-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.fighter-gear-cell .item-art img { padding: 5px; }
.fighter-gear-cell .item-no-image { font-size: 7px; }
.fighter-gear-cell .empty-art .item-no-image { font-size: 18px; }
.fighter-gear-cell > small { position: absolute; right: 2px; bottom: 1px; color: #94c5e4; font: 8px/12px ui-monospace, monospace; text-shadow: 0 1px 2px #000; }
.fighter-weapons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.fighter-weapons .fighter-gear-cell { aspect-ratio: auto; min-height: 0; }
.fighter-weapons .item-art img { padding: 2px; }
.fighter-weapons .item-no-image { font-size: 6px; }
.fighter-weapons .fighter-gear-cell > small { font-size: 6px; line-height: 8px; }
.fighter-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fighter-metrics > div { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 58px; padding: 8px; border: 1px solid #5b3c46; border-radius: 3px; background: #251a20; color: #e5a3aa; }
.fighter-metrics > .fighter-speed { border-color: #31555a; background: #11262a; color: #8bc9cb; }
.fighter-metrics > .fighter-unset { border-color: #3a4b32; background: #182219; color: #9caf91; }
.fighter-metrics span { min-width: 0; font-size: 8px; line-height: 1.4; }
.fighter-metrics strong { display: block; font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.fighter-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: auto; padding-top: 11px; border-top: 1px solid #30422a; }
.fighter-stats > span { text-align: center; min-width: 0; border-right: 1px solid #30422a; color: #94a589; font-size: 9px; }
.fighter-stats > span:last-child { border-right: 0; }
.fighter-stats strong { display: block; margin-top: 5px; font-size: 17px; font-weight: 500; }
.fighter-absence { align-self: center; color: #d49ca3; font-size: 9px; }
.squad-fighter-card.is-absent { border-color: #79535c; }
.squad-empty-card { display: flex; align-items: center; justify-content: center; min-height: 250px; border: 1px dashed #374b30; border-radius: 8px; color: #627a53; background: #121a1366; }
.squad-empty-card:hover { border-color: var(--squad-color); color: var(--squad-color); }
.squad-fighter-card.drop-insert-before::before, .squad-fighter-card.drop-insert-after::after { top: 0; bottom: 0; width: 3px; height: auto; right: auto; }
.squad-fighter-card.drop-insert-before::before { left: -8px; }
.squad-fighter-card.drop-insert-after::after { left: auto; right: -8px; }
.squad-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; width: 100%; gap: 18px; }
.squad-workspace .squad-support .reserve-panel { position: static; margin: 0; }
.squad-workspace .squad-support .reserve-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.squad-empty-state { margin: 0; padding: 10px 0; color: var(--muted); font-size: 11px; }
.squad-leader-preview { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
    .squad-support { grid-template-columns: minmax(0, 1fr); }
    .squad-horizontal { padding: 12px 10px; }
}

/* Адаптация рабочих областей по ширине окна и высоте монитора. */
:root {
    --sidebar: clamp(210px, 13.5vw, 264px);
    --page-gutter: clamp(12px, 1.8vw, 36px);
    --layout-gap: clamp(12px, 1.15vw, 22px);
    --modal-gutter: clamp(8px, 2vmin, 28px);
}
.sidebar { width: var(--sidebar); overflow-y: auto; overscroll-behavior-y: contain; }
.sidebar > * { flex-shrink: 0; }
.main { min-width: 0; margin-left: var(--sidebar); }
.main > .content,
body[data-page="gear"] .main > .content,
body[data-page="squads"] .main > .content {
    width: 100%; max-width: 2560px; margin: 0 auto;
    padding: clamp(16px, 1.8vw, 32px) var(--page-gutter) 0;
}
#page-content, #content-slot, .overview-grid > *, .settings-grid > *, .metrics > *, .settings-side { min-width: 0; }
.section-heading { gap: 12px var(--layout-gap); margin-bottom: clamp(16px, 1.5vw, 26px); }
.section-heading h1 { font-size: clamp(23px, 2vw, 33px); overflow-wrap: anywhere; }
.heading-actions { min-width: 0; max-width: 100%; gap: 8px; }
.panel-head { flex-wrap: wrap; gap: 10px; }
.panel-title { min-width: 0; flex-wrap: wrap; }
.panel-title > span { white-space: normal; }
.page-footer { flex-wrap: wrap; gap: 10px; }
.filter-bar { min-width: 0; }
.filter-bar input, .field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.filter-bar select { max-width: 100%; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--layout-gap); }
.metric { min-width: 0; padding: clamp(14px, 1.4vw, 24px); }
.metric-value { font-size: clamp(26px, 2.2vw, 38px); }
.overview-grid { gap: var(--layout-gap); }
.tactics-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--layout-gap); }
.settings-grid { gap: var(--layout-gap); }
.settings-buttons .btn { max-width: 100%; white-space: normal; text-align: left; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.members-roster-table { min-width: 1320px; }
.members-roster-table td { font-size: 11px; }
.members-roster-table th { font-size: 9px; }
.profile-history-table table { min-width: 720px; }
.toast { left: calc(50% + var(--sidebar) / 2); max-width: min(520px, calc(100vw - var(--sidebar) - 24px)); overflow-wrap: anywhere; }

/* Равные секции карточек сохраняют выравнивание при длинном тексте. */
.gear-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    grid-auto-rows: 1fr; align-items: stretch; gap: var(--layout-gap);
}
.loadout-card { container-type: inline-size; display: flex; flex-direction: column; min-width: 0; padding: 18px; }
.loadout-card .gear-card-head { flex: 0 0 68px; min-height: 68px; align-items: flex-start; gap: 10px; }
.loadout-card .loadout-player-link {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; min-width: 0;
    font-size: clamp(21px, 7cqi, 27px); line-height: 1.18; padding: 2px 0;
}
.loadout-card .gear-card-actions { padding-top: 1px; }
.loadout-card .gear-card-actions .icon-button { width: 32px; height: 34px; }
.loadout-card .loadout-metrics { flex-shrink: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 58px; height: 58px; gap: 8px; margin: 0 0 12px; }
.loadout-card .loadout-metric { box-sizing: border-box; flex-flow: row nowrap; align-items: center; gap: 7px; height: 58px; min-height: 58px; max-height: 58px; padding: 10px 9px; overflow: hidden; }
.loadout-card .loadout-metric .inline-loadout-input { font-size: clamp(19px, 6.3cqi, 24px); }
.loadout-card .loadout-metric small { font-size: 11px; }
.loadout-card .loadout-layout { flex: 1; margin: 0; grid-template-rows: 226px repeat(4, 78px); }
.loadout-card .loadout-layout .armor-slot { min-height: 0; }
.loadout-card .loadout-layout .armor-slot .equipment-cell {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 50px minmax(0, 1fr);
    justify-content: stretch; align-items: center; gap: 4px;
    min-height: 0; padding: 10px 7px 40px;
}
.loadout-card .loadout-layout .armor-slot .equipment-read-name { grid-row: 1; align-self: start; justify-content: flex-start; min-height: 0; height: 50px; }
.loadout-card .loadout-layout .armor-slot .equipment-read-name b {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; line-height: 1.35; max-height: 49px;
}
.loadout-card .loadout-layout .armor-slot .item-art { grid-row: 2; width: min(100%, 156px); height: 122px; justify-self: center; align-self: center; }
.loadout-card .loadout-layout .armor-slot .equipment-level { bottom: 10px; }
.loadout-card .loadout-layout .weapon-slot { min-height: 0; height: 78px; }
.loadout-card .loadout-layout .weapon-slot .equipment-read-name b { font-size: 12px; line-height: 1.4; }
.loadout-card .loadout-layout .weapon-slot .item-art { width: 68px; height: 56px; }
.loadout-card .loadout-layout .weapon-slot .equipment-cell { gap: 9px; }

/* Пять бойцов остаются в одном ряду; узкое окно прокручивает только ряд. */
.squad-member-cards { grid-template-columns: repeat(5, minmax(clamp(185px, 14vw, 260px), 1fr)); gap: 12px; }
.squad-card-scroll { max-width: calc(100% + 8px); min-width: 0; overscroll-behavior-x: contain; }
.squad-support { min-width: 0; gap: var(--layout-gap); }
.fighter-card-head { min-height: 62px; }
.fighter-name b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.25; }
.fighter-metrics > div { padding: 7px 6px; gap: 5px; }
.fighter-metrics strong { font-size: clamp(15px, 1.1vw, 20px); }

/* Окна ограничиваются доступным местом, каталог имеет свой скролл. */
.modal-backdrop { padding: var(--modal-gutter); }
.modal { width: min(600px, 100%); min-width: 0; max-width: 100%; max-height: calc(100dvh - 2 * var(--modal-gutter)); padding: clamp(14px, 2vw, 24px); }
.modal.wide { width: min(1020px, 100%); }
.modal.catalog-modal { width: min(1040px, 100%); padding: 0; }
.modal > header h2 { min-width: 0; overflow-wrap: anywhere; }
.form-grid, .profile-identity{ min-width: 0; }
.form-footer { flex-wrap: wrap; }
.profile-stats > div { min-width: 0; }
.equipment-picker { height: min(760px, calc(100dvh - 2 * var(--modal-gutter) - 2px)); min-height: 0; }
.item-picker-head { padding: 18px 20px; }
.item-picker-head h3 { overflow-wrap: anywhere; }
.item-picker-columns { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.item-picker-left, .item-preview { min-width: 0; min-height: 0; padding: 16px; }
.item-preview-summary b, .catalog-item > b { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    :root { --sidebar: 0px; }
    .sidebar { width: 238px; transform: translateX(-100%); transition: transform .2s; padding: 25px 17px 0; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .mobile-menu { display: flex; }
    .sidebar-shade { position: fixed; inset: 0; background: #0009; backdrop-filter: blur(3px); z-index: 35; }
    .overview-grid { grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); }
}
@media (max-width: 800px) {
    .overview-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
    .overview-grid > * { grid-column: 1 / -1; }
    .gear-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
    .loadout-card { padding: 15px; }
    .squad-support { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .heading-actions { width: 100%; }
    .heading-actions .btn { flex: 1 1 auto; justify-content: center; }
    .panel-head { padding: 14px; }
    .profile-editor .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modal > header { padding-bottom: 14px; margin-bottom: 14px; }
    .equipment-picker { height: calc(100dvh - 2 * var(--modal-gutter) - 2px); }
    .item-picker-head { padding: 12px 14px; }
    .item-picker-head h3 { font-size: 19px; margin-top: 4px; }
    .item-picker-columns { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr); }
    .item-picker-left { border-right: 0; border-bottom: 1px solid #1c2634; gap: 8px; padding: 10px; }
    .item-preview { padding: 10px; }
    .item-preview-summary { min-height: 35px; margin: 7px 0; }
    .item-preview-summary b { font-size: 13px; }
    .item-preview-footer { padding-top: 8px; }
    .catalog-item { min-height: 50px; }
}
@media (max-width: 380px) {
    .loadout-card { padding: 12px; }
    .loadout-card .gear-card-head { gap: 6px; }
    .loadout-card .gear-card-actions { gap: 3px; }
    .loadout-card .gear-card-actions .icon-button { width: 28px; height: 30px; }
    .loadout-card .loadout-layout .weapon-slot .item-art { width: 52px; }
    .loadout-card .loadout-layout .weapon-slot .equipment-cell { gap: 6px; }
    .form-grid{ grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 620px) {
    .sidebar { padding-top: 16px; }
    .clan-switch { margin-top: 18px; margin-bottom: 16px; }
    .nav-item { min-height: 38px; }
    .account { padding-top: 14px; padding-bottom: 14px; }
    .item-picker-head { padding-top: 10px; padding-bottom: 10px; }
}
@media (max-height: 480px) and (min-width: 641px) {
    .item-picker-columns { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
    .item-preview-summary { margin: 6px 0; min-height: 32px; }
    .item-preview-summary > .item-art { width: 32px; height: 32px; }
    .item-preview-summary b { font-size: 12px; }
    .picker-kicker { font-size: 7px; letter-spacing: 1px; }
}

body[data-page="gear"] .main > .content,
body[data-page="squads"] .main > .content { max-width: 3000px; }
.loadout-card .loadout-layout .weapon-slot .equipment-read-name b {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; max-height: 51px;
}
@media (max-height: 800px) and (min-width: 641px) {
    .loadout-card { padding: 15px; }
    .loadout-card .gear-card-head { flex-basis: 60px; min-height: 60px; }
    .loadout-card .loadout-metric { min-height: 52px; padding: 8px 9px; }
    .loadout-card .loadout-metrics { margin-bottom: 10px; }
    .loadout-card .loadout-layout { grid-template-rows: 196px repeat(4, 68px); }
    .loadout-card .loadout-layout .armor-slot .equipment-cell { grid-template-rows: 44px minmax(0, 1fr); padding: 8px 7px 34px; }
    .loadout-card .loadout-layout .armor-slot .equipment-read-name { height: 44px; }
    .loadout-card .loadout-layout .armor-slot .equipment-read-name b { font-size: 11px; line-height: 1.3; max-height: 44px; }
    .loadout-card .loadout-layout .armor-slot .item-art { height: 104px; }
    .loadout-card .loadout-layout .armor-slot .equipment-level { bottom: 6px; }
    .loadout-card .loadout-layout .weapon-slot { height: 68px; }
    .loadout-card .loadout-layout .weapon-slot .item-art { height: 50px; }
    .loadout-card .loadout-layout .weapon-slot .equipment-read-name b { font-size: 11px; line-height: 1.35; max-height: 45px; }
}

/* Перенос показывает точное место и действие до отпускания мыши. */
body.squad-dragging { user-select: none; }
body.squad-dragging .squad-fighter-card { cursor: grabbing; }
body.squad-dragging .squad-fighter-card button,
body.squad-dragging .squad-fighter-card img { pointer-events: none; }
.drop-preview-anchor { position: relative; }
.squad-horizontal.is-drop-target, .squad-support .is-drop-target {
    outline: 2px solid #b678ff; outline-offset: -2px;
    box-shadow: inset 0 0 0 1px #b678ff66, 0 0 20px #9b50e22b;
}
.squad-horizontal.is-drop-target > .squad-head { color: #dcbfff; }
.squad-fighter-card.squad-stat-row.is-swap-target {
    outline: 3px solid #c78aff; outline-offset: -3px;
    background: #342046; box-shadow: 0 0 20px #b46eff77;
}
.squad-fighter-card.is-swap-target .fighter-card-body { filter: brightness(.62); }
.squad-fighter-card.squad-stat-row.is-insert-target { outline: 2px solid #b678ff; outline-offset: -2px; background: #251b32; }
.squad-empty-card.is-insert-target { outline: 3px solid #bd7cff; outline-offset: -3px; border-color: #bd7cff; background: #9e57de24; }
.squad-fighter-card.drop-insert-before::before,
.squad-fighter-card.drop-insert-after::after { width: 5px; top: 0; bottom: 0; background: #d0a0ff; box-shadow: 0 0 12px #b568ff; z-index: 5; }
.drop-action-label {
    position: absolute; z-index: 6; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: block; width: max-content; max-width: calc(100% - 16px); padding: 9px 12px;
    color: #fff; background: #7032a9f2; border: 1px solid #dfbaff; border-radius: 5px;
    box-shadow: 0 3px 16px #0009; font-size: 12px; font-weight: 600; line-height: 1.4;
    text-align: center; pointer-events: none;
}
.drop-group-label { top: 12px; right: 50px; left: auto; transform: none; max-width: calc(100% - 70px); }
.drop-blocked-label { color: #ffe2e2; background: #783636f2; border-color: #e49d9d; }
.squad-horizontal.is-drop-blocked { outline: 2px solid #e59c9c; outline-offset: -2px; }

#reserve.is-drop-target, #today-absences.is-drop-target { outline-color: #b678ff; }

/* Предпросмотр импорта игрового TAB. */
.tab-import { min-width: 0; }
.import-upload { display: grid; gap: 12px; margin-bottom: 16px; }
.import-upload .field { margin-bottom: 0; }
.import-date-check { display: flex; align-items: center; gap: 8px; color: #b7c8a8; font-size: 12px; }
.import-date-check input { width: 16px; min-height: 16px; flex-shrink: 0; }
.import-progress { display: grid; gap: 8px; font-size: 12px; color: var(--accent); }
.import-progress progress { width: 100%; height: 8px; accent-color: var(--accent); }
.import-error { padding: 12px; border: 1px solid #875252; border-radius: 5px; color: #efb8b8; background: #5b25252b; font-size: 12px; }
.import-overview { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.import-image { border: 1px solid var(--border); border-radius: 5px; padding: 10px; }
.import-image summary { cursor: pointer; font-size: 12px; color: #a6bb95; }
.import-image summary span { font-size: 10px; color: var(--muted); margin-left: 8px; }
.import-image img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; margin-top: 10px; }
.tab-import .form-grid { gap: 0 12px; }
.tab-import .field > small { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.import-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; }
.import-section-heading h3 { font-size: 14px; font-weight: 500; }
.import-section-heading .btn { font-size: 11px; padding: 6px 9px; }
.import-teams { min-width: 580px; }
.import-teams input:not([type=radio]) { width: 100%; min-width: 90px; min-height: 34px; font-size: 12px; padding: 6px 8px; }
.import-teams td:nth-child(2) { width: 55%; }
.import-teams input[type=radio] { width: 16px; min-height: 16px; }
.import-teams input.import-score-uncertain { border-color: #ad8c50; }
.import-score-source { display: block; width: 100px; height: 38px; margin-top: 4px; object-fit: contain; background: #fff; border-radius: 3px; }
.import-players { min-width: 850px; }
.import-players input { font-size: 11px; min-height: 34px; padding: 6px; }
.import-players [data-row-name] { width: 160px; }
.import-nick-control { display: flex; align-items: center; gap: 6px; }
.import-nick-control .icon-button { flex-shrink: 0; }
.import-name-source { display: block; max-width: 160px; margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.import-players [data-row-field] { width: 85px; }
.import-players [data-row-field="tabPosition"], .import-players [data-row-field="kills"], .import-players [data-row-field="deaths"], .import-players [data-row-field="assists"] { width: 54px; }
.import-uncertain > td:first-child { box-shadow: inset 3px 0 #ad8c50; }
.import-unresolved { background: #8c673424; }
.import-row-count { display: block; margin-top: 12px; color: #9fb88c; font-size: 11px; }
.import-absent { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.import-absent summary, .import-outside summary { cursor: pointer; font-size: 12px; color: #c3a3a8; }
.import-absent > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.import-absent span { font-size: 11px; padding: 4px 7px; background: #783c4926; border: 1px solid #70414d; border-radius: 4px; }
.import-outside { margin-top: 18px; }
.import-outside .table-scroll { margin-top: 10px; }
.tab-import > .form-footer { position: sticky; bottom: -1px; z-index: 3; background: var(--panel); padding-top: 16px; padding-bottom: 12px; }
.profile-history-table table { min-width: 920px; }
@media (max-width: 760px) {
    .import-overview { grid-template-columns: minmax(0, 1fr); }
    .import-image img { max-height: 190px; }
    .import-date-check { align-items: flex-start; font-size: 11px; }
}

.modal.tab-import-modal { width: min(1520px, 100%); }

/* Перенос состава со снаряжением. */
.modal.roster-import-modal { width: min(1320px, 100%); }
.roster-import-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.roster-import-heading b { font-size: 13px; overflow-wrap: anywhere; }
.roster-import-heading > span { color: var(--muted); font-size: 11px; }
.roster-import-table { max-height: min(56dvh, 600px); overflow: auto; }
.roster-import-table table { min-width: 1000px; }
.roster-import-table thead { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.roster-import-table td { vertical-align: top; font-size: 12px; }
.roster-import-table input[type=checkbox] { width: 16px; min-height: 16px; accent-color: var(--accent); }
.roster-import-table td:nth-child(2) { min-width: 160px; }
.roster-import-table td:nth-child(2) > small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.roster-import-items { min-width: 210px; max-width: 290px; }
.roster-import-items > span { display: block; margin-bottom: 5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.roster-import-note { margin-top: 7px; max-width: 230px; font-size: 10px; color: var(--muted); }
.roster-import-note summary { cursor: pointer; }
.roster-import-note p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.roster-import > .form-footer { position: sticky; bottom: -1px; background: var(--panel); padding-bottom: 4px; }

/* Тактики 0.3: три карты и рабочее пространство редактора. */
.tactical-maps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--layout-gap); margin-bottom: 26px; }
.tactical-map-card { padding: 0; min-width: 0; overflow: hidden; border: 1px solid #30432c; border-radius: 10px; background: #142017; text-align: left; transition: border-color .15s, transform .15s; }
.tactical-map-card:hover, .tactical-map-card.selected { border-color: #9dcb72; }
.tactical-map-card:hover { transform: translateY(-2px); }
.tactical-map-card img { display: block; width: 100%; height: clamp(150px, 13vw, 225px); object-fit: cover; object-position: center; }
.tactical-map-card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 18px 20px; }
.tactical-map-card-body strong { grid-column: 1; color: #e0edd6; font-size: clamp(16px, 1.2vw, 21px); font-weight: 550; }
.tactical-map-card-body > span { grid-column: 1; color: #8ba17e; font-size: 11px; }
.tactical-map-card-body > svg { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #c4f37c; }
.tactics-filters { gap: 12px; margin-bottom: 20px; }
.tactics-filters input { flex: 1 1 260px; width: auto; }
.tactics-filters select { flex: 0 1 230px; width: auto; }
#tactics-grid .tactic-preview { aspect-ratio: 1.6; }
#tactics-grid .tactic-preview .plan-svg { display: block; width: 100%; height: 100%; transform: none; }
#tactics-grid .tactic-actions > div { display: flex; gap: 6px; }
#tactics-grid > .empty { grid-column: 1 / -1; border: 1px solid #2e4028; border-radius: 10px; background: #111c14; }
.plan-workspace { width: 100%; height: 100%; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #101a13; }
.plan-editor { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; }
.plan-topbar { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, 220px) 120px auto; align-items: end; gap: 12px; flex: 0 0 auto; padding: 14px 20px; border-bottom: 1px solid #2a3b26; }
.plan-workspace .field { min-width: 0; margin: 0; gap: 6px; }
.plan-workspace .field > span { font-size: 10px; color: #9aaf8c; }
.plan-workspace input:not([type=checkbox]):not([type=color]):not([type=range]), .plan-workspace select { min-height: 35px; height: 35px; padding: 7px 9px; font-size: 12px; width: 100%; }
.plan-workspace textarea { width: 100%; min-height: 80px; resize: vertical; font-size: 12px; line-height: 1.65; padding: 10px; }
.plan-save-state { align-self: center; min-width: 96px; color: #9eb786; font-size: 11px; text-align: right; white-space: nowrap; }
.plan-layout { flex: 1 1 auto; display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: 0; min-width: 0; }
.plan-controls { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid #2b3a28; background: #111d15; }
.plan-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 0 0 auto; border-bottom: 1px solid #2b3a28; }
.plan-tabs button { padding: 13px 5px; font-size: 11px; color: #8fa47f; border-bottom: 2px solid transparent; }
.plan-tabs button[aria-selected=true] { color: #c4f37c; background: #c4f37c0a; border-bottom-color: #c4f37c; }
.plan-tab-panel { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px; }
.plan-tab-panel[hidden], .plan-workspace [hidden] { display: none !important; }
.plan-tab-panel .field + .field { margin-top: 16px; }
.plan-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.plan-tools button { min-height: 62px; min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: center; border: 1px solid #2c3e27; border-radius: 5px; color: #9db48c; background: #162319; padding: 7px 3px; }
.plan-tools button span { font-size: 9px; white-space: normal; overflow-wrap: anywhere; }
.plan-tools button.active, .plan-tools button:hover { color: #c4f37c; border-color: #7a9b56; background: #c4f37c0d; }
.plan-control-heading { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #829971; margin: 21px 0 10px; }
.plan-squads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.plan-squads button { display: flex; gap: 7px; align-items: center; min-width: 0; padding: 7px; background: #162319; border: 1px solid #2c3e27; border-radius: 5px; color: #b6c6aa; text-align: left; }
.plan-squads button[aria-pressed=true] { border-color: var(--squad-color); }
.plan-squads button i { flex: 0 0 21px; width: 21px; height: 21px; display: grid; place-items: center; font-size: 10px; color: #0c170e; background: var(--squad-color); border-radius: 3px; font-style: normal; font-weight: 700; }
.plan-squads button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.plan-palette { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.plan-palette > button { flex: 0 0 20px; width: 20px; height: 20px; padding: 2px; border: 1px solid transparent; border-radius: 50%; }
.plan-palette > button::before { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--swatch); }
.plan-palette > button[aria-pressed=true] { border-color: #d8e8cf; }
.plan-palette input[type=color] { width: 24px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.plan-marker-settings { margin-top: 16px; margin-bottom: 16px; }
.plan-params { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; margin: 14px 0; align-items: end; }
.plan-params .field + .field { margin: 0; }
.plan-workspace input[type=range] { width: 100%; height: 25px; min-height: 25px; accent-color: #c4f37c; }
.plan-check { display: flex; align-items: center; gap: 9px; color: #b0c1a3; font-size: 11px; margin: 12px 0; }
.plan-workspace input[type=checkbox] { width: 15px; min-width: 15px; height: 15px; min-height: 15px; accent-color: #c4f37c; }
.plan-selected { margin-top: 17px; border-top: 1px solid #2b3a28; padding-top: 14px; }
.plan-selected > span { display: block; font-size: 11px; color: #d3e5c5; overflow-wrap: anywhere; margin-bottom: 10px; }
.plan-selected > div { display: flex; gap: 6px; }
.plan-selected .btn { flex: 1; justify-content: center; font-size: 10px; min-height: 32px; padding: 5px; }
.plan-layer-settings { border-bottom: 1px solid #2b3a28; padding-bottom: 12px; margin-bottom: 12px; }
.plan-layer-settings > summary { cursor: pointer; color: #b3c6a3; font-size: 12px; }
.plan-layer-toggles { padding-top: 2px; }
.plan-object-search { margin-bottom: 12px; }
.plan-object-list { display: grid; gap: 5px; }
.plan-object { display: flex; align-items: center; min-width: 0; border: 1px solid #2a3a26; border-radius: 4px; background: #162319; padding: 4px 5px; }
.plan-object.selected { border-color: #9cc777; }
.plan-object > label { display: flex; align-items: center; padding: 4px; }
.plan-object > button:not(.icon-button) { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; padding: 6px; text-align: left; font-size: 10px; color: #c0d0b4; }
.plan-object > button > i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.plan-object > button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-object > button > span, .plan-reference-object > span { flex: 1; }
.plan-object > button > svg, .plan-reference-object > svg { flex: 0 0 15px; width: 15px; height: 15px; color: #92ad7f; }
.plan-object.is-hidden > button:not(.icon-button), .plan-reference-object.is-hidden { color: #7e8b78; background: #101a13; }
.plan-object.is-hidden > button > i, .plan-reference-object.is-hidden > i, .plan-reference-object.is-hidden > b { opacity: .4; }
.plan-object.is-hidden > button > svg, .plan-reference-object.is-hidden > svg { color: #707e68; }
.plan-object .icon-button { flex: 0 0 26px; width: 26px; height: 26px; padding: 4px; }
.plan-no-objects { padding: 18px 8px; text-align: center; color: #849b75; font-size: 12px; }
.plan-viewport { position: relative; min-height: 0; min-width: 0; overflow: hidden; background: #080f0b; touch-action: none; user-select: none; cursor: crosshair; outline-offset: -3px; }
.plan-viewport[data-tool=select], .plan-viewport.is-panning { cursor: grab; }
.plan-viewport:active[data-tool=select], .plan-viewport.is-panning:active { cursor: grabbing; }
.plan-zone-tooltip { position: absolute; z-index: 3; pointer-events: none; max-width: calc(100% - 16px); padding: 4px 7px; border: 1px solid #41503d; border-radius: 4px; background: #080f0ded; color: #f1f5ee; font: 700 12px/1.25 Arial, sans-serif; overflow-wrap: anywhere; box-shadow: 0 2px 5px #0005; }
.plan-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.plan-world .plan-svg { position: relative; display: block; width: 100%; height: 100%; transform: none; overflow: hidden; }
.plan-map-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; image-rendering: pixelated; pointer-events: none; }
.plan-map-image.is-custom { image-rendering: auto; }
.plan-world [data-plan-kind] { cursor: inherit; }
.plan-view-actions { display: flex; position: absolute; right: 16px; bottom: 16px; align-items: center; gap: 4px; padding: 5px; border: 1px solid #415237; border-radius: 7px; background: #101a13ed; z-index: 2; }
.plan-view-actions .btn { min-height: 31px; height: 31px; padding: 5px 8px; font-size: 10px; }
.plan-view-actions .plan-zoom-input { display: flex; align-items: center; gap: 2px; color: #b7ce9f; font-size: 11px; font-variant-numeric: tabular-nums; }
.plan-workspace .plan-view-actions input[data-plan-zoom-value] { width: 47px; min-width: 47px; min-height: 29px; height: 29px; padding: 3px; border-color: transparent; background: transparent; text-align: right; font-size: 11px; appearance: textfield; -moz-appearance: textfield; }
.plan-view-actions input[data-plan-zoom-value]::-webkit-inner-spin-button, .plan-view-actions input[data-plan-zoom-value]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.plan-workspace .plan-view-actions input[data-plan-zoom-value]:focus { outline: 1px solid #9cbd79; border-radius: 3px; }
.plan-footer { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid #2a3b26; background: #111d15; }
.plan-footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.plan-footer .btn { font-size: 11px; min-height: 35px; padding: 7px 10px; }
@media (min-width: 1700px) {
    .plan-layout { grid-template-columns: 315px minmax(0, 1fr); }
    .plan-tools button { min-height: 70px; }
}
@media (max-width: 1000px) {
    .plan-layout { grid-template-columns: 245px minmax(0, 1fr); }
    .plan-topbar { grid-template-columns: minmax(140px, 1fr) 160px 100px; padding: 10px 14px; gap: 8px; }
    .plan-save-state { display: none; }
    .plan-tab-panel { padding: 10px; }
    .plan-footer { padding: 10px 14px; gap: 8px; }
    .plan-footer .btn { font-size: 10px; padding: 6px 8px; }
}
@media (max-width: 720px) {
    .tactical-maps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .tactical-map-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: stretch; }
    .tactical-map-card img { height: 105px; }
    .tactical-map-card-body { align-content: center; padding: 14px; }
    .tactical-map-card-body strong { font-size: 17px; }

    .plan-topbar { grid-template-columns: minmax(0, 1fr) 95px; gap: 7px; padding: 9px 12px; }
    .plan-topbar > .field:first-child { grid-column: 1 / -1; }
    .plan-topbar .field > span { display: none; }
    .plan-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(190px, 1fr) minmax(130px, .6fr); }
    .plan-viewport { grid-row: 1; grid-column: 1; }
    .plan-controls { grid-row: 2; grid-column: 1; border: 0; border-top: 1px solid #2b3a28; }
    .plan-tools { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .plan-tools button { min-height: 56px; }
    .plan-squads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .plan-footer { flex-wrap: wrap; padding: 8px 10px; gap: 7px; }
    .plan-footer > div:last-child { flex: 1; justify-content: flex-end; }
    .plan-footer .btn { min-height: 31px; padding: 5px 7px; }
    .plan-footer [data-plan-upload] { display: none; }
    .plan-view-actions { bottom: 10px; right: 10px; }
}


/* Редактор тактики на отдельной странице. */
body[data-page=tactic-editor] { overflow: hidden; }
body[data-page=tactic-editor] #layout { height: 100dvh; min-height: 0; }
body[data-page=tactic-editor] .sidebar,
body[data-page=tactic-editor] .sidebar-shade,
body[data-page=tactic-editor] .section-heading,
body[data-page=tactic-editor] .demo-banner,
body[data-page=tactic-editor] .page-footer { display: none !important; }
body[data-page=tactic-editor] .main { margin: 0; padding: 0; width: 100%; min-height: 0; height: 100dvh; }
body[data-page=tactic-editor] .content { margin: 0; padding: 0; width: 100%; max-width: none; height: 100%; min-height: 0; display: flex; flex-direction: column; }
body[data-page=tactic-editor] #content-slot,
body[data-page=tactic-editor] #page-content,
body[data-page=tactic-editor] #tactic-editor-host { flex: 1 1 auto; height: 100%; min-height: 0; min-width: 0; }
.plan-page .plan-topbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px 18px; }
.plan-page .plan-topbar > .field { flex: 0 1 190px; }
.plan-page .plan-topbar > .field:nth-of-type(1) { flex: 1 1 240px; }
.plan-page .plan-topbar > .plan-back { flex: 0 0 auto; min-height: 35px; font-size: 11px; order: -2; }
.plan-page .plan-panel-toggle { flex: 0 0 35px; width: 35px; min-height: 35px; height: 35px; padding: 7px; order: -1; }
.plan-page .plan-save-state { align-self: center; }
.plan-page .plan-layout { grid-template-columns: 300px minmax(0, 1fr); }
.plan-page.controls-collapsed .plan-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.plan-page.controls-collapsed .plan-controls { display: none; }
.plan-page.controls-collapsed .plan-viewport { grid-row: 1; grid-column: 1; }
.plan-reference-error { flex: 0 0 auto; padding: 10px 18px; color: #f0bd91; background: #352519; font-size: 12px; }
.plan-reference-object { display: flex; width: 100%; min-width: 0; align-items: center; gap: 9px; padding: 8px 10px; text-align: left; border: 1px solid #2b3c27; border-radius: 5px; color: #c3d2b8; background: #162319; font-size: 11px; }
.plan-reference-object:hover { border-color: #8ba66c; background: #1c2e20; }
.plan-reference-object > b { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; color: #f3deaa; border: 1px solid #b4a477; border-radius: 3px; font-size: 12px; }
.plan-reference-object > i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.plan-reference-object > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-object-heading { color: #8aa179; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 2px 7px; }
.plan-object-heading:first-child { padding-top: 0; }
.plan-not-found { min-height: 100dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; padding: 24px; text-align: center; }
@media (min-width: 1700px) {
    .plan-page .plan-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 1050px) {
    .plan-page .plan-topbar { gap: 8px; padding: 10px 12px; }
    .plan-page .plan-topbar > .field { flex-basis: 150px; }
    .plan-page .plan-topbar > .field:nth-of-type(1) { flex-basis: 160px; }
    .plan-page .plan-layout { grid-template-columns: 255px minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .plan-page .plan-topbar > .field { grid-column: auto; flex: 1 1 135px; }
    .plan-page .plan-topbar > .field:nth-of-type(1) { flex: 1 1 calc(100% - 175px); }
    .plan-page .plan-topbar .field > span { display: none; }
    .plan-page .plan-layout { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
    .plan-page .plan-controls { position: absolute; inset: 0 auto 0 0; width: min(290px, 88vw); z-index: 4; border-right: 1px solid #425438; box-shadow: 8px 0 24px #0008; }
    .plan-page .plan-footer { padding: 8px 10px; }
    .plan-page .plan-topbar > .plan-back { font-size: 10px; padding: 7px; }
}


/* Карточка игрока: календарь, гранаты и аналитика 0.3.8. */
.modal.player-profile-modal { width: min(1440px, 100%); }
.player-profile .profile-header { align-items: center; padding-bottom: 18px; border-bottom: 1px solid #30402b; margin-bottom: 18px; }
.player-profile .profile-header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.profile-squad { display: inline-flex; align-items: center; gap: 7px; color: #b7c9aa; font-size: 12px; }
.profile-squad i { width: 8px; height: 8px; border-radius: 50%; }
.player-profile .profile-statistics { margin-top: 0; margin-bottom: 20px; }
.player-profile .profile-stat-heading h3 { font-size: 12px; text-transform: none; letter-spacing: 0; }
.player-profile-modal .profile-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.player-profile-modal .profile-stats > div { min-width: 0; padding: 14px 10px; text-align: left; border: 1px solid #2b3c27; border-radius: 6px; background: #132017; }
.player-profile-modal .profile-stats strong { font-size: clamp(18px, 1.8vw, 27px); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.player-profile-modal .profile-stats span { display: block; color: #9caf91; font-size: 10px; margin-top: 6px; }
.player-calendar-panel, .player-chart-panel, .player-notes-panel, .player-history-panel { min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 20px 0; }
.player-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.player-panel-heading h3, .player-notes-panel h3 { margin: 0; font-size: 14px; color: #dbe8d1; font-weight: 550; }
.player-panel-heading > div > span { display: block; font-size: 10px; color: #829b76; margin-top: 5px; }
.profile-month-nav { display: flex; align-items: center; gap: 5px; }
.profile-month-nav .icon-button { min-width: 30px; width: 30px; height: 31px; font-size: 21px; border: 1px solid #33472c; }
.profile-month-nav input { width: 155px; min-height: 31px; padding: 4px 7px; font-size: 12px; color-scheme: dark; }
.profile-calendar-scroll { overflow-x: auto; }
.profile-calendar { min-width: 700px; }
.profile-weekdays, .profile-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.profile-weekdays { gap: 4px; margin-bottom: 4px; }
.profile-weekdays span { padding: 8px; color: #8ba27b; text-align: center; font-size: 10px; border: 1px solid #283b25; border-radius: 4px; }
.profile-calendar-grid { gap: 4px; }
.profile-calendar-day { min-width: 0; min-height: 88px; padding: 6px; background: #142018; border: 1px solid #2b3c28; border-radius: 5px; }
.profile-calendar-day.outside { background: #101a14; border-color: #21301f; }
.profile-calendar-day.today { border-color: #b2d77f; box-shadow: inset 0 0 0 1px #b2d77f35; }
.profile-calendar-day.on-leave { background: #25251d; }
.profile-day-number { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 5px; }
.profile-day-number b { color: #a2b594; font: 500 11px ui-monospace, monospace; }
.profile-day-number span { color: #c2ac77; font-size: 8px; }
.profile-calendar-match.unknown, .profile-calendar-match.unknown:hover { background: #202820; border-color: #465046; border-left-color: #899389; }
.profile-calendar-match { display: block; width: 100%; padding: 6px; margin-top: 4px; text-align: left; background: #1c3828; border: 1px solid #396243; border-left: 3px solid #96c56b; border-radius: 4px; overflow: hidden; }
.profile-calendar-match:hover { background: #274a32; border-color: #b2d77f; }
.profile-calendar-match b { display: block; font-size: 10px; color: #d7e7cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-calendar-match span { display: block; font-size: 8px; color: #a2baa0; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-calendar-match strong { display: block; margin-top: 5px; font-size: 9px; color: #b4d9a1; font-weight: 500; }
.profile-calendar-match.absent { background: #362429; border-color: #714049; border-left-color: #c0737c; opacity: 1; cursor: default; }
.profile-calendar-match.absent b, .profile-calendar-match.absent strong { color: #d99da5; }
.profile-calendar-match.loss { background: #392026; border-color: #914752; border-left-color: #ef7787; }
.profile-calendar-match.loss:hover { background: #512831; border-color: #ee8b99; }
.profile-calendar-match.loss b { color: #f2b0b9; }
.profile-calendar-match.loss span { color: #d296a0; }
.profile-calendar-match.draw { background: #332d20; border-color: #786636; border-left-color: #dfbb76; }
.profile-calendar-match.draw:hover { background: #423823; border-color: #c8a96b; }
.profile-calendar-match.draw b { color: #e4d1a7; }
.profile-calendar-match.draw span { color: #bbae8e; }
.profile-history-table tr[data-profile-match-row]:focus { outline: 1px solid #b2d77f; outline-offset: -1px; background: #253322; }
.player-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 14px 0; border-top: 1px solid #30422a; }
.player-chart-panel { display: flex; flex-direction: column; min-width: 0; }
.player-chart-panel .trend-chart { padding: 0; }
.player-chart-panel .trend-chart svg, .profile-bar-chart svg { display: block; width: 100%; height: auto; }
.player-chart-panel .chart-legend { justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 5px; font-size: 10px; }
.player-chart-panel .empty { flex: 1; min-height: 180px; padding: 20px; }
.profile-radar { max-width: 420px; width: 100%; margin: auto; }
.profile-radar svg { display: block; width: 100%; height: auto; max-height: 240px; }
.profile-radar .chart-legend { font-size: 9px; }
.player-notes-panel { margin-bottom: 14px; border-top: 1px solid #30422a; }
.player-notes-panel textarea { width: 100%; margin-top: 12px; min-height: 68px; resize: vertical; font-size: 12px; padding: 10px; }
.player-history-panel .profile-history-heading { margin-top: 0; }
.player-profile-modal .profile-history-table { max-height: 380px; }
.player-profile-modal .profile-history-table table { min-width: 1040px; }
.profile-history-more { display: flex; margin: 12px auto 0; }
.members-roster-table { min-width: 1320px; }
@media (max-width: 1100px) {
    .player-profile-modal .profile-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .player-profile-modal .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .player-chart-grid { grid-template-columns: minmax(0, 1fr); }
    .player-profile .profile-header { flex-wrap: wrap; gap: 12px; }
    .player-profile .profile-header-actions { width: 100%; justify-content: space-between; margin-left: 0; }
    .player-profile-modal .profile-stats > div { padding: 10px; }
    .player-profile-modal .profile-stats strong { font-size: 20px; }
    .player-calendar-panel, .player-chart-panel, .player-notes-panel, .player-history-panel { padding: 12px 0; }
}
@media (max-width: 420px) {
    .player-profile-modal .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Страница бойца и учёт API: плоские секции, редактирование без дополнительных окон. */
#player-profile { width: 100%; min-width: 0; }
#player-profile .profile-editor { padding: 0; }
#player-profile .profile-header { margin-top: 0; }
#player-profile .profile-stats > div { border: 0; border-left: 2px solid #3d5232; border-radius: 0; background: transparent; }
#player-profile .profile-history-table { max-height: none; }
#player-profile .form-footer, .player-profile > .form-footer, .match-page-form > .form-footer { position: sticky; bottom: 16px; z-index: 3; width: max-content; max-width: 100%; margin: 20px 0 0 auto; padding: 0; background: transparent; border: 0; box-shadow: none; pointer-events: none; }
#player-profile .form-footer > *, .player-profile > .form-footer > *, .match-page-form > .form-footer > * { pointer-events: auto; }
#grenade-tracker { margin-bottom: 20px; }
.grenade-tracker { border-top: 1px solid #33472b; border-bottom: 1px solid #33472b; }
.grenade-tracker > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 16px 0; color: #d2e4c6; font-size: 14px; }
.grenade-tracker > summary::after { content: '+'; margin-left: auto; color: #a2bd8d; }
.grenade-tracker[open] > summary::after { content: '−'; }
.grenade-tracker > summary > span { color: #8da17f; font-size: 11px; }
.grenade-tracker-content { padding: 0 0 20px; }
.game-api-settings { padding: 26px 0; margin-top: 24px; border-top: 1px solid #33472b; }
.game-api-settings h2 { font-size: 18px; margin: 0 0 12px; }
.game-api-settings p { font-size: 12px; color: #a5bc97; margin-bottom: 20px; }
.game-api-settings form { max-width: 900px; }
.game-api-settings small { display: block; margin-top: 15px; color: #8ea180; font-size: 10px; }



.api-grenade-value { color: #89c1b7; font-variant-numeric: tabular-nums; }
.api-schedule { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #95ad88; font-size: 12px; }
.api-schedule b { color: #c3d4b9; font-weight: 500; }
.api-background-status { margin: 16px 0; color: #a2b695; font-size: 12px; line-height: 1.6; }
.api-background-history { min-width: 700px; }
.api-background-history a { color: #bbd69e; }
.match-page-form { min-width: 0; padding-bottom: 16px; }
.match-page-form > .table-scroll, .match-page-form > .form-grid { margin-bottom: 24px; }
.match-page-form .match-input table { min-width: 950px; }
.match-page-form .match-input input[type=number] { width: 90px; }
.match-page-form .match-input th, .match-page-form .match-input td { text-align: center; }
.match-page-form .match-input th:first-child, .match-page-form .match-input td:first-child { text-align: left; }

.game-api-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) { .game-api-actions .btn { flex: 1; justify-content: center; } }

.match-file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 760px) {
    .match-file-actions { flex: 1 1 100%; margin-left: 0; }
    .match-file-actions .btn { flex: 1 1 auto; justify-content: center; }
}

.match-stage-date { white-space: nowrap; }
.match-stage-date small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.file-drop-overlay {
    position: fixed; inset: 14px; z-index: 10000; pointer-events: none;
    display: grid; place-items: center; border: 2px dashed var(--accent, #c4f37c);
    border-radius: 10px; background: rgba(9, 17, 10, .88); color: #dcebcf;
}
.file-drop-overlay[hidden] { display: none; }
.file-drop-overlay > div { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; text-align: center; }
.file-drop-overlay svg { color: #c4f37c; }
.file-drop-overlay strong { font-size: clamp(18px, 3vw, 30px); font-weight: 500; }
.file-drop-overlay span { color: #a4b799; font-size: 13px; }


/* Периоды статистики, сравнение и дневная история без вложенных рамок. */
.statistics-period-control { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; max-width: 100%; }
.statistics-period-control > label { flex: 0 1 380px; width: 380px; min-width: 0; max-width: 100%; }
.statistics-period-control select { max-width: 100%; width: 100%; }
.statistics-roster-period { margin-bottom: 16px; }
/* Выбор карты прямо в общей сводке. */
.clan-map-results { grid-column: 1 / -1; }
.clan-map-button { display: block; width: 100%; min-width: 0; text-align: left; color: inherit; font: inherit; background: transparent; border: 0; border-left: 2px solid transparent; border-radius: 4px; padding: 10px 12px; cursor: pointer; }
.clan-map-button:not(:disabled):hover, .clan-map-button[aria-pressed=true] { background: #c4f37c09; border-left-color: #c4f37c; }
.clan-map-button:focus-visible { outline: 2px solid #c4f37c; outline-offset: 2px; }
.clan-map-button:disabled { opacity: .65; cursor: default; }
.clan-comparison-numbers { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0 0 7px; }
.clan-archive-roster { min-width: 760px; }
.clan-archive-roster td small { display: block; color: var(--muted); margin-top: 4px; }
.clan-archive-equipment { margin-top: 8px; max-width: 340px; white-space: normal; }
.clan-archive-equipment summary { cursor: pointer; color: #bad99c; font-size: 11px; }
.clan-archive-equipment span { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.clan-archive-roster td:first-child { min-width: 170px; }
#dashboard div.recent-match { cursor: default; }
@media (max-width: 600px) {
    #dashboard .comparison-row > div:first-child { flex-wrap: wrap; gap: 6px; }
}
.period-notice { color: #d8be83; padding: 12px 0; }
.period-editor { margin-bottom: 20px; }
.period-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.period-editor-heading h2 { font-size: 16px; margin: 0; }
.period-editor form { display: grid; grid-template-columns: minmax(120px,.8fr) repeat(2,minmax(140px,1fr)) auto auto; align-items: end; gap: 12px; }
.period-editor .field { margin: 0; }
.period-saved-list { margin-top: 18px; }
.period-saved-list > div { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding: 10px 0; }
.period-saved-name { flex: 1; background: transparent; border: 0; display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; text-align: left; color: var(--text); padding: 6px 0; cursor: pointer; }
.comparison-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.compare-pickers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.compare-pickers select { width: 100%; }
.fighter-comparison-table { width: 100%; min-width: 600px; table-layout: fixed; }
.fighter-comparison-table th:first-child { width: 27%; }
.fighter-comparison-table thead th a { color: var(--text); overflow-wrap: anywhere; }
.fighter-comparison-table th small, .fighter-comparison-table td small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 6px; }
.fighter-comparison-table tbody th { text-align: left; font-weight: 400; color: #afc0a5; }
.fighter-comparison-table .comparison-best { color: #c4f37c; background: #bce68a09; }
.comparison-footnote { color: var(--muted); font-size: 12px; margin: 18px 0 0; line-height: 1.6; }
.profile-stat-heading { flex-wrap: wrap; }
.profile-stat-heading .statistics-period-control { margin-left: auto; }
@media (max-width: 1250px) {
    .period-editor form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .statistics-period-control { align-items: flex-start; gap: 8px; }
    .statistics-period-control > label { flex-basis: 100%; width: 100%; }
    .profile-stat-heading .statistics-period-control { width: 100%; margin-left: 0; }
    .compare-pickers { grid-template-columns: 1fr; gap: 8px; }
    .period-editor form { grid-template-columns: 1fr; }
}


/* Одна лента дней вместо двух независимых фильтров отрядов. */
.squad-day-browser { padding: 0 0 18px; margin-bottom: 22px; border-bottom: 1px solid var(--border); min-width: 0; }
.squad-day-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.squad-day-heading h2 { margin: 0 0 4px; font-size: 21px; font-weight: 500; letter-spacing: -.5px; }
.squad-day-heading h2::first-letter { text-transform: uppercase; }
.squad-day-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.squad-day-status.live { color: #b7db8e; }
.squad-day-status.live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.squad-day-status.missing { color: #d7b779; }
.squad-day-navigation { display: flex; align-items: center; gap: 7px; max-width: 100%; }
.squad-day-navigation .icon-button { width: 34px; height: 36px; font-size: 25px; }
.squad-day-navigation select { width: 150px; min-width: 0; height: 36px; padding: 5px 8px; font-size: 12px; }
.squad-day-navigation button:disabled { cursor: default; opacity: .3; }
.squad-day-rail { position: relative; display: flex; align-items: stretch; gap: 7px; overflow-x: auto; padding: 3px 2px 7px; scrollbar-width: thin; }
.squad-day-chip { flex: 1 0 68px; min-width: 68px; max-width: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 76px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #8d9b84; }
.squad-day-chip > span { font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
.squad-day-chip > strong { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.squad-day-chip:hover { background: #b9d99708; color: var(--text); }
.squad-day-chip.today > span { color: #c4f37c; }
.squad-day-chip.active { background: #b6db810f; border-color: #a8d27566; color: #e3edda; box-shadow: inset 0 -2px 0 #b6db81; }
.squad-day-dots { display: flex; justify-content: center; gap: 3px; height: 5px; }
.squad-day-dots > i { display: block; width: 4px; height: 4px; border-radius: 50%; }
.squad-day-dots .win { background: #b7df87; }
.squad-day-dots .loss { background: #d67b80; }
.squad-day-dots .draw { background: #d8b36b; }
.squad-day-dots .no-games { background: #41503b; width: 10px; border-radius: 2px; height: 2px; margin-top: 1px; }
.fighter-card-head > .svg-icon { flex-shrink: 0; color: var(--squad-color); }
.fighter-day-totals { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 10px 0; font-size: 10px; }
.fighter-day-totals b { display: block; font-size: 23px; font-weight: 400; margin-top: 4px; }
.squad-workspace.is-history .squad-fighter-card { cursor: default; }
.squad-workspace.is-history .squad-empty-card { min-height: 145px; background: transparent; border-color: #2f3d29; color: #44513e; }
.squad-workspace.is-history .squad-member-cards { grid-template-columns: repeat(5,minmax(160px,1fr)); }
.squad-workspace.is-history .squad-card { border-color: #29382c; }
.recent-day { border-bottom: 1px solid var(--border); }
.recent-day:last-child { border-bottom: 0; }
.recent-day > summary { list-style: none; display: grid; grid-template-columns: 1fr auto 16px; gap: 14px; align-items: center; padding: 14px 0; cursor: pointer; }
.recent-day > summary::-webkit-details-marker { display: none; }
.recent-day > summary:hover { color: var(--accent); }
.recent-day > summary small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.recent-day-result { text-align: right; font-size: 12px; }
.recent-day-result .stat-red { color: var(--danger); }
.recent-day[open] > summary > svg { transform: rotate(90deg); }
.recent-day-matches { padding: 0 0 10px; }
.recent-day-matches .recent-match { padding: 11px 0; }
@media (max-width: 600px) {
    .squad-day-heading h2 { font-size: 18px; }
    .squad-day-navigation { gap: 4px; }
    .squad-day-navigation select { width: 135px; }
    .squad-day-navigation .btn { padding: 7px 10px; }
    .squad-day-chip { flex-basis: 62px; min-width: 62px; }
}

.leave-member .fighter-name { display: block; }

.recent-matches .panel-head { flex-wrap: wrap; gap: 10px; }
@media (max-width: 600px) {
    .squad-day-navigation { width: 100%; }
    .squad-day-navigation label { flex: 1; min-width: 0; }
    .squad-day-navigation select { width: 100%; }
}

/* Цветные переключатели одновременно служат легендой общего графика. */
.performance .panel-head { flex-wrap: wrap; gap: 10px; }
.overview-chart-controls { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 16px; }
.overview-metric-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #35442f; border-radius: 5px; color: #7e8d73; font-size: 11px; background: transparent; white-space: nowrap; }
.overview-metric-toggle > i { width: 14px; height: 3px; border-radius: 2px; background: var(--metric-color); opacity: .35; }
.overview-metric-toggle.active { border-color: var(--metric-color); color: var(--text); background: #b8d99408; }
.overview-metric-toggle.active > i { opacity: 1; }
.overview-metric-toggle:hover { color: var(--text); background: #b8d9940e; }
.overview-combined-chart { overflow-x: auto; scrollbar-width: thin; }
.overview-combined-chart svg { min-width: 640px; max-height: 330px; }


/* Ручной запуск Discord-бота: один контроллер на локальный сервер. */
.sidebar-bot { margin-bottom: 10px; }
.sidebar-bot > small { display: block; margin: 0 12px 0 42px; color: #7f9275; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.sidebar-bot .nav-item { background: transparent; cursor: pointer; }
.sidebar-bot .nav-item:disabled { cursor: wait; opacity: .65; }
.bot-status-dot { flex: 0 0 6px; height: 6px; border-radius: 50%; background: #64715d; }
[data-bot-toggle][data-state=running] .bot-status-dot { background: #c4f37c; box-shadow: 0 0 9px #c4f37c55; }
[data-bot-toggle][data-state=starting] .bot-status-dot, [data-bot-toggle][data-state=reconnecting] .bot-status-dot { background: #e9b76c; }
[data-bot-toggle][data-state=error] .bot-status-dot { background: #e18a80; }
.discord-bot-settings { padding: 26px 0; margin-top: 24px; border-top: 1px solid #33472b; scroll-margin-top: 24px; }
.discord-bot-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.discord-bot-heading h2 { margin: 0; font-size: 18px; }
.discord-bot-settings p { font-size: 12px; color: #8ea180; overflow-wrap: anywhere; margin: 0 0 12px; }
.discord-bot-settings .discord-bot-status { color: #d2e4c6; }
.discord-bot-settings .discord-bot-status[data-state=error] { color: #e18a80; }
.discord-bot-settings form { max-width: 900px; }
.discord-bot-settings small { display: block; margin-top: 15px; color: #8ea180; font-size: 10px; }

/* Привязки Discord без вложенных панелей. */
.discord-roles-settings { margin-top: 30px; }
.discord-roles-settings h3 { font-size: 16px; margin: 0 0 14px; }
.discord-roles-settings h4 { font-size: 14px; margin: 0; }
.discord-bindings-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.discord-bindings-heading .search-box { flex: 1 1 250px; max-width: 420px; }
.discord-bindings-table { min-width: 560px; }
.discord-bindings-table td:first-child { min-width: 130px; }
.discord-bindings-table td:first-child small { margin: 5px 0 0; }
.discord-bindings-table [data-member-role-status] { color: #8ea180; font-size: 11px; }
.discord-bindings-table [data-member-role-status][data-state=error], .discord-roles-settings [data-roles-summary][data-state=error], .discord-roles-settings [data-roles-summary][data-state=partial], .discord-roles-issues { color: #e18a80; }
.discord-auto-sync { display: flex; align-items: center; gap: 10px; margin: 20px 0; font-size: 12px; color: #c3d4b9; }
.discord-auto-sync input { width: 16px; height: 16px; accent-color: #c4f37c; }
.discord-roles-issues { padding-left: 20px; font-size: 12px; line-height: 1.6; margin-top: 18px; }

.discord-bindings-table td:nth-child(2) { min-width: 170px; overflow-wrap: anywhere; }

/* Журнал, словарь OCR и явка без боевых показателей. */
.log-filters { display:flex; flex-wrap:wrap; gap:8px; padding:16px; border-bottom:1px solid var(--border); }
.log-filters .search-box { flex:1 1 200px; }.log-filters input,.log-filters select { min-width:0; max-width:100%; }
.activity-row { display:grid; grid-template-columns:160px minmax(0,1fr) auto; gap:16px; padding:16px; border-bottom:1px solid var(--border); }
.activity-row time,.activity-row small { display:block; color:var(--muted); font-size:11px; }.activity-row p { margin:4px 0 0; color:var(--muted); overflow-wrap:anywhere; }.activity-row.error { border-left:3px solid var(--danger); }.activity-row.warning { border-left:3px solid var(--amber); }
.ocr-dictionary form { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }.ocr-dictionary form input { flex:1 1 150px; min-width:0; }.ocr-dictionary [data-ocr-rows] { max-height:360px; overflow:auto; }.ocr-alias-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); overflow-wrap:anywhere; }
@media(max-width:700px){.activity-row { grid-template-columns:minmax(0,1fr) auto; gap:8px; }.activity-row>div:first-child { grid-column:1/-1; }.log-filters>* { flex:1 1 130px; }}

.discord-squad-settings,.discord-statistics-settings { margin-top:24px; padding-top:20px; border-top:1px solid var(--border); }
.discord-squad-settings form,.discord-statistics-settings form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.discord-squad-settings .field,.discord-statistics-settings .field { flex:1; min-width:min(220px,100%); }
.discord-squad-settings small,.discord-squad-settings [role=status],.discord-statistics-settings small,.discord-statistics-settings [role=status] { width:100%; }

/* Equipment dates, tactic phases and targeted TAB recognition. */
.gear-updated { display: block; color: var(--muted); font-size: 10px; margin: -3px 0 10px; }
.plan-phase-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 18px; border-bottom: 1px solid var(--border); flex: 0 0 auto; min-width: 0; }
.plan-phase-list { display: flex; flex: 1 1 240px; gap: 4px; overflow-x: auto; min-width: 0; }
.plan-phase-list button { white-space: nowrap; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 7px 10px; cursor: pointer; font: inherit; font-size: 11px; }
.plan-phase-list button.active { background: #293a20; color: var(--accent); }
.plan-phase-list button:hover { color: var(--text); }
.plan-phase-bar > input { width: 150px; min-height: 32px; font-size: 11px; }
.plan-phase-bar .btn { min-height: 32px; font-size: 10px; padding: 6px 9px; }
.import-region { margin: 16px 0 24px; min-width: 0; }
.import-region > summary { color: var(--accent); cursor: pointer; padding: 9px 0; }
.import-region-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 10px 0; }
.import-region-controls .field { flex: 1 1 150px; margin: 0; min-width: 0; }
.import-region-status { color: var(--muted); font-size: 11px; margin: 8px 0; }
.import-region-image { position: relative; touch-action: none; user-select: none; cursor: crosshair; overflow: hidden; line-height: 0; }
.import-region-image img { display: block; width: 100%; height: auto; pointer-events: none; }
.import-region-selection { position: absolute; border: 2px solid var(--accent); background: #c4f37c25; box-shadow: 0 0 0 9999px #0006; pointer-events: none; }
.import-region-values { display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 8px; }
.import-region-values input, .import-region-values select { width: 100%; min-width: 0; }
.import-region [data-region-result] { margin-top: 14px; }
.discord-post-preview { padding: 0 22px 16px; }
.discord-post-destination { color: var(--muted); margin: 2px 0 16px; overflow-wrap: anywhere; }
.discord-post-destination strong { color: var(--accent); }
.discord-post-destination small { display: block; font-size: 10px; }
.discord-post-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.discord-post-image { display: block; max-height: 60vh; overflow: auto; }
.discord-post-image img { display: block; max-width: 100%; height: auto; }
@media(max-width:720px) {
    .plan-phase-bar { padding: 6px 10px; gap: 4px; }
    .plan-phase-list { flex-basis: calc(100% - 80px); order: -1; }
    .plan-phase-bar [data-plan-phase-prev] { order: -2; }
    .plan-phase-bar [data-plan-phase-next] { order: -1; }
    .plan-phase-bar > input { flex: 1 1 110px; width: 110px; }
    .discord-post-preview { padding: 0 14px 12px; }
}

/* Read-only tactic presentation with phase navigation and squad orders. */
.plan-show-toolbar, .plan-show-tasks { display: none; }
.plan-page.is-presenting { position: fixed; inset: 0; z-index: 1100; width: 100%; height: 100dvh; background: #101a13; }
.plan-page.is-presenting .plan-topbar,
.plan-page.is-presenting .plan-phase-bar,
.plan-page.is-presenting .plan-controls,
.plan-page.is-presenting .plan-footer,
.plan-page.is-presenting .plan-reference-error { display: none !important; }
.plan-page.is-presenting .plan-show-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; flex: 0 0 auto; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #111b14; }
.plan-show-title { flex: 1 1 140px; min-width: 0; }
.plan-show-title strong, .plan-show-title > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-show-title strong { font-size: 14px; }
.plan-show-title > span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.plan-show-navigation { display: flex; align-items: center; gap: 9px; min-width: 0; max-width: 55%; }
.plan-show-navigation > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font-size: 13px; }
.plan-show-navigation .btn { flex: 0 0 34px; padding: 5px; }
.plan-show-toolbar .btn { min-height: 34px; font-size: 11px; }
.plan-page.is-presenting .plan-layout { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); }
.plan-page.is-presenting .plan-viewport { grid-column: 1; grid-row: 1; }
.plan-page.is-presenting .plan-viewport, .plan-page.is-presenting .plan-viewport [data-plan-kind] { cursor: grab !important; }
.plan-page.is-presenting .plan-show-tasks { display: block; grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; max-height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; border-left: 1px solid var(--border); padding: 20px; background: #111b14; }
.plan-show-tasks h2 { font-size: 16px; margin: 0 0 18px; }
.plan-show-tasks p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; margin: 8px 0 0; }
.plan-show-tasks .plan-show-note { margin-bottom: 22px; color: var(--text); }
.plan-show-order + .plan-show-order { margin-top: 24px; }
.plan-show-order h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--squad-color); font-size: 13px; overflow-wrap: anywhere; }
.plan-show-order h3::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--squad-color); }
.plan-show-tasks .plan-show-empty { color: var(--muted); }
.plan-show-general { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.plan-show-general summary { color: var(--muted); cursor: pointer; font-size: 12px; }
.plan-page.is-presenting.plan-show-tasks-hidden .plan-layout { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 720px) {
    .plan-page.is-presenting .plan-show-toolbar { gap: 7px; padding: 8px 10px; }
    .plan-show-title { flex-basis: calc(100% - 190px); }
    .plan-show-navigation { order: 1; flex: 1 1 100%; max-width: none; justify-content: center; }
    .plan-page.is-presenting .plan-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(100px, 30dvh); }
    .plan-page.is-presenting .plan-show-tasks { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--border); padding: 14px; }
    .plan-page.is-presenting.plan-show-tasks-hidden .plan-layout { grid-template-rows: minmax(0, 1fr); }
}@media(max-width:640px){}

/* Проверка сомнительных чисел TAB · 0.6. */
.import-verification { margin: 16px 0 22px; padding: 12px 0 16px; border-block: 1px solid #806535; }
.import-verification .import-section-heading { margin: 0 0 8px; }
.import-review-note, [data-review-reason] { color: var(--muted); font-size: 12px; line-height: 1.5; }
.import-verification [data-review-detail] > strong { display: block; margin-top: 14px; color: #f3ce88; }
.import-review-crop { display: block; max-width: 100%; width: auto; height: 76px; object-fit: contain; object-position: left; margin: 12px 0; image-rendering: pixelated; }
.import-review-context summary { cursor: pointer; color: var(--muted); font-size: 12px; margin: 8px 0; }
.import-review-context img { display: block; width: 100%; height: auto; }
.import-review-readings, .import-review-edit { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.import-review-edit .field { margin: 0; max-width: 230px; }
.import-review-readings .btn { font-size: 11px; }
.import-review-button { display: block; background: none; border: 0; padding: 5px 0; font-size: 10px; color: #f3ce88; cursor: pointer; text-decoration: underline; }
.import-players input.import-number-uncertain, .import-teams input.import-number-uncertain { border-color: #c59848; background: #b9831826; }
.import-review-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Отпуска Discord: результаты чтения прямо на странице отрядов. */
.discord-absence-settings { margin-top: 24px; }
.discord-absence-settings small { display: block; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.discord-absence-panel { padding: 20px; margin-bottom: 20px; }
.discord-absence-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.discord-absence-toolbar > div { flex: 1 1 280px; }
.discord-absence-toolbar .field { margin: 0; }
.discord-absence-toolbar p, .discord-absence-panel [role=status], .discord-absence-item > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.discord-absence-item { border-top: 1px solid var(--border); padding: 16px 0; }
.discord-absence-item header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.discord-absence-item header > span { font-size: 11px; color: #e9b76c; }
.discord-absence-item.is-approved header > span { color: var(--accent); }
.discord-absence-item header a { margin-left: auto; font-size: 11px; color: var(--muted); }
.discord-absence-item .discord-absence-text { white-space: pre-wrap; color: var(--text); overflow-wrap: anywhere; }
.discord-absence-item summary { cursor: pointer; margin: 10px 0; color: var(--accent); font-size: 12px; }
.discord-absence-item form > .field { max-width: 360px; }
.discord-absence-range, .discord-absence-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0; }
.discord-absence-range .field { margin: 0; }
.discord-absence-panel .discord-absence-warning { color: #e9b76c; font-size: 12px; line-height: 1.5; }

/* Очередь TAB и проверка общего голосового · 0.6. */
.tab-queue { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.tab-queue .import-section-heading { margin-top: 0; }
.tab-queue [role=status], .tab-queue > small { font-size: 11px; color: var(--muted); }
.tab-queue ol { list-style: none; padding: 0; margin: 10px 0; max-height: 160px; overflow-y: auto; }
.tab-queue li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; color: var(--muted); font-size: 12px; }
.tab-queue li.current { background: #c4f37c12; color: var(--accent); }
.tab-queue li span { overflow-wrap: anywhere; min-width: 0; }
.tab-queue li small { flex-shrink: 0; }
.tab-queue-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.voice-panel { padding: 20px; margin-bottom: 20px; }
.voice-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.voice-toolbar > div { flex: 1 1 260px; }
.voice-toolbar .field { margin: 0; min-width: 180px; }
.voice-toolbar p, .voice-panel [role=status] { font-size: 12px; color: var(--muted); }
.voice-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; font-size: 12px; }
.voice-filters label { display: flex; align-items: center; gap: 6px; }
.voice-filters small { color: var(--muted); }
.voice-results { min-width: 700px; }
.voice-results td:last-child { color: var(--muted); font-size: 11px; max-width: 330px; }
.voice-status { font-size: 11px; }
.voice-status.present { color: var(--accent); }.voice-status.other { color: #e9b76c; }.voice-status.absent { color: #e18d89; }.voice-status.unknown,.voice-status.unlinked { color: var(--muted); }
.voice-warning { color: #e9b76c; font-size: 12px; }.discord-voice-settings { margin-top: 24px; }.discord-voice-settings small { display: block; color: var(--muted); line-height: 1.5; margin-top: 12px; }

/* Расшифровка эффективности */
.efficiency-button { display: inline-flex; align-items: baseline; justify-content: center; padding: 4px 2px; border: 0; border-bottom: 1px dotted currentColor; border-radius: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.efficiency-button:hover { color: #d5efb9; border-bottom-style: solid; }
.efficiency-button:focus-visible { outline: 2px solid #b7df87; outline-offset: 4px; }
.efficiency-button>.efficiency-info { display: inline; margin: 0 0 0 5px; color: inherit; font-size: 10px; opacity: .7; }
.efficiency-modal { width: 1080px !important; }
.efficiency-detail { font-size: 13px; line-height: 1.6; }
.efficiency-detail h3 { margin: 24px 0 12px; font-size: 15px; }
.efficiency-context { color: #a9b89e; margin-bottom: 16px; }
.efficiency-context b { color: #e2ebdc; }
.efficiency-scope { max-width: 580px; margin: 12px 0 20px; }
.efficiency-result { display: flex; align-items: center; gap: 30px; padding: 20px 0; border-block: 1px solid #35452e; }
.efficiency-result>div { min-width: 170px; }
.efficiency-result span { color: #9ba991; }
.efficiency-result strong { display: block; color: #c5a8e4; font-size: 36px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.efficiency-result p { max-width: 620px; margin: 0; }
.efficiency-components { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.efficiency-components>div { padding: 8px 0 12px; border-bottom: 1px solid #35452e; }
.efficiency-components span { display: block; color: #a9b89e; }
.efficiency-components strong { font-size: 23px; font-weight: 500; }
.efficiency-note { color: #9ba991; font-size: 12px; }
.efficiency-detail details { margin: 12px 0; padding: 12px 0; border-top: 1px solid #35452e; }
.efficiency-detail summary { cursor: pointer; color: #c8d8bc; overflow-wrap: anywhere; }
.efficiency-detail summary>span { margin-left: 8px; font-size: 12px; }
.efficiency-detail table { min-width: 580px; }
.efficiency-detail th, .efficiency-detail td { padding: 10px 12px; text-align: left; font-variant-numeric: tabular-nums; }
.efficiency-detail td { white-space: nowrap; }
.efficiency-current { background: #b7df8710; }
.efficiency-stale { padding: 12px 0; color: #dfbb76; }
.efficiency-stale .btn { margin-left: 8px; }
@media (max-width: 600px) {
    .efficiency-detail { font-size: 12px; }
    .efficiency-result { align-items: flex-start; flex-direction: column; gap: 10px; }
    .efficiency-components { gap: 10px; }
    .efficiency-components span { font-size: 11px; }
    .efficiency-components strong { font-size: 20px; }
}

/* Общий вид динамики клана и игрока. */
.player-dynamics-panel { grid-column: 1 / -1; }
.player-dynamics-panel .overview-chart-controls { padding: 0 0 16px; }
.player-dynamics-panel .chart-explanation { padding: 0 0 12px; }

/* Права доступа: недоступные действия скрыты до и после загрузки аккаунта. */
body:not([data-full-access="1"]) :is([data-admin-only],.sidebar-bot,[data-bot-toggle],[data-roles-sync],[data-statistics-discord],[data-statistics-day],[data-discord-absence-scan],[data-check-voice],#send-squads-discord,#import-roster,#import-tab,#import-matches-json,#delete-all-matches,#reset-statistics,[data-delete-member],[data-open="member"],[data-open="squad"],[data-open="absences"],[data-open="match"]:not([data-id]),[data-remove="matches"],[data-edit-periods],[data-delete-period],[data-new-period],#period-editor,[data-assign-member],[data-remove-member],[data-remove-leave],#grenade-tracker,a[href="/log"],a[href^="/settings"],a[href*="periods=1"]) { display:none !important; }
body:not([data-tactics-edit="1"]) :is([data-new-plan],[data-copy-plan],[data-remove="tactics"],[data-open="tactic"]:not([data-id])) { display:none !important; }
.equipment-cell:disabled { opacity:1;cursor:default; }
.inline-loadout-input[readonly] { cursor:default;border-color:transparent; }
.access-settings { margin-top:24px; }
.access-settings p { padding:0 20px;line-height:1.6; }
.access-settings td small { display:block;color:var(--muted);margin-top:5px; }
.access-settings select { max-width:360px;min-width:180px; }
.tactic-viewer { display:flex; flex-direction:column; height:100%; min-height:0; overflow:hidden; }
.tactic-viewer > .panel-head, .tactic-viewer-controls { flex-shrink:0; }
.tactic-viewer h2 { margin:0; }
.tactic-viewer .panel-head p { color:var(--muted);margin:8px 0 0; }
.tactic-viewer-controls { display:flex;flex-wrap:wrap;gap:16px;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border); }
.tactic-viewer-controls [data-view-phases] { display:flex;gap:8px;flex-wrap:wrap;flex:1 1 300px; }
.tactic-viewer-controls label { display:flex;align-items:center;gap:10px; }
.tactic-viewer-scroll { flex:1 1 0; min-height:0; overflow:auto; background:#0d1711; }
.tactic-viewer-scroll [data-view-map] { min-width:300px; }
.tactic-viewer-scroll svg { display:block;width:100%;height:auto; }
.tactic-viewer-notes { flex:0 1 auto; min-height:0; max-height:40%; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-gutter:stable; padding:20px; line-height:1.6; overflow-wrap:anywhere; }
.tactic-viewer-notes:empty { display:none; }
.tactic-viewer-notes p { white-space:pre-wrap; }

.profile-name-input[readonly] { cursor:default;border-color:transparent; }
.match-page-form :is(input,select,textarea):disabled { opacity:1;color:inherit; }

/* Не показываем пустые формы до данных и прав доступа. Меню доступно сразу. */
body[data-boot="loading"] #page-content,
body[data-boot="loading"] #heading-actions { display: none !important; }
.page-boot { min-height: 100vh; padding: 32px 20px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; text-align: center; color: var(--muted); }
#content-slot > .page-boot { min-height: 55vh; }
.page-boot h2 { color: var(--text); font-size: 20px; font-weight: 500; }
.page-boot p { max-width: 480px; }
.page-boot .brand-mark { width: 48px; height: 48px; font-size: 30px; }
.page-boot [hidden], .page-boot[hidden] { display: none !important; }
.page-boot:not([role="alert"]) .brand-mark { animation: boot-pulse 1.4s ease-in-out infinite; }
@keyframes boot-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .page-boot .brand-mark { animation: none !important; } }

.tactic-viewer-notes:focus-visible, .plan-show-tasks:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
