* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --layout-gap: 24px;
    --layout-gap-sm: 16px;
    --layout-gap-xs: 12px;
    --layout-container-x: 32px;
    --site-header-pad-top: 14px;
    --site-header-pad-bottom: 16px;
    --site-header-pad-x: 18px;
    --site-header-inner-height: 44px;
    --site-header-height: calc(var(--site-header-pad-top) + var(--site-header-inner-height) + var(--site-header-pad-bottom));
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(1200px 700px at 10% -10%, rgba(54, 224, 255, 0.13), transparent 55%),
        radial-gradient(900px 560px at 100% 0%, rgba(116, 246, 200, 0.08), transparent 52%),
        linear-gradient(135deg, #0a1022 0%, #0d1a35 45%, #162f5e 100%);
    color: #e8eef2;
    min-height: 100vh;
    padding: 0;
    width: 100%;
    position: relative;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    opacity: 0.24;
    background-image:
        linear-gradient(rgba(141, 195, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(141, 195, 255, 0.18) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 10%, rgba(0, 0, 0, 0.85), transparent 78%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(580px 320px at 13% 6%, rgba(54, 224, 255, 0.18), transparent 70%),
        radial-gradient(620px 360px at 88% 2%, rgba(116, 246, 200, 0.12), transparent 72%),
        radial-gradient(520px 420px at 50% 100%, rgba(17, 35, 69, 0.6), transparent 76%);
}

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    overflow: hidden;
}

.ambient-widget {
    position: absolute;
    min-width: 112px;
    padding: 6px 10px;
    border: 1px solid rgba(125, 184, 255, 0.22);
    background: rgba(10, 18, 36, 0.28);
    color: rgba(189, 223, 255, 0.46);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    opacity: 0.2;
    transform: translateY(0);
    backdrop-filter: blur(1px);
    transition: opacity 1.3s ease, left 2.2s ease, top 2.2s ease;
    animation-name: ambientFloat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.ambient-widget-label {
    display: block;
    color: rgba(167, 205, 245, 0.44);
    font-size: 9px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ambient-widget-value {
    display: block;
    font-size: 12px;
    color: rgba(134, 233, 255, 0.56);
    font-weight: 600;
}

.ambient-widget.is-updating .ambient-widget-value {
    color: rgba(182, 255, 214, 0.64);
}

@keyframes ambientFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-10px) translateX(3px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: var(--layout-gap) var(--layout-container-x);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

h1 {
    margin-bottom: var(--layout-gap);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 16px;
    line-height: 1.2;
}

h1::before {
    content: none;
    display: none;
}

.upload-area {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    padding: 48px;
    text-align: center;
    margin-bottom: var(--layout-gap);
    transition: all 0.22s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    backdrop-filter: blur(2px);
}

.upload-area:hover, .upload-area.drag-over {
    border: 1px dashed #4a90e2;
    background: linear-gradient(180deg, rgba(24, 37, 68, 0.9) 0%, rgba(17, 28, 52, 0.86) 100%);
    box-shadow: 0 20px 44px rgba(6, 15, 31, 0.42), 0 0 0 1px rgba(74, 144, 226, 0.24);
    transform: translateY(-1px);
}

.upload-icon {
    font-size: 56px;
    color: #ffd966;
    margin-bottom: 16px;
    opacity: 0.9;
    line-height: 1;
}

.upload-icon i {
    display: block;
}

.upload-text {
    font-size: 18px;
    color: #b9c8d8;
    font-weight: 400;
}

.upload-text span {
    color: #ffd966;
    font-weight: 500;
    background: rgba(255, 217, 102, 0.1);
    padding: 4px 12px;
    margin-left: 8px;
    border: 1px solid rgba(255, 217, 102, 0.3);
}

.upload-format-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #8ea3ba;
    line-height: 1.4;
}

.file-info {
    margin-top: 16px;
    font-size: 14px;
    color: #5f6c7a;
    font-family: 'JetBrains Mono', monospace;
}

.save-replay-consent {
    margin-bottom: 0;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(20, 30, 57, 0.82) 0%, rgba(14, 21, 40, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.24);
    box-shadow: 0 10px 24px rgba(4, 10, 22, 0.3), inset 0 1px 0 rgba(188, 220, 255, 0.07);
}

.save-replay-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e8eef2;
    font-size: 0.9rem;
    cursor: pointer;
}

.save-replay-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.save-replay-slider {
    width: 44px;
    height: 24px;
    background: #2a3138;
    border: 1px solid #3a434d;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.save-replay-slider::before {
    content: "";
    width: 18px;
    height: 18px;
    background: #9aa7b2;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.2s ease;
}

.save-replay-switch input[type="checkbox"]:checked + .save-replay-slider {
    background: rgba(76, 175, 80, 0.25);
    border-color: #4caf50;
}

.save-replay-switch input[type="checkbox"]:checked + .save-replay-slider::before {
    transform: translateX(20px);
    background: #4caf50;
}

.save-replay-switch-text {
    line-height: 1.3;
}

.save-replay-consent-hint {
    margin-top: 6px;
    color: #9db0c3;
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

.filters-panel {
    background: linear-gradient(180deg, rgba(20, 30, 57, 0.8) 0%, rgba(14, 21, 40, 0.76) 100%);
    border: 1px solid rgba(113, 163, 230, 0.22);
    margin-bottom: var(--layout-gap);
    margin-top: var(--layout-gap);
    width: 100%;
    box-shadow: 0 12px 28px rgba(4, 10, 22, 0.3);
}

#errorContainer {
    background: linear-gradient(180deg, rgba(40, 24, 34, 0.74) 0%, rgba(28, 18, 26, 0.74) 100%);
    border: 1px solid rgba(219, 123, 153, 0.25);
    width: 100%;
    box-shadow: 0 12px 26px rgba(26, 9, 16, 0.26);
}

.files-list,
#errorContainer {
    border-width: 1px;
    margin-bottom: var(--layout-gap);
    width: 100%;
}

.files-error-wrapper {
    display: flex;
    gap: var(--layout-gap);
    margin-bottom: var(--layout-gap);
    align-items: stretch;
}

.files-list {
    flex: 2;
    margin-bottom: 0;
    min-width: 0;
    border: 1px solid rgba(113, 163, 230, 0.24);
    background: linear-gradient(180deg, rgba(20, 30, 57, 0.8) 0%, rgba(14, 21, 40, 0.76) 100%);
    box-shadow: 0 12px 28px rgba(4, 10, 22, 0.28);
}

#filtersContainer {
    width: 100%;
    margin-top: var(--layout-gap);
}

#errorContainer {
    flex: 1;
    margin-bottom: 0;
    min-width: 300px;
    align-self: flex-start;
}

.files-header,
#errorContainer .error-header {
    padding: 14px 20px;
    background: rgba(23, 36, 66, 0.82);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #2a3138;
    width: 100%;
    font-size: 1rem;
}

.files-header {
    color: #4caf50;
}

#errorContainer .error-header {
    color: #ff8a8a;
    border-bottom-color: rgba(255, 68, 68, 0.3);
}

.files-content,
#errorContainer .error-content {
    background: rgba(15, 24, 45, 0.74);
    padding: 12px;
}

.files-list-container,
.error-files-list {
    height: calc(5 * 40px);
    overflow-y: auto;
    background: #1a1f24;
    border: 1px solid #2a3138;
    scrollbar-width: thin;
}

.files-list-container {
    scrollbar-color: #4caf50 #2a3138;
}

.error-files-list {
    scrollbar-color: #ff8a8a #2a3138;
}

.files-list-container::-webkit-scrollbar,
.error-files-list::-webkit-scrollbar,
.dropdown-content::-webkit-scrollbar,
.players-list::-webkit-scrollbar,
.columns-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.files-list-container::-webkit-scrollbar-track,
.error-files-list::-webkit-scrollbar-track,
.dropdown-content::-webkit-scrollbar-track,
.players-list::-webkit-scrollbar-track,
.columns-grid::-webkit-scrollbar-track {
    background: #2a3138;
}

.files-list-container::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 4px;
}

.files-list-container::-webkit-scrollbar-thumb:hover {
    background: #66bb6a;
}

.dropdown-content::-webkit-scrollbar-thumb,
.players-list::-webkit-scrollbar-thumb,
.columns-grid::-webkit-scrollbar-thumb {
    background: #ffd966;
    border-radius: 4px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover,
.players-list::-webkit-scrollbar-thumb:hover,
.columns-grid::-webkit-scrollbar-thumb:hover {
    background: #ffd44d;
}

.error-files-list::-webkit-scrollbar-thumb {
    background: #ff8a8a;
    border-radius: 4px;
}

.error-files-list::-webkit-scrollbar-thumb:hover {
    background: #ff6b6b;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1a1f24;
    border-bottom: 1px solid #2a3138;
    transition: all 0.2s;
    font-size: 0.75rem;
    min-height: 40px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #1f262c;
    border-left: 3px dashed #4a90e2;
}

.file-name {
    color: #4caf50;
    flex: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
    font-weight: 500;
    font-size: 0.75rem;
}

.file-map {
    color: #4caf50;
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(76, 175, 80, 0.1);
    margin-right: 10px;
    white-space: nowrap;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 0;
    flex-shrink: 0;
}

.delete-file {
    background: none;
    border: 1px solid transparent;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.7;
    line-height: 1;
    border-radius: 3px;
}

.delete-file:hover {
    color: #ff5252;
    opacity: 1;
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.error-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1a1f24;
    border-bottom: 1px solid #2a3138;
    transition: all 0.2s;
    font-size: 0.75rem;
    min-height: 40px;
    color: #ffc8c8;
    border-left: 2px solid rgba(255, 68, 68, 0.3);
}

.error-file-item:last-child {
    border-bottom: none;
}

.error-file-item:hover {
    background: rgba(255, 68, 68, 0.05);
    border-left-color: #ff8a8a;
}

.error-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.error-copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff8a8a;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
    flex-shrink: 0;
}

.error-copy-btn:hover {
    opacity: 1;
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff8a8a;
    transform: scale(1.05);
}

.error-copy-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
    opacity: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: rgba(255, 217, 102, 0.15);
    border: 1px solid rgba(255, 217, 102, 0.3);
    color: #ffd966;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
    border-radius: 0;
}

.files-header .badge {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.error-badge {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff8a8a;
    border-radius: 0;
}

.filter-section {
    border-bottom: 1px solid #2a3138;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    padding: 14px 20px;
    background: #1a1f24;
    color: #ffd966;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    user-select: none;
    border-bottom: 1px solid #2a3138;
    width: 100%;
    position: relative;
    font-size: 1rem;
}

.filter-header:hover {
    background: #1f262c;
}

.filter-header.expanded {
    background: #1f262c;
}

.filter-expand-icon {
    display: inline-block;
    font-size: 12px;
    color: #ffd966;
    transition: transform 0.2s;
    width: 16px;
    flex-shrink: 0;
    margin-right: 6px;
}

.filter-header.expanded .filter-expand-icon {
    transform: rotate(90deg);
}

.filter-content {
    padding: 20px;
    background: #14181c;
    display: none;
    border-bottom: 1px solid #2a3138;
}

.filter-content[style*="display: block"] {
    display: block;
}

.filter-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: var(--layout-gap);
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-label {
    display: block;
    color: #9aa7b2;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dropdown-search {
    padding: 8px;
    border-bottom: 1px solid #313e48;
}

.dropdown-search-input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1f24;
    border: 1px solid #313e48;
    color: #e8eef2;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}

.dropdown-search-input:focus {
    border-color: #ffd966;
}

.dropdown-search-input::placeholder {
    color: #5f6c7a;
}

.players-search {
    margin-bottom: 8px;
}

.players-search-input {
    width: 100%;
    padding: 10px 12px;
    background: #1f262c;
    border: 1px solid #313e48;
    color: #e8eef2;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}

.players-search-input:focus {
    border-color: #ffd966;
}

.players-search-input::placeholder {
    color: #5f6c7a;
}

.players-list-container {
    background: #1a1f24;
    border: 1px solid #2a3138;
    max-height: 350px;
    display: flex;
    flex-direction: column;
}

.players-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #1f262c;
    border-bottom: 1px solid #2a3138;
}

.players-list-title {
    color: #ffd966;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.players-list-actions {
    display: flex;
    gap: 8px;
}

.players-action-btn {
    background: transparent;
    border: 1px solid #313e48;
    color: #ffd966;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.players-action-btn:hover {
    background: #ffd966;
    color: #0a0c0f;
    border-color: #ffd966;
}

.players-list {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
    scrollbar-width: thin;
    scrollbar-color: #ffd966 #2a3138;
}

.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.players-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-badge {
    background: rgba(255, 217, 102, 0.15);
    border-color: rgba(255, 217, 102, 0.3);
    color: #ffd966;
    font-size: 0.7rem;
    padding: 2px 6px;
}

.players-show-btn {
    background: transparent;
    border: 1px solid #313e48;
    color: #9aa7b2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.players-show-btn:hover {
    border-color: #ffd966;
    color: #ffd966;
}

.players-show-btn.active {
    background: #ffd966;
    border-color: #ffd966;
    color: #0a0c0f;
}

.players-filter-group {
    flex: 1;
    min-width: 300px;
}

.player-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: #1a1f24;
}

.player-checkbox-label:last-child {
    border-bottom: none;
}

.player-checkbox-label:hover {
    background: rgba(255, 217, 102, 0.1);
}

.player-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ffd966;
    flex-shrink: 0;
}

.player-checkbox-name {
    color: #ffd966;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.player-checkbox-clan {
    color: #64b5f6;
    font-size: 0.75rem;
    background: rgba(100, 181, 246, 0.1);
    padding: 2px 6px;
    border: 1px solid rgba(100, 181, 246, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.battles-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: transparent;
    border: 1px dashed #ffd966;
    color: #ffd966;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    margin-left: auto;
}

.battles-badge::before {
    content: "Сыграно боев: ";
    color: #9aa7b2;
    font-weight: normal;
    margin-right: 4px;
}

.selected-count {
    color: #ffd966;
    font-weight: 600;
    margin-left: 4px;
}

.no-players-message {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
    background: #1a1f24;
    border: 1px dashed #2a3138;
}

.filter-select {
    background: #1f262c;
    color: #e8eef2;
    border: 1px solid #313e48;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 200px;
    font-family: 'Inter', sans-serif;
    margin-right: 10px;
}

.filter-select:hover {
    border-color: #ffd966;
}

.filter-select option {
    background: #1f262c;
    color: #e8eef2;
}

.map-select {
    min-width: 250px;
}

.columns-group {
    width: 100%;
}

.columns-filter {
    background: #1a1f24;
    padding: 16px;
    border: 1px solid #2a3138;
}

.columns-section {
    margin-bottom: 16px;
}

.columns-section:last-child {
    margin-bottom: 0;
}

.columns-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 16px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ffd966 #2a3138;
}

.columns-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.columns-action-btn {
    background: transparent;
    border: 1px solid #313e48;
    color: #ffd966;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.columns-action-btn:hover {
    background: #ffd966;
    color: #0a0c0f;
    border-color: #ffd966;
}

@media (max-width: 1200px) {
    .columns-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .columns-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .columns-grid {
        grid-template-columns: 1fr;
    }
}

.column-checkbox {
    display: flex;
    align-items: center;
    min-height: 32px;
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    transition: background-color 0.2s;
    width: 100%;
    min-height: 32px;
    white-space: nowrap;
}

.checkbox-label:hover {
    background: rgba(255, 217, 102, 0.08);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ffd966;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checkbox-text {
    color: #e8eef2;
    font-size: 0.9rem;
    flex: 0 1 auto;
    line-height: 1.4;
    display: flex;
    align-items: center;
    min-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-text.text-disabled {
    color: #5f6c7a;
}

.players-table-container {
    background: linear-gradient(180deg, rgba(20, 30, 57, 0.84) 0%, rgba(14, 21, 40, 0.78) 100%);
    padding: var(--layout-gap);
    margin-top: var(--layout-gap);
    border: 1px solid rgba(113, 163, 230, 0.24);
    width: 100%;
    position: relative;
    box-shadow: 0 18px 38px rgba(4, 10, 22, 0.36), inset 0 1px 0 rgba(188, 220, 255, 0.06);
}

.players-table-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: var(--layout-gap-sm);
}

.players-table-container h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.min-battles-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.min-battles-control label {
    color: #9aa7b2;
    font-size: 0.85rem;
    white-space: nowrap;
}

.min-battles-control .number-wrapper {
    display: inline-flex;
    flex-direction: row;
    align-items: stretch;
    vertical-align: middle;
    width: 70px;
    border: 1px solid #2a3138;
    background: #1a1f24;
    box-sizing: border-box;
}
.min-battles-control .number-wrapper .number-input {
    flex: 1;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: #ffd966;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
    font-family: 'Inter', monospace;
    border-radius: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.min-battles-control .number-wrapper:focus-within {
    border-color: #ffd966;
}
.min-battles-control .number-input:focus {
    outline: none;
}
.min-battles-control .number-input::-webkit-inner-spin-button,
.min-battles-control .number-input::-webkit-outer-spin-button {
    display: none;
    -webkit-appearance: none;
    margin: 0;
}
.min-battles-control .number-controls {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 24px;
    align-items: center;
    justify-content: stretch;
    background: #1a1f24;
    border-left: 1px solid #2a3138;
}
.min-battles-control .number-controls button {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: transparent;
    border: none;
    color: #ffd966;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.min-battles-control .number-controls button:hover {
    background: rgba(255, 217, 102, 0.15);
    color: #ffd44d;
}
.min-battles-control .number-controls button:active {
    transform: scale(0.95);
}

.map-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: var(--layout-gap-sm) 0 var(--layout-gap);
    padding: 0;
}

.map-tag {
    background: #1a1f24;
    border: 1px solid #2a3138;
    color: #9aa7b2;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: inline-block;
}

.map-tag:hover {
    border-color: #ffd966;
    color: #ffd966;
    background: #1f262c;
}

.map-tag.active {
    background: #ffd966;
    border-color: #ffd966;
    color: #0a0c0f;
    font-weight: 500;
}

.players-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    margin-top: 10px;
    border: 1px solid rgba(97, 140, 197, 0.34);
    position: relative;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: auto;
    min-width: 100%;
    border: none;
}

.players-table th {
    text-align: left;
    color: #9aa7b2;
    font-size: 0.7rem;
    padding: 10px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    white-space: nowrap;
    background: rgba(24, 37, 68, 0.88);
    border-bottom: 1px solid rgba(113, 163, 230, 0.34);
    line-height: 1.2;
    vertical-align: middle;
    width: auto;
    border-right: 1px solid rgba(97, 140, 197, 0.3);
}

.players-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background: rgba(24, 37, 68, 0.94);
    border-right: 1px solid rgba(113, 163, 230, 0.4);
    min-width: 200px;
    width: auto;
}

.players-table th:last-child {
    border-right: none;
}

.players-table th:not(:first-child) {
    min-width: 60px;
    width: auto;
}

.players-table th:hover {
    color: #ffd966;
    background: rgba(29, 45, 80, 0.94);
}

.players-table th.sorted-asc,
.players-table th.sorted-desc {
    color: #ffd966;
    background: rgba(29, 45, 80, 0.96);
}

.players-table th.sorted-asc::after {
    content: "↑";
    font-size: 12px;
    margin-left: 4px;
    display: inline-block;
}

.players-table th.sorted-desc::after {
    content: "↓";
    font-size: 12px;
    margin-left: 4px;
    display: inline-block;
}

.players-table td {
    padding: 8px 12px;
    background: rgba(16, 27, 50, 0.76);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(97, 140, 197, 0.22);
    line-height: 1.2;
    vertical-align: middle;
    font-size: 0.7rem;
    max-width: none;
    width: auto;
    border-right: 1px solid rgba(97, 140, 197, 0.2);
    text-align: left;
}

.players-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: rgba(18, 30, 56, 0.94);
    border-right: 1px solid rgba(113, 163, 230, 0.34);
    min-width: 200px;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: auto;
}

.players-table td:last-child {
    border-right: none;
}

.players-table td:first-child > * {
    vertical-align: middle;
}

.players-table tbody tr.expanded-row td {
    background: rgba(19, 31, 58, 0.82);
    border-bottom: 1px solid rgba(97, 140, 197, 0.24);
}

.players-table tbody tr.expanded-details {
    background: linear-gradient(180deg, rgba(17, 29, 54, 0.86) 0%, rgba(12, 21, 40, 0.82) 100%);
}

.players-table tbody tr.expanded-details td {
    background: linear-gradient(180deg, rgba(17, 29, 54, 0.86) 0%, rgba(12, 21, 40, 0.82) 100%);
    padding: 0;
    border-bottom: 1px solid rgba(113, 163, 230, 0.26);
}

.players-table tbody tr:hover td {
    background: rgba(24, 39, 69, 0.9);
}

.players-table tbody tr:hover td:first-child {
    background: rgba(24, 39, 69, 0.94);
}

.player-row {
    cursor: pointer;
}

.player-row:hover td {
    background: rgba(24, 39, 69, 0.9);
}

.player-row .expand-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 10px;
    color: #ffd966;
    transition: transform 0.2s;
    vertical-align: middle;
}

.player-row.expanded-row .expand-icon {
    transform: rotate(90deg);
}

.empty-table-message {
    text-align: center;
    padding: 40px !important;
    color: #9aa7b2;
    font-size: 1.1rem;
    background: #1a1f24;
    border: none;
    vertical-align: middle;
}

.players-table td.empty-table-message {
    background: #1a1f24;
}

.players-table td.empty-table-message:hover {
    background: #1a1f24;
}

.empty-icon {
    font-size: 3rem;
    color: #3f4d5a;
    margin-bottom: 15px;
    display: block;
}

.empty-icon-small {
    font-size: 1.2rem;
    color: #5f6c7a;
    margin-right: 8px;
    vertical-align: middle;
}

.players-table-wrapper::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.players-table-wrapper::-webkit-scrollbar-track {
    background: #2a3138;
}

.players-table-wrapper::-webkit-scrollbar-thumb {
    background: #ffd966;
    border-radius: 4px;
}

.players-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffd44d;
}

.player-name-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    max-width: 100%;
}

.player-name-text {
    color: #ffd966;
    font-weight: 500;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
    vertical-align: middle;
}

.player-right-elements {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    flex-shrink: 0;
}

.player-clan-tag {
    color: #64b5f6;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    background: rgba(100, 181, 246, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.battle-name-indicator {
    font-size: 14px;
    color: #ffd966;
    cursor: help;
    opacity: 0.8;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 217, 102, 0.15);
    border: 1px solid rgba(255, 217, 102, 0.3);
    border-radius: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}

.battle-name-indicator:hover {
    opacity: 1;
    background: rgba(255, 217, 102, 0.3);
    border-color: #ffd966;
    transform: scale(1.05);
}

.vehicles-details {
    background: linear-gradient(180deg, rgba(19, 32, 60, 0.88) 0%, rgba(13, 23, 44, 0.84) 100%);
    border: 1px solid rgba(113, 163, 230, 0.3);
    box-shadow: inset 0 1px 0 rgba(188, 220, 255, 0.06);
    width: 100%;
    overflow-x: auto;
}

.vehicles-header {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 1fr 1.5fr 1.5fr 0.8fr 1.5fr 1.5fr;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(24, 37, 68, 0.9);
    color: #c2d7ef;
    font-weight: 600;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(113, 163, 230, 0.34);
    min-width: 1000px;
}

.vehicles-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 1fr 1.5fr 1.5fr 0.8fr 1.5fr 1.5fr;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 27, 50, 0.82);
    color: #d3e3f2;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(97, 140, 197, 0.24);
    min-width: 1000px;
}

.vehicles-row:nth-child(even) {
    background: rgba(18, 30, 56, 0.8);
}

.vehicles-row:last-child {
    border-bottom: none;
}

.vehicles-row:hover {
    background: rgba(24, 39, 69, 0.92);
}

.vehicles-row .vehicle-name {
    color: #8ecbff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicles-row .damage-stat {
    color: #8ecbff;
    font-weight: 500;
}

.vehicles-row .survived {
    color: #4caf50;
}

.vehicles-row .died {
    color: #ff8a8a;
}

.vehicles-row .win {
    color: #4caf50;
    font-weight: 500;
}

.vehicles-row .loss {
    color: #ff8a8a;
    font-weight: 500;
}

.vehicles-row .draw {
    color: #b0bec5;
    font-weight: 500;
}

.vehicles-row .stat-percent {
    color: #64b5f6;
    font-size: 0.7rem;
}

.team-tabs {
    display: flex;
    gap: 0;
    background: #1a1f24;
    border: 1px solid #2a3138;
    margin-bottom: var(--layout-gap);
}

.team-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #9aa7b2;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    border-right: 1px solid #2a3138;
}

.team-tab:last-child {
    border-right: none;
}

.team-tab.active[data-team="friendly"] {
    background: #1e3a5f;
    color: #ffffff;
    border-bottom: 3px solid #4a90e2;
}

.team-tab.active[data-team="enemy"] {
    background: #5f1e1e;
    color: #ffffff;
    border-bottom: 3px solid #ff8a8a;
}

.team-tab:hover:not(.active) {
    color: #ffd966;
    background: #1f262c;
}

.action-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: var(--layout-gap);
}

.download-btn {
    background: #ffd966;
    color: #0a0c0f;
    border: 1px solid rgba(255, 217, 102, 0.3);
    padding: 14px 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.download-btn i {
    font-size: 16px;
    color: #0a0c0f;
}

.download-btn:hover {
    background: #ffd44d;
    box-shadow: 0 4px 12px rgba(255, 217, 102, 0.3);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

.reset-btn {
    background: transparent;
    color: #ff8a8a;
    border: 1px solid #3f4d5a;
    padding: 14px 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.reset-btn i {
    font-size: 16px;
    color: #ff8a8a;
}

.reset-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff8a8a;
    transform: translateY(-1px);
}

.reset-btn:hover i {
    color: #ff8a8a;
}

.reset-btn:active {
    transform: translateY(0);
}

#loading {
    display: none;
}

#loading.is-active {
    display: flex;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #ffd966;
    font-size: 1.2rem;
    background: linear-gradient(180deg, rgba(20, 30, 57, 0.84) 0%, rgba(14, 21, 40, 0.8) 100%);
    border: 1px solid rgba(113, 163, 230, 0.26);
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 14px 32px rgba(4, 10, 22, 0.3);
}

.loading-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.loading .spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(126, 196, 255, 0.25);
    border-top-color: #8ecbff;
    border-right-color: #8ecbff;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    flex-shrink: 0;
}

.loading-text {
    font-weight: 500;
    letter-spacing: 0.01em;
}

.loading-text::after {
    content: "...";
    display: inline-block;
    width: 1.2em;
    text-align: left;
    overflow: hidden;
    vertical-align: bottom;
    animation: loadingDots 1.3s steps(4, end) infinite;
}

#content {
    margin-top: var(--layout-gap);
}

.loading::before {
    content: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes loadingDots {
    0% { width: 0; }
    100% { width: 1.2em; }
}

.site-logo-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.site-logo-link:hover {
    color: #ffd966;
}

.site-logo-img {
    display: block;
    width: auto;
    height: 50px;
    max-width: min(240px, 72vw);
    flex-shrink: 0;
}

.site-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    background-image: url('/assets/icons/logo-header.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(116, 246, 200, 0.18), 0 0 22px rgba(54, 224, 255, 0.22);
}

.site-logo-text {
    display: inline-block;
    line-height: 1.1;
}

.cms-public-page .header {
    margin-bottom: 0;
}

.cms-public-page .cms-page-main {
    padding-top: var(--layout-gap);
    padding-bottom: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor {
    padding: 0;
    white-space: normal;
    font-size: 1rem;
    line-height: 1.42;
}

.cms-public-page .cms-page-article-inner.ql-editor p {
    margin-top: 0;
    margin-bottom: 0.35em;
}

.cms-public-page .cms-page-article-inner.ql-editor p:last-child {
    margin-bottom: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor > p,
.cms-public-page .cms-page-article-inner.ql-editor > ul,
.cms-public-page .cms-page-article-inner.ql-editor > ol,
.cms-public-page .cms-page-article-inner.ql-editor > h2,
.cms-public-page .cms-page-article-inner.ql-editor > h3,
.cms-public-page .cms-page-article-inner.ql-editor > h4,
.cms-public-page .cms-page-article-inner.ql-editor > blockquote,
.cms-public-page .cms-page-article-inner.ql-editor > pre {
    margin-bottom: 0.45em;
}

.cms-public-page .cms-page-article-inner.ql-editor > p:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > ul:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > ol:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > h2:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > h3:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > h4:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > blockquote:last-child,
.cms-public-page .cms-page-article-inner.ql-editor > pre:last-child {
    margin-bottom: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 1em;
    margin-bottom: 0.35em;
    line-height: 1.28;
}

.cms-public-page .cms-page-article-inner.ql-editor h2:first-child {
    margin-top: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8eef2;
    margin-top: 0.85em;
    margin-bottom: 0.28em;
    line-height: 1.32;
}

.cms-public-page .cms-page-article-inner.ql-editor h3:first-child {
    margin-top: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor li > p {
    margin-bottom: 0.25em;
}

.cms-public-page .cms-page-article-inner.ql-editor li > p:last-child {
    margin-bottom: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor ol,
.cms-public-page .cms-page-article-inner.ql-editor ul {
    margin-top: 0;
    margin-bottom: 0.35em;
    padding-left: 1.5em;
}

.cms-public-page .cms-page-article-inner.ql-editor li > ol,
.cms-public-page .cms-page-article-inner.ql-editor li > ul {
    margin-top: 0.2em;
    margin-bottom: 0;
    padding-left: 1.5em;
}

.cms-public-page .cms-page-article-inner.ql-editor li {
    margin-bottom: 0.2em;
    line-height: 1.42;
}

.cms-public-page .cms-page-article-inner.ql-editor li:last-child {
    margin-bottom: 0;
}

.cms-public-page .cms-page-article-inner.ql-editor li:not(.ql-direction-rtl)::before {
    margin-right: 1ch;
}

.cms-public-page .cms-page-article-inner.ql-editor li.ql-direction-rtl::before {
    margin-left: 1ch;
}

.cms-public-page h1.cms-page-title {
    display: block;
    margin: 0 0 var(--layout-gap);
    padding: 0;
    font-size: 1.85rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.cms-public-page h1.cms-page-title::before {
    display: none;
    content: none;
}

.page-bottom-spacer {
    flex: 1 1 auto;
    min-height: 0;
}

footer {
    position: relative;
    text-align: center;
    margin-top: var(--layout-gap);
    flex-shrink: 0;
    color: #5f6c7a;
    font-size: 0.9rem;
    line-height: 1.75;
    padding-bottom: var(--layout-gap-sm);
    border-top: none;
}

.footer-axis {
    position: relative;
    margin: -4px 0 14px;
    padding-right: 0;
}

.footer-axis-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid rgba(120, 173, 236, 0.58);
}

.footer-axis-ticks {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 0;
    position: relative;
}

.footer-axis-tick {
    position: relative;
    padding-top: 12px;
    text-align: center;
    color: rgba(122, 166, 221, 0.62);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 10px;
    letter-spacing: 0.02em;
}

.footer-axis-tick::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 1px;
    height: 8px;
    background: rgba(114, 185, 255, 0.56);
}

.page-404 .error-page {
    padding: var(--layout-gap) 0 calc(var(--layout-gap) * 2);
    min-height: 42vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-404 .error-page-inner {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.page-404 .error-page-code {
    margin: 0 0 var(--layout-gap-sm);
    font-size: clamp(4rem, 14vw, 6.5rem);
    font-weight: 700;
    line-height: 1;
    color: #ffd966;
    letter-spacing: -0.04em;
    opacity: 0.95;
}

.page-404 .error-page-title {
    margin: 0 0 var(--layout-gap-sm);
    padding: 0;
    font-size: 1.65rem;
    font-weight: 600;
    color: #e8eef2;
    letter-spacing: -0.02em;
    line-height: 1.3;
    display: block;
}

.page-404 .error-page-title::before {
    display: none;
    content: none;
}

.page-404 .error-page-text {
    margin: 0 0 var(--layout-gap);
    color: #9aa7b2;
    font-size: 1rem;
    line-height: 1.6;
}

.page-404 .error-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.page-404 .error-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-404 .error-page-link--primary {
    background: #ffd966;
    color: #0a0c0f;
    border: 1px solid rgba(255, 217, 102, 0.3);
}

.page-404 .error-page-link--primary:hover {
    background: #ffe08a;
    color: #0a0c0f;
}

.page-404 .error-page-link:not(.error-page-link--primary) {
    background: transparent;
    color: #9aa7b2;
    border: 1px solid #2a3138;
}

.page-404 .error-page-link:not(.error-page-link--primary):hover {
    color: #e8eef2;
    border-color: #ffd966;
}

.site-footer-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 0;
}

.site-footer-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    position: relative;
}

.site-footer-menu {
    position: relative;
    flex-shrink: 0;
}

.site-footer-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(120, 173, 236, 0.58);
    border-radius: 9px;
    background: rgba(10, 16, 34, 0.72);
    color: #d8e8ff;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(114, 185, 255, 0.08);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-footer-menu-toggle:hover,
.site-footer-menu-toggle:focus-visible {
    color: #8ecbff;
    border-color: rgba(114, 185, 255, 0.78);
    box-shadow: 0 0 12px rgba(100, 181, 246, 0.22);
    outline: none;
}

.site-footer-menu.is-open .site-footer-menu-toggle {
    color: #8ecbff;
    border-color: rgba(114, 185, 255, 0.85);
    background: rgba(18, 28, 52, 0.95);
    box-shadow: 0 0 14px rgba(100, 181, 246, 0.28);
}

.site-footer-menu-bars {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.site-footer-nav--dropdown {
    display: flex;
    position: static;
    z-index: auto;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.site-footer-menu-toggle {
    display: none;
}

.site-footer-nav--dropdown .site-footer-nav-link {
    display: inline;
    padding: 0;
    text-align: left;
    white-space: normal;
}

.site-footer-nav--dropdown .site-footer-nav-link:hover {
    background: transparent;
}

.site-footer-menu.is-open .site-footer-nav--dropdown {
    display: flex;
}

.site-footer-nav--dropdown[hidden] {
    display: none !important;
}

.site-footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin-bottom: calc(var(--layout-gap) / 2);
    flex-wrap: wrap;
}

.site-lang-switch-footer {
    margin-left: 0;
    justify-content: center;
    flex-wrap: nowrap;
}

.site-footer-nav-link {
    color: #9aa7b2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.site-footer-nav-link:hover {
    color: #ffd966;
}

.footer-links {
    margin-bottom: calc(var(--layout-gap) / 2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 900px) {
    .site-footer-top {
        justify-content: center;
    }

    .site-footer-toolbar {
        flex-wrap: nowrap;
        justify-content: center;
    }

    .site-lang-switch-footer {
        margin-left: 0;
    }
}

@media (max-width: 680px) {
    .site-footer-toolbar {
        position: relative;
        width: 100%;
    }

    .site-footer-menu {
        position: static;
    }

    .site-footer-menu-toggle {
        display: inline-flex;
    }

    .site-footer-nav--dropdown {
        display: none;
        position: absolute;
        left: 50%;
        right: auto;
        bottom: calc(100% + 10px);
        z-index: 30;
        min-width: min(280px, calc(100vw - 32px));
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0;
        padding: 6px 0;
        background: rgba(12, 18, 36, 0.98);
        border: 1px solid rgba(120, 173, 236, 0.58);
        border-radius: 10px;
        box-shadow:
            0 14px 36px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(114, 185, 255, 0.1),
            inset 0 1px 0 rgba(114, 185, 255, 0.06);
        transform: translateX(-50%);
    }

    .site-footer-menu.is-open .site-footer-nav--dropdown {
        display: flex;
    }

    .site-footer-nav--dropdown .site-footer-nav-link {
        display: block;
        padding: 10px 16px;
        text-align: center;
        white-space: nowrap;
    }

    .site-footer-nav--dropdown .site-footer-nav-link:hover {
        background: rgba(54, 224, 255, 0.08);
    }
}

@media (max-width: 420px) {
    .footer-links {
        gap: 4px;
    }

    .footer-links .social-link {
        padding: 7px 7px;
    }

    .footer-links .social-link i {
        font-size: 15px;
    }
}

.footer-text {
    color: #5f6c7a;
}

.footer-text--legal {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.82rem;
    line-height: 1.55;
}

.footer-text--legal-disclaimer {
    margin-top: 8px;
    font-size: 0.76rem;
    line-height: 1.5;
    opacity: 0.92;
}

.social-link {
    color: #9aa7b2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #1a1f24;
    border: 1px solid #2a3138;
    font-size: 0.95rem;
    line-height: 1;
}

.social-link i {
    margin-right: 6px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.social-link:hover {
    color: #ffffff;
    background: #1f262c;
    border-color: #ffd966;
    transform: translateY(-1px);
}

.separator {
    color: #2a3138;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 1.2rem;
    margin: 0 2px;
}

.text-muted {
    color: #5f6c7a;
}

.border-top {
    border-top: 1px solid #2a3138;
}

.border-bottom {
    border-bottom: 1px solid #2a3138;
}

.bg-dark {
    background: #14181c;
}

.bg-darker {
    background: #1a1f24;
}

@media (max-width: 1200px) {
    .sort-group {
        min-width: 300px;
    }

    .map-group {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--layout-gap-sm);
    }

    h1 {
        font-size: 1.8rem;
        gap: 12px;
    }

    h1::before {
        display: none;
    }

    .files-error-wrapper {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    #errorContainer {
        min-width: auto;
        width: 100%;
    }

    .files-header,
    #errorContainer .error-header {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .files-header {
        color: #4caf50;
    }

    .files-content,
    #errorContainer .error-content {
        padding: 8px;
    }

    .files-list-container,
    .error-files-list {
        height: calc(5 * 36px);
    }

    .file-item,
    .error-file-item {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .file-name {
        font-size: 0.7rem;
        color: #4caf50;
    }

    .file-map {
        font-size: 0.65rem;
        padding: 1px 6px;
        color: #4caf50;
    }

    .delete-file {
        font-size: 14px;
        padding: 3px 6px;
    }

    .error-copy-btn {
        padding: 3px 6px;
        font-size: 10px;
    }

    .filter-header {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .filter-content {
        padding: 16px;
    }

    .filter-row {
        flex-direction: column;
        gap: 20px;
    }

    .filter-group {
        min-width: auto;
        width: 100%;
    }

    .sort-group {
        min-width: 100%;
    }

    .map-group {
        min-width: 100%;
    }

    .players-filter-group {
        min-width: 100%;
    }

    .dropdown-content {
        max-height: 250px;
    }

    .players-list-container {
        max-height: 300px;
    }

    .players-list {
        max-height: 200px;
    }

    .players-list-header {
        padding: 8px 10px;
    }

    .players-list-title {
        font-size: 0.8rem;
    }

    .players-action-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    .players-search-input {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .player-checkbox-label {
        flex-wrap: wrap;
        gap: 4px;
    }

    .player-checkbox-name {
        width: 100%;
        font-size: 0.8rem;
    }

    .player-checkbox-clan {
        font-size: 0.7rem;
        padding: 1px 4px;
    }

    .battles-badge {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    .battles-badge::before {
        content: "Б: ";
    }

    .map-tags {
        gap: 6px;
        margin: 12px 0 16px 0;
    }

    .map-tag {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .checkbox-label {
        padding: 8px;
    }

    .columns-grid {
        max-height: 250px;
    }

    .columns-actions {
        flex-direction: column;
        gap: 6px;
    }

    .columns-action-btn {
        width: 100%;
    }

    .team-tabs {
        flex-direction: column;
    }

    .team-tab {
        border-right: none;
        border-bottom: 1px solid #2a3138;
    }

    .team-tab:last-child {
        border-bottom: none;
    }

    .players-table {
        font-size: 0.65rem;
        min-width: 900px;
    }

    .players-table th,
    .players-table td {
        padding: 6px 4px;
        font-size: 0.65rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .download-btn, .reset-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-links {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: auto;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .separator {
        display: none;
    }

    .social-link {
        width: auto;
        justify-content: center;
        padding: 8px 9px;
        font-size: 0;
        min-width: 0;
        flex: 0 0 auto;
    }

    .social-link-label {
        display: none;
    }

    .social-link i {
        margin-right: 0;
        font-size: 16px;
    }

    .vehicles-header,
    .vehicles-row {
        grid-template-columns: 1.5fr 0.8fr 0.6fr 0.8fr 1.2fr 1.2fr 0.6fr 1.2fr;
        font-size: 0.7rem;
        gap: 4px;
        padding: 8px;
        min-width: 600px;
    }

    .player-name-text {
        max-width: 150px;
        font-size: 0.65rem;
    }

    .player-clan-tag {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .battle-name-indicator {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }

    .player-name-container {
        gap: 4px;
    }

    .player-right-elements {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--layout-gap-xs);
    }

    h1 {
        font-size: 1.5rem;
        gap: 10px;
    }

    h1::before {
        display: none;
    }

    .upload-area {
        padding: 32px 20px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .upload-text {
        font-size: 16px;
    }

    .files-header,
    #errorContainer .error-header {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .files-header {
        color: #4caf50;
    }

    .files-list-container,
    .error-files-list {
        height: calc(5 * 32px);
    }

    .file-item,
    .error-file-item {
        min-height: 32px;
        padding: 4px 8px;
    }

    .file-name {
        color: #4caf50;
    }

    .file-map {
        color: #4caf50;
    }

    .filter-header {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .filter-content {
        padding: 12px;
    }

    .map-tag {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .dropdown-search-input {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .players-search-input {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .players-list-container {
        max-height: 250px;
    }

    .players-list {
        max-height: 180px;
    }

    .players-table {
        min-width: 800px;
        font-size: 0.6rem;
    }

    .players-table th,
    .players-table td {
        font-size: 0.6rem;
        padding: 4px 2px;
    }

    .vehicles-header,
    .vehicles-row {
        grid-template-columns: 1.5fr 0.8fr 0.6fr 0.8fr 1.2fr 1.2fr 0.6fr 1.2fr 1.2fr;
        font-size: 0.7rem;
        gap: 4px;
        padding: 8px;
        min-width: 800px;
    }

    .footer-text {
        font-size: 0.8rem;
        padding: 0 8px;
    }

    .player-name-text {
        max-width: 120px;
        font-size: 0.6rem;
    }

    .player-clan-tag {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    .battle-name-indicator {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .badge {
        padding: 1px 6px;
        font-size: 0.7rem;
    }

    .columns-grid {
        max-height: 200px;
    }
}

.search-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
    background: #1a1f24;
    border: 1px dashed #2a3138;
}

.search-no-results i {
    color: #ffd966;
    font-size: 1rem;
}

.empty-table-message-wrapper {
    position: relative;
    height: 200px;
    padding: 0 !important;
    background: #1a1f24;
    overflow: hidden;
}

.empty-table-message-centered {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1f24;
    width: 100vw;
    min-width: 100vw;
    margin-left: calc(-50vw + 50%);
    pointer-events: none;
}

.empty-table-message-content {
    color: #9aa7b2;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    pointer-events: none;
}

.empty-table-hint {
    font-size: 0.85rem;
    color: #5f6c7a;
    margin-top: 5px;
}

.empty-icon-centered {
    font-size: 3rem;
    color: #3f4d5a;
    margin-bottom: 15px;
    display: block;
}

.empty-table-row {
    cursor: default;
}

.empty-table-row td {
    background: #1a1f24;
}

.empty-table-row:hover td {
    background: #1a1f24;
}

.wgsrt-tooltip {
    border-bottom: 2px dotted #ffd966;
    cursor: help;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--layout-gap);
    flex-wrap: wrap;
    gap: 16px;
    min-height: var(--site-header-height);
    box-sizing: border-box;
    padding: var(--site-header-pad-top) var(--site-header-pad-x) var(--site-header-pad-bottom);
    border: 1px solid rgba(125, 184, 255, 0.18);
    border-bottom: 1px solid rgba(125, 184, 255, 0.38);
    background: linear-gradient(180deg, rgba(17, 34, 67, 0.62) 0%, rgba(12, 22, 44, 0.35) 100%);
    backdrop-filter: blur(4px);
    box-shadow:
        0 14px 40px rgba(4, 9, 18, 0.35),
        inset 0 1px 0 rgba(202, 228, 255, 0.08),
        0 1px 0 rgba(125, 184, 255, 0.12);
    position: relative;
    z-index: 50;
    overflow: visible;
}

.header::after {
    content: '';
    position: absolute;
    left: var(--site-header-pad-x);
    right: var(--site-header-pad-x);
    bottom: -1px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(125, 184, 255, 0.55) 18%,
        rgba(125, 184, 255, 0.55) 82%,
        transparent 100%
    );
    pointer-events: none;
}

.header h1 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header h1.site-heading {
    align-items: flex-start;
}

.site-heading-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    overflow: visible;
}

.site-law-help-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.site-law-help-wrap[hidden] {
    display: none;
}

.site-law-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(202, 228, 255, 0.72);
    font-size: 1.05rem;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
}

.site-law-help:hover,
.site-law-help:focus-visible {
    color: #ffd966;
    outline: none;
}

.site-law-help-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: max-content;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(125, 184, 255, 0.28);
    border-radius: 8px;
    background: rgba(12, 22, 44, 0.96);
    box-shadow: 0 10px 28px rgba(4, 9, 18, 0.45);
    color: rgba(232, 240, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.site-law-help-tip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(125, 184, 255, 0.28);
}

.site-law-help-tip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% - 1px);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(12, 22, 44, 0.96);
}

.site-law-help-tip-line {
    display: block;
    white-space: nowrap;
}

.site-law-help-wrap.is-open .site-law-help-tip,
.site-law-help-wrap:hover .site-law-help-tip,
.site-law-help-wrap:focus-within .site-law-help-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.header h1 .version {
    font-size: 1rem;
    color: #ffd966;
    background: rgba(255, 217, 102, 0.1);
    padding: 4px 8px;
    border: 1px solid rgba(255, 217, 102, 0.3);
    font-weight: 400;
    letter-spacing: normal;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 12px;
    flex: 1;
    min-width: 0;
    align-self: stretch;
}

.site-header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 18px;
    margin-right: 14px;
}

.site-header-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: stretch;
    margin: -14px -18px -16px 0;
    padding: 14px 18px 16px;
    border-left: 1px solid rgba(125, 184, 255, 0.24);
}

.site-header-logout-form {
    display: flex;
    margin: 0;
    padding: 0;
}

.site-header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(125, 184, 255, 0.28);
    background: rgba(17, 34, 67, 0.45);
    color: #9aa7b2;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
}

.site-header-icon-btn i {
    font-size: 15px;
}

.site-header-icon-btn:hover {
    color: #e8eef2;
    border-color: rgba(125, 184, 255, 0.45);
    background: rgba(24, 45, 82, 0.55);
}

.site-header-icon-btn--logout:hover {
    color: #ffcdd2;
    border-color: rgba(229, 115, 115, 0.55);
    background: rgba(58, 24, 35, 0.35);
}

.site-header-nav a {
    color: #9aa7b2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-header-nav a:hover {
    color: #ffd966;
}

.site-lang-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-lang-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9aa7b2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-lang-link.is-active {
    color: #ffd966;
}

.site-lang-link:hover {
    color: #e8eef2;
}

.site-lang-flag {
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 2px;
    flex-shrink: 0;
}

.header-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.header-social-link {
    color: #9aa7b2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 1.35em;
    height: 1.35em;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.header-social-link i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
}

.header-social-link:hover {
    color: #e8eef2;
    transform: translateY(-1px);
}

.footer-text .version {
    color: #ffd966;
    font-weight: 500;
}

.footer-text .footer-author-link {
    text-decoration: none;
}

.footer-text .footer-author-link:hover {
    color: #8ecbff;
}

@media (max-width: 1024px) {
    .header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 10px 10px;
        padding: var(--site-header-pad-top) var(--site-header-pad-x);
        min-height: auto;
    }

    .header h1.site-heading {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        align-self: center;
        align-items: center;
    }

    .site-heading-main {
        min-width: 0;
        max-width: 100%;
        overflow: visible;
    }

    .site-logo-link {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .site-logo-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-right {
        display: contents;
    }

    .site-header-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        flex: none;
        order: unset;
        justify-content: flex-start;
        margin-right: 0;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(125, 184, 255, 0.14);
        gap: 8px 14px;
    }

    .site-law-help-wrap {
        position: static;
    }

    .header h1.site-heading,
    .page-auth-profile .profile-panel__head {
        position: relative;
    }

    .site-law-help-tip {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        min-width: 0;
        box-sizing: border-box;
        transform: translateY(4px);
    }

    .site-law-help-tip-line {
        white-space: normal;
    }

    .site-law-help-tip::before,
    .site-law-help-tip::after {
        display: none;
    }

    .site-law-help-wrap.is-open .site-law-help-tip,
    .site-law-help-wrap:hover .site-law-help-tip,
    .site-law-help-wrap:focus-within .site-law-help-tip {
        transform: translateY(0);
    }

    .site-lang-switch {
        grid-column: 2;
        grid-row: 1;
        order: unset;
        gap: 10px;
        justify-self: end;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .site-header-auth {
        grid-column: 3;
        grid-row: 1;
        order: unset;
        margin: 0;
        padding: 0;
        border-left: none;
        justify-content: center;
        align-self: center;
        flex-shrink: 0;
    }

    .header-controls {
        align-self: flex-end;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header-x64-promo {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        z-index: auto;
        max-width: none;
        pointer-events: auto;
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: end;
        width: auto;
    }

    .site-header-nav {
        grid-row: 3;
    }
}

@media (max-width: 680px) {
    .header {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        gap: 8px 10px;
    }

    .header--no-nav:not(:has(.header-x64-promo)) h1.site-heading {
        justify-self: center;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .header--no-nav:not(:has(.header-x64-promo)) .site-heading-main,
    .header--no-nav:not(:has(.header-x64-promo)) .site-logo-link {
        justify-content: center;
    }

    .header--no-nav:has(.header-x64-promo) h1.site-heading {
        justify-self: start;
        width: auto;
        justify-content: flex-start;
    }

    .header--no-nav:has(.header-x64-promo) .site-heading-main,
    .header--no-nav:has(.header-x64-promo) .site-logo-link {
        justify-content: flex-start;
    }

    .header h1.site-heading {
        grid-column: 1 / -1;
        grid-row: 1;
        max-width: none;
        min-width: 0;
        justify-self: start;
    }

    .header:has(.header-x64-promo) h1.site-heading {
        grid-column: 1;
        justify-self: start;
    }

    .site-heading-main,
    .site-logo-link,
    .site-logo-text {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .header:has(.header-x64-promo) .site-heading-main,
    .header:has(.header-x64-promo) .site-logo-link {
        min-width: 0;
        max-width: 100%;
    }

    .header:has(.header-x64-promo) .site-logo-img {
        height: 36px;
        max-width: min(46vw, 148px);
    }

    .site-lang-switch {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .site-header-auth {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        padding: 0;
    }

    .site-header-nav {
        grid-row: 3;
        padding-top: 8px;
    }

    .header-x64-promo {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        width: auto;
        max-width: min(50vw, 168px);
        min-width: 0;
    }

    .header-x64-promo .x64-promo-header {
        max-width: 100%;
        height: auto;
        min-height: 32px;
    }

    .header-x64-promo .x64-promo-header-brand {
        padding: 0 6px;
    }

    .header-x64-promo .x64-promo-header-logo {
        height: 10px;
        max-width: 24px;
    }

    .header-x64-promo .x64-promo-header-copy {
        padding: 5px 7px 5px 6px;
    }

    .header-x64-promo .x64-promo-header-kicker {
        font-size: 0.42rem;
        letter-spacing: 0.08em;
    }

    .header-x64-promo .x64-promo-header-text--long {
        display: none;
    }

    .header-x64-promo .x64-promo-header-text--short {
        display: block;
        font-size: 0.58rem;
        line-height: 1.05;
    }
}

@media (max-width: 768px) {
    body::before {
        background-size: 32px 32px;
        opacity: 0.18;
    }

    .ambient-widget {
        min-width: 92px;
        padding: 5px 8px;
        font-size: 10px;
        opacity: 0.18;
    }

    :root {
        --site-header-pad-top: 12px;
        --site-header-pad-bottom: 12px;
        --site-header-pad-x: 14px;
    }

    .header {
        gap: 10px 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header-x64-promo .x64-promo-header {
        height: auto;
        min-height: 0;
        font-size: 0.68rem;
        font-weight: 600;
        color: #9aa7b2;
        background: #1a1f24;
        border: 1px solid #2a3138;
        box-shadow: none;
    }

    .header-x64-promo .x64-promo-header-accent {
        flex: 0 0 2px;
        box-shadow: none;
    }

    .header-x64-promo .x64-promo-header-brand {
        padding: 0 7px;
        border-right: 1px solid rgba(125, 184, 255, 0.12);
    }

    .header-x64-promo .x64-promo-header-logo {
        height: 11px;
        max-width: 26px;
    }

    .header-x64-promo .x64-promo-header-copy {
        gap: 0;
        padding: 6px 10px 6px 8px;
    }

    .header-x64-promo .x64-promo-header-kicker {
        font-size: 0.46rem;
        letter-spacing: 0.1em;
        color: rgba(255, 176, 130, 0.78);
    }

    .header-x64-promo .x64-promo-header-text {
        font-size: 0.66rem;
        font-weight: 600;
        color: #c8d2dc;
        line-height: 1.05;
    }
}

@media (max-width: 480px) {
    .header {
        backdrop-filter: blur(2px);
        gap: 8px 8px;
    }

    .site-logo-link {
        gap: 8px;
    }

    :root {
        --site-header-inner-height: 36px;
    }

    .header:has(.header-x64-promo) .site-logo-img {
        height: 30px;
        max-width: min(40vw, 118px);
    }

    .header-x64-promo {
        max-width: min(54vw, 152px);
    }

    .header-x64-promo .x64-promo-header-kicker {
        display: none;
    }

    .header-x64-promo .x64-promo-header-copy {
        padding: 4px 6px 4px 5px;
    }

    .header-x64-promo .x64-promo-header-text--short {
        font-size: 0.52rem;
    }

    .site-logo-img {
        height: 40px;
        max-width: min(200px, 76vw);
    }

    .site-logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .header h1 {
        font-size: 1.5rem;
        flex-wrap: wrap;
    }

    .header h1 .version {
        font-size: 0.85rem;
        padding: 3px 6px;
    }

    .site-lang-link {
        font-size: 0.88rem;
        gap: 6px;
    }

    .site-header-icon-btn {
        width: 34px;
        height: 34px;
    }

    .site-header-nav {
        padding-top: 8px;
    }

    .site-header-nav a {
        font-size: 0.88rem;
    }
}

.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-banner {
    max-width: 350px;
    padding: 15px;
    background: #14181c;
    border: 1px solid #2a3138;
    border-left-width: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.notification-banner.priority-0 { border-left-color: #4caf50; }
.notification-banner.priority-1 { border-left-color: #ffd966; }
.notification-banner.priority-2 { border-left-color: #ff8a8a; }

.notification-banner-title {
    font-weight: 600;
    color: #ffd966;
    margin-bottom: 5px;
}

.notification-banner-content {
    color: #e8eef2;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wgsrt-very-bad {
    color: #ff4444 !important;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.wgsrt-bad {
    color: #ff8844 !important;
    font-weight: bold;
}

.wgsrt-average {
    color: #ffdd44 !important;
    font-weight: bold;
}

.wgsrt-good {
    color: #44ff44 !important;
    font-weight: bold;
}

.wgsrt-excellent {
    color: #44ddff !important;
    font-weight: bold;
}

.wgsrt-professional {
    color: #aa44ff !important;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(170,68,255,0.5);
}

.wgsrt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: var(--layout-gap-xs) var(--layout-gap-sm);
    background: #1a1f24;
    border: 1px solid #2a3138;
    margin-bottom: var(--layout-gap);
    font-size: 0.75rem;
    justify-content: center;
}

.wgsrt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: help;
}

.wgsrt-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.wgsrt-legend-color.very-bad { background: #ff4444; }
.wgsrt-legend-color.bad { background: #ff8844; }
.wgsrt-legend-color.average { background: #ffdd44; }
.wgsrt-legend-color.good { background: #44ff44; }
.wgsrt-legend-color.excellent { background: #44ddff; }
.wgsrt-legend-color.professional { background: #aa44ff; }

.wgsrt-legend-text {
    color: #e8eef2;
}

.wgsrt-legend-value {
    color: #9aa7b2;
    font-size: 0.7rem;
}

.wgsrt-tooltip {
    border-bottom: 2px dotted #ffd966;
    cursor: help;
}

@media (max-width: 768px) {
    .wgsrt-legend {
        gap: 8px;
        padding: 8px 12px;
    }

    .wgsrt-legend-item {
        font-size: 0.65rem;
    }

    .wgsrt-legend-color {
        width: 12px;
        height: 12px;
    }
}

:root {
    --ui-bg-1: rgba(20, 30, 57, 0.84);
    --ui-bg-2: rgba(14, 21, 40, 0.8);
    --ui-bg-3: rgba(24, 37, 68, 0.9);
    --ui-border: rgba(113, 163, 230, 0.26);
    --ui-border-strong: rgba(126, 184, 255, 0.44);
    --ui-text-main: #dbe9f7;
    --ui-text-dim: #9bb0c5;
    --ui-accent: #ffd966;
    --ui-accent-2: #74f6c8;
    --ui-danger: #ff9b9b;
    --ui-shadow: 0 14px 32px rgba(4, 10, 22, 0.32), inset 0 1px 0 rgba(188, 220, 255, 0.08);
}

.upload-area,
.save-replay-consent,
.filters-panel,
.files-list,
#errorContainer,
.players-table-container,
.loading,
.wgsrt-legend,
.players-list-container,
.columns-filter,
.team-tabs {
    background: linear-gradient(180deg, var(--ui-bg-1) 0%, var(--ui-bg-2) 100%);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
    color: var(--ui-text-main);
}

.files-header,
#errorContainer .error-header,
.filter-header,
.players-list-header,
.players-table th,
.team-tab {
    background: rgba(24, 37, 68, 0.88);
    border-color: rgba(113, 163, 230, 0.28);
}

.download-btn,
.reset-btn,
.players-action-btn,
.columns-action-btn,
.players-show-btn,
.map-tag,
.team-tab,
.site-lang-link,
.site-header-nav a,
.site-footer-nav-link,
.social-link {
    transition: all 0.2s ease;
}

.download-btn {
    background: linear-gradient(180deg, #ffe08a 0%, #ffd966 100%);
    border-color: rgba(255, 217, 102, 0.5);
    color: #0a0c0f;
}

.download-btn:hover {
    background: linear-gradient(180deg, #ffe6a8 0%, #ffd44d 100%);
    box-shadow: 0 6px 18px rgba(255, 217, 102, 0.35);
}

.reset-btn {
    color: var(--ui-danger);
    border-color: rgba(255, 155, 155, 0.45);
    background: rgba(58, 24, 35, 0.28);
}

.reset-btn:hover {
    background: rgba(255, 107, 107, 0.14);
    border-color: rgba(255, 155, 155, 0.72);
}

.filter-select,
.dropdown-search-input,
.players-search-input,
.min-battles-control .number-wrapper,
.min-battles-control .number-wrapper .number-input,
.save-replay-slider,
.upload-text span,
.site-menu-table input[type="text"] {
    background: rgba(15, 25, 47, 0.82);
    border-color: rgba(97, 140, 197, 0.38);
    color: var(--ui-text-main);
}

.filter-select:focus,
.dropdown-search-input:focus,
.players-search-input:focus,
.min-battles-control .number-wrapper:focus-within {
    border-color: var(--ui-accent);
    box-shadow: 0 0 0 2px rgba(255, 217, 102, 0.18);
}

.filter-label,
.players-list-title,
.min-battles-control label,
.upload-format-hint,
.save-replay-consent-hint,
.footer-text,
.wgsrt-legend-value {
    color: var(--ui-text-dim);
}

.players-table-wrapper {
    border-color: rgba(113, 163, 230, 0.34);
}

.players-table th {
    color: #c2d7ef;
    border-bottom: 1px solid rgba(113, 163, 230, 0.36);
    border-right: 1px solid rgba(97, 140, 197, 0.3);
}

.players-table td {
    background: rgba(16, 27, 50, 0.8);
    border-bottom: 1px solid rgba(97, 140, 197, 0.22);
    border-right: 1px solid rgba(97, 140, 197, 0.2);
    color: #d3e3f2;
}

.players-table tbody tr:hover td {
    background: rgba(24, 39, 69, 0.92);
}

.players-table th:first-child,
.players-table td:first-child {
    background: rgba(20, 33, 60, 0.96);
    border-right: 1px solid rgba(113, 163, 230, 0.4);
}

.badge,
.filter-badge,
.file-map,
.player-clan-tag {
    border-radius: 6px;
    border: 1px solid rgba(114, 185, 255, 0.35);
    background: rgba(25, 42, 74, 0.7);
}

.map-tag.active,
.team-tab.active,
.players-show-btn.active {
    background: linear-gradient(180deg, #ffe08a 0%, #ffd966 100%);
    color: #0a0c0f;
    border-color: rgba(255, 217, 102, 0.6);
}

.site-header-nav a,
.site-footer-nav-link,
.site-lang-link {
    color: #a9bfd6;
}

.site-header-nav a:hover,
.site-footer-nav-link:hover,
.site-lang-link:hover {
    color: #f0f7ff;
}

.site-lang-link.is-active {
    color: var(--ui-accent);
}

footer {
    color: #92a8bf;
}

@media (max-width: 768px) {
    .upload-area,
    .players-table-container,
    .filters-panel,
    .files-list,
    #errorContainer {
        box-shadow: 0 10px 22px rgba(4, 10, 22, 0.26);
    }
}

:root {
    --ui-accent: #64b5f6;
    --ui-accent-strong: #4a90e2;
    --ui-accent-soft: rgba(100, 181, 246, 0.2);
}

.files-list-container {
    background: linear-gradient(180deg, rgba(16, 27, 50, 0.82) 0%, rgba(12, 20, 38, 0.8) 100%);
    border: 1px solid rgba(97, 140, 197, 0.34);
    scrollbar-color: #64b5f6 rgba(42, 49, 56, 0.9);
}

.files-list-container::-webkit-scrollbar-thumb {
    background: #64b5f6;
}

.files-list-container::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

.map-tag {
    background: rgba(19, 31, 58, 0.86);
    border: 1px solid rgba(97, 140, 197, 0.34);
    color: #b9cde4;
}

.map-tag:hover {
    border-color: #64b5f6;
    color: #d9ebff;
    background: rgba(24, 39, 69, 0.95);
}

.map-tag.active {
    background: linear-gradient(180deg, #7ec4ff 0%, #64b5f6 100%);
    border-color: #64b5f6;
    color: #07121f;
}

.download-btn,
.columns-action-btn:hover,
.players-action-btn:hover,
.players-show-btn.active,
.team-tab.active,
.site-lang-link.is-active {
    background: linear-gradient(180deg, #7ec4ff 0%, #64b5f6 100%);
    border-color: #64b5f6;
    color: #07121f;
}

.download-btn:hover {
    background: linear-gradient(180deg, #9bd2ff 0%, #74beff 100%);
    box-shadow: 0 6px 18px rgba(100, 181, 246, 0.34);
}

.reset-btn,
.columns-action-btn,
.players-action-btn,
.players-show-btn,
.team-tab {
    border-color: rgba(97, 140, 197, 0.42);
    color: #c5daf1;
    background: rgba(18, 30, 56, 0.74);
}

.columns-action-btn:hover,
.players-action-btn:hover,
.players-show-btn:hover,
.team-tab:hover:not(.active) {
    border-color: #64b5f6;
    color: #dff0ff;
    background: rgba(30, 51, 89, 0.9);
}

.upload-text span,
.filter-badge,
.badge,
.battles-badge,
.battle-name-indicator,
.player-name-text,
.players-list-title,
.filter-header,
.wgsrt-tooltip {
    color: #8ecbff;
    border-color: rgba(100, 181, 246, 0.42);
}

.upload-text span,
.filter-badge,
.badge,
.battles-badge,
.battle-name-indicator {
    background: rgba(100, 181, 246, 0.14);
}

:root {
    --ui-accent: #64b5f6;
    --ui-accent-2: #64b5f6;
    --ui-danger: #64b5f6;
}

.upload-icon,
.upload-text span,
.files-header,
.file-name,
.file-map,
.filter-header,
.filter-expand-icon,
.players-list-title,
.players-action-btn,
.players-show-btn:hover,
.players-show-btn.active,
.player-checkbox-name,
.battles-badge,
.selected-count,
.map-tag:hover,
.map-tag.active,
.players-table th:hover,
.players-table th.sorted-asc,
.players-table th.sorted-desc,
.player-row .expand-icon,
.player-name-text,
.battle-name-indicator,
.loading,
.site-logo-link:hover,
.site-header-nav a:hover,
.site-footer-nav-link:hover,
.footer-text .version,
.search-no-results i,
.wgsrt-tooltip,
.notification-banner-title {
    color: #8ecbff;
}

.download-btn,
.download-btn:hover,
.page-404 .error-page-link--primary,
.page-404 .error-page-link--primary:hover {
    background: linear-gradient(180deg, #7ec4ff 0%, #64b5f6 100%);
    border-color: rgba(100, 181, 246, 0.62);
    color: #07121f;
    box-shadow: 0 6px 18px rgba(100, 181, 246, 0.3);
}

.reset-btn,
.reset-btn i,
.reset-btn:hover,
.reset-btn:hover i,
.delete-file,
.delete-file:hover,
#errorContainer .error-header,
.error-copy-btn,
.error-copy-btn:hover,
.error-copy-btn.copied,
.error-badge,
.notification-banner.priority-2,
.notification-banner.priority-1,
.notification-banner.priority-0 {
    color: #8ecbff;
    border-color: rgba(100, 181, 246, 0.46);
}

.reset-btn:hover,
.delete-file:hover,
.error-copy-btn:hover,
.error-file-item:hover,
#errorContainer {
    background: rgba(24, 39, 69, 0.28);
}

.files-list-container,
.error-files-list,
.players-list,
.columns-grid,
.players-table-wrapper {
    scrollbar-color: #64b5f6 #2a3138;
}

.error-files-list::-webkit-scrollbar-thumb,
.dropdown-content::-webkit-scrollbar-thumb,
.players-list::-webkit-scrollbar-thumb,
.columns-grid::-webkit-scrollbar-thumb,
.players-table-wrapper::-webkit-scrollbar-thumb {
    background: #64b5f6;
}

.error-files-list::-webkit-scrollbar-thumb:hover,
.dropdown-content::-webkit-scrollbar-thumb:hover,
.players-list::-webkit-scrollbar-thumb:hover,
.columns-grid::-webkit-scrollbar-thumb:hover,
.players-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

.site-lang-link,
.site-lang-link.is-active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.site-lang-flag {
    box-shadow: none !important;
    background-color: transparent !important;
}

.map-tag.active {
    background: rgba(44, 79, 128, 0.92) !important;
    color: #e6f2ff !important;
    border-color: rgba(126, 196, 255, 0.72) !important;
}

.min-battles-control .number-wrapper .number-input,
.min-battles-control .number-controls button {
    color: #8ecbff;
}

.min-battles-control .number-wrapper:focus-within {
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.18);
}

.min-battles-control .number-controls button:hover {
    background: rgba(100, 181, 246, 0.16);
    color: #b8deff;
}

.checkbox-label input[type="checkbox"],
.player-checkbox-label input[type="checkbox"],
.save-replay-switch input[type="checkbox"] + .save-replay-slider {
    accent-color: #64b5f6;
}

.save-replay-switch input[type="checkbox"]:checked + .save-replay-slider {
    background: rgba(100, 181, 246, 0.25);
    border-color: #64b5f6;
}

.save-replay-switch input[type="checkbox"]:checked + .save-replay-slider::before {
    background: #64b5f6;
}

.site-lang-link.is-active {
    color: #8ecbff !important;
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.35);
    border-bottom: none !important;
}

.social-link,
.header-social-link {
    color: #a9bfd6;
}

.social-link {
    background: rgba(18, 30, 56, 0.72);
    border: 1px solid rgba(97, 140, 197, 0.42);
}

.social-link:hover,
.header-social-link:hover {
    color: #8ecbff;
    background: rgba(30, 51, 89, 0.88);
    border-color: #64b5f6;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.2);
}

.page-abs .container {
    gap: var(--layout-gap);
}

.page-abs .header {
    margin-bottom: 0;
}

.page-abs .upload-area,
.page-abs .save-replay-consent,
.page-abs .loading {
    margin-top: 0;
    margin-bottom: 0;
}

.page-abs #content {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    margin-top: 0;
    margin-bottom: 0;
}

.page-abs .page-bottom-spacer {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
}

.page-abs:not(:has(#content:not(.hidden))) .page-bottom-spacer {
    display: block;
}

.page-abs footer {
    margin-top: 0;
}

.page-abs:not(:has(#content:not(.hidden))) footer {
    margin-top: var(--layout-gap);
}

.page-abs .files-error-wrapper,
.page-abs #errorContainer,
.page-abs .files-list,
.page-abs #filtersContainer,
.page-abs .players-table-container,
.page-abs .filters-panel {
    margin-top: 0;
    margin-bottom: 0;
}

.page-abs .action-buttons {
    margin-top: 0;
}

.page-landing .header {
    margin-bottom: 0;
}

.page-landing .container {
    gap: var(--layout-gap);
}

.page-landing .page-bottom-spacer {
    display: none;
}

.page-landing footer {
    margin-top: auto;
}

.page-landing .projects-landing {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.page-landing .projects-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--layout-gap);
    align-items: stretch;
}

.page-landing .projects-grid > .project-card {
    grid-column: span 6;
}

.page-landing .projects-grid > .project-card.project-card--span-2 {
    grid-column: span 6;
}

.page-landing .projects-grid > .project-card.project-card--span-1 {
    grid-column: span 3;
}

.page-landing .projects-grid > .project-card.project-card--span-4 {
    grid-column: span 12;
}

.page-landing .project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 260px;
    min-height: 260px;
    max-height: 260px;
    padding: 22px 24px 20px;
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    overflow: hidden;
    isolation: isolate;
}

.page-landing .project-card-bg-icon {
    position: absolute;
    right: -8px;
    bottom: -16px;
    font-size: 7.5rem;
    line-height: 1;
    color: rgba(142, 203, 255, 0.07);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: rotate(-8deg);
}

.page-landing .project-card-body,
.page-landing .project-card-footer {
    position: relative;
    z-index: 1;
}

.page-landing .project-card--active:hover .project-card-bg-icon {
    color: rgba(142, 203, 255, 0.1);
}

.page-landing .project-card--disabled .project-card-bg-icon {
    color: rgba(140, 148, 162, 0.06);
}

.page-landing .project-card--active:hover {
    border-color: rgba(100, 181, 246, 0.55);
    box-shadow: 0 8px 28px rgba(54, 120, 200, 0.18);
    transform: translateY(-2px);
}

.page-landing .project-card--disabled {
    background: linear-gradient(180deg, rgba(28, 32, 42, 0.72) 0%, rgba(22, 26, 36, 0.68) 100%);
    border-color: rgba(90, 98, 112, 0.35);
    color: rgba(160, 168, 182, 0.72);
    cursor: not-allowed;
    user-select: none;
    filter: grayscale(0.85);
    opacity: 0.72;
}

.status-badge,
.page-landing .project-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    padding: 3px 7px;
    font-size: 0.54rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(180, 186, 198, 0.9);
    background: rgba(55, 60, 72, 0.85);
    border: 1px solid rgba(100, 108, 122, 0.45);
}

.page-landing .project-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.page-landing .project-card-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
}

.page-landing .project-card-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    min-height: 1.15rem;
    width: 100%;
}

.page-landing .project-card-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.28rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.page-landing .project-card-icon {
    flex: 0 0 auto;
    width: 1.25rem;
    margin-top: 0.12rem;
    font-size: 1.15rem;
    line-height: 1;
    color: #8ecbff;
    text-align: center;
}

.page-landing .project-card-title-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 1.6rem;
}

.page-landing .project-card-badge {
    flex: 0 0 auto;
    max-width: 100%;
    text-align: left;
}

.page-landing .project-card-badge--test {
    color: #ffb4b4;
    background: rgba(88, 28, 36, 0.88);
    border-color: rgba(220, 90, 100, 0.55);
}

.page-landing .project-card-badge--wg {
    color: rgba(210, 214, 222, 0.95);
    background: rgba(16, 18, 24, 0.95);
    border-color: rgba(58, 62, 72, 0.75);
}

.page-landing .project-card-badge--inactive {
    color: rgba(140, 148, 162, 0.72);
    background: rgba(40, 44, 52, 0.72);
    border-color: rgba(80, 88, 100, 0.35);
    filter: grayscale(0.85);
    opacity: 0.72;
}

.page-landing .project-card-badge--active.project-card-badge--wg {
    color: rgba(210, 214, 222, 0.95);
    background: rgba(16, 18, 24, 0.95);
    border-color: rgba(58, 62, 72, 0.75);
    filter: none;
    opacity: 1;
}

.page-landing .project-card-badge--lesta {
    color: #ffffff;
    background: rgba(30, 136, 229, 0.92);
    border-color: rgba(100, 181, 246, 0.65);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
    white-space: normal;
    max-width: 11rem;
    text-align: center;
}

.page-wotmods .project-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    font-size: 0.54rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(180, 186, 198, 0.9);
    background: rgba(55, 60, 72, 0.85);
    border: 1px solid rgba(100, 108, 122, 0.45);
}

.page-wotmods .project-card-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
}

.page-wotmods .project-card-badge--wg {
    color: rgba(210, 214, 222, 0.95);
    background: rgba(16, 18, 24, 0.95);
    border-color: rgba(58, 62, 72, 0.75);
}

.page-wotmods .project-card-badge--lesta {
    color: #ffffff;
    background: rgba(30, 136, 229, 0.92);
    border-color: rgba(100, 181, 246, 0.65);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
    white-space: normal;
    max-width: 11rem;
    text-align: center;
}

.page-landing .project-card-badge--cs2 {
    color: #f0c060;
    background: rgba(27, 40, 56, 0.92);
    border-color: rgba(222, 155, 53, 0.55);
}

.page-landing .project-card-badge--dota2 {
    color: #f08a7a;
    background: rgba(58, 14, 10, 0.92);
    border-color: rgba(194, 60, 42, 0.55);
}

.page-landing .project-card-badge--minecraft {
    color: #9bd2ff;
    background: rgba(12, 28, 48, 0.92);
    border-color: rgba(54, 224, 255, 0.45);
}

.page-landing .project-card-badge--survival {
    color: #b8f5c8;
    background: rgba(18, 48, 32, 0.92);
    border-color: rgba(76, 175, 80, 0.5);
}

.page-landing .project-card-badge--pvp {
    color: #ffc9a8;
    background: rgba(56, 24, 12, 0.92);
    border-color: rgba(255, 120, 72, 0.55);
}

.page-landing .project-card-badge--vip {
    color: #ffe08a;
    background: rgba(48, 36, 8, 0.92);
    border-color: rgba(255, 193, 7, 0.55);
}

.page-landing .project-card-badge--classic {
    color: #d0d8e2;
    background: rgba(34, 40, 48, 0.92);
    border-color: rgba(120, 132, 148, 0.45);
}

.page-landing .project-card-badge--beta {
    color: #d8c4ff;
    background: rgba(36, 20, 56, 0.92);
    border-color: rgba(156, 120, 255, 0.5);
}

.page-landing .project-card-badge--new {
    color: #9ef0d2;
    background: rgba(12, 44, 40, 0.92);
    border-color: rgba(54, 224, 180, 0.5);
}

.page-landing .project-card--disabled .project-card-icon {
    color: rgba(140, 148, 162, 0.85);
}

.page-landing .project-card--disabled .project-card-title {
    color: rgba(175, 182, 194, 0.85);
}

.page-landing .project-card-desc {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(175, 200, 228, 0.78);
    min-height: 4.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.page-landing .project-card--disabled .project-card-desc {
    color: rgba(140, 148, 162, 0.65);
}

.page-landing .project-card-footer {
    flex: 0 0 28px;
    min-height: 28px;
    display: flex;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 12px;
}

.page-landing .project-card-footer--actions {
    flex-wrap: wrap;
    gap: 8px 20px;
}

.page-landing .project-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8ecbff;
    text-decoration: none;
}

.page-landing .project-card-action:hover {
    color: #b8deff;
}

.page-landing .project-card-action--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.page-landing .project-card--active:hover .project-card-action {
    color: #b8deff;
}

.page-landing .x64-promo-card {
    border-color: rgba(255, 120, 50, 0.28);
}

.page-landing .x64-promo-card:hover {
    border-color: rgba(255, 140, 70, 0.45);
}

.page-landing .x64-promo-card .project-card-action {
    color: #ff9f6a;
}

.page-landing .x64-promo-card:hover .project-card-action {
    color: #ffb88a;
}

.page-landing .x64-promo-badge {
    color: #ffb48a;
    border-color: rgba(255, 140, 70, 0.35);
    background: rgba(255, 120, 50, 0.08);
}

.page-landing .x64-promo-card .project-card-title {
    align-items: center;
    line-height: 1.25;
}

.page-landing .x64-promo-card .project-card-title-text {
    display: block;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.page-landing .x64-promo-logo {
    width: auto;
    height: 1.25em;
    max-width: 3.4em;
    margin: 0;
    align-self: center;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 0 8px rgba(255, 140, 70, 0.18));
}

.page-landing .x64-promo-bg-logo {
    position: absolute;
    right: -18px;
    bottom: -10px;
    width: min(58%, 220px);
    height: auto;
    opacity: 0.1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: rotate(-8deg);
    object-fit: contain;
}

@media (min-width: 1025px) {
    .header-x64-promo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 3;
        max-width: min(48vw, 320px);
        pointer-events: none;
    }
}

.header-x64-promo .x64-promo-header {
    pointer-events: auto;
}

.x64-promo-header {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    justify-content: flex-start;
    width: auto;
    min-width: 38px;
    height: 40px;
    padding: 0;
    gap: 0;
    border-radius: 0;
    border: 1px solid rgba(125, 184, 255, 0.24);
    background:
        linear-gradient(180deg, rgba(20, 36, 68, 0.92) 0%, rgba(12, 22, 44, 0.82) 100%);
    color: #e8eef2;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(202, 228, 255, 0.08),
        0 8px 22px rgba(4, 9, 18, 0.22);
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.x64-promo-header-accent {
    flex: 0 0 3px;
    align-self: stretch;
    background: linear-gradient(180deg, #ffb36a 0%, #ff7a3d 100%);
    box-shadow: 0 0 12px rgba(255, 140, 70, 0.35);
}

.x64-promo-header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-right: 1px solid rgba(125, 184, 255, 0.14);
}

.x64-promo-header-copy {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1px;
    padding: 0 12px 0 10px;
    min-width: 0;
    text-align: left;
}

.x64-promo-header-kicker {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 176, 130, 0.82);
    line-height: 1;
}

.x64-promo-header:hover,
.x64-promo-header:focus-visible {
    color: #ffffff;
    border-color: rgba(125, 184, 255, 0.42);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(202, 228, 255, 0.12),
        0 10px 24px rgba(4, 9, 18, 0.28),
        0 0 0 1px rgba(255, 140, 70, 0.12);
}

.x64-promo-header:hover .x64-promo-header-accent,
.x64-promo-header:focus-visible .x64-promo-header-accent {
    box-shadow: 0 0 16px rgba(255, 140, 70, 0.5);
}

.x64-promo-header-logo {
    width: auto;
    height: 17px;
    max-width: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.x64-promo-header-text {
    line-height: 1.1;
    color: #f4f7fb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.x64-promo-header-text--short {
    display: none;
}

.footer-links .x64-promo-header--footer {
    height: auto;
    min-height: 0;
    min-width: 0;
    padding: 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: #9aa7b2;
    background: #1a1f24;
    border: 1px solid #2a3138;
    box-shadow: none;
    text-align: left;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.footer-links .x64-promo-header--footer .x64-promo-header-accent {
    flex: 0 0 2px;
    box-shadow: none;
}

.footer-links .x64-promo-header--footer .x64-promo-header-brand {
    padding: 0 7px;
    border-right: 1px solid rgba(125, 184, 255, 0.12);
}

.footer-links .x64-promo-header--footer .x64-promo-header-logo {
    height: 11px;
    max-width: 26px;
}

.footer-links .x64-promo-header--footer .x64-promo-header-copy {
    gap: 0;
    padding: 6px 10px 6px 8px;
    align-items: flex-start;
    text-align: left;
}

.footer-links .x64-promo-header--footer .x64-promo-header-kicker {
    font-size: 0.46rem;
    letter-spacing: 0.1em;
    color: rgba(255, 176, 130, 0.78);
    text-align: left;
}

.footer-links .x64-promo-header--footer .x64-promo-header-text {
    font-size: 0.66rem;
    font-weight: 600;
    color: #c8d2dc;
    line-height: 1.05;
    text-align: left;
}

.footer-links .x64-promo-header--footer:hover,
.footer-links .x64-promo-header--footer:focus-visible {
    color: #ffffff;
    background: #1f262c;
    border-color: #ffd966;
    transform: translateY(-1px);
    box-shadow: none;
}

.footer-links .x64-promo-header--footer:hover .x64-promo-header-text,
.footer-links .x64-promo-header--footer:focus-visible .x64-promo-header-text {
    color: #ffffff;
}

.footer-links .x64-promo-header--footer:hover .x64-promo-header-accent,
.footer-links .x64-promo-header--footer:focus-visible .x64-promo-header-accent {
    box-shadow: none;
}

@media (max-width: 1200px) {
    .page-landing .projects-grid > .project-card {
        grid-column: span 6;
    }

    .page-landing .projects-grid > .project-card.project-card--span-2 {
        grid-column: span 6;
    }

    .page-landing .projects-grid > .project-card.project-card--span-1 {
        grid-column: span 3;
    }

    .page-landing .projects-grid > .project-card.project-card--span-4 {
        grid-column: span 12;
    }
}

@media (max-width: 640px) {
    .page-landing .projects-grid > .project-card,
    .page-landing .projects-grid > .project-card.project-card--span-1,
    .page-landing .projects-grid > .project-card.project-card--span-2,
    .page-landing .projects-grid > .project-card.project-card--span-4 {
        grid-column: span 12;
    }

    .page-landing .project-card {
        height: 248px;
        min-height: 248px;
        max-height: 248px;
    }
}

.page-online .online-service {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.page-online .online-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 16px;
}

.page-online .online-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 14px;
}

.page-online .online-header-actions .online-cache-note {
    margin: 0;
    white-space: nowrap;
}

.page-online .online-cache-note {
    margin: 0;
    color: rgba(160, 180, 210, 0.85);
    font-size: 0.88rem;
}

.page-online .online-cache-stale {
    color: rgba(255, 183, 77, 0.92);
}

.page-online .online-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--layout-gap);
    align-items: start;
}

.page-online .online-stats-column,
.page-online .online-charts-column {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
}

.page-online .online-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 20px 22px;
}

.page-online .online-charts-column {
    position: sticky;
    top: 16px;
}

.page-online .online-section-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.page-online .online-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-online .online-summary-card {
    padding: 14px 16px;
    background: rgba(12, 20, 38, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.22);
}

.page-online .online-summary-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: rgba(175, 200, 228, 0.78);
}

.page-online .online-summary-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #8ecbff;
}

.page-online .online-charts-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-online .online-charts-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
}

.page-online .online-charts-head .online-section-title {
    margin: 0;
}

.page-online .online-chart-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(113, 163, 230, 0.24);
    background: rgba(11, 19, 36, 0.7);
}

.page-online .online-chart-range-btn {
    border: 0;
    background: transparent;
    color: rgba(170, 198, 228, 0.88);
    font-size: 0.78rem;
    line-height: 1;
    padding: 6px 9px;
    cursor: pointer;
}

.page-online .online-chart-range-btn:hover {
    color: #ffffff;
    background: rgba(70, 121, 187, 0.18);
}

.page-online .online-chart-range-btn.is-active {
    color: #e9f5ff;
    background: rgba(89, 155, 232, 0.24);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.34);
}

.page-online .online-charts-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-online .online-chart-card {
    padding: 12px 14px 10px;
    background: rgba(12, 20, 38, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.22);
}

.page-online .online-chart-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(220, 232, 248, 0.95);
}

.page-online .online-chart-wrap {
    position: relative;
    height: 240px;
}

.page-online .online-clusters {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-online .online-cluster-card {
    background: rgba(12, 20, 38, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.22);
    overflow: hidden;
}

.page-online .online-cluster-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.18);
}

.page-online .online-cluster-card.is-collapsed .online-cluster-head {
    border-bottom: none;
}

.page-online .online-cluster-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.page-online .online-cluster-toggle:hover .online-cluster-title {
    color: #b8deff;
}

.page-online .online-cluster-chevron {
    flex: 0 0 auto;
    width: 0.85rem;
    font-size: 0.8rem;
    color: rgba(142, 203, 255, 0.9);
    transition: transform 0.18s ease;
}

.page-online .online-cluster-card.is-collapsed .online-cluster-chevron {
    transform: rotate(-90deg);
}

.page-online .online-cluster-card.is-collapsed .online-cluster-body {
    display: none;
}

.page-online .online-cluster-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

.page-online .online-cluster-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.9rem;
}

.page-online .online-cluster-online {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.page-online .online-cluster-online-value {
    font-weight: 700;
    color: #8ecbff;
}

.page-online .online-cluster-online-label {
    font-weight: 300;
    color: rgba(175, 200, 228, 0.75);
}

.page-online .online-cluster-body {
    min-width: 0;
}

.page-online .online-table-wrap {
    overflow-x: auto;
    min-width: 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.page-online .online-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.page-online .online-table th,
.page-online .online-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(113, 163, 230, 0.12);
}

.page-online .online-table th {
    color: rgba(175, 200, 228, 0.72);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-online .online-table td {
    color: rgba(220, 232, 248, 0.92);
}

.page-online .online-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.page-online .online-status-pill.is-good {
    color: #b9f6ca;
    background: rgba(46, 125, 50, 0.28);
    border: 1px solid rgba(102, 187, 106, 0.45);
}

.page-online .online-status-pill.is-minor {
    color: #ffe082;
    background: rgba(255, 160, 0, 0.2);
    border: 1px solid rgba(255, 183, 77, 0.45);
}

.page-online .online-status-pill.is-major,
.page-online .online-status-pill.is-offline {
    color: #ffab91;
    background: rgba(198, 40, 40, 0.22);
    border: 1px solid rgba(239, 83, 80, 0.45);
}

.page-online .online-cluster-api {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 0;
}

.page-online .online-cluster-api-label {
    flex: 0 0 auto;
    min-width: 28px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(175, 200, 228, 0.72);
}

.page-online .online-server-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px;
}

.page-online .online-server-card {
    padding: 10px 12px;
    background: rgba(8, 14, 28, 0.42);
    border: 1px solid rgba(113, 163, 230, 0.16);
}

.page-online .online-server-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.page-online .online-server-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #66bb6a;
    box-shadow: 0 0 0 2px rgba(102, 187, 106, 0.22);
}

.page-online .online-server-dot.is-minor {
    background: #ffca28;
    box-shadow: 0 0 0 2px rgba(255, 202, 40, 0.22);
}

.page-online .online-server-dot.is-major,
.page-online .online-server-dot.is-offline {
    background: #ef5350;
    box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.22);
}

.page-online .online-server-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.page-online .online-server-name {
    font-weight: 600;
    color: rgba(236, 244, 255, 0.96);
}

.page-online .online-server-online {
    font-size: 0.86rem;
    color: rgba(175, 200, 228, 0.78);
}

.page-online .online-server-rec {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b9f6ca;
}

.page-online .online-server-rec.is-minor {
    color: #ffe082;
}

.page-online .online-server-rec.is-major,
.page-online .online-server-rec.is-offline {
    color: #ffab91;
}

.page-online .online-uptime-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.page-online .online-uptime-bar {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: 1px;
    min-width: 0;
    height: 10px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
}

.page-online .online-uptime-bar.is-empty {
    background: rgba(255, 255, 255, 0.06);
}

.page-online .online-uptime-seg {
    flex: 1 1 0;
    min-width: 3px;
    background: #43a047;
}

.page-online .online-uptime-seg.is-good {
    background: #43a047;
}

.page-online .online-uptime-seg.is-dip {
    background: #ffb300;
}

.page-online .online-uptime-seg.is-issue {
    background: #fb8c00;
}

.page-online .online-uptime-seg.is-down {
    background: #e53935;
}

.page-online .online-uptime-seg.is-latest {
    flex: 2.5 1 0;
    min-width: 12px;
}

.page-online .online-uptime-seg.is-latest.is-good {
    background: #66bb6a;
    box-shadow: 0 0 0 1px rgba(129, 199, 132, 0.75), 0 0 8px rgba(102, 187, 106, 0.45);
}

.page-online .online-uptime-label {
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.62);
    white-space: nowrap;
}

.page-online .online-empty {
    padding: 28px;
    text-align: center;
    color: rgba(175, 200, 228, 0.82);
    border: 1px dashed rgba(113, 163, 230, 0.35);
}

@media (max-width: 1100px) {
    .page-online .online-dashboard {
        grid-template-columns: 1fr;
    }

    .page-online .online-charts-column {
        position: static;
    }

    .page-online .online-charts-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-online .online-chart-wrap {
        height: 260px;
    }
}

@media (max-width: 640px) {
    .page-online .online-summary-grid,
    .page-online .online-charts-grid {
        grid-template-columns: 1fr;
    }

    .page-online .online-panel {
        padding: 16px;
    }

    .page-online .online-table-wrap {
        overflow-x: visible;
    }

    .page-online .online-table {
        display: block;
        width: 100%;
        font-size: 0.85rem;
    }

    .page-online .online-table thead {
        display: none;
    }

    .page-online .online-table tbody {
        display: block;
    }

    .page-online .online-table tr {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(113, 163, 230, 0.12);
    }

    .page-online .online-table tr:last-child {
        border-bottom: none;
    }

    .page-online .online-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0;
        border-bottom: none;
        text-align: right;
    }

    .page-online .online-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: rgba(175, 200, 228, 0.72);
        text-align: left;
        flex: 0 0 auto;
    }

    .page-online .online-table td:first-child {
        display: block;
        padding: 0 0 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(113, 163, 230, 0.1);
        font-size: 0.95rem;
        font-weight: 700;
        color: #ffffff;
        text-align: left;
    }

    .page-online .online-table td:first-child::before {
        display: none;
    }

    .page-online .online-status-pill {
        flex-shrink: 0;
    }
}

.page-recruiting .recruiting-service {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.recruiting-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
}

.recruiting-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.recruiting-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

.recruiting-section-hint {
    margin: 8px 0 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.recruiting-cta-btn,
.recruiting-back-link,
.recruiting-submit-btn,
.recruiting-search-btn,
.recruiting-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.recruiting-cta-btn:hover,
.recruiting-back-link:hover,
.recruiting-submit-btn:hover:not(:disabled),
.recruiting-search-btn:hover,
.recruiting-page-btn:hover:not(:disabled) {
    border-color: #64b5f6;
    color: #b8deff;
}

.recruiting-cta-btn {
    justify-content: center;
    align-self: center;
    text-align: center;
    line-height: 1.25;
    min-height: 44px;
    box-sizing: border-box;
}

.recruiting-cta-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.recruiting-back-link {
    flex: 0 0 auto;
    background: rgba(10, 18, 36, 0.55);
}

.recruiting-filters {
    padding: 14px 16px;
}

.recruiting-filters-toolbar {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto minmax(0, 2fr);
    gap: 10px 12px;
    align-items: end;
}

.recruiting-filters-field {
    display: grid;
    grid-template-rows: auto 38px;
    gap: 4px;
    align-content: end;
    min-width: 0;
}

.recruiting-filters-toolbar .recruiting-select-trigger,
.recruiting-filters-toolbar .recruiting-realm-tabs {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;
}

.recruiting-filters-toolbar .recruiting-search-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
    height: 38px;
}

.recruiting-filters-toolbar .recruiting-select-trigger {
    padding: 8px 12px;
    font-size: 0.92rem;
}

.recruiting-filters-toolbar .recruiting-realm-tabs {
    min-height: 38px;
    align-items: stretch;
    border-color: rgba(113, 163, 230, 0.35);
}

.recruiting-filters-toolbar .recruiting-realm-tab {
    min-width: 48px;
    padding: 0 12px;
    font-size: 0.92rem;
    align-self: stretch;
}

.recruiting-filters-toolbar .recruiting-search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 8px 12px;
    font-size: 0.92rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.recruiting-filters-toolbar .recruiting-search-btn {
    flex: 0 0 auto;
    align-self: auto;
    min-height: 38px;
    height: 38px;
    max-height: 38px;
    padding: 8px 12px;
    font-size: 0.92rem;
    white-space: nowrap;
    box-sizing: border-box;
}

.recruiting-filters-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recruiting-filter-label {
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.recruiting-select,
.recruiting-text-input,
.recruiting-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #e8eef2;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.recruiting-select-wrap {
    position: relative;
    width: 100%;
}

.recruiting-select-wrap.is-open {
    z-index: 130;
}

.recruiting-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.recruiting-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(15, 25, 47, 0.88);
    color: #e8eef2;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.recruiting-select-trigger.is-placeholder .recruiting-select-trigger-label {
    color: rgba(154, 167, 178, 0.88);
}

.recruiting-select-trigger:hover {
    border-color: rgba(100, 181, 246, 0.62);
    background: rgba(18, 32, 58, 0.92);
}

.recruiting-select-wrap.is-open .recruiting-select-trigger,
.recruiting-select-trigger:focus-visible {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.18);
}

.recruiting-select-trigger-icon {
    font-size: 0.72rem;
    color: #64b5f6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.recruiting-select-wrap.is-open .recruiting-select-trigger-icon {
    transform: rotate(180deg);
}

.recruiting-select-menu {
    display: none;
    position: absolute;
    z-index: 120;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(113, 163, 230, 0.38);
    background: linear-gradient(180deg, rgba(18, 30, 56, 0.98) 0%, rgba(12, 22, 44, 0.98) 100%);
    box-shadow: 0 18px 36px rgba(4, 10, 22, 0.45), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(15, 25, 47, 0.8);
}

.recruiting-select-wrap.is-open .recruiting-select-menu {
    display: block;
}

.recruiting-select-menu::-webkit-scrollbar {
    width: 8px;
}

.recruiting-select-menu::-webkit-scrollbar-track {
    background: rgba(15, 25, 47, 0.8);
}

.recruiting-select-menu::-webkit-scrollbar-thumb {
    background: rgba(100, 181, 246, 0.45);
    border-radius: 4px;
}

.recruiting-select-option {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid rgba(113, 163, 230, 0.12);
    background: transparent;
    color: rgba(232, 238, 242, 0.92);
    font-size: 0.96rem;
    font-family: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.recruiting-select-option:last-child {
    border-bottom: none;
}

.recruiting-select-option:hover,
.recruiting-select-option:focus-visible {
    outline: none;
    color: #ffffff;
    background: rgba(30, 51, 89, 0.72);
}

.recruiting-select-option.is-active {
    color: #ffffff;
    background: rgba(30, 58, 95, 0.92);
    box-shadow: inset 3px 0 0 #64b5f6;
}

.recruiting-select-option--placeholder {
    color: rgba(154, 167, 178, 0.88);
}

.recruiting-select:focus,
.recruiting-text-input:focus,
.recruiting-textarea:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.18);
}

.recruiting-textarea {
    resize: vertical;
    min-height: 160px;
}

.recruiting-realm-tabs {
    display: flex;
    gap: 0;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.55);
    width: fit-content;
    flex-wrap: wrap;
}

.recruiting-realm-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 10px 16px;
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-right: 1px solid rgba(113, 163, 230, 0.22);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, background 0.2s ease;
}

.recruiting-realm-tab:last-child {
    border-right: none;
}

.recruiting-realm-tab:hover {
    color: #b8deff;
    background: rgba(30, 51, 89, 0.45);
}

.recruiting-realm-tab.is-active {
    color: #ffffff;
    background: rgba(30, 58, 95, 0.88);
    box-shadow: inset 0 -2px 0 #64b5f6;
}

.recruiting-search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

.recruiting-search-input {
    flex: 1 1 220px;
    min-width: 0;
    width: auto;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background-color: rgba(10, 18, 36, 0.65);
    color: #e8eef2;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.recruiting-search-input::placeholder {
    color: rgba(154, 167, 178, 0.72);
}

.recruiting-search-input:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.18);
}

.recruiting-search-input:-webkit-autofill,
.recruiting-search-input:-webkit-autofill:hover,
.recruiting-search-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 18, 36, 0.65) inset;
    -webkit-text-fill-color: #e8eef2;
    caret-color: #e8eef2;
    transition: background-color 99999s ease-out 0s;
}

.recruiting-search-input::-webkit-search-decoration,
.recruiting-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.recruiting-search-btn {
    flex-shrink: 0;
    align-self: stretch;
    min-height: 46px;
}

.recruiting-list-status,
.recruiting-form-status {
    margin-bottom: 12px;
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.9rem;
}

.recruiting-list-status.is-error,
.recruiting-form-status.is-error {
    color: #ff9eb0;
}

.recruiting-form-status.is-success {
    color: #8de4b0;
}

.recruiting-post-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.recruiting-post-list:has(.recruiting-post-column) {
    flex-direction: row;
    align-items: flex-start;
}

.recruiting-post-column {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recruiting-list-empty {
    margin: 0;
    color: rgba(175, 200, 228, 0.75);
    flex: 1 1 100%;
    text-align: center;
    padding: 32px 16px;
}

.recruiting-list-loading {
    margin: 0;
    color: rgba(175, 200, 228, 0.75);
    flex: 1 1 100%;
    text-align: center;
    padding: 32px 16px;
}

.recruiting-post-card {
    box-sizing: border-box;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid rgba(113, 163, 230, 0.24);
    background: rgba(10, 18, 36, 0.42);
}

.recruiting-post-card-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recruiting-post-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px 14px;
}

.recruiting-post-author,
.recruiting-post-date {
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.84rem;
    line-height: 1.4;
}

.recruiting-post-date {
    color: rgba(175, 200, 228, 0.65);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.recruiting-post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recruiting-post-badges--bottom {
    margin-top: 0;
}

.recruiting-post-card .recruiting-type-badge,
.recruiting-post-card .recruiting-realm-badge {
    border-radius: 4px;
}

.recruiting-type-badge,
.recruiting-realm-badge,
.recruiting-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.recruiting-type-badge {
    border: 1px solid rgba(113, 163, 230, 0.35);
    color: rgba(175, 200, 228, 0.95);
    background: rgba(30, 51, 89, 0.55);
}

.recruiting-type-badge--clan-seeks {
    border-color: rgba(100, 181, 246, 0.45);
    color: #b8deff;
}

.recruiting-type-badge--team-seeks {
    border-color: rgba(129, 199, 132, 0.45);
    color: #b9f6ca;
}

.recruiting-type-badge--player-clan {
    border-color: rgba(255, 183, 77, 0.45);
    color: #ffe082;
}

.recruiting-type-badge--player-team {
    border-color: rgba(186, 104, 200, 0.45);
    color: #e1bee7;
}

.recruiting-realm-badge {
    border: 1px solid rgba(113, 163, 230, 0.28);
    color: rgba(142, 203, 255, 0.9);
    background: rgba(10, 18, 36, 0.5);
}

.recruiting-post-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.35;
}

.recruiting-post-excerpt,
.recruiting-post-body-full {
    margin-top: 10px;
    color: rgba(200, 214, 232, 0.9);
    font-size: 0.94rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.recruiting-post-toggle {
    display: block;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: #8ecbff;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.recruiting-post-toggle:hover {
    color: #b8deff;
    text-decoration: underline;
}

.recruiting-post-card-foot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(113, 163, 230, 0.16);
    color: rgba(175, 200, 228, 0.82);
    font-size: 0.84rem;
    line-height: 1.45;
}

.recruiting-post-card-foot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 16px;
    width: 100%;
}

.recruiting-post-meta-item--clan {
    flex: 0 1 auto;
    min-width: 0;
}

.recruiting-clan-tag-link {
    color: #8ecbff;
    text-decoration: none;
    font-weight: 600;
}

.recruiting-clan-tag-link:hover,
.recruiting-clan-tag-link:focus-visible {
    color: #ffd966;
    outline: none;
}

.recruiting-post-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 14px;
    flex: 0 1 auto;
    min-width: 0;
}

.recruiting-post-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8ecbff;
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.35;
    word-break: break-word;
}

.recruiting-post-contact-link:hover,
.recruiting-post-contact-link:focus-visible {
    color: #b8deff;
    text-decoration: none;
}

.recruiting-post-contact-link--plain {
    color: rgba(175, 200, 228, 0.82);
    cursor: default;
}

.recruiting-post-contact-link--copy {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: rgba(175, 200, 228, 0.82);
    cursor: pointer;
}

.recruiting-post-contact-link--copy:hover,
.recruiting-post-contact-link--copy:focus-visible {
    color: #b8deff;
}

.recruiting-post-contact-link--copy.is-copied {
    color: #7ddea8;
}

.recruiting-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
    color: rgba(175, 200, 228, 0.82);
    font-size: 0.84rem;
}

.recruiting-post-meta-item i,
.recruiting-post-contact-link i,
.recruiting-post-contact-link .recruiting-contact-icon-max {
    flex-shrink: 0;
    opacity: 0.85;
}

.recruiting-post-meta-item i {
    margin-right: 4px;
}

.recruiting-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.recruiting-page-btn:disabled {
    border-color: rgba(96, 104, 118, 0.5);
    background: rgba(36, 40, 50, 0.82);
    color: rgba(132, 140, 154, 0.88);
    cursor: not-allowed;
    opacity: 0.92;
}

.recruiting-page-info {
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.9rem;
}

.recruiting-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.recruiting-form-field--full {
    grid-column: 1 / -1;
}

.recruiting-clan-tag-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recruiting-clan-tag-field__row {
    display: grid;
    grid-template-columns: minmax(148px, 0.85fr) minmax(0, 1.15fr);
    gap: 10px;
    align-items: center;
}

.recruiting-clan-tag-field .recruiting-clan-tag-type,
.recruiting-clan-tag-field .recruiting-clan-tag-value {
    width: 100%;
    min-width: 0;
}

.recruiting-clan-tag-value--caps {
    text-transform: uppercase;
}

.recruiting-clan-tag-field__row--auto-type {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
}

.recruiting-clan-tag-field--auto-type .recruiting-clan-tag-inline-label {
    margin-bottom: 0;
    align-self: center;
    white-space: nowrap;
    padding-right: 4px;
}

.recruiting-clan-tag-field--locked .recruiting-clan-tag-value,
.recruiting-clan-tag-field--locked .recruiting-clan-tag-type {
    opacity: 0.72;
    cursor: not-allowed;
}

.recruiting-clan-tag-required.hidden {
    display: none;
}

.recruiting-clan-tag-field--hidden {
    display: none;
}

@media (max-width: 560px) {
    .recruiting-clan-tag-field__row {
        grid-template-columns: 1fr;
    }
}

.recruiting-form-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(175, 200, 228, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
}

.recruiting-required {
    color: #ff9eb0;
}

.recruiting-form-actions {
    margin-top: 22px;
}

.recruiting-submit-btn:disabled {
    border-color: rgba(96, 104, 118, 0.5);
    background: rgba(36, 40, 50, 0.82);
    color: rgba(132, 140, 154, 0.88);
    cursor: not-allowed;
}

.recruiting-form-status-note {
    margin: 16px 0 0;
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.9rem;
}

.recruiting-status-badge--pending {
    border: 1px solid rgba(255, 183, 77, 0.45);
    color: #ffe082;
}

.recruiting-status-badge--approved {
    border: 1px solid rgba(129, 199, 132, 0.45);
    color: #b9f6ca;
}

.recruiting-status-badge--rejected {
    border: 1px solid rgba(239, 83, 80, 0.45);
    color: #ff9eb0;
}

.recruiting-status-badge--hidden {
    border: 1px solid rgba(158, 158, 158, 0.45);
    color: rgba(189, 189, 189, 0.95);
}

.recruiting-moderation-note {
    color: rgba(255, 158, 176, 0.9);
}

.recruiting-form-hint {
    margin: 6px 0 0;
    color: rgba(154, 167, 178, 0.88);
    font-size: 0.82rem;
    line-height: 1.4;
}

.recruiting-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recruiting-contact-row {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.recruiting-contact-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recruiting-contact-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 8px;
    background: rgba(10, 18, 36, 0.65);
    color: rgba(200, 220, 245, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.recruiting-contact-type-btn:hover {
    border-color: rgba(100, 181, 246, 0.62);
    background: rgba(18, 32, 58, 0.92);
}

.recruiting-contact-type-btn.is-active {
    border-color: #64b5f6;
    background: rgba(30, 51, 89, 0.88);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.18);
}

.recruiting-contact-type-btn[data-type="vk"].is-active { color: #4c75a3; }
.recruiting-contact-type-btn[data-type="telegram"].is-active { color: #2aabee; }
.recruiting-contact-type-btn[data-type="viber"].is-active { color: #7360f2; }
.recruiting-contact-type-btn[data-type="discord"].is-active { color: #5865f2; }
.recruiting-contact-type-btn[data-type="max"].is-active { color: #5b8cff; }

.recruiting-contact-icon-max {
    display: block;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    color: currentColor;
}

.recruiting-contact-type-btn .recruiting-contact-icon-max {
    color: rgba(202, 228, 255, 0.88);
}

.recruiting-contact-type-btn[data-type="max"].is-active .recruiting-contact-icon-max {
    color: #5b8cff;
}

.recruiting-contact-value {
    min-width: 0;
}

.recruiting-contact-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(229, 115, 115, 0.35);
    border-radius: 8px;
    background: rgba(58, 24, 35, 0.45);
    color: #ffcdd2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.recruiting-contact-remove:hover {
    background: rgba(58, 24, 35, 0.72);
    border-color: rgba(229, 115, 115, 0.55);
}

.recruiting-contacts-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px dashed rgba(113, 163, 230, 0.45);
    border-radius: 8px;
    background: transparent;
    color: #8ecbff;
    font: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.recruiting-contacts-add:hover:not(:disabled) {
    border-color: rgba(100, 181, 246, 0.72);
    background: rgba(18, 32, 58, 0.45);
}

.recruiting-contacts-add:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.recruiting-post-meta-item--contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.recruiting-post-meta-item--contact .recruiting-contact-icon-max {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .recruiting-contact-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .recruiting-contact-types {
        grid-column: 1 / -1;
    }

    .recruiting-contact-value {
        grid-column: 1;
    }

    .recruiting-contact-remove {
        grid-column: 2;
        grid-row: 2;
    }
}

.recruiting-form-hint--warn {
    margin: 10px 0 0;
    color: rgba(255, 224, 130, 0.92);
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .recruiting-panel {
        padding: 18px;
    }

    .recruiting-filters-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .recruiting-type-filter {
        grid-column: 1 / -1;
    }

    .recruiting-realm-filter {
        grid-column: 1 / -1;
    }

    .recruiting-filters-toolbar .recruiting-realm-tabs {
        width: 100%;
        flex-wrap: nowrap;
    }

    .recruiting-filters-toolbar .recruiting-realm-tab {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 6px;
    }

    .recruiting-search-filter {
        grid-column: 1 / -1;
    }

    .recruiting-filters-toolbar .recruiting-search-btn {
        width: auto;
    }

    .recruiting-form-grid {
        grid-template-columns: 1fr;
    }

    .recruiting-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .recruiting-cta-btn,
    .recruiting-back-link {
        justify-content: center;
    }
}

.page-auth .header {
    margin-bottom: 0;
}

.page-auth .container {
    gap: var(--layout-gap);
    min-width: 0;
}

.page-auth .page-bottom-spacer {
    display: none;
}

.page-auth footer {
    margin-top: 0;
}

.page-auth .auth-page {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 0;
}

.page-auth-profile .auth-page--account {
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
}

.page-auth-profile .profile-save-bar {
    width: 100%;
    margin-top: var(--layout-gap);
}

.page-auth-profile .profile-save-bar .auth-btn {
    width: auto;
    min-width: 200px;
}

@media (max-width: 960px) {
    .page-auth-profile .profile-save-bar .auth-btn {
        width: 100%;
    }
}

.page-auth-profile .profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-items: start;
}

.page-auth-profile .profile-layout__col {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
}

.page-auth-profile .profile-panel--list {
    padding: 20px 22px;
}

.page-auth-profile .profile-panel--list .profile-panel__title {
    margin-bottom: 14px;
    font-size: 1.15rem;
}

.page-auth-profile .profile-panel--list .bracket-profile-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-auth-profile .profile-panel--list .bracket-profile-table th,
.page-auth-profile .profile-panel--list .bracket-profile-table td {
    padding: 10px 8px;
}

.page-auth-profile .profile-panel--list .bracket-profile-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.page-auth-profile .profile-panel--list .bracket-profile-link,
.page-auth-profile .profile-panel--list .bracket-profile-delete {
    font-size: 0.82rem;
    white-space: nowrap;
}

.page-auth-profile .profile-panel--list .bracket-profile-title__text {
    font-size: 0.92rem;
}

.page-auth-profile .profile-panel--list .bracket-profile-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
}

.page-auth-profile .profile-panel {
    min-width: 0;
    max-width: 100%;
    padding: 28px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
}

.page-auth-profile .profile-panel__head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 20px;
}

.page-auth-profile .profile-panel__head .profile-panel__title {
    margin-bottom: 0;
}

.page-auth-profile .profile-panel__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

.page-auth-profile .profile-panel__title i {
    color: #8ecbff;
}

.page-auth-profile .profile-panel__hint {
    margin: -8px 0 18px;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.page-auth-profile .profile-panel--account .auth-profile__logout {
    margin-top: 24px;
}

.page-auth-profile .profile-panel--account .auth-btn,
.page-auth-profile .profile-panel--recruiting .auth-btn {
    width: auto;
    min-width: 180px;
}

.page-auth-profile .auth-form--profile-account {
    margin-bottom: 20px;
}

.page-auth-profile .profile-password {
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-auth-profile .profile-password__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.page-auth-profile .profile-password__row .auth-form__group {
    min-width: 0;
}

.page-auth-profile .profile-password__row .auth-form__group input {
    font-size: 0.82rem;
    font-family: inherit;
    box-sizing: border-box;
    height: 38px;
    padding: 0 12px;
    line-height: 36px;
}

.page-auth-profile .profile-password__row .auth-form__group .auth-password-wrap input {
    padding-right: 44px;
}

.page-auth-profile .profile-password__row .auth-form__group input::placeholder {
    color: rgba(154, 167, 178, 0.65);
    line-height: 36px;
}

.page-auth-profile .profile-password .auth-password-match {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .page-auth-profile .profile-password__row {
        grid-template-columns: 1fr;
    }
}

.page-auth-profile .profile-linking {
    margin-bottom: 20px;
}

.page-auth-profile .profile-linking .auth-provider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-auth-profile .profile-linking .auth-provider-btn--linked {
    opacity: 1;
    cursor: default;
    justify-content: flex-start;
    border-color: rgba(125, 184, 255, 0.35);
    background: rgba(24, 45, 82, 0.35);
    color: #c5d4e4;
}

.page-auth-profile .profile-linking .auth-provider-btn__unlink {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(175, 200, 228, 0.72);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.page-auth-profile .profile-linking .auth-provider-btn__unlink:hover:not(:disabled),
.page-auth-profile .profile-linking .auth-provider-btn__unlink:focus-visible:not(:disabled) {
    color: #ff6b6b;
    background: rgba(255, 80, 80, 0.1);
    outline: none;
}

.page-auth-profile .profile-linking .auth-provider-btn__unlink:disabled {
    opacity: 0.6;
    cursor: wait;
}

.page-auth-profile .profile-linking__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e8eef2;
}

.page-auth-profile .profile-linking__hint {
    margin: 0 0 14px;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.9rem;
    line-height: 1.45;
}

.page-auth-profile .profile-linking__hint--muted {
    margin-bottom: 0;
}

.page-auth-profile .profile-linking__nickname {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e8eef2;
    line-height: 1.3;
    word-break: break-word;
}

.page-auth-profile .profile-linking__meta {
    margin: 0 0 14px;
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.88rem;
    line-height: 1.4;
}

.page-auth-profile .profile-game-nicks {
    margin-bottom: 20px;
}

.page-auth-profile .profile-game-nicks__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-auth-profile .profile-game-nick-field__label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.page-auth-profile .profile-game-nick-field__badge {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(154, 167, 178, 0.35);
    color: rgba(175, 200, 228, 0.75);
    font-size: 0.72rem;
    font-weight: 500;
    vertical-align: middle;
}

.page-auth-profile .profile-game-nick-field--locked .recruiting-text-input--readonly {
    opacity: 0.85;
    cursor: not-allowed;
    color: #c5ced6;
    border-color: rgba(154, 167, 178, 0.28);
    background: rgba(45, 52, 62, 0.45);
}

.page-auth-profile .profile-linking__providers {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.page-auth-profile .profile-linking__providers .auth-provider-form {
    flex: 1 1 0;
    min-width: 0;
}

.page-auth-profile .profile-linking__providers .auth-provider-actions {
    width: 100%;
    height: 100%;
}

.page-auth-profile .profile-linking .auth-provider-btn {
    width: 100%;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    box-sizing: border-box;
    justify-content: flex-start;
    align-items: center;
    border-color: rgba(154, 167, 178, 0.32);
    background: rgba(55, 62, 72, 0.45);
    color: #9aa7b2;
}

.page-auth-profile .profile-linking .auth-provider-btn > .fas:first-child {
    flex-shrink: 0;
}

.page-auth-profile .profile-linking .auth-provider-btn__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.page-auth-profile .profile-linking .auth-provider-btn__label,
.page-auth-profile .profile-linking .auth-provider-btn__api {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-auth-profile .profile-linking .auth-provider-btn:hover:not(:disabled) {
    border-color: rgba(154, 167, 178, 0.5);
    background: rgba(70, 78, 88, 0.55);
    color: #c5ced6;
}

.page-auth-profile .profile-linking .auth-provider-btn--wg:hover:not(:disabled) {
    border-color: rgba(154, 167, 178, 0.5);
    background: rgba(70, 78, 88, 0.55);
}

.page-auth-profile .auth-profile--meta {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(125, 184, 255, 0.12);
    min-width: 0;
    max-width: 100%;
}

.page-auth-profile .auth-form--profile-account,
.page-auth-profile .auth-form--profile-recruiting,
.page-auth-profile .auth-form__group,
.page-auth-profile .profile-password,
.page-auth-profile .profile-password__row,
.page-auth-profile .profile-game-nicks,
.page-auth-profile .profile-game-nicks__grid,
.page-auth-profile .profile-linking,
.page-auth-profile .profile-linking__providers {
    min-width: 0;
    max-width: 100%;
}

.page-auth-profile .recruiting-text-input,
.page-auth-profile .recruiting-select,
.page-auth-profile .recruiting-select-wrap,
.page-auth-profile .recruiting-select-trigger,
.page-auth-profile .auth-form__group input,
.page-auth-profile .auth-form__group select {
    max-width: 100%;
}

.page-auth .auth-card {
    width: 100%;
    max-width: 440px;
    padding: 28px 28px 24px;
    border: 1px solid rgba(125, 184, 255, 0.22);
    background: rgba(10, 18, 36, 0.72);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

.page-auth .auth-card--wide {
    max-width: 560px;
}

.page-auth .auth-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #e8eef2;
}

.page-auth .auth-card__title i {
    color: #8ecbff;
}

.page-auth .auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-auth .auth-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-auth .auth-form__group label {
    font-size: 0.9rem;
    color: #9aa7b2;
}

.page-auth .auth-form__group input,
.page-auth .auth-form__group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(125, 184, 255, 0.28);
    border-radius: 8px;
    background: rgba(17, 34, 67, 0.55);
    color: #e8eef2;
    font: inherit;
}

.page-auth .auth-form__group input:focus,
.page-auth .auth-form__group select:focus {
    outline: none;
    border-color: rgba(125, 184, 255, 0.55);
}

.page-auth .auth-password-wrap {
    position: relative;
}

.page-auth .auth-password-wrap input {
    padding-right: 44px;
}

.page-auth .auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8ecbff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background 0.2s ease;
}

.page-auth .auth-password-toggle:hover:not(:disabled) {
    color: #b8deff;
    background: rgba(125, 184, 255, 0.12);
}

.page-auth .auth-password-toggle:focus-visible {
    outline: 2px solid rgba(125, 184, 255, 0.55);
    outline-offset: 1px;
}

.page-auth .auth-password-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.page-auth .auth-password-match {
    margin: 6px 0 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.page-auth .auth-password-match--error {
    color: #ff9eb0;
}

.page-auth .auth-form__group input.auth-input--invalid {
    border-color: rgba(229, 115, 115, 0.55);
}

.page-auth .auth-form__group--inline {
    margin-bottom: 8px;
}

.page-auth .auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9aa7b2;
    font-size: 0.9rem;
    cursor: pointer;
}

.page-auth .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-auth .auth-btn--primary {
    background: linear-gradient(135deg, rgba(54, 224, 255, 0.22), rgba(116, 246, 200, 0.18));
    border-color: rgba(125, 184, 255, 0.45);
    color: #e8eef2;
}

.page-auth .auth-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(54, 224, 255, 0.32), rgba(116, 246, 200, 0.26));
}

.page-auth .auth-btn--secondary {
    background: rgba(17, 34, 67, 0.45);
    border-color: rgba(125, 184, 255, 0.28);
    color: #9aa7b2;
}

.page-auth .auth-btn--secondary:hover {
    color: #e8eef2;
    border-color: rgba(125, 184, 255, 0.45);
}

.page-auth .auth-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.page-auth .auth-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.page-auth .auth-alert--error {
    background: rgba(58, 24, 35, 0.55);
    border: 1px solid rgba(229, 115, 115, 0.45);
    color: #ffcdd2;
}

.page-auth .auth-alert__link {
    display: inline-block;
    margin-top: 8px;
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
}

.page-auth .auth-alert__link:hover {
    text-decoration: underline;
}

.page-auth .auth-alert--warning {
    background: rgba(58, 48, 24, 0.55);
    border: 1px solid rgba(255, 217, 102, 0.35);
    color: #ffe8a3;
}

.page-auth .auth-alert--success {
    background: rgba(24, 58, 42, 0.55);
    border: 1px solid rgba(116, 246, 200, 0.35);
    color: #b9f5df;
}

.page-auth .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: #6f7d8a;
    font-size: 0.85rem;
}

.page-auth .auth-divider::before,
.page-auth .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(125, 184, 255, 0.18);
}

.page-auth .auth-providers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-auth.page-auth-profile .auth-providers.profile-linking__providers {
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.page-auth.page-auth-profile .auth-providers.profile-linking__providers .auth-provider-form {
    flex: 1 1 0;
    min-width: 0;
}

.page-auth.page-auth-profile .auth-providers.profile-linking__providers .auth-provider-actions {
    width: 100%;
}

.page-auth .auth-providers.auth-providers--row {
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.page-auth .auth-providers.auth-providers--row .auth-provider-form {
    flex: 1;
    min-width: 0;
}

.page-auth .auth-providers.auth-providers--row .auth-provider-actions {
    width: 100%;
}

.page-auth .auth-providers.auth-providers--row .auth-provider-btn {
    width: 100%;
}

.page-auth .auth-provider-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-auth .auth-provider-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.page-auth .auth-provider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(125, 184, 255, 0.28);
    background: rgba(17, 34, 67, 0.45);
    color: #e8eef2;
    font: inherit;
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.page-auth .auth-provider-btn--nickname {
    white-space: normal;
}

.page-auth .auth-provider-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.25;
    text-align: left;
}

.page-auth .auth-provider-btn__label {
    font-weight: 600;
}

.page-auth .auth-provider-btn__api {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(175, 200, 228, 0.72);
    letter-spacing: 0.02em;
}

.page-auth .auth-provider-btn--wg:hover:not(:disabled) {
    border-color: rgba(125, 184, 255, 0.5);
    background: rgba(24, 45, 82, 0.55);
}

.page-auth .auth-provider-btn--disabled,
.page-auth .auth-provider-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: #7a8794;
}

.page-auth .auth-provider-btn--unconfigured:disabled {
    opacity: 1;
    border-color: rgba(154, 167, 178, 0.28);
    background: rgba(55, 62, 72, 0.35);
    color: #7a8794;
}

.page-auth .auth-card__footer {
    margin-top: 18px;
    text-align: center;
    color: #9aa7b2;
    font-size: 0.92rem;
}

.page-auth .auth-card__footer a {
    color: #8ecbff;
    text-decoration: none;
}

.page-auth .auth-card__footer a:hover {
    color: #b8deff;
}

.page-auth .auth-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-auth .auth-profile__row {
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: 8px 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(125, 184, 255, 0.12);
}

.page-auth .auth-profile__row dt {
    color: #9aa7b2;
    font-size: 0.9rem;
}

.page-auth .auth-profile__row dd {
    margin: 0;
    color: #e8eef2;
    word-break: break-word;
}

.page-auth .auth-profile__logout {
    margin-top: 20px;
}

.page-auth .auth-profile-section-title {
    margin: 24px 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e8eef2;
}

.page-auth .auth-profile-section-hint {
    margin: 0 0 16px;
    color: #9aa7b2;
    font-size: 0.88rem;
    line-height: 1.45;
}

.page-auth .auth-form--profile-recruiting {
    margin-bottom: 8px;
}

.site-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(380px, calc(100vw - 32px));
    padding: 14px 18px;
    border-radius: 0;
    border: 1px solid rgba(141, 195, 255, 0.18);
    background: linear-gradient(180deg, rgba(18, 28, 52, 0.98) 0%, rgba(12, 20, 38, 0.98) 100%);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    color: #f0f7ff;
    font-size: 0.94rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.site-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-toast.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.site-toast--success {
    border-color: rgba(116, 246, 200, 0.42);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(116, 246, 200, 0.1);
}

.site-toast--success i {
    color: #74f6c8;
}

.site-toast--error {
    border-color: rgba(255, 138, 138, 0.45);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 138, 138, 0.1);
}

.site-toast--error i {
    color: #ff8a8a;
}

.site-toast--info {
    border-color: rgba(100, 181, 246, 0.45);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(100, 181, 246, 0.1);
}

.site-toast--info i {
    color: #8ecbff;
}

.page-wotmods .site-toast--success {
    border-color: rgba(100, 181, 246, 0.45);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(100, 181, 246, 0.1);
}

.page-wotmods .site-toast--success i {
    color: #8ecbff;
}

@media (max-width: 560px) {
    .site-toast {
        top: auto;
        bottom: 24px;
        right: 16px;
        left: 16px;
        max-width: none;
        transform: translateY(12px);
    }

    .site-toast.is-visible {
        transform: translateY(0);
    }
}

.page-auth .auth-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.page-auth .auth-form--profile-recruiting .auth-form__group {
    gap: 6px;
}

.page-auth .auth-form--profile-recruiting .recruiting-form-label {
    font-size: 0.9rem;
    color: #9aa7b2;
}

@media (max-width: 560px) {
    .page-auth .auth-form__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .page-auth-profile .profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-auth-profile .profile-layout__col,
    .page-auth-profile .profile-layout__col--secondary {
        display: contents;
    }

    .page-auth-profile .profile-panel--account,
    .page-auth-profile .profile-panel--recruiting,
    .page-auth-profile .profile-panel--brackets,
    .page-auth-profile .profile-panel--tactics {
        width: 100%;
    }

    .page-auth-profile .profile-panel--account .auth-btn,
    .page-auth-profile .profile-panel--recruiting .auth-btn {
        width: 100%;
    }

    .page-auth-profile .profile-game-nicks__grid {
        grid-template-columns: 1fr;
    }

    .page-auth.page-auth-profile .auth-providers.profile-linking__providers,
    .page-auth-profile .profile-linking__providers {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .page-auth-profile .container {
        padding-left: var(--layout-gap-sm);
        padding-right: var(--layout-gap-sm);
    }

    .site-header-nav a {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .page-auth .auth-card,
    .page-auth-profile .profile-panel {
        padding: 16px 12px 14px;
    }

    .page-auth-profile .profile-panel__title {
        font-size: 1.15rem;
    }

    .page-auth .auth-profile__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.bracket-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.bracket-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
}

.bracket-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.bracket-service-header .bracket-section-head {
    align-items: center;
    margin-bottom: 0;
}

.bracket-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

.bracket-section-hint,
.bracket-guest-hint,
.bracket-form-hint,
.bracket-no-edit-msg {
    margin: 8px 0 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.bracket-view-creator {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.9rem;
    line-height: 1.45;
}

.bracket-view-creator i {
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.92em;
}

.bracket-view-creator span {
    color: rgba(200, 220, 245, 0.95);
    font-weight: 600;
}

.bracket-cta-btn[hidden],
.bracket-back-link[hidden] {
    display: none !important;
}

.bracket-cta-btn,
.bracket-back-link,
.bracket-submit-btn,
.bracket-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.25;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

button.bracket-cta-btn,
button.bracket-back-link,
button.bracket-submit-btn,
button.bracket-delete-btn {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.bracket-cta-btn:hover,
.bracket-back-link:hover,
.bracket-submit-btn:hover:not(:disabled) {
    border-color: #64b5f6;
    color: #b8deff;
}

.bracket-delete-btn {
    border-color: rgba(255, 138, 138, 0.45);
    color: #ff8a8a;
    background: rgba(60, 20, 20, 0.5);
}

.bracket-delete-btn:hover {
    border-color: #ff8a8a;
    color: #ffcdd2;
}

.bracket-section-actions,
.bracket-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
}

.bracket-form-group.is-locked .recruiting-select-trigger,
.bracket-form-group.is-locked select.bracket-select {
    opacity: 0.48;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(10, 18, 36, 0.35);
    color: rgba(175, 200, 228, 0.42);
    border-color: rgba(113, 163, 230, 0.22);
}

.bracket-form-group.is-locked .recruiting-select-trigger:hover,
.bracket-form-group.is-locked select.bracket-select:hover {
    border-color: rgba(113, 163, 230, 0.22);
    background: rgba(10, 18, 36, 0.35);
    color: rgba(175, 200, 228, 0.42);
}

.bracket-form-group {
    margin-bottom: 16px;
}

#bracketCreateForm > .bracket-submit-btn {
    margin-top: 24px;
}

.bracket-form-desc-prize-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.bracket-form-desc-prize-row .bracket-form-group {
    margin-bottom: 0;
}

.bracket-create-prize-wrap {
    overflow: visible;
}

.bracket-prize-fieldset,
.bracket-prize-grid--compact,
.bracket-form-desc-prize-row .bracket-form-group {
    overflow: visible;
}

.bracket-prize-fieldset > .bracket-form-label,
.bracket-prize-fieldset > legend.bracket-form-label {
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.bracket-prize-grid--compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.bracket-meta-edit .bracket-prize-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.bracket-prize-compact-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
}

.bracket-prize-compact-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, 112px);
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}

.bracket-prize-compact-fields .recruiting-select-wrap {
    position: relative;
    min-width: 0;
}

.bracket-prize-compact-fields .recruiting-select-trigger {
    min-height: 100%;
    padding: 5px 8px;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.25;
}

.bracket-prize-compact-fields .recruiting-select-trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-prize-compact-fields .recruiting-select-trigger-icon {
    font-size: 0.65rem;
}

.bracket-prize-compact-fields .recruiting-select-menu {
    top: calc(100% + 4px);
    bottom: auto;
    left: auto;
    right: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(100vw - 32px, 220px);
    max-height: none;
}

.bracket-prize-compact-fields .recruiting-select-option {
    padding: 5px 10px;
    font-size: 0.8rem;
    line-height: 1.2;
}

.bracket-create-prize-wrap .recruiting-select-wrap.is-open,
.bracket-prize-grid .recruiting-select-wrap.is-open {
    z-index: 150;
}

.bracket-prize-unit-select.recruiting-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.bracket-prize-compact-label {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 500;
    color: rgba(175, 200, 228, 0.7);
    line-height: 1.15;
}

.bracket-prize-compact-input {
    width: 100%;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid rgba(113, 163, 230, 0.26);
    background: rgba(10, 18, 36, 0.5);
    color: #e8eef2;
    font-size: 0.84rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.bracket-prize-compact-input::placeholder {
    color: rgba(175, 200, 228, 0.38);
    font-size: 0.8rem;
}

.bracket-prize-compact-input:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(10, 18, 36, 0.72);
}

.bracket-scroll,
.page-bracket,
.bracket-create-prize-wrap,
.bracket-participants-textarea,
.bracket-group-participants-textarea,
.bracket-elimination,
.bracket-profile-wrap,
.page-bracket .recruiting-select-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(10, 18, 36, 0.55);
}

.page-bracket::-webkit-scrollbar,
.bracket-create-prize-wrap::-webkit-scrollbar,
.bracket-participants-textarea::-webkit-scrollbar,
.bracket-group-participants-textarea::-webkit-scrollbar,
.bracket-elimination::-webkit-scrollbar,
.bracket-profile-wrap::-webkit-scrollbar,
.page-bracket .recruiting-select-menu::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.page-bracket::-webkit-scrollbar-track,
.bracket-create-prize-wrap::-webkit-scrollbar-track,
.bracket-participants-textarea::-webkit-scrollbar-track,
.bracket-group-participants-textarea::-webkit-scrollbar-track,
.bracket-elimination::-webkit-scrollbar-track,
.bracket-profile-wrap::-webkit-scrollbar-track,
.page-bracket .recruiting-select-menu::-webkit-scrollbar-track {
    background: rgba(10, 18, 36, 0.5);
    border-radius: 999px;
}

.page-bracket::-webkit-scrollbar-thumb,
.bracket-create-prize-wrap::-webkit-scrollbar-thumb,
.bracket-participants-textarea::-webkit-scrollbar-thumb,
.bracket-group-participants-textarea::-webkit-scrollbar-thumb,
.bracket-elimination::-webkit-scrollbar-thumb,
.bracket-profile-wrap::-webkit-scrollbar-thumb,
.page-bracket .recruiting-select-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(113, 163, 230, 0.62) 0%, rgba(76, 141, 220, 0.48) 100%);
    border: 2px solid rgba(10, 18, 36, 0.45);
    border-radius: 999px;
    background-clip: padding-box;
}

.page-bracket::-webkit-scrollbar-thumb:hover,
.bracket-create-prize-wrap::-webkit-scrollbar-thumb:hover,
.bracket-participants-textarea::-webkit-scrollbar-thumb:hover,
.bracket-group-participants-textarea::-webkit-scrollbar-thumb:hover,
.bracket-elimination::-webkit-scrollbar-thumb:hover,
.bracket-profile-wrap::-webkit-scrollbar-thumb:hover,
.page-bracket .recruiting-select-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(142, 203, 255, 0.78) 0%, rgba(100, 181, 246, 0.62) 100%);
    border-color: rgba(10, 18, 36, 0.35);
}

.page-bracket::-webkit-scrollbar-corner,
.bracket-elimination::-webkit-scrollbar-corner {
    background: transparent;
}

.bracket-create-prize-wrap .bracket-prize-compact-row:last-child {
    margin-bottom: 0;
}

.bracket-prize-grid--stack {
    grid-template-columns: 1fr;
}

.bracket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.bracket-form-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bracket-form-grid .bracket-form-group {
    margin-bottom: 0;
    min-width: 0;
}

.bracket-form-grid[hidden],
.bracket-group-only[hidden],
.bracket-group-participants[hidden] {
    display: none !important;
}

.bracket-group-only {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bracket-group-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.45);
}

.bracket-group-actions[hidden] {
    display: none !important;
}

.bracket-group-actions__hint {
    margin: 0;
    flex: 1 1 220px;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.88rem;
}

.bracket-form-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(175, 200, 228, 0.85);
    font-size: 0.88rem;
    font-weight: 600;
}

.bracket-visibility-switch {
    display: flex;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 0;
    background: rgba(10, 18, 36, 0.65);
    gap: 0;
    box-sizing: border-box;
    min-height: calc(1rem + 26px);
}

.bracket-visibility-switch__option {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
}

.bracket-visibility-switch__option + .bracket-visibility-switch__option {
    border-left: 1px solid rgba(113, 163, 230, 0.28);
}

.bracket-visibility-switch__option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bracket-visibility-switch__text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: calc(1rem + 24px);
    padding: 12px 10px;
    border-radius: 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 1rem;
    line-height: 1.25;
    text-align: center;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease;
}

.bracket-visibility-switch__option:hover .bracket-visibility-switch__text {
    color: #e8eef2;
    background: rgba(113, 163, 230, 0.12);
}

.bracket-visibility-switch__option.is-active .bracket-visibility-switch__text,
.bracket-visibility-switch__option:has(input:checked) .bracket-visibility-switch__text {
    background: rgba(76, 141, 220, 0.45);
    color: #e8eef2;
    box-shadow: none;
}

.bracket-text-input,
.bracket-select,
.bracket-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #e8eef2;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.bracket-text-input:focus,
.bracket-text-input:focus-visible,
.bracket-textarea:focus,
.bracket-textarea:focus-visible,
.bracket-group-participants-textarea:focus,
.bracket-group-participants-textarea:focus-visible,
.bracket-combobox__input:focus,
.bracket-combobox__input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: rgba(113, 163, 230, 0.35);
}

.bracket-form .recruiting-select-wrap.is-open,
.bracket-form .bracket-datetime-wrap.is-open {
    z-index: 140;
}

.bracket-datetime-wrap {
    position: relative;
    width: 100%;
}

.bracket-datetime-trigger {
    width: 100%;
}

.bracket-datetime-trigger-icon {
    color: #64b5f6;
    flex-shrink: 0;
}

.bracket-datetime-popup {
    position: absolute;
    z-index: 150;
    top: calc(100% + 6px);
    left: 0;
    width: min(100%, 320px);
    padding: 14px;
    border: 1px solid rgba(113, 163, 230, 0.38);
    background: linear-gradient(180deg, rgba(18, 30, 56, 0.98) 0%, rgba(12, 22, 44, 0.98) 100%);
    box-shadow: 0 18px 36px rgba(4, 10, 22, 0.45), inset 0 1px 0 rgba(188, 220, 255, 0.08);
}

.bracket-datetime-wrap.is-open .bracket-datetime-popup {
    display: block;
}

.bracket-datetime-popup[hidden] {
    display: none;
}

.bracket-datetime-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.bracket-datetime-popup__title {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
}

.bracket-datetime-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #8ecbff;
    cursor: pointer;
}

.bracket-datetime-nav:hover {
    border-color: rgba(100, 181, 246, 0.62);
}

.bracket-datetime-weekdays,
.bracket-datetime-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.bracket-datetime-weekdays {
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.75);
    text-align: center;
}

.bracket-datetime-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid transparent;
    background: rgba(10, 18, 36, 0.45);
    color: #e8eef2;
    font-size: 0.88rem;
    cursor: pointer;
}

.bracket-datetime-day.is-empty {
    background: transparent;
    cursor: default;
}

.bracket-datetime-day.is-today {
    border-color: rgba(100, 181, 246, 0.45);
}

.bracket-datetime-day.is-selected {
    background: rgba(30, 51, 89, 0.95);
    border-color: #64b5f6;
    color: #fff;
    font-weight: 600;
}

.bracket-datetime-day:not(.is-empty):hover {
    border-color: rgba(100, 181, 246, 0.55);
}

.bracket-datetime-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

.bracket-datetime-time__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.85);
}

.bracket-datetime-time__fields {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bracket-datetime-hour,
.bracket-datetime-minute {
    width: 56px;
    padding: 8px 10px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #e8eef2;
    font-size: 0.95rem;
    font-family: inherit;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.bracket-datetime-hour::-webkit-outer-spin-button,
.bracket-datetime-minute::-webkit-outer-spin-button,
.bracket-datetime-hour::-webkit-inner-spin-button,
.bracket-datetime-minute::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bracket-datetime-time__sep {
    color: rgba(175, 200, 228, 0.85);
    font-weight: 600;
}

.bracket-datetime-popup__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.bracket-datetime-popup__actions-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.bracket-datetime-clear,
.bracket-datetime-today,
.bracket-datetime-apply {
    padding: 8px 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #8ecbff;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}

.bracket-datetime-apply {
    border-color: rgba(100, 181, 246, 0.72);
    background: rgba(36, 92, 160, 0.55);
    color: #d8ecff;
    font-weight: 600;
}

.bracket-datetime-clear:hover,
.bracket-datetime-today:hover,
.bracket-datetime-apply:hover {
    border-color: rgba(100, 181, 246, 0.62);
}

.bracket-datetime-apply:hover {
    background: rgba(46, 108, 182, 0.72);
}

.bracket-textarea {
    min-height: 160px;
    resize: vertical;
}

.bracket-participants-textarea {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
}

.bracket-combobox {
    position: relative;
    width: 100%;
}

.bracket-combobox__input {
    width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
}

.bracket-combobox__toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-left: 1px solid rgba(113, 163, 230, 0.28);
    background: transparent;
    color: #64b5f6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bracket-combobox__toggle:hover {
    color: #8ecbff;
    background: rgba(113, 163, 230, 0.08);
}

.bracket-combobox.is-open .bracket-combobox__toggle {
    color: #8ecbff;
}

.bracket-combobox.is-open .bracket-combobox__toggle i {
    transform: rotate(180deg);
}

.bracket-combobox__toggle i {
    font-size: 0.72rem;
    transition: transform 0.15s ease;
}

.bracket-combobox__menu {
    position: absolute;
    z-index: 130;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(113, 163, 230, 0.38);
    background: linear-gradient(180deg, rgba(18, 30, 56, 0.98) 0%, rgba(12, 22, 44, 0.98) 100%);
    box-shadow: 0 12px 28px rgba(4, 10, 22, 0.45);
}

.bracket-combobox__menu[hidden] {
    display: none !important;
}

.bracket-combobox__option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #e8eef2;
    font: inherit;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.bracket-combobox__option:hover,
.bracket-combobox__option:focus-visible {
    background: rgba(76, 141, 220, 0.35);
    outline: none;
}

.bracket-combobox__empty {
    padding: 10px 14px;
    color: rgba(175, 200, 228, 0.45);
    font-size: 0.9rem;
    text-align: center;
}

.bracket-form .bracket-combobox.is-open {
    z-index: 140;
}

.bracket-render-target .bracket-combobox.is-open,
.bracket-group-panel__head .bracket-group-search.is-open {
    z-index: 130;
}

.bracket-number-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bracket-number-input::-webkit-outer-spin-button,
.bracket-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bracket-group-participants {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bracket-group-participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.bracket-group-participants-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bracket-group-participants-textarea {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    resize: none;
    overflow-y: auto;
}

.bracket-catalog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.bracket-catalog-card {
    display: flex;
    flex-direction: column;
    height: 156px;
    min-height: 156px;
    max-height: 156px;
    padding: 16px;
    border: 1px solid rgba(113, 163, 230, 0.25);
    background: rgba(10, 18, 36, 0.45);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.bracket-catalog-card:hover {
    border-color: rgba(100, 181, 246, 0.55);
    transform: translateY(-1px);
}

.bracket-catalog-card__title {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-catalog-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    min-height: 0;
    overflow: hidden;
    font-size: 0.82rem;
    color: rgba(175, 200, 228, 0.75);
}

.bracket-catalog-card__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    min-width: 0;
}

.bracket-catalog-card__count,
.bracket-catalog-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bracket-catalog-card__count i,
.bracket-catalog-card__date i {
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.92em;
}

.bracket-catalog-card__date--empty {
    color: rgba(175, 200, 228, 0.62);
}

.bracket-catalog-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.bracket-catalog-card__head .bracket-catalog-card__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.bracket-catalog-card__head .bracket-meta-status {
    flex: 0 0 auto;
    margin-top: 2px;
}

.bracket-catalog-card__subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 1.75rem;
    flex: 0 0 auto;
    min-width: 0;
}

.bracket-catalog-card__creator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
    color: rgba(175, 200, 228, 0.82);
}

.bracket-catalog-card__creator i {
    flex: 0 0 auto;
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.92em;
}

.bracket-catalog-card__creator--empty {
    min-height: 1em;
}

.bracket-catalog-card__subhead .bracket-game-badge {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 55%;
    overflow: hidden;
}

.bracket-catalog-card__subhead .bracket-game-badge__icon {
    flex-shrink: 0;
}

.bracket-catalog-card__subhead .bracket-game-badge__label {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.bracket-catalog-card__badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
    max-width: 58%;
}

.bracket-catalog-card__head .bracket-game-badge {
    flex: 0 0 auto;
    max-width: 100%;
}

.bracket-catalog-card__badges .bracket-meta-status {
    flex: 0 0 auto;
}

.bracket-view-header-meta {
    margin-top: 10px;
}

.bracket-view-header-meta.bracket-meta-top {
    margin-bottom: 0;
}

.bracket-edit-tournament-title {
    margin: 8px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(200, 220, 245, 0.92);
}

.bracket-service-header .bracket-view-creator {
    margin-top: 10px;
}

.bracket-view-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.bracket-view-game-icon {
    flex: 0 0 auto;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
}

.bracket-game-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(10, 18, 36, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.28);
    color: rgba(220, 235, 255, 0.92);
    box-sizing: border-box;
    text-align: center;
}

.bracket-game-badge__icon {
    display: block;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
}

.bracket-game-option__icon {
    border-radius: 0;
    object-fit: contain;
    width: 32px;
    height: 32px;
    background: transparent;
    flex-shrink: 0;
}

.bracket-game-picker {
    display: flex;
    gap: 0;
    margin-top: 8px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.55);
    width: 100%;
    overflow: hidden;
}

.bracket-game-option {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    cursor: pointer;
}

.bracket-realm-option {
    cursor: pointer;
}

.bracket-game-option__input,
.bracket-realm-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bracket-game-option__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    height: 100%;
    padding: 10px 8px;
    border: none;
    border-right: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.bracket-game-option:last-child .bracket-game-option__card {
    border-right: none;
}

.bracket-realm-option__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 64px;
    padding: 10px 12px;
    border: none;
    border-right: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.bracket-realm-option:last-child .bracket-realm-option__card {
    border-right: none;
}

.bracket-game-option__name,
.bracket-realm-option__name {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.88);
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
}

.bracket-game-option:hover .bracket-game-option__card,
.bracket-realm-option:hover .bracket-realm-option__card {
    color: #b8deff;
    background: rgba(30, 51, 89, 0.45);
}

.bracket-game-option.is-active .bracket-game-option__card,
.bracket-realm-option.is-active .bracket-realm-option__card {
    color: #ffffff;
    background: rgba(30, 58, 95, 0.88);
    box-shadow: inset 0 -2px 0 #64b5f6;
}

.bracket-realm-picker {
    margin-top: 14px;
}

.bracket-realm-picker.is-hidden {
    display: none;
}

.bracket-realm-picker__label {
    display: block;
    margin-bottom: 8px;
}

.bracket-realm-picker__grid {
    display: flex;
    gap: 0;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.55);
    width: 100%;
    overflow: hidden;
}

.bracket-realm-option {
    flex: 1 1 0;
    min-width: 0;
}

.bracket-realm-option__flag {
    width: 1.6em;
    line-height: 1.2;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.bracket-catalog-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    color: #fff;
}

.bracket-meta-display {
    margin-bottom: 20px;
}

.bracket-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.bracket-meta-grid:has(.bracket-meta-block:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bracket-meta-grid:has(.bracket-meta-block:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.bracket-meta-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: linear-gradient(180deg, rgba(14, 24, 46, 0.78) 0%, rgba(10, 18, 36, 0.62) 100%);
    box-shadow:
        0 10px 24px rgba(4, 10, 22, 0.22),
        inset 0 1px 0 rgba(188, 220, 255, 0.07);
    overflow: hidden;
}

.bracket-meta-block__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.22);
    background: linear-gradient(180deg, rgba(24, 42, 78, 0.82) 0%, rgba(18, 32, 60, 0.68) 100%);
}

.bracket-meta-block__head i {
    flex: 0 0 auto;
    color: #8ecbff;
    font-size: 0.82rem;
    opacity: 0.92;
}

.bracket-meta-block__title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(200, 220, 245, 0.95);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bracket-meta-block__body {
    padding: 14px;
    flex: 1 1 auto;
    min-height: 0;
}

.bracket-meta-block--prizes .bracket-meta-block__body {
    padding: 0;
}

.bracket-meta-block--results .bracket-meta-block__body {
    padding: 0;
}

.bracket-meta-block .bracket-results-table {
    border: none;
    border-radius: 0;
    background: transparent;
}

.bracket-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bracket-meta-start,
.bracket-meta-completed {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(175, 200, 228, 0.85);
}

.bracket-meta-start--empty {
    color: rgba(175, 200, 228, 0.62);
}

.bracket-meta-start i,
.bracket-meta-completed i {
    margin-right: 6px;
    color: #8ecbff;
}

.bracket-meta-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bracket-meta-status--upcoming {
    background: rgba(255, 217, 102, 0.15);
    border: 1px solid rgba(255, 217, 102, 0.35);
    color: #ffd966;
}

.bracket-meta-status--live {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.35);
    color: #a5d6a7;
}

.bracket-meta-status--completed {
    background: rgba(158, 158, 158, 0.15);
    border: 1px solid rgba(158, 158, 158, 0.35);
    color: #e0e0e0;
}

.bracket-meta-match-format {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(142, 203, 255, 0.12);
    border: 1px solid rgba(142, 203, 255, 0.3);
    color: #8ecbff;
}

.bracket-catalog-card__match-format {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8ecbff;
}

.bracket-meta-desc-body {
    color: rgba(232, 238, 242, 0.92);
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.bracket-meta-block--prizes .bracket-prize-row {
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-bottom-color: rgba(113, 163, 230, 0.14);
    font-size: 0.88rem;
    box-sizing: border-box;
}

.bracket-prize-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(113, 163, 230, 0.12);
    font-size: 0.82rem;
    text-align: left;
}

.bracket-prize-row:last-child {
    border-bottom: none;
}

.bracket-prize-place {
    color: rgba(175, 200, 228, 0.85);
    flex-shrink: 0;
}

.bracket-prize-value {
    color: #ffd966;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.bracket-results-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 4px;
    overflow: hidden;
}

.bracket-result-row {
    display: grid;
    grid-template-columns: minmax(88px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.14);
    font-size: 0.88rem;
}

.bracket-result-row:last-child {
    border-bottom: none;
}

.bracket-result-place {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(175, 200, 228, 0.92);
    font-weight: 600;
}

.bracket-result-medal {
    flex: 0 0 auto;
    display: block;
    width: 24px;
    height: 24px;
}

.bracket-result-place-text {
    min-width: 0;
}

.bracket-result-names {
    color: #fff;
    word-break: break-word;
}

.bracket-meta-edit-wrap {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.2);
}

.bracket-playoff-section {
    width: 100%;
    max-width: 100%;
}

.bracket-elimination > .bracket-tournament-actions,
.bracket-playoff-section > .bracket-tournament-actions {
    margin-top: 12px;
}

.bracket-tournament-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
}

.bracket-tournament-actions__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.bracket-tournament-actions__row .bracket-completed-hint {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 0.95rem;
    line-height: 1.25;
    border-radius: 0;
    box-sizing: border-box;
}

.bracket-tournament-actions__row .bracket-back-link {
    flex: 0 0 auto;
    white-space: nowrap;
}

.bracket-prize-fieldset {
    margin: 0;
    padding: 0;
    border: none;
}

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

.bracket-prize-grid.bracket-prize-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.bracket-submit-btn--secondary {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.45);
    color: #a5d6a7;
}

.bracket-completed-hint {
    margin: 0;
    padding: 10px 12px;
    background: rgba(255, 217, 102, 0.1);
    border: 1px solid rgba(255, 217, 102, 0.3);
    color: #ffd966;
    font-size: 0.88rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .bracket-meta-grid {
        grid-template-columns: 1fr;
    }

    .bracket-result-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .bracket-prize-grid,
    .bracket-prize-grid--compact,
    .bracket-meta-edit .bracket-prize-grid--compact {
        grid-template-columns: 1fr;
    }
}

.bracket-render-target {
    overflow-x: visible;
    padding: 8px 0 0;
}

.page-bracket .header {
    margin-bottom: 0;
}

.page-bracket .container {
    gap: var(--layout-gap);
}

.page-bracket .page-bottom-spacer {
    display: none;
}

.page-bracket footer {
    margin-top: auto;
}

.bracket-elimination {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.bracket-stage {
    margin-bottom: 24px;
}

.bracket-elimination > .bracket-stage:last-child {
    margin-bottom: 0;
}

.bracket-elimination--double .bracket-stage--upper {
    margin-bottom: 28px;
}

.bracket-stage__title,
.bracket-group__title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #8ecbff;
}

.bracket-rounds {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-width: min-content;
    padding-bottom: 12px;
}

.bracket-tree {
    --bracket-tree-block: 88px;
    --bracket-tree-match-w: 176px;
    --bracket-tree-pedestal-w: 152px;
    --bracket-tree-connector: 28px;
    --bracket-tree-line: rgba(142, 203, 255, 0.72);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-width: min-content;
    padding: 4px 8px 16px;
    overflow-x: visible;
}

.bracket-tree__round {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: calc(var(--bracket-tree-match-w) + var(--bracket-tree-connector));
    padding-right: var(--bracket-tree-connector);
}

.bracket-tree__round--winner {
    width: calc(var(--bracket-tree-connector) + var(--bracket-tree-pedestal-w));
    padding-right: 0;
}

.bracket-tree__round--continuation {
    width: calc(var(--bracket-tree-connector) * 2);
    padding-right: 0;
}

.bracket-tree__stack--continuation {
    width: 100%;
    padding-left: var(--bracket-tree-connector);
    box-sizing: border-box;
}

.bracket-tree__match-wrap--continuation {
    width: 100%;
}

.bracket-tree__lines--continuation {
    left: 0;
    width: 100%;
}

.bracket-tree__round-label {
    font-size: 0.78rem;
    color: rgba(175, 200, 228, 0.65);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-height: 1.2em;
}

.bracket-tree__stack {
    position: relative;
    width: var(--bracket-tree-match-w);
    overflow: visible;
}

.bracket-tree__round--winner .bracket-tree__stack {
    width: calc(var(--bracket-tree-connector) + var(--bracket-tree-pedestal-w));
    padding-left: var(--bracket-tree-connector);
    box-sizing: border-box;
}

.bracket-tree__match-wrap {
    position: absolute;
    left: 0;
    width: var(--bracket-tree-match-w);
    z-index: 1;
}

.bracket-tree__match-wrap--pedestal {
    width: var(--bracket-tree-pedestal-w);
}

.bracket-tree__lines {
    position: absolute;
    left: 100%;
    top: 50%;
    width: var(--bracket-tree-connector);
    height: 0;
    pointer-events: none;
    z-index: 0;
}

.bracket-tree__line {
    position: absolute;
    background: var(--bracket-tree-line);
}

.bracket-tree__line--h {
    left: 0;
    top: 0;
    width: 50%;
    height: 2px;
    transform: translateY(-50%);
}

.bracket-tree__line--h.is-full {
    width: 100%;
}

.bracket-tree__line--v {
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
}

.bracket-tree__line--v.is-down {
    top: 0;
    height: var(--v-len, 44px);
}

.bracket-tree__line--v.is-up {
    bottom: 0;
    top: auto;
    height: var(--v-len, 44px);
    transform: translate(-50%, 0);
}

.bracket-tree__line--merge {
    left: 50%;
    top: var(--v-len, 44px);
    width: 50%;
    height: 2px;
    transform: translateY(-50%);
}

.bracket-tree__match-wrap--pedestal .bracket-tree__winner {
    position: relative;
    display: flex;
    align-items: center;
    height: 72px;
    box-sizing: border-box;
}

.bracket-tree__winner-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(175, 200, 228, 0.85);
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.2;
    min-height: 1em;
}

.bracket-tree__match-wrap--pedestal .bracket-tree__winner-label {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    margin-bottom: 0;
}

.bracket-tree__winner-box {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 2px solid rgba(129, 199, 132, 0.55);
    background: rgba(76, 175, 80, 0.16);
    border-radius: 4px;
    color: #a5d6a7;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
}

.bracket-tree__match-wrap--pedestal .bracket-tree__winner-box {
    width: 100%;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
}

.bracket-tree .bracket-match {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 72px;
    box-sizing: border-box;
}

.bracket-round {
    flex: 0 0 auto;
    min-width: 180px;
}

.bracket-round__label {
    font-size: 0.78rem;
    color: rgba(175, 200, 228, 0.65);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bracket-round__matches {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bracket-match {
    border: 1px solid rgba(113, 163, 230, 0.3);
    background: rgba(8, 14, 28, 0.6);
    border-radius: 4px;
    overflow: hidden;
    min-width: 160px;
}

.bracket-match__slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
    color: #e8eef2;
    border-bottom: 1px solid rgba(113, 163, 230, 0.15);
}

.bracket-match__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-match__score {
    width: 44px;
    flex-shrink: 0;
    padding: 4px 6px;
    border: 1px solid rgba(113, 163, 230, 0.4);
    background: rgba(10, 18, 36, 0.75);
    color: #e8eef2;
    font-size: 0.88rem;
    font-family: inherit;
    text-align: center;
    border-radius: 3px;
    -moz-appearance: textfield;
}

.bracket-match__score::-webkit-outer-spin-button,
.bracket-match__score::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bracket-match__score:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.25);
}

.bracket-match__score-display {
    flex-shrink: 0;
    min-width: 24px;
    padding: 2px 8px;
    font-weight: 700;
    color: #8ecbff;
    text-align: center;
    background: rgba(100, 181, 246, 0.12);
    border-radius: 3px;
}

.bracket-match__slot:last-of-type {
    border-bottom: none;
}

.bracket-match__slot.is-winner {
    background: rgba(76, 175, 80, 0.18);
    color: #a5d6a7;
    font-weight: 600;
}

.bracket-match__slot.is-clickable {
    cursor: pointer;
}

.bracket-match__slot.is-clickable:hover {
    background: rgba(100, 181, 246, 0.12);
}

.bracket-match__vs {
    display: none;
}

.bracket-group {
    margin-bottom: 0;
}

.bracket-group-stage {
    margin-bottom: 24px;
    max-width: 100%;
    overflow-x: hidden;
}

.bracket-group-panel {
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: linear-gradient(180deg, rgba(14, 24, 46, 0.72) 0%, rgba(10, 18, 36, 0.58) 100%);
    box-shadow: inset 0 1px 0 rgba(188, 220, 255, 0.05);
    overflow: visible;
}

.bracket-group-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.22);
}

.bracket-group-panel__tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.bracket-group-tab {
    margin: 0;
    padding: 7px 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(18, 30, 56, 0.55);
    color: rgba(175, 200, 228, 0.88);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.bracket-group-tab:hover:not(.is-active) {
    border-color: rgba(100, 181, 246, 0.55);
    color: #b8deff;
}

.bracket-group-tab.is-active {
    border-color: rgba(100, 181, 246, 0.72);
    background: rgba(76, 141, 220, 0.22);
    color: #8ecbff;
}

.bracket-group-search {
    position: relative;
    flex: 0 0 auto;
    width: min(100%, 260px);
}

.bracket-group-search__input {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
}

.bracket-group-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.bracket-group-search__menu {
    position: absolute;
    z-index: 130;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(113, 163, 230, 0.38);
    background: linear-gradient(180deg, rgba(18, 30, 56, 0.98) 0%, rgba(12, 22, 44, 0.98) 100%);
    box-shadow: 0 12px 28px rgba(4, 10, 22, 0.45);
}

.bracket-group-search__menu[hidden] {
    display: none !important;
}

.bracket-group-search__option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #e8eef2;
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
}

.bracket-group-search__option:hover,
.bracket-group-search__option:focus-visible {
    background: rgba(76, 141, 220, 0.35);
    outline: none;
}

.bracket-group-search__option-label {
    font-weight: 600;
    color: #e8eef2;
}

.bracket-group-search__option-hint {
    font-size: 0.82rem;
    color: rgba(175, 200, 228, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.bracket-group-search__empty {
    padding: 10px 14px;
    color: rgba(175, 200, 228, 0.45);
    font-size: 0.9rem;
}

.bracket-group-panel__head .bracket-group-search.is-open {
    z-index: 130;
}

@media (max-width: 640px) {
    .bracket-group-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .bracket-group-search {
        width: 100%;
    }
}

.bracket-group-stage__body {
    padding: 16px 18px;
}

.bracket-combobox--groups .bracket-combobox__menu {
    max-height: 280px;
}

.bracket-combobox__option--group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px 14px;
    text-align: left;
    line-height: 1.35;
}

.bracket-combobox__option--group.is-active {
    background: rgba(76, 141, 220, 0.22);
}

.bracket-combobox__option-label {
    font-weight: 600;
    color: #e8eef2;
}

.bracket-combobox__option-hint {
    font-size: 0.82rem;
    color: rgba(175, 200, 228, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.bracket-group-stage__not-found {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px dashed rgba(113, 163, 230, 0.35);
    border-radius: 4px;
    background: rgba(10, 18, 36, 0.45);
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.9rem;
}

.bracket-group-stage__not-found[hidden],
.bracket-group-stage__panels[hidden] {
    display: none !important;
}

.bracket-standings {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 0.88rem;
}

.bracket-standings th,
.bracket-standings td {
    padding: 6px 10px;
    border: 1px solid rgba(113, 163, 230, 0.2);
    text-align: left;
}

.bracket-standings th {
    background: rgba(10, 18, 36, 0.5);
    color: rgba(175, 200, 228, 0.85);
}

.bracket-group__matches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.bracket-edit-controls {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.2);
}

.bracket-participants-panel {
    margin: 16px 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

.bracket-participants-panel[hidden] {
    display: none !important;
}

.bracket-edit-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    margin-top: 24px;
}

.bracket-moderation-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(255, 138, 138, 0.15);
    border: 1px solid rgba(255, 138, 138, 0.35);
    color: #ff8a8a;
    font-size: 0.85rem;
    border-radius: 3px;
}

.bracket-profile-wrap {
    overflow-x: auto;
}

.bracket-profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    table-layout: fixed;
}

.bracket-profile-table th,
.bracket-profile-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.2);
    text-align: left;
    vertical-align: top;
}

.bracket-profile-table th:nth-child(1),
.bracket-profile-table td:nth-child(1) {
    width: 34%;
}

.bracket-profile-table th:nth-child(2),
.bracket-profile-table td:nth-child(2) {
    width: 28%;
}

.bracket-profile-table th:nth-child(3),
.bracket-profile-table td:nth-child(3) {
    width: 16%;
}

.bracket-profile-table th:nth-child(4),
.bracket-profile-table td:nth-child(4) {
    width: 22%;
}

.bracket-profile-table--tactics th:nth-child(1),
.bracket-profile-table--tactics td:nth-child(1) {
    width: 34%;
}

.bracket-profile-table--tactics th:nth-child(2),
.bracket-profile-table--tactics td:nth-child(2) {
    width: 22%;
}

.bracket-profile-table--tactics th:nth-child(3),
.bracket-profile-table--tactics td:nth-child(3) {
    width: 20%;
}

.bracket-profile-table--tactics th:nth-child(4),
.bracket-profile-table--tactics td:nth-child(4) {
    width: 24%;
}

.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) th:nth-child(1),
.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) td:nth-child(1) {
    width: 34%;
}

.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) th:nth-child(2),
.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) td:nth-child(2) {
    width: 24%;
}

.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) th:nth-child(3),
.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) td:nth-child(3) {
    width: 18%;
}

.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) th:nth-child(4),
.page-auth-profile .profile-panel--list .bracket-profile-table:not(.bracket-profile-table--tactics) td:nth-child(4) {
    width: 24%;
}

.bracket-profile-table--tactics code {
    font-size: 0.82rem;
    word-break: break-all;
}

.bracket-profile-table th {
    color: rgba(175, 200, 228, 0.85);
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.bracket-profile-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.bracket-profile-title__text {
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
}

.bracket-profile-title__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.bracket-profile-format,
.bracket-profile-date {
    color: rgba(175, 200, 228, 0.88);
    line-height: 1.4;
}

.bracket-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.bracket-profile-link,
.bracket-profile-delete {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    color: #8ecbff;
    text-decoration: none;
    padding: 0;
    line-height: 1.35;
}

.bracket-profile-link:hover,
.bracket-profile-delete:hover {
    text-decoration: underline;
}

.bracket-profile-delete {
    color: #ff8a8a;
}

.bracket-profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.72rem;
    margin-left: 0;
}

.bracket-profile-badge--hidden {
    background: rgba(255, 138, 138, 0.15);
    color: #ff8a8a;
}

.bracket-profile-badge--unlisted {
    background: rgba(158, 158, 158, 0.15);
    color: #bdbdbd;
}

@media (max-width: 768px) {
    .bracket-panel {
        padding: 20px 16px;
    }

    .bracket-section-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bracket-service-header .bracket-section-head {
        align-items: stretch;
    }

    .bracket-section-head > div {
        min-width: 0;
        max-width: 100%;
    }

    .bracket-section-actions,
    .bracket-view-actions,
    .bracket-edit-toolbar,
    .bracket-tournament-actions {
        width: 100%;
        flex-shrink: 1;
        flex-direction: column;
        align-items: stretch;
    }

    .bracket-section-head > .bracket-cta-btn,
    .bracket-section-head > .bracket-back-link,
    .bracket-section-actions .bracket-cta-btn,
    .bracket-section-actions .bracket-back-link,
    .bracket-section-actions .bracket-submit-btn,
    .bracket-section-actions .bracket-delete-btn,
    .bracket-view-actions .bracket-cta-btn,
    .bracket-view-actions .bracket-back-link,
    .bracket-edit-toolbar .bracket-cta-btn,
    .bracket-edit-toolbar .bracket-back-link,
    .bracket-edit-toolbar .bracket-submit-btn,
    .bracket-edit-toolbar .bracket-delete-btn,
    .bracket-tournament-actions .bracket-cta-btn,
    .bracket-tournament-actions .bracket-back-link,
    .bracket-tournament-actions .bracket-submit-btn,
    .bracket-tournament-actions .bracket-delete-btn {
        width: 100%;
    }

    .bracket-tournament-actions__row .bracket-back-link {
        width: auto;
    }

    .bracket-service,
    .bracket-panel {
        min-width: 0;
        max-width: 100%;
    }

    .bracket-form-grid {
        grid-template-columns: 1fr;
    }

    .bracket-form-desc-prize-row {
        grid-template-columns: 1fr;
    }

    .bracket-game-picker {
        flex-wrap: wrap;
    }

    .bracket-game-option {
        flex: 1 1 calc(50% - 1px);
        min-width: calc(50% - 1px);
    }

    .bracket-game-option:nth-child(2n) .bracket-game-option__card {
        border-right: none;
    }

    .bracket-game-option:nth-child(-n+2) .bracket-game-option__card {
        border-bottom: 1px solid rgba(113, 163, 230, 0.22);
    }

    .bracket-rounds {
        flex-direction: column;
    }

    .bracket-tree {
        padding-bottom: 20px;
    }

    .bracket-profile-table {
        table-layout: auto;
    }

    .bracket-profile-table th:nth-child(3),
    .bracket-profile-table td:nth-child(3) {
        white-space: nowrap;
    }
}

.tactics-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.tactics-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
}

.tactics-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tactics-section-actions {
    flex-shrink: 0;
}

.tactics-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tactics-custom-map-upload {
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 217, 102, 0.06) 0%, rgba(22, 33, 61, 0.55) 100%);
    border: 1px dashed rgba(255, 217, 102, 0.38);
    border-radius: 8px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.tactics-custom-map-upload__btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255, 217, 102, 0.45);
    border-radius: 6px;
    background: rgba(255, 217, 102, 0.1);
    color: #ffd966;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.tactics-custom-map-upload__btn:hover:not(:disabled) {
    background: rgba(255, 217, 102, 0.16);
    border-color: rgba(255, 217, 102, 0.65);
    color: #ffe699;
}

.tactics-custom-map-upload__btn:disabled,
.tactics-custom-map-upload__btn.is-busy {
    opacity: 0.65;
    cursor: wait;
}

.tactics-custom-map-upload__hint {
    margin: 8px 0 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgba(200, 214, 230, 0.65);
    text-align: left;
}

#tacticsCustomMapUpload[hidden] {
    display: none !important;
}

.tactics-field input.tactics-input--locked,
.tactics-field input.tactics-input--locked:focus {
    opacity: 0.82;
    cursor: default;
    border-color: rgba(113, 163, 230, 0.22);
    box-shadow: none;
}

.tactics-room-header-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-width: 0;
}

.tactics-room-header-main .tactics-section-title {
    margin: 0;
}

button.tactics-back-link {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.tactics-room-code-btn {
    white-space: nowrap;
    line-height: 1;
    align-items: center;
    justify-content: flex-start;
}

.tactics-room-code-btn__text {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 1 auto;
    gap: 0.35em;
    line-height: 1;
    box-sizing: border-box;
}

.tactics-room-code-btn__icon {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 0.92em;
    line-height: 1;
}

.tactics-room-code-btn__label {
    flex: 0 0 auto;
    font-weight: 600;
    color: inherit;
}

.tactics-room-code-btn__value {
    font-weight: 700;
    color: #e8f2ff;
    letter-spacing: 0.03em;
}

.tactics-room-code-btn.is-copied {
    border-color: rgba(126, 224, 138, 0.75);
    color: #b8f0c0;
}

.tactics-room-code-btn.is-copied .tactics-room-code-btn__icon {
    color: #9ee8a8;
}

.tactics-room-code-btn.is-copy-error {
    border-color: rgba(255, 138, 138, 0.65);
    color: #ffb8b8;
}

.tactics-room-code-btn__copied {
    font-weight: 700;
    color: inherit;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tactics-room-code-btn__copied--error {
    font-size: 0.88rem;
    font-weight: 600;
}

.tactics-section-title,
.tactics-panel-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

.tactics-panel-title {
    font-size: 1.1rem;
}

.tactics-section-hint,
.tactics-room-meta {
    margin: 8px 0 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.tactics-room-meta code {
    color: #8ecbff;
    font-size: 0.95em;
}

.page-tactics-lobby #tactics-create {
    scroll-margin-top: 24px;
}

.page-tactics-lobby #tactics-create .tactics-panel-title {
    scroll-margin-top: 24px;
}

.tactics-lobby-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap);
    position: relative;
    z-index: 2;
}

.page-tactics-lobby .tactics-create-panel {
    position: relative;
    z-index: 2;
}

.tactics-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
    gap: 32px;
    align-items: start;
}

.tactics-create-form-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.tactics-create-form-col .tactics-panel-title {
    margin-bottom: 18px;
}

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

.tactics-create-submit {
    align-self: flex-start;
    min-width: 220px;
}

.tactics-create-preview-col {
    position: sticky;
    top: 24px;
    min-width: 0;
}

.tactics-create-preview-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tactics-create-preview__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(155, 176, 197, 0.92);
}

.tactics-create-preview__frame {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%),
        rgba(8, 14, 28, 0.88);
    border: 1px solid rgba(141, 195, 255, 0.18);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 18px 40px rgba(4, 10, 22, 0.35);
}

.tactics-create-preview__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tactics-create-preview__img[hidden] {
    display: none !important;
}

.tactics-create-preview__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    color: rgba(155, 176, 197, 0.72);
    text-align: center;
}

.tactics-create-preview__placeholder[hidden] {
    display: none !important;
}

.tactics-create-preview__placeholder i {
    font-size: 2.4rem;
    line-height: 1;
    opacity: 0.5;
}

.tactics-create-preview__placeholder span {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: 18em;
}

.tactics-create-preview__frame:has(.tactics-create-preview__scale:not([hidden]))::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 52%;
    height: 42%;
    background: radial-gradient(ellipse 100% 100% at top right, rgba(0, 0, 0, 0.45) 0%, transparent 68%);
    pointer-events: none;
}

.tactics-create-preview__scale {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    pointer-events: none;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.92),
        0 0 8px rgba(0, 0, 0, 0.75);
}

.tactics-create-preview__scale[hidden] {
    display: none !important;
}

.tactics-create-preview__meta {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 14px 14px;
    background: linear-gradient(180deg, rgba(8, 14, 28, 0) 0%, rgba(8, 14, 28, 0.92) 55%);
    pointer-events: none;
}

.tactics-create-preview__meta[hidden] {
    display: none !important;
}

.tactics-create-preview__game,
.tactics-create-preview__mode {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(155, 176, 197, 0.88);
}

.tactics-create-preview__map {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #f0f7ff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.tactics-create-preview__hint {
    margin: 0;
    color: rgba(155, 176, 197, 0.78);
    font-size: 0.84rem;
    line-height: 1.45;
}

.page-tactics-lobby .tactics-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.97) 0%, rgba(16, 24, 46, 0.95) 100%);
    isolation: isolate;
}

.page-tactics-lobby .tactics-catalog {
    position: relative;
    z-index: 1;
}

.tactics-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tactics-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tactics-field[hidden],
.tactics-password-field[hidden],
.tactics-add-slide-field[hidden],
#tacticsPasswordWrap[hidden],
#tacticsRoomVisibilityWrap[hidden],
#tacticsRoomWorkspace[hidden],
#tacticsPasswordGate[hidden],
#tacticsRoomGone[hidden] {
    display: none !important;
}

.tactics-field-label,
.tactics-visibility-field legend {
    color: rgba(175, 200, 228, 0.88);
    font-size: 0.88rem;
    font-weight: 600;
}

.tactics-field input[type="text"],
.tactics-field input[type="password"],
.tactics-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(12, 20, 38, 0.72);
    color: #e8f2ff;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.tactics-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(200, 220, 245, 0.92);
    font-size: 0.92rem;
    margin-top: 6px;
}

.tactics-form-error {
    margin: 0;
    color: #ff8a8a;
    font-size: 0.9rem;
}

.tactics-submit-btn,
.tactics-back-link,
.tactics-icon-btn,
.tactics-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tactics-submit-btn:hover,
.tactics-back-link:hover,
.tactics-icon-btn:hover,
.tactics-tool-btn:hover {
    border-color: #64b5f6;
    color: #b8deff;
}

.tactics-submit-btn:disabled,
.tactics-submit-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.tactics-catalog-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tactics-catalog-card {
    display: flex;
    flex-direction: column;
    min-height: 156px;
    padding: 16px;
    border: 1px solid rgba(113, 163, 230, 0.25);
    background: linear-gradient(180deg, rgba(16, 26, 48, 0.82) 0%, rgba(10, 18, 36, 0.72) 100%);
    box-shadow: inset 0 1px 0 rgba(188, 220, 255, 0.06);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tactics-catalog-card:hover {
    border-color: rgba(100, 181, 246, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(4, 10, 22, 0.28), inset 0 1px 0 rgba(188, 220, 255, 0.08);
}

.tactics-catalog-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    min-width: 0;
}

.tactics-catalog-card__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tactics-catalog-card__lock {
    flex: 0 0 auto;
    color: rgba(255, 196, 120, 0.92);
    font-size: 0.82rem;
    line-height: 1;
    margin-top: 2px;
}

.tactics-catalog-card__subhead {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
    min-width: 0;
}

.tactics-catalog-card__creator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
    color: rgba(175, 200, 228, 0.82);
}

.tactics-catalog-card__creator i {
    flex: 0 0 auto;
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.92em;
}

.tactics-catalog-card__subhead .bracket-game-badge {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

.tactics-catalog-card__subhead .bracket-game-badge__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.tactics-catalog-card__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    min-width: 0;
    font-size: 0.82rem;
    color: rgba(175, 200, 228, 0.78);
}

.tactics-catalog-card__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tactics-catalog-card__code,
.tactics-catalog-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.tactics-catalog-card__code i,
.tactics-catalog-card__date i {
    flex: 0 0 auto;
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.92em;
}

.tactics-catalog-card__code strong {
    color: #e8f2ff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.tactics-catalog-card__date--empty {
    color: rgba(175, 200, 228, 0.62);
}

.tactics-catalog-empty,
.tactics-catalog-loading {
    grid-column: 1 / -1;
    color: rgba(175, 200, 228, 0.75);
    margin: 0;
}

@media (max-width: 1100px) {
    .tactics-catalog-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .tactics-catalog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .tactics-catalog-list {
        grid-template-columns: 1fr;
    }
}

.tactics-password-gate {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-sizing: border-box;
}

.tactics-auth-gate {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    width: 100%;
    box-sizing: border-box;
    background: var(--tactics-editor-bg, #0a1022);
}

.tactics-auth-gate__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
}

.tactics-auth-gate__text {
    margin: 0;
    color: rgba(200, 220, 245, 0.92);
    font-size: 1rem;
    line-height: 1.45;
}

.tactics-auth-gate .spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(126, 196, 255, 0.25);
    border-top-color: #8ecbff;
    border-right-color: #8ecbff;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    flex-shrink: 0;
}

html.tactics-auth-pending #tacticsPasswordGate {
    display: none !important;
}

html.tactics-auth-pending #tacticsAuthGate {
    display: flex !important;
}

html.tactics-auth-pending #tacticsAuthGate[hidden] {
    display: flex !important;
}

html.tactics-auth-pending .tactics-room-layout--locked {
    min-height: 100dvh;
    height: 100dvh;
    margin: 0;
}

.page-tactics-room-locked .tactics-password-panel.tactics-panel {
    padding: 28px 24px 24px;
    border-radius: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.96) 0%, rgba(16, 24, 46, 0.94) 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.page-tactics-room-locked .tactics-password-panel .tactics-panel-title {
    margin: 0 0 18px;
    text-align: center;
    color: #f0f4f8;
    font-size: 1.25rem;
}

.page-tactics-room-locked .tactics-password-panel .tactics-form {
    gap: 14px;
}

.page-tactics-room-locked .tactics-password-panel .tactics-field-label {
    color: rgba(200, 220, 245, 0.88);
}

.page-tactics-room-locked .tactics-password-panel .tactics-field input[type="password"] {
    border-radius: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(8, 14, 28, 0.88);
    color: #e8f2ff;
    outline: none;
    box-shadow: none;
}

.page-tactics-room-locked .tactics-password-panel .tactics-field input[type="password"]:focus {
    border-color: rgba(126, 184, 255, 0.62);
    box-shadow: 0 0 0 2px rgba(76, 139, 220, 0.22);
}

.page-tactics-room-locked .tactics-password-panel .tactics-field input[type="password"]:-webkit-autofill,
.page-tactics-room-locked .tactics-password-panel .tactics-field input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #e8f2ff;
    caret-color: #e8f2ff;
    transition: background-color 99999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px rgba(8, 14, 28, 0.88) inset;
}

.page-tactics-room-locked .tactics-password-panel__enter {
    border-radius: 0;
    border-color: rgba(126, 184, 255, 0.5);
    background: linear-gradient(180deg, rgba(41, 98, 168, 0.95) 0%, rgba(26, 68, 128, 0.95) 100%);
    color: #eef6ff;
}

.page-tactics-room-locked .tactics-password-panel__enter:hover {
    border-color: rgba(160, 204, 255, 0.72);
    color: #fff;
}

.page-tactics-room-locked .tactics-password-panel__lobby {
    border-radius: 0;
    border-color: rgba(113, 163, 230, 0.32);
    background: rgba(18, 28, 50, 0.82);
    color: rgba(200, 220, 245, 0.92);
}

.page-tactics-room-locked .tactics-password-panel__lobby:hover {
    border-color: rgba(126, 184, 255, 0.48);
    color: #d8ebff;
}

.page-tactics-room-locked .tactics-password-panel__actions {
    gap: 10px;
}

.page-tactics-room-locked .tactics-password-panel__actions .tactics-submit-btn,
.page-tactics-room-locked .tactics-password-panel__actions .tactics-back-link {
    border-radius: 0;
    min-height: 44px;
}

.page-tactics-room-locked .tactics-password-panel .tactics-form-error {
    text-align: center;
}

.tactics-room-gone-page {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: min(72vh, calc(100dvh - 220px));
    padding: 24px 16px;
    box-sizing: border-box;
}

.tactics-room-gone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.tactics-room-gone--overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    padding: 24px 16px;
    background: rgba(8, 12, 22, 0.82);
    backdrop-filter: blur(6px);
}

.page-tactics-room-gone .tactics-room-layout--gone {
    min-height: min(72vh, calc(100dvh - 220px));
}

.tactics-room-gone__card {
    width: min(100%, 460px);
    padding: 28px 24px 24px;
    border-radius: 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.96) 0%, rgba(16, 24, 46, 0.94) 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.tactics-room-gone__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(255, 217, 102, 0.12);
    border: 1px solid rgba(255, 217, 102, 0.35);
    color: #ffd966;
    font-size: 1.6rem;
}

.tactics-room-gone__title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    color: #f0f4f8;
}

.tactics-room-gone__text {
    margin: 0 0 22px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(200, 220, 245, 0.82);
}

.tactics-room-gone__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.tactics-room-gone__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.tactics-room-gone__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    text-decoration: none;
}

.tactics-room-layout--locked {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: min(72vh, calc(100dvh - 220px));
    margin: 0 auto;
    overflow: hidden;
}

.tactics-room-layout--locked .tactics-room-workspace {
    display: none !important;
}

.page-tactics-room-locked .tactics-room-layout--locked {
    width: 100%;
}

.tactics-password-panel {
    width: 100%;
    box-sizing: border-box;
}

.tactics-password-panel__actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 4px;
}

.tactics-password-panel__actions .tactics-submit-btn,
.tactics-password-panel__actions .tactics-back-link {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.tactics-password-panel__enter {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 22px;
    justify-content: center;
}

.tactics-password-panel__lobby {
    flex: 0 0 auto;
    padding: 12px 16px;
    white-space: nowrap;
}

.page-tactics-room-locked .container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.page-tactics-room-locked .tactics-service {
    flex: 1 1 auto;
}

.tactics-room-workspace {
    display: grid;
    grid-template-columns: minmax(148px, 168px) minmax(0, 1fr) minmax(220px, 280px);
    gap: var(--layout-gap);
    align-items: stretch;
    min-height: 0;
}

.tactics-tools-column {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
    min-height: 0;
}

.tactics-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
    min-height: 0;
}

.tactics-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
}

.tactics-tools-panel {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
}

.tactics-palette {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tactics-palette-presets {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.tactics-palette-swatch {
    aspect-ratio: 1;
    border: 2px solid rgba(113, 163, 230, 0.35);
    border-radius: 4px;
    background: var(--swatch-color);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.tactics-palette-swatch:hover {
    border-color: rgba(100, 181, 246, 0.7);
}

.tactics-palette-swatch.is-active {
    border-color: #64b5f6;
    box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.5);
}

.tactics-hue-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    appearance: none;
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    cursor: pointer;
}

.tactics-hue-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(12, 20, 38, 0.8);
    cursor: pointer;
}

.tactics-palette-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    align-items: center;
}

.tactics-color-input--secondary {
    opacity: 0.85;
}

.tactics-palette-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
}

.tactics-toolbar--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 100%;
}

.tactics-toolbar--grid .tactics-tool-btn {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tactics-toolbar-room {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

.tactics-toolbar-room__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.tactics-toolbar-room__row .tactics-tool-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
}

.tactics-width-input--horizontal {
    width: 100%;
    height: auto;
    writing-mode: horizontal-tb;
    direction: ltr;
    margin: 0;
}

.tactics-chat-panel {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.tactics-chat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: rgba(200, 220, 245, 0.95);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.tactics-chat-toggle__icon {
    transition: transform 0.2s ease;
}

.tactics-chat-panel.is-collapsed .tactics-chat-body,
.tactics-chat-panel.is-collapsed .tactics-chat-form {
    display: none;
}

.tactics-chat-panel.is-collapsed .tactics-chat-toggle__icon {
    transform: rotate(180deg);
}

.tactics-chat-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    padding: 0 10px 10px;
    gap: 8px;
}

.tactics-chat-messages {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tactics-chat-message {
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(200, 220, 245, 0.9);
    word-break: break-word;
}

.tactics-chat-message__nick {
    font-weight: 600;
    color: #64b5f6;
    margin-right: 4px;
}

.tactics-chat-message__time {
    font-size: 0.7rem;
    color: rgba(150, 170, 200, 0.65);
    margin-left: 4px;
}

.tactics-chat-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tactics-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 6px;
    background: rgba(12, 20, 38, 0.75);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    outline: none;
    box-shadow: none;
}

.tactics-chat-input:focus,
.tactics-chat-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.tactics-chat-send {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 6px;
    background: rgba(40, 70, 120, 0.55);
    color: #b8deff;
    cursor: pointer;
}

.tactics-slides-head__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tactics-add-slide-btn {
    padding: 4px 10px;
    border: 1px solid rgba(100, 181, 246, 0.55);
    border-radius: 6px;
    background: rgba(40, 70, 120, 0.45);
    color: #b8deff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tactics-add-slide-btn:hover {
    border-color: #64b5f6;
    background: rgba(50, 90, 140, 0.6);
}

.tactics-slides-strip-wrap {
    margin-top: 8px;
    overflow: hidden;
}

.tactics-slides-list--strip {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.tactics-slide-card--thumb {
    flex: 0 0 auto;
    width: 108px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 0;
    position: relative;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.tactics-slide-card--thumb.is-active {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.tactics-slide-preview {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(8, 14, 28, 0.9);
}

.tactics-slide-thumb-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.tactics-slide-preview__scale {
    position: absolute;
    top: 4px;
    left: 5px;
    z-index: 1;
    padding: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: left;
    letter-spacing: 0.02em;
    pointer-events: none;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.92),
        0 0 8px rgba(0, 0, 0, 0.75);
}

.tactics-slide-preview__scale[hidden] {
    display: none;
}

.tactics-slide-card--thumb.is-active .tactics-slide-preview {
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.35);
}

.tactics-slide-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(8, 14, 28, 0.9);
}

.tactics-slide-card--thumb .tactics-slide-btn,
.tactics-slide-card--thumb .tactics-slide-thumb-btn {
    flex-direction: column;
    padding: 0;
    gap: 0;
    align-items: stretch;
    width: 100%;
    height: 100%;
    text-align: left;
}

.tactics-slide-card--thumb .tactics-slide-name {
    flex: 0 0 auto;
    font-size: 0.72rem;
    text-align: center;
    width: 100%;
    padding: 0 2px;
    cursor: pointer;
}

.tactics-slide-card--thumb .tactics-slide-delete,
.tactics-slide-card--thumb .tactics-slide-duplicate {
    position: absolute;
    top: 4px;
    z-index: 3;
    width: 22px;
    height: 22px;
    margin: 0;
    border-radius: 0;
    background: rgba(12, 20, 38, 0.85);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tactics-slide-card--thumb .tactics-slide-delete {
    right: 4px;
}

.tactics-slide-card--thumb .tactics-slide-duplicate {
    right: 30px;
}

.tactics-slide-card--thumb:not(:has(.tactics-slide-delete)) .tactics-slide-duplicate {
    right: 4px;
}

.tactics-slide-preview .tactics-slide-change-map {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: none;
    min-height: 24px;
    margin: 0;
    padding: 5px 6px;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.62);
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
    cursor: pointer;
}

.tactics-slide-preview .tactics-slide-change-map:hover {
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
}

.tactics-slide-card--thumb:hover .tactics-slide-delete,
.tactics-slide-card--thumb:hover .tactics-slide-duplicate,
.tactics-slide-card--thumb:focus-within .tactics-slide-delete,
.tactics-slide-card--thumb:focus-within .tactics-slide-duplicate {
    opacity: 1;
}

.tactics-slide-change-map {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(175, 200, 228, 0.55);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.tactics-slide-change-map__label {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.tactics-slide-change-map:hover {
    color: rgba(232, 238, 242, 0.95);
    background: rgba(113, 163, 230, 0.18);
}

.tactics-sidebar-panel--slides {
    margin-top: auto;
}

.tactics-remote-strokes-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: visible;
}

.tactics-remote-stroke {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.tactics-remote-stroke svg {
    overflow: visible;
}

.tactics-sidebar-panel {
    padding: 20px;
}

.tactics-sidebar-title {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(200, 220, 245, 0.95);
}

.tactics-participants-list,
.tactics-slides-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tactics-participant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(12, 20, 38, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.2);
    color: rgba(200, 220, 245, 0.9);
    font-size: 0.88rem;
}

.tactics-participant-name {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}

.tactics-participant-nick {
    display: inline-flex;
    align-items: center;
    line-height: 1.35;
}

.tactics-participant-present {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 1.1em;
    height: 1.1em;
    color: rgba(255, 168, 130, 0.95);
    font-size: 0.82rem;
    line-height: 1;
}

.tactics-participant-present i {
    display: block;
    font-size: 1em;
    line-height: 1;
    transform: translateY(1px);
}

.tactics-participant-present.is-offline {
    color: rgba(160, 170, 190, 0.75);
}

.tactics-participant-nick.is-offline {
    opacity: 0.62;
}

.tactics-participant-offline {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-left: 2px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(120, 130, 150, 0.16);
    border: 1px solid rgba(140, 155, 180, 0.28);
    color: rgba(170, 180, 200, 0.88);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.tactics-participant--offline {
    opacity: 0.92;
    border-style: dashed;
    border-color: rgba(120, 140, 170, 0.28);
}

.tactics-participant-present-timer {
    flex-shrink: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-width: 2.85rem;
    margin-left: 2px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 196, 160, 0.95);
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    letter-spacing: 0.02em;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.tactics-participant-present-timer.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    background: rgba(255, 168, 130, 0.14);
    border-color: rgba(255, 168, 130, 0.35);
}

.tactics-participant-present-timer.is-visible.is-warning {
    background: rgba(255, 152, 72, 0.18);
    border-color: rgba(255, 152, 72, 0.5);
    color: #ffc48a;
}

.tactics-participant-present-timer.is-visible.is-critical {
    background: rgba(255, 92, 72, 0.2);
    border-color: rgba(255, 92, 72, 0.55);
    color: #ffb0a6;
}

.tactics-participant-nick-btn,
.tactics-participant-editor-btn,
.tactics-participant-color-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(12, 20, 38, 0.85);
    color: rgba(180, 200, 225, 0.75);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tactics-participant-color-btn__swatch {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.tactics-nick-color-picker {
    position: fixed;
    z-index: 12050;
    display: grid;
    grid-template-columns: repeat(5, 24px);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(113, 163, 230, 0.45);
    background: rgba(10, 16, 30, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    border-radius: 6px;
}

.tactics-nick-color-picker[hidden] {
    display: none !important;
}

.tactics-nick-color-picker__swatch {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.tactics-nick-color-picker__swatch:hover,
.tactics-nick-color-picker__swatch.is-selected {
    border-color: rgba(255, 255, 255, 0.85);
    transform: scale(1.08);
}

.tactics-participant-nick-btn:hover,
.tactics-participant-editor-btn:hover,
.tactics-participant-color-btn:hover {
    border-color: rgba(100, 181, 246, 0.55);
    color: #b8deff;
}

.tactics-participant-nick-btn.is-save {
    border-color: rgba(100, 181, 246, 0.65);
    color: #b8deff;
}

.tactics-participant-editor-btn.is-active {
    border-color: rgba(100, 181, 246, 0.75);
    background: rgba(40, 80, 130, 0.45);
    color: #b8deff;
}

.tactics-tool-btn.is-disabled,
.tactics-tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.tactics-sidebar-panel--maps.is-disabled,
.tactics-sidebar-panel--slides.is-disabled {
    opacity: 0.45;
}

.tactics-sidebar-panel--maps.is-disabled .tactics-slides-head,
.tactics-sidebar-panel--maps.is-disabled .tactics-add-slide-field,
.tactics-sidebar-panel--slides.is-disabled .tactics-slides-head,
.tactics-sidebar-panel--slides.is-disabled .tactics-add-slide-field {
    pointer-events: none;
}

.tactics-participant-self {
    border-color: rgba(100, 181, 246, 0.55);
    color: #b8deff;
}

.tactics-participant--editing-nick {
    padding: 0 4px 0 0;
    gap: 4px;
}

.tactics-participant--editing-nick:focus-within {
    border-color: rgba(100, 181, 246, 0.75);
}

.tactics-participant-name-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    box-sizing: border-box;
    outline: none;
}

.tactics-slide-rename-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #64b5f6;
    background: rgba(12, 20, 38, 0.95);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.tactics-slides-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tactics-icon-btn {
    padding: 6px 10px;
    min-width: 36px;
}

.tactics-map-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tactics-map-picker-tabs {
    margin-top: 6px;
    width: 100%;
}

.tactics-map-picker .tactics-map-picker-tabs.recruiting-realm-tabs {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
}

.tactics-map-picker-tabs--game {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    border: none;
    background: transparent;
    padding: 2px 0 0;
}

.tactics-map-picker-tabs--game.recruiting-realm-tabs {
    border: none;
    background: transparent;
    width: 100%;
}

.tactics-map-picker-tabs--game .tactics-game-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 84px;
    padding: 12px 8px 10px;
    border: 1px solid rgba(113, 163, 230, 0.2);
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(22, 34, 58, 0.78) 0%, rgba(12, 20, 38, 0.62) 100%);
    color: rgba(188, 212, 238, 0.9);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.tactics-map-picker-tabs--game .tactics-game-tab:hover {
    border-color: rgba(113, 163, 230, 0.42);
    background: linear-gradient(165deg, rgba(28, 44, 74, 0.88) 0%, rgba(16, 26, 48, 0.72) 100%);
    color: #dcecff;
    transform: translateY(-1px);
}

.tactics-map-picker-tabs--game .tactics-game-tab.is-active {
    border-color: rgba(100, 181, 246, 0.72);
    background: linear-gradient(165deg, rgba(34, 62, 98, 0.95) 0%, rgba(22, 42, 72, 0.9) 100%);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.28), 0 10px 24px rgba(4, 10, 24, 0.38);
    transform: translateY(-1px);
}

.tactics-game-tab__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tactics-map-picker-tabs--game .tactics-game-tab.is-active .tactics-game-tab__icon-wrap {
    background: rgba(100, 181, 246, 0.14);
    border-color: rgba(100, 181, 246, 0.35);
    box-shadow: 0 0 16px rgba(100, 181, 246, 0.18);
}

.tactics-game-tab__icon-wrap--empty {
    background: rgba(255, 255, 255, 0.04);
}

.tactics-game-tab__icon {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.tactics-game-tab__label {
    display: block;
    max-width: 100%;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
}

.tactics-mode-switch {
    display: flex;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 10px;
    background: rgba(10, 18, 36, 0.65);
    box-sizing: border-box;
    overflow: hidden;
    gap: 0;
}

.tactics-mode-switch--vertical {
    flex-direction: column;
}

.tactics-mode-switch--horizontal {
    flex-direction: row;
}

.tactics-mode-switch__option {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 14px;
    border: none;
    background: transparent;
    color: rgba(175, 200, 228, 0.82);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tactics-mode-switch--vertical .tactics-mode-switch__option {
    justify-content: flex-start;
    text-align: left;
    border-bottom: 1px solid rgba(113, 163, 230, 0.22);
}

.tactics-mode-switch--vertical .tactics-mode-switch__option:last-child {
    border-bottom: none;
}

.tactics-mode-switch--horizontal .tactics-mode-switch__option + .tactics-mode-switch__option {
    border-left: 1px solid rgba(113, 163, 230, 0.28);
}

.tactics-mode-switch__option:hover {
    color: #e8f2ff;
    background: rgba(113, 163, 230, 0.1);
}

.tactics-mode-switch__option.is-active {
    color: #d8ecff;
    background: rgba(74, 144, 226, 0.24);
    box-shadow: inset 3px 0 0 #64b5f6;
}

.tactics-mode-switch--horizontal .tactics-mode-switch__option.is-active {
    box-shadow: inset 0 -3px 0 #64b5f6;
}

.tactics-add-slide-field {
    margin-top: 8px;
}

.tactics-add-slide-field .tactics-map-picker {
    gap: 10px;
}

.tactics-add-slide-field .tactics-map-picker-tabs .recruiting-realm-tab {
    font-size: 0.68rem;
    padding: 7px 4px;
    line-height: 1.2;
}

.tactics-add-slide-field .tactics-map-picker-tabs--game {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tactics-add-slide-field .tactics-map-picker-tabs--game .tactics-game-tab {
    min-height: 72px;
    padding: 10px 6px 8px;
    font-size: 0.68rem;
    border-radius: 10px;
}

.tactics-add-slide-field .tactics-game-tab__icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.tactics-add-slide-field .tactics-game-tab__icon {
    width: 22px;
    height: 22px;
}

@media (max-width: 720px) {
    .tactics-map-picker-tabs--game {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tactics-map-picker-tabs--game .tactics-game-tab {
        min-height: 76px;
    }
}

.tactics-slide-item {
    list-style: none;
}

.tactics-slide-card {
    display: flex;
    align-items: stretch;
    min-height: 44px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    background: rgba(12, 20, 38, 0.55);
    overflow: hidden;
}

.tactics-slide-card.is-active {
    border-color: #64b5f6;
    background: rgba(40, 70, 120, 0.65);
}

.tactics-slide-btn {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: rgba(200, 220, 245, 0.9);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.tactics-slide-card.is-active .tactics-slide-btn {
    color: #ffffff;
}

.tactics-slide-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tactics-slide-delete {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 28px;
    height: 28px;
    margin-right: 4px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(175, 200, 228, 0.45);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.tactics-slide-duplicate {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 28px;
    height: 28px;
    margin-right: 4px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(175, 200, 228, 0.45);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.tactics-slide-delete:hover {
    color: rgba(232, 238, 242, 0.95);
    background: rgba(113, 163, 230, 0.18);
}

.tactics-slide-duplicate:hover {
    color: rgba(232, 238, 242, 0.95);
    background: rgba(113, 163, 230, 0.18);
}

.tactics-room-password-field {
    margin-top: 10px;
}

.tactics-room-delete-wrap {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(113, 163, 230, 0.18);
}

.tactics-room-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid rgba(255, 90, 90, 0.45);
    border-radius: 8px;
    background: rgba(255, 70, 70, 0.12);
    color: #ffb4b4;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tactics-room-delete-btn:hover {
    background: rgba(255, 70, 70, 0.22);
    border-color: rgba(255, 120, 120, 0.65);
}

.tactics-canvas-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    padding: 12px;
    min-width: 0;
}

.tactics-canvas-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

@media (max-width: 1100px) {
    .tactics-room-workspace {
        grid-template-columns: minmax(132px, 148px) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .tactics-room-workspace .tactics-right-sidebar {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--layout-gap);
    }

    .tactics-room-workspace .tactics-right-sidebar .tactics-sidebar-panel {
        flex: 1 1 200px;
    }

    .tactics-room-workspace .tactics-sidebar-panel--slides {
        flex: 1 1 100%;
        margin-top: 0;
    }
}

@media (max-width: 720px) {
    .tactics-room-workspace {
        grid-template-columns: 1fr;
    }

    .tactics-room-workspace .tactics-tools-column {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tactics-room-workspace .tactics-tools-panel {
        flex: 1 1 100%;
    }

    .tactics-room-workspace .tactics-chat-panel {
        flex: 1 1 100%;
    }
}

.tactics-map-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    gap: 6px;
}

.tactics-map-scale {
    margin: 0;
    padding-left: 32px;
    font-size: 0.82rem;
    color: #9aa5b1;
    line-height: 1.35;
}

#tacticsMapScale[hidden] {
    display: none !important;
}

.tactics-map-grid {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: 24px minmax(0, 1fr);
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.tactics-map-grid.is-map-loading {
    visibility: hidden;
}

.tactics-grid-corner {
    grid-column: 1;
    grid-row: 1;
}

.tactics-grid-top {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    align-items: end;
    min-height: 24px;
}

.tactics-grid-left {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-rows: repeat(10, 1fr);
    min-width: 28px;
}

.tactics-grid-top span,
.tactics-grid-left span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    color: rgba(142, 203, 255, 0.78);
    user-select: none;
    pointer-events: none;
}

.tactics-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 720px;
}

.tactics-toolbar--side {
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 8px;
    gap: 6px;
    background: rgba(12, 20, 38, 0.45);
    border: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 8px;
}

.tactics-toolbar--side .tactics-tool-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.tactics-toolbar--side .tactics-toolbar-sep {
    width: 32px;
    height: 1px;
    margin: 2px 0;
}

.tactics-toolbar--side .tactics-color-input {
    width: 42px;
    height: 42px;
    padding: 4px;
    box-sizing: border-box;
}

.tactics-toolbar--side .tactics-width-input {
    width: 42px;
    margin: 0;
    writing-mode: vertical-lr;
    direction: rtl;
    height: 72px;
    box-sizing: border-box;
}

.tactics-tool-btn {
    padding: 8px 10px;
    min-width: 38px;
}

.tactics-tool-btn.is-active {
    border-color: #64b5f6;
    background: rgba(40, 70, 120, 0.65);
    color: #ffffff;
}

.tactics-toolbar-sep {
    width: 1px;
    height: 24px;
    background: rgba(113, 163, 230, 0.35);
    margin: 0 4px;
}

.tactics-color-input {
    width: 38px;
    height: 34px;
    padding: 2px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: transparent;
    cursor: pointer;
}

.tactics-width-input {
    width: 90px;
}

.tactics-map-canvas-stack {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    flex: none;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    isolation: isolate;
    overflow: visible;
}

.tactics-map-viewport {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.tactics-map-zoom-layer {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
}

.tactics-map-viewport.is-map-zoomed {
    cursor: grab;
}

.tactics-map-viewport.is-map-panning {
    cursor: grabbing;
}

.tactics-map-viewport.is-map-panning .upper-canvas {
    cursor: grabbing !important;
}

.tactics-map-picker [data-tactics-map-field][hidden] {
    display: none !important;
}

.tactics-canvas-wrap {
    position: absolute;
    inset: 0;
    flex: none;
    min-width: 0;
    min-height: 0;
    background: transparent;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(113, 163, 230, 0.2);
    overflow: hidden;
}

.tactics-canvas-overlays {
    position: absolute;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    overflow: visible;
}

.tactics-canvas-wrap .canvas-container {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.tactics-canvas-wrap .canvas-container,
.tactics-canvas-wrap canvas {
    display: block;
    margin: 0;
}

.tactics-canvas-wrap .upper-canvas {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
}

.tactics-canvas-wrap--readonly {
    cursor: default;
}

.tactics-canvas-wrap--readonly .upper-canvas {
    cursor: default !important;
}

.tactics-canvas-wrap--readonly.tactics-canvas-wrap--ping .upper-canvas {
    cursor: default !important;
}

.tactics-canvas-wrap--readonly.tactics-canvas-wrap--ruler .upper-canvas {
    cursor: crosshair !important;
}

.tactics-pings-layer,
.tactics-cell-flashes-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.tactics-cell-flashes-layer {
    z-index: 5;
}

.tactics-cell-flash {
    position: absolute;
    box-sizing: border-box;
    pointer-events: none;
    background: var(--cell-flash-color, #ff4444);
    opacity: 0;
    animation: tactics-cell-flash var(--cell-flash-duration, 2000ms) ease-out forwards;
}

@keyframes tactics-cell-flash {
    0% {
        opacity: 0;
    }

    18% {
        opacity: 0.58;
    }

    100% {
        opacity: 0;
    }
}

.tactics-ping {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tactics-ping__ring {
    position: absolute;
    left: 0;
    top: 0;
    box-sizing: border-box;
    width: var(--ping-size);
    height: var(--ping-size);
    margin-left: calc(var(--ping-size) * -0.5);
    margin-top: calc(var(--ping-size) * -0.5);
    border: var(--ping-stroke, 6px) solid var(--ping-color);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.15);
}

.tactics-canvas-wrap--ping .upper-canvas {
    cursor: default !important;
}

.tactics-canvas-wrap--ruler .upper-canvas {
    cursor: crosshair !important;
}

.tactics-canvas-wrap--cell .upper-canvas {
    cursor: pointer !important;
}

.tactics-canvas-wrap--eyedropper .upper-canvas {
    cursor: crosshair !important;
}

.tactics-ruler-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.tactics-ruler-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.tactics-ruler-line {
    stroke-width: 2;
    stroke-linecap: round;
}

.tactics-ruler-cap {
    stroke: rgba(0, 0, 0, 0.45);
    stroke-width: 1;
}

.tactics-ruler-label {
    position: absolute;
    transform: translate(-50%, calc(-100% - 8px));
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(12, 16, 22, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f0f4f8;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.tactics-side-length-input {
    width: 5.5rem;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    font-size: 0.85rem;
}

.tactics-cursors-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.tactics-remote-cursor {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate3d(0, 0, 0);
    pointer-events: none;
    white-space: nowrap;
    overflow: visible;
    will-change: transform;
}

.tactics-remote-cursor__pointer {
    display: block;
    width: 20px;
    height: 20px;
    line-height: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.tactics-remote-cursor__svg {
    display: block;
    width: 20px;
    height: 20px;
}

.tactics-remote-cursor__label {
    position: absolute;
    left: 14px;
    top: 14px;
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: #0b1020;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-tactics .header {
    margin-bottom: 0;
}

.page-tactics .container {
    gap: var(--layout-gap);
}

.page-tactics-room-shell .page-bottom-spacer {
    display: none;
}

.page-tactics:not(.page-tactics-room-shell) footer {
    margin-top: auto;
}

.page-tactics-room {
    --tactics-editor-bg: #0a1022;
    --tactics-panel-bg: linear-gradient(180deg, rgba(22, 33, 61, 0.96) 0%, rgba(16, 24, 46, 0.94) 100%);
    --tactics-panel-border: rgba(113, 163, 230, 0.28);
    --tactics-panel-border-strong: rgba(126, 184, 255, 0.44);
    --tactics-topbar-bg: linear-gradient(180deg, rgba(17, 29, 54, 0.98) 0%, rgba(12, 21, 40, 0.98) 100%);
    --tactics-canvas-bg: linear-gradient(180deg, rgba(19, 32, 60, 0.92) 0%, rgba(13, 23, 44, 0.88) 100%);
    --tactics-canvas-bg-solid: #0c152d;
    --tactics-control-bg: rgba(19, 31, 58, 0.88);
    --tactics-control-bg-hover: rgba(24, 39, 69, 0.94);
    --tactics-control-border: rgba(97, 140, 197, 0.34);
    --tactics-active: #64b5f6;
    --tactics-active-strong: #4a90e2;
    --tactics-active-glow: #8ecbff;
    --tactics-active-soft: rgba(100, 181, 246, 0.18);
    --tactics-active-softer: rgba(100, 181, 246, 0.12);
    --tactics-text: #dbe9f7;
    --tactics-text-bright: #f0f7ff;
    --tactics-muted: #9bb0c5;
    --tactics-muted-dim: #7a92ab;
    --tactics-hover-bg: rgba(100, 181, 246, 0.12);
    --tactics-hover-bg-strong: rgba(100, 181, 246, 0.18);
    --tactics-danger: #ff8a8a;
    --tactics-danger-soft: rgba(255, 138, 138, 0.15);
    --tactics-danger-border: rgba(255, 138, 138, 0.45);
    --tactics-success: #74f6c8;
    --tactics-success-strong: #4caf50;
    --tactics-success-border: rgba(116, 246, 200, 0.45);
    --tactics-cta: #ffd966;
    --tactics-cta-soft: rgba(255, 217, 102, 0.12);
    --tactics-cta-border: rgba(255, 217, 102, 0.38);
    --tactics-overlay: rgba(4, 10, 22, 0.72);
    --tactics-shadow: 0 14px 32px rgba(4, 10, 22, 0.32), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    --tactics-scrollbar: rgba(100, 181, 246, 0.42);
    --tactics-scrollbar-track: rgba(16, 27, 50, 0.55);
    --tactics-font: 0.8125rem;
    --tactics-line: 1.3;
    --tactics-panel-width: 304px;
    --tactics-edge-strip: 18px;
    --tactics-chat-expanded-height: 270px;
}

.page-tactics-room-shell .container {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

.page-tactics-room-shell .ambient-bg,
.page-tactics-room-shell .container > .header,
.page-tactics-room-shell .container > .page-bottom-spacer,
.page-tactics-room-shell .container > footer {
    display: none !important;
}

.page-tactics-room-shell {
    overflow: hidden;
    background: var(--tactics-editor-bg);
}

.page-tactics-room .tactics-editor.is-booting {
    opacity: 0;
    pointer-events: none;
}

.page-tactics-room .tactics-editor.is-ready {
    opacity: 1;
    transition: opacity 0.12s ease;
}

.page-tactics-room-shell .tactics-service.tactics-room-layout {
    gap: 0;
    min-height: 100dvh;
    height: 100dvh;
}

.page-tactics-room-shell .tactics-room-layout--locked {
    min-height: 100dvh;
    height: 100dvh;
}

.page-tactics-room .tactics-editor {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: calc(100dvh - var(--site-header-height));
    background: var(--tactics-editor-bg);
    border: 1px solid var(--tactics-panel-border);
    overflow: hidden;
    font-size: var(--tactics-font);
    line-height: var(--tactics-line);
}

.page-tactics-room-shell .tactics-editor {
    min-height: 100dvh;
    height: 100dvh;
    border: none;
}

.page-tactics-room .tactics-editor-build {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.page-tactics-room-shell .tactics-editor.is-presenting {
    box-shadow: inset 0 3px 0 var(--tactics-active);
}

.page-tactics-room .tactics-editor-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: var(--site-header-height);
    height: var(--site-header-height);
    box-sizing: border-box;
    padding: var(--site-header-pad-top) var(--site-header-pad-x) var(--site-header-pad-bottom);
    background: var(--tactics-topbar-bg);
    border-bottom: 1px solid var(--tactics-panel-border);
    flex: 0 0 auto;
}

.page-tactics-room .tactics-editor-topbar__group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.page-tactics-room .tactics-editor-topbar__group--center {
    justify-content: center;
    flex-direction: row;
    gap: 8px;
    text-align: center;
    flex-wrap: nowrap;
}

.page-tactics-room .tactics-editor-topbar__title-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
}

.page-tactics-room .tactics-editor-topbar__title-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
}

.page-tactics-room .tactics-editor-topbar__title-row.is-nickname-editing {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(420px, 42vw);
}

.page-tactics-room .tactics-editor-topbar__group--center.is-nickname-editing {
    min-width: 0;
    overflow: hidden;
}

.page-tactics-room .tactics-mobile-nickname-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.page-tactics-room .tactics-mobile-nickname-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--tactics-control-border);
    border-radius: 4px;
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    font: inherit;
    font-size: inherit;
    box-sizing: border-box;
}

.page-tactics-room .tactics-mobile-nickname-input:focus,
.page-tactics-room .tactics-mobile-nickname-input:focus-visible {
    outline: none;
    border-color: var(--tactics-active);
}

.page-tactics-room .tactics-mobile-nickname-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
}

.page-tactics-room .tactics-editor-topbar__group--right {
    justify-content: flex-end;
}

.page-tactics-room .tactics-editor-topbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--tactics-text);
    font-size: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.page-tactics-room .tactics-editor-topbar__btn:hover {
    background: var(--tactics-hover-bg);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-editor-topbar__btn.is-active {
    color: var(--tactics-active);
}

.page-tactics-room .tactics-editor-topbar__btn#tacticsPresentBtn.is-viewer-status {
    pointer-events: none;
    cursor: default;
    color: var(--tactics-active);
}

.page-tactics-room .tactics-editor-topbar__btn#tacticsPresentBtn.is-viewer-status:hover {
    background: transparent;
    color: var(--tactics-active);
}

.page-tactics-room .tactics-editor-topbar__btn--text {
    width: auto;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    gap: 6px;
    font-size: inherit;
    font-weight: 600;
}

.page-tactics-room .tactics-editor-topbar__btn--text span {
    line-height: 1;
}

.page-tactics-room .tactics-editor-topbar__divider {
    flex: 0 0 auto;
    width: 1px;
    height: 22px;
    margin: 0 2px;
    background: var(--tactics-panel-border);
}

.page-tactics-room .tactics-editor-topbar__btn.is-disabled,
.page-tactics-room .tactics-editor-topbar__btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.page-tactics-room .tactics-room-code-btn.tactics-editor-topbar__btn {
    width: auto;
    min-width: 0;
    height: 38px;
    max-width: none;
    padding: 0 12px;
    gap: 8px;
    border: 1px solid var(--tactics-panel-border);
    border-radius: 4px;
    font-size: inherit;
    flex-shrink: 0;
    justify-content: flex-start;
}

.page-tactics-room .tactics-editor-topbar__btn.tactics-room-delete-btn {
    width: auto;
    min-width: 0;
    flex-shrink: 0;
    padding: 0 10px;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--tactics-danger);
    font-weight: 600;
    white-space: nowrap;
}

.page-tactics-room .tactics-editor-topbar__btn.tactics-room-delete-btn:hover {
    background: rgba(255, 138, 138, 0.18);
    color: var(--tactics-danger);
}

.page-tactics-room #tacticsDeleteRoomBtn[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-room-visibility-wrap {
    flex-shrink: 0;
}

.page-tactics-room .tactics-room-visibility-anchor {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.page-tactics-room .tactics-room-password-slot {
    position: absolute;
    right: 100%;
    top: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 0;
    margin-right: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
}

.page-tactics-room .tactics-room-password-slot.is-open {
    width: 140px;
    margin-right: 6px;
    opacity: 1;
    pointer-events: auto;
}

.page-tactics-room .tactics-room-password-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--tactics-panel-border);
    border-radius: 0;
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    font-size: inherit;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.page-tactics-room .tactics-room-password-save-btn:hover {
    border-color: var(--tactics-panel-border-strong);
    background: var(--tactics-control-bg-hover);
}

.page-tactics-room .tactics-room-password-save-btn:focus-visible {
    outline: none;
    border-color: var(--tactics-active-soft);
}

.page-tactics-room .tactics-room-password-save-btn.is-saved {
    background: var(--tactics-active);
    border-color: var(--tactics-active);
    color: #fff;
}

.page-tactics-room .tactics-room-password-save-btn.is-saved:hover {
    background: var(--tactics-active);
    border-color: var(--tactics-active);
}

.page-tactics-room .tactics-room-password-input {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: 96px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--tactics-panel-border);
    border-radius: 0;
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    font: inherit;
    font-size: inherit;
    box-sizing: border-box;
}

.page-tactics-room .tactics-room-password-input.is-masked {
    color: var(--tactics-muted);
    letter-spacing: 0.12em;
    cursor: default;
}

.page-tactics-room .tactics-room-password-input::placeholder {
    color: var(--tactics-muted);
}

.page-tactics-room .tactics-room-password-input:focus {
    outline: none;
    border-color: var(--tactics-active-soft);
}

.page-tactics-room .tactics-room-visibility-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-tactics-room .tactics-room-visibility-lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--tactics-panel-border);
    border-radius: 0;
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    font-size: inherit;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.page-tactics-room .tactics-room-visibility-lock-btn:hover {
    border-color: var(--tactics-panel-border-strong);
    background: var(--tactics-control-bg-hover);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-room-visibility-lock-btn.is-closed {
    border-color: var(--tactics-active-soft);
    background: var(--tactics-active-softer);
    color: var(--tactics-danger);
}

.page-tactics-room .tactics-room-visibility-lock-btn.is-closed:hover {
    border-color: var(--tactics-panel-border-strong);
    background: var(--tactics-danger-soft);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-editor-lang-switch {
    flex-shrink: 0;
    margin-left: 2px;
    gap: 4px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.page-tactics-room .tactics-editor-lang-switch .site-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: auto;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 8px;
    gap: 4px;
    border: none;
    border-radius: 4px;
    background: transparent !important;
    color: var(--tactics-text) !important;
    text-shadow: none !important;
    font-size: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.page-tactics-room .tactics-editor-lang-switch .site-lang-link:hover {
    background: var(--tactics-hover-bg) !important;
    color: var(--tactics-text-bright) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.page-tactics-room .tactics-editor-lang-switch .site-lang-link.is-active {
    background: var(--tactics-hover-bg) !important;
    color: var(--tactics-text-bright) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.page-tactics-room .tactics-editor-lang-switch .site-lang-link.is-active:hover {
    background: var(--tactics-hover-bg) !important;
    color: var(--tactics-text-bright) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.page-tactics-room .tactics-editor-lang-switch .site-lang-flag {
    font-size: 1.05em;
    line-height: 1;
}

.page-tactics-room .tactics-editor-topbar__title {
    display: block;
    flex: 0 1 auto;
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.01em;
    color: var(--tactics-text-bright);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: auto;
    max-width: min(480px, 50vw);
    box-sizing: border-box;
    text-align: left;
}

.page-tactics-room .tactics-editor-topbar__group--center.is-title-editing {
    position: relative;
    min-height: 38px;
}

.page-tactics-room .tactics-editor-topbar__title-row.is-editing {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
    max-width: min(480px, calc(100vw - 280px));
}

.page-tactics-room .tactics-editor-topbar__title.is-editing {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    text-align: center;
    cursor: text;
    outline: none;
    min-width: 1ch;
}

.page-tactics-room .tactics-editor-topbar__title.is-editable {
    cursor: text;
}

.page-tactics-room .tactics-editor-topbar__title.is-editable:focus-visible {
    outline: none;
}

.page-tactics-room .tactics-editor .tactics-slide-rename-input--topbar {
    display: block;
    flex: 0 1 auto;
    width: auto;
    min-width: 120px;
    max-width: min(480px, 50vw);
    margin: 0;
    padding: 0;
    font-size: 1.5em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: left;
    color: var(--tactics-text-bright);
    border: none;
    border-radius: 0;
    background: transparent;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    caret-color: var(--tactics-active);
    appearance: none;
}

.page-tactics-room .tactics-editor .tactics-slide-rename-input--topbar:focus {
    border: none;
    background: transparent;
    box-shadow: none;
    outline: none;
}

.page-tactics-room .tactics-editor .tactics-slide-rename-input--topbar::selection {
    background: rgba(100, 181, 246, 0.45);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-tools-scroll {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.page-tactics-room .tactics-room-controls {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--tactics-panel-border);
    flex: 0 0 auto;
    order: -1;
}

.page-tactics-room .tactics-room-controls__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--tactics-muted);
    font-size: inherit;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.page-tactics-room .tactics-room-controls__btn:hover {
    background: var(--tactics-hover-bg);
    color: var(--tactics-text);
}

.page-tactics-room .tactics-room-controls__btn.is-active {
    color: var(--tactics-active);
}

.page-tactics-room .tactics-room-controls__btn.is-disabled,
.page-tactics-room .tactics-room-controls__btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.page-tactics-room .tactics-slides-list.is-locked {
    opacity: 0.55;
    pointer-events: none;
}

.page-tactics-room .tactics-chat-form.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.page-tactics-room .tactics-editor-body {
    display: grid;
    grid-template-columns: var(--tactics-panel-width) minmax(0, 1fr) var(--tactics-panel-width);
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    position: relative;
}

.page-tactics-room .tactics-editor-body.is-left-collapsed:not(.is-right-collapsed) {
    grid-template-columns: minmax(0, 0) minmax(0, 1fr) var(--tactics-panel-width);
}

.page-tactics-room .tactics-editor-body.is-right-collapsed:not(.is-left-collapsed) {
    grid-template-columns: var(--tactics-panel-width) minmax(0, 1fr) minmax(0, 0);
}

.page-tactics-room .tactics-editor-body.is-left-collapsed.is-right-collapsed {
    grid-template-columns: minmax(0, 0) minmax(0, 1fr) minmax(0, 0);
}

.page-tactics-room .tactics-tools-column,
.page-tactics-room .tactics-right-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    grid-column: auto;
    grid-row: 1;
    min-height: 0;
    min-width: 0;
    overflow: visible;
    background: var(--tactics-panel-bg);
    border-color: var(--tactics-panel-border);
}

.page-tactics-room .tactics-tools-column {
    border-right: 1px solid var(--tactics-panel-border);
}

.page-tactics-room .tactics-right-sidebar {
    border-left: 1px solid var(--tactics-panel-border);
}

.page-tactics-room .tactics-tools-column__inner,
.page-tactics-room .tactics-right-sidebar__inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    height: 100%;
}

.page-tactics-room .tactics-tools-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-tactics-room .tactics-tools-panel > .tactics-palette,
.page-tactics-room .tactics-tools-panel > .tactics-tool-list {
    flex: 0 0 auto;
}

.page-tactics-room .tactics-right-sidebar__inner {
    display: grid;
    grid-template-rows: var(--tactics-right-users-height, auto) minmax(0, 1fr);
    gap: 0;
}

.page-tactics-room .tactics-tools-column.is-collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-right: none;
}

.page-tactics-room .tactics-tools-column.is-collapsed .tactics-tools-column__inner {
    display: none;
}

.page-tactics-room .tactics-right-sidebar.is-collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-left: none;
}

.page-tactics-room .tactics-right-sidebar.is-collapsed .tactics-right-sidebar__inner {
    display: none;
}

.page-tactics-room .tactics-editor-edge-toggle {
    position: absolute;
    top: 50%;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tactics-edge-strip);
    height: 52px;
    padding: 0;
    border: 1px solid var(--tactics-panel-border);
    background: var(--tactics-control-bg);
    color: var(--tactics-muted);
    font-size: 0.625rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.page-tactics-room .tactics-editor-edge-toggle:hover,
.page-tactics-room .tactics-editor-edge-toggle:focus-visible {
    background: var(--tactics-control-bg-hover);
    color: var(--tactics-text);
    border-color: var(--tactics-active);
    outline: none;
}

.page-tactics-room .tactics-editor-edge-toggle--left {
    right: calc(-1 * var(--tactics-edge-strip));
    left: auto;
    border-radius: 0 4px 4px 0;
}

.page-tactics-room .tactics-tools-column.is-collapsed .tactics-editor-edge-toggle--left {
    right: auto;
    left: 0;
}

.page-tactics-room .tactics-editor-edge-toggle--right {
    left: calc(-1 * var(--tactics-edge-strip));
    right: auto;
    border-radius: 4px 0 0 4px;
}

.page-tactics-room .tactics-right-sidebar.is-collapsed .tactics-editor-edge-toggle--right {
    left: auto;
    right: 0;
}

.page-tactics-room .tactics-tools-column.is-collapsed .tactics-editor-edge-toggle--left i {
    transform: rotate(180deg);
}

.page-tactics-room .tactics-right-sidebar.is-collapsed .tactics-editor-edge-toggle--right i {
    transform: rotate(180deg);
}

.page-tactics-room .tactics-tools-panel,
.page-tactics-room .tactics-sidebar-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 10px 10px;
}

.page-tactics-room .tactics-panel {
    background: transparent;
    border: none;
    box-shadow: none;
}

.page-tactics-room .tactics-palette-presets {
    gap: 4px;
}

.page-tactics-room .tactics-palette-swatch {
    border-radius: 4px;
    border-width: 2px;
    border-color: var(--tactics-control-border);
    min-height: 28px;
}

.page-tactics-room .tactics-palette-swatch.is-active {
    border-color: var(--tactics-active-glow);
    box-shadow: 0 0 0 1px var(--tactics-active-glow);
}

.page-tactics-room .tactics-tool-setting__slider {
    width: 100%;
    height: 6px;
    margin: 0;
}

.page-tactics-room .tactics-hue-slider {
    flex: 1 1 auto;
    min-width: 0;
    height: 10px;
    margin: 0;
}

.page-tactics-room .tactics-palette-hue-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}

.page-tactics-room .tactics-palette-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
}

.page-tactics-room .tactics-palette-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--tactics-control-border);
    border-radius: 3px;
    background: var(--tactics-control-bg);
    color: var(--tactics-muted);
    cursor: pointer;
    font-size: inherit;
}

.page-tactics-room .tactics-color-input--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.page-tactics-room .tactics-tool-list.tactics-toolbar {
    display: grid;
    flex-wrap: unset;
    align-items: stretch;
    max-width: none;
    gap: 2px;
}

.page-tactics-room .tactics-tool-list {
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    margin-top: 8px;
}

.page-tactics-room .tactics-tool-list .tactics-tool-btn {
    width: 100%;
    aspect-ratio: 1;
    min-height: 0;
    height: auto;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--tactics-muted);
    font-size: inherit;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    min-width: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-tactics-room .tactics-tool-list .tactics-tool-btn__icon {
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
}

.page-tactics-room .tactics-tool-btn__icon--ping {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.page-tactics-room .tactics-tool-list .tactics-tool-btn:hover {
    background: var(--tactics-hover-bg);
    color: var(--tactics-text);
}

.page-tactics-room .tactics-tool-list .tactics-tool-btn.is-active {
    background: var(--tactics-active-softer);
    border-color: var(--tactics-active-soft);
    color: var(--tactics-active);
}

.page-tactics-room .tactics-tool-list .tactics-tool-btn.is-active .tactics-tool-btn__icon {
    color: var(--tactics-active);
}

.page-tactics-room .tactics-tool-context {
    margin: 10px -10px 0;
    width: calc(100% + 20px);
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.page-tactics-room .tactics-tool-context__head {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: var(--tactics-control-bg-hover);
    border-top: 1px solid var(--tactics-panel-border);
    border-bottom: 1px solid var(--tactics-panel-border);
}

.page-tactics-room .tactics-tool-context__title {
    font-weight: 600;
    color: var(--tactics-text);
    line-height: 1.3;
}

.page-tactics-room .tactics-tool-context__content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.page-tactics-room .tactics-tool-context__content[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-tool-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1 1 auto;
}

.page-tactics-room .tactics-tool-panel[data-tactics-tool-panel="icons"] {
    min-height: 0;
}

.page-tactics-room .tactics-tool-panel[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-tool-field__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.page-tactics-room .tactics-tool-field__label {
    color: var(--tactics-muted);
    font-weight: 600;
}

.page-tactics-room .tactics-tool-field__value {
    color: var(--tactics-text);
    font-variant-numeric: tabular-nums;
}

.page-tactics-room .tactics-tool-slider {
    width: 100%;
    height: 6px;
    margin: 0;
    accent-color: var(--tactics-active);
    cursor: pointer;
}

.page-tactics-room .tactics-option-row {
    display: flex;
    gap: 4px;
}

.page-tactics-room .tactics-option-row--markers .tactics-option-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
}

.page-tactics-room .tactics-option-row--markers .tactics-option-btn svg {
    width: 7px;
    height: 9px;
}

.page-tactics-room .tactics-option-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 32px;
    padding: 0 6px;
    border: 1px solid var(--tactics-control-border);
    border-radius: 6px;
    background: var(--tactics-control-bg-hover);
    color: var(--tactics-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.page-tactics-room .tactics-option-btn:hover {
    background: var(--tactics-control-bg-hover);
    border-color: var(--tactics-panel-border-strong);
}

.page-tactics-room .tactics-option-btn.is-active {
    border-color: var(--tactics-active-soft);
    background: var(--tactics-active-softer);
    color: var(--tactics-active);
}

.page-tactics-room .tactics-option-btn svg {
    width: 14px;
    height: 18px;
    display: block;
}

.page-tactics-room .tactics-line-preview {
    display: block;
    width: 100%;
    max-width: 42px;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
}

.page-tactics-room .tactics-line-preview--dashed {
    background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 16px);
}

.page-tactics-room .tactics-line-preview--dotted {
    height: 6px;
    border-radius: 0;
    background: transparent;
    background-image: radial-gradient(circle, currentColor 2px, transparent 2.5px);
    background-size: 12px 6px;
    background-repeat: repeat-x;
    background-position: center;
}

.page-tactics-room .tactics-end-preview {
    display: block;
    width: 100%;
    max-width: 42px;
    height: 3px;
    background: currentColor;
    position: relative;
}

.page-tactics-room .tactics-end-preview--arrow::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid currentColor;
}

.page-tactics-room .tactics-end-preview--bar::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    width: 2px;
    height: 14px;
    transform: translateY(-50%);
    background: currentColor;
    border-radius: 1px;
}

.page-tactics-room .tactics-text-type-preview {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.page-tactics-room .tactics-text-type-preview--callout {
    padding: 2px 5px;
    border: 1px solid currentColor;
    border-radius: 3px 3px 3px 0;
    position: relative;
}

.page-tactics-room .tactics-tool-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    color: var(--tactics-text);
    user-select: none;
}

.page-tactics-room .tactics-tool-checkbox input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.page-tactics-room .tactics-tool-checkbox__box {
    width: 16px;
    height: 16px;
    border: 1px solid var(--tactics-panel-border-strong);
    border-radius: 3px;
    background: var(--tactics-control-bg-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-tactics-room .tactics-tool-checkbox input:checked + .tactics-tool-checkbox__box {
    background: var(--tactics-active);
    border-color: var(--tactics-active);
}

.page-tactics-room .tactics-tool-checkbox input:checked + .tactics-tool-checkbox__box::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid var(--tactics-text-bright);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.page-tactics-room .tactics-icon-label-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--tactics-control-border);
    border-radius: 4px;
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    font: inherit;
}

.page-tactics-room .tactics-icon-label-input::placeholder {
    color: var(--tactics-muted-dim);
}

.page-tactics-room .tactics-tool-divider {
    border: none;
    border-top: 1px solid var(--tactics-panel-border);
    margin: 4px 0;
}

.page-tactics-room .tactics-icon-grid-scroll {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    margin: 0 -2px;
    padding: 0 2px;
}

.page-tactics-room .tactics-icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
}

.page-tactics-room .tactics-icon-grid__btn {
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--tactics-control-bg-hover);
    color: var(--tactics-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.page-tactics-room .tactics-icon-grid__btn:hover {
    background: var(--tactics-control-bg-hover);
}

.page-tactics-room .tactics-icon-grid__btn.is-active {
    border-color: var(--tactics-active);
    color: var(--tactics-active);
    background: var(--tactics-active-softer);
}

.page-tactics-room .tactics-canvas-panel {
    grid-column: auto;
    grid-row: 1;
    background: var(--tactics-canvas-bg);
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: visible;
    isolation: isolate;
    box-sizing: border-box;
}

.page-tactics-room .tactics-editor-body:not(.is-left-collapsed) .tactics-canvas-panel {
    padding-left: var(--tactics-edge-strip);
}

.page-tactics-room .tactics-editor-body:not(.is-right-collapsed) .tactics-canvas-panel {
    padding-right: var(--tactics-edge-strip);
}

@media (max-width: 1340px) {
    .page-tactics-room .tactics-editor-body:not(.is-right-collapsed) {
        grid-template-columns: minmax(0, 0) minmax(0, 1fr) var(--tactics-panel-width);
    }

    .page-tactics-room .tactics-editor-body.is-right-collapsed {
        grid-template-columns: minmax(0, 0) minmax(0, 1fr) minmax(0, 0);
    }

    .page-tactics-room .tactics-tools-column {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 26;
        overflow: visible;
    }

    .page-tactics-room .tactics-tools-column:not(.is-collapsed) {
        width: min(var(--tactics-panel-width), calc(100vw - var(--tactics-edge-strip)));
        max-width: min(304px, 88vw);
        z-index: 28;
        background: var(--tactics-panel-bg);
        border-right: 1px solid var(--tactics-panel-border);
        box-shadow: 8px 0 28px rgba(4, 10, 22, 0.55);
    }

    .page-tactics-room .tactics-editor-body:not(.is-left-collapsed) .tactics-canvas-panel {
        padding-left: 0;
        position: relative;
    }

    .page-tactics-room .tactics-editor-body:not(.is-left-collapsed) .tactics-canvas-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        background: var(--tactics-overlay);
        pointer-events: none;
    }
}

@media (max-width: 1340px) and (min-width: 501px) {
    .page-tactics-room-shell {
        --tactics-panel-width: 248px;
        --tactics-compact-slides-h: 148px;
        --tactics-carousel-thumb-active: 96px;
        --tactics-carousel-thumb-inactive: calc(var(--tactics-carousel-thumb-active) * 0.9);
    }

    .page-tactics-room-shell .tactics-editor-topbar {
        grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
        gap: 4px;
        min-height: 42px;
        height: auto;
        padding: 6px 10px;
    }

    .page-tactics-room-shell .tactics-editor-topbar__title {
        font-size: 0.88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-tactics-room-shell .tactics-room-code-btn__label {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor-body,
    .page-tactics-room-shell .tactics-editor-body.is-left-collapsed,
    .page-tactics-room-shell .tactics-editor-body.is-right-collapsed,
    .page-tactics-room-shell .tactics-editor-body.is-left-collapsed.is-right-collapsed {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .page-tactics-room-shell .tactics-editor-body.is-right-collapsed {
        grid-template-rows: minmax(0, 1fr);
    }

    .page-tactics-room-shell .tactics-tools-column {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-editor-edge-toggle {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-canvas-panel {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
        height: 100%;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .page-tactics-room-shell .tactics-canvas-panel::before {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-map-column {
        flex: 0 0 auto;
        min-height: 0;
        width: fit-content;
        max-width: 100%;
        height: auto;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
    }

    .page-tactics-room-shell .tactics-map-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        flex: 0 0 auto;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: none;
    }

    .page-tactics-room-shell .tactics-map-scale {
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        padding: 0;
        text-align: center;
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .page-tactics-room-shell .tactics-grid-corner,
    .page-tactics-room-shell .tactics-grid-top,
    .page-tactics-room-shell .tactics-grid-left {
        display: none;
    }

    .page-tactics-room-shell .tactics-map-canvas-stack {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
        aspect-ratio: unset;
    }

    .page-tactics-room-shell .tactics-right-sidebar {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        max-height: var(--tactics-compact-slides-h);
        border-left: none;
        border-top: 1px solid var(--tactics-panel-border);
    }

    .page-tactics-room-shell .tactics-right-sidebar.is-collapsed {
        max-height: 0;
        border-top: none;
    }

    .page-tactics-room-shell .tactics-right-sidebar__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        height: 100%;
        max-height: var(--tactics-compact-slides-h);
    }

    .page-tactics-room-shell .tactics-sidebar-panel--users,
    .page-tactics-room-shell .tactics-chat-dock {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-sidebar-panel--slides {
        border-top: none;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .page-tactics-room-shell .tactics-sidebar-panel--slides .tactics-slides-head {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-slides-strip-wrap {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0;
    }

    .page-tactics-room-shell .tactics-sidebar-panel--slides .tactics-slides-strip-wrap--carousel {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        grid-template-rows: minmax(0, 1fr);
        flex-direction: row;
        align-items: center;
        gap: 6px;
        padding: 6px 8px 8px;
        overflow: visible;
    }

    .page-tactics-room-shell .tactics-slides-carousel-viewport {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-width: 0;
        width: 100%;
        height: 100%;
        mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    }

    .page-tactics-room-shell .tactics-slides-carousel-btn--prev {
        grid-column: 1;
        grid-row: 1;
    }

    .page-tactics-room-shell .tactics-slides-carousel-btn--next {
        grid-column: 3;
        grid-row: 1;
    }

    .page-tactics-room-shell .tactics-slides-carousel-viewport::-webkit-scrollbar {
        display: none;
    }

    .page-tactics-room-shell .tactics-slides-carousel-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        margin: 0;
        align-self: center;
        padding: 0;
        border: 1px solid var(--tactics-control-border);
        border-radius: 4px;
        background: var(--tactics-control-bg);
        color: var(--tactics-text);
        font-size: 0.8rem;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        flex: 0 0 auto;
    }

    .page-tactics-room-shell .tactics-slides-carousel-btn.is-disabled,
    .page-tactics-room-shell .tactics-slides-carousel-btn:disabled {
        opacity: 0.35;
        pointer-events: none;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
        min-height: calc(var(--tactics-carousel-thumb-active) + 1.5rem);
        margin: 0 auto;
        padding: 0 max(0px, calc(50% - (var(--tactics-carousel-thumb-active) / 2)));
        list-style: none;
        overflow: visible;
        grid-template-columns: unset !important;
        overflow-x: visible;
        overflow-y: visible;
        max-height: none;
        align-content: unset;
        width: max-content;
        max-width: none;
        box-sizing: border-box;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-item {
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--tactics-carousel-thumb-active);
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-card--thumb {
        width: auto;
        align-items: center;
        transform: none;
        opacity: 1;
        transition: opacity 0.2s ease;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-card--thumb:not(.is-active) {
        opacity: 0.82;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-card--thumb.is-active {
        opacity: 1;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-preview {
        width: var(--tactics-carousel-thumb-active);
        height: var(--tactics-carousel-thumb-active);
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-name {
        display: block;
        margin-top: 4px;
        font-size: 0.68rem;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-height: 1.4rem;
        opacity: 0;
        transition: opacity 0.22s ease;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-card--thumb.is-active .tactics-slide-name {
        opacity: 1;
    }

    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-delete,
    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-duplicate,
    .page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-change-map {
        display: none !important;
    }
}

@media (max-width: 1100px) and (min-width: 501px) {
    .page-tactics-room-shell .tactics-editor-topbar__group--left #tacticsUndoBtn,
    .page-tactics-room-shell .tactics-editor-topbar__group--left #tacticsRedoBtn,
    .page-tactics-room-shell .tactics-editor-topbar__group--right #tacticsDownloadScreenshotBtn {
        display: none !important;
    }

    .page-tactics-room-shell #tacticsPresentBtn span,
    .page-tactics-room-shell #tacticsBackBtn span,
    .page-tactics-room-shell .tactics-room-delete-btn span {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor-topbar__btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .page-tactics-room-shell .tactics-editor-topbar__btn--text {
        width: auto;
        min-width: 34px;
        padding: 0 8px;
    }

    .page-tactics-room-shell .tactics-room-code-btn.tactics-editor-topbar__btn {
        width: auto;
        min-width: 0;
        height: 34px;
        padding: 0 8px;
    }

    .page-tactics-room-shell .tactics-room-code-btn__icon {
        display: none;
    }

    .page-tactics-room-shell {
        --tactics-compact-slides-h: 140px;
        --tactics-carousel-thumb-active: 88px;
    }
}

@media (max-width: 700px) and (min-width: 501px) {
    .page-tactics-room-shell {
        --tactics-compact-slides-h: 132px;
        --tactics-carousel-thumb-active: 80px;
    }

    .page-tactics-room-shell .tactics-slides-carousel-btn {
        width: 30px;
        height: 30px;
    }

    .page-tactics-room-shell .tactics-sidebar-panel--slides .tactics-slides-strip-wrap--carousel {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
    }
}

.page-tactics-room .tactics-mobile-bar {
    display: none;
}

@media (max-width: 500px) {
    .page-tactics-room-shell {
        --tactics-mobile-topbar-h: 44px;
        --tactics-mobile-bar-h: 48px;
    }

    .page-tactics-room-shell .tactics-editor {
        min-height: 100dvh;
        height: 100dvh;
        overscroll-behavior: none;
        touch-action: manipulation;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-body {
        flex: 1 1 auto;
        min-height: 0;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar {
        grid-template-columns: auto minmax(0, 1fr) minmax(max-content, auto);
        gap: 4px;
        min-height: var(--tactics-mobile-topbar-h);
        height: var(--tactics-mobile-topbar-h);
        padding: 6px 8px;
        padding-top: max(6px, env(safe-area-inset-top));
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--left #tacticsUndoBtn,
    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--left #tacticsRedoBtn,
    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--left #tacticsPresentBtn,
    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--right #tacticsDeleteRoomBtn,
    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--right #tacticsDownloadScreenshotBtn,
    .page-tactics-room-shell .tactics-editor .tactics-editor-lang-switch,
    .page-tactics-room-shell .tactics-editor .tactics-room-visibility-wrap {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-editor #tacticsBackBtn span {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__btn:not(.tactics-room-code-btn) {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__btn--text#tacticsBackBtn {
        width: auto;
        min-width: 34px;
        padding: 0 6px;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--center {
        min-width: 0;
        overflow: hidden;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__group--right {
        flex-shrink: 0;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-topbar__title {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .page-tactics-room-shell .tactics-editor .tactics-room-code-btn.tactics-editor-topbar__btn {
        width: auto;
        min-width: 0;
        max-width: none;
        height: 34px;
        min-height: 34px;
        padding: 0 8px;
        gap: 4px;
        flex-shrink: 0;
    }

    .page-tactics-room-shell .tactics-editor .tactics-room-code-btn__label {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor .tactics-room-code-btn__text {
        gap: 0;
    }

    .page-tactics-room-shell .tactics-editor .tactics-room-code-btn__icon {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor .tactics-room-code-btn__value {
        font-size: 0.78rem;
        letter-spacing: 0.04em;
    }

    .page-tactics-room-shell .tactics-mobile-nickname-btn {
        flex: 0 0 auto;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        margin-left: 4px;
    }

    .page-tactics-room-shell .tactics-mobile-nickname-wrap {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        flex: 1 1 auto;
    }

    .page-tactics-room-shell .tactics-mobile-nickname-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 30px;
        padding: 0 8px;
        border: 1px solid var(--tactics-control-border);
        border-radius: 4px;
        background: var(--tactics-control-bg);
        color: var(--tactics-text);
        font: inherit;
        font-size: 0.85rem;
        box-sizing: border-box;
    }

    .page-tactics-room-shell .tactics-mobile-nickname-input:focus,
    .page-tactics-room-shell .tactics-mobile-nickname-input:focus-visible {
        outline: none;
        border-color: var(--tactics-active);
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-body,
    .page-tactics-room-shell .tactics-editor .tactics-editor-body.is-left-collapsed,
    .page-tactics-room-shell .tactics-editor .tactics-editor-body.is-right-collapsed,
    .page-tactics-room-shell .tactics-editor .tactics-editor-body.is-left-collapsed.is-right-collapsed {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .page-tactics-room-shell .tactics-editor .tactics-tools-column,
    .page-tactics-room-shell .tactics-editor .tactics-right-sidebar {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-editor .tactics-editor-edge-toggle {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-editor .tactics-canvas-panel {
        padding: 0 !important;
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .page-tactics-room-shell .tactics-editor .tactics-canvas-panel::before,
    .page-tactics-room .tactics-editor-body:not(.is-left-collapsed) .tactics-canvas-panel::before {
        display: none !important;
        pointer-events: none !important;
    }

    .page-tactics-room-shell .tactics-editor .tactics-map-column {
        flex: 0 0 auto;
        width: fit-content;
        min-height: 0;
        height: auto !important;
        max-width: 100%;
        max-height: none;
        padding: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
    }

    .page-tactics-room-shell .tactics-editor .tactics-map-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        flex: 0 0 auto;
        min-height: 0;
        width: auto;
        max-width: 100%;
        max-height: none;
        margin: 0;
        align-self: auto;
    }

    .page-tactics-room-shell .tactics-editor .tactics-grid-corner,
    .page-tactics-room-shell .tactics-editor .tactics-grid-top,
    .page-tactics-room-shell .tactics-editor .tactics-grid-left {
        display: none;
    }

    .page-tactics-room-shell .tactics-editor .tactics-map-canvas-stack {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
        aspect-ratio: unset;
    }

    .page-tactics-room-shell .tactics-editor .tactics-map-scale {
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        padding: 0;
        text-align: center;
        font-size: 0.62rem;
        line-height: 1.2;
    }

    .page-tactics-room-shell .tactics-editor .tactics-canvas-wrap {
        touch-action: pan-x pan-y;
    }

    .page-tactics-room-shell .tactics-editor .tactics-canvas-wrap--readonly .upper-canvas {
        touch-action: pan-x pan-y;
        pointer-events: none;
    }

    .page-tactics-room-shell .tactics-editor .tactics-mobile-bar:not([hidden]) {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        min-height: var(--tactics-mobile-bar-h);
        padding: 6px 10px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--tactics-panel-border);
        background: var(--tactics-topbar-bg);
        box-sizing: border-box;
    }

    .page-tactics-room-shell .tactics-editor .tactics-mobile-bar[hidden] {
        display: none !important;
    }

    .page-tactics-room-shell .tactics-mobile-bar__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--tactics-control-border);
        border-radius: 4px;
        background: var(--tactics-control-bg);
        color: var(--tactics-text);
        font-size: 0.9rem;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .page-tactics-room-shell .tactics-mobile-bar__btn.is-disabled {
        opacity: 0.35;
        pointer-events: none;
    }

    .page-tactics-room .tactics-mobile-bar__label {
        min-width: 0;
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.25;
        text-align: center;
        color: var(--tactics-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-tactics-room .tactics-map-modal {
        padding: 0;
        align-items: stretch;
    }

    .page-tactics-room .tactics-map-modal__dialog {
        width: 100%;
        max-width: none;
        max-height: 100dvh;
        height: 100dvh;
        border: none;
        border-radius: 0;
    }

    .page-tactics-room .tactics-map-modal__body {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .page-tactics-room .tactics-map-modal.is-custom-map-mode .tactics-map-modal__body {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .page-tactics-room .tactics-map-modal__maps-panel {
        min-height: 0;
    }

    .page-tactics-room .tactics-map-modal__footer {
        padding: 0 12px max(12px, env(safe-area-inset-bottom));
    }
}

.page-tactics-room .tactics-map-column {
    position: relative;
    z-index: 2;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}

body.page-tactics-room-shell.is-tactics-compact .tactics-map-column,
body.page-tactics-room-shell.is-tactics-mobile .tactics-map-column {
    height: auto !important;
    max-height: none;
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
}

body.page-tactics-room-shell.is-tactics-compact .tactics-map-grid,
body.page-tactics-room-shell.is-tactics-mobile .tactics-map-grid {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: 0;
    align-self: auto;
}

body.page-tactics-room-shell.is-tactics-compact .tactics-map-scale,
body.page-tactics-room-shell.is-tactics-mobile .tactics-map-scale {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
}

.page-tactics-room .tactics-map-grid {
    max-width: 100%;
    box-sizing: border-box;
}

.page-tactics-room .tactics-map-grid {
    flex: 0 0 auto;
    margin: 0 auto;
    align-self: center;
    overflow: visible;
}

.page-tactics-room .tactics-map-canvas-stack {
    aspect-ratio: unset;
}

.page-tactics-room .tactics-grid-top span,
.page-tactics-room .tactics-grid-left span {
    color: rgba(142, 203, 255, 0.78);
}

.page-tactics-room .tactics-sidebar-panel--users {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(38vh, 260px);
    overflow: auto;
    padding: 0;
}

.page-tactics-room .tactics-sidebar-panel--users .tactics-participants-list {
    margin: 8px 10px 0;
}

.page-tactics-room .tactics-sidebar-panel--slides {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin-top: 0;
    border-top: 1px solid var(--tactics-panel-border);
    padding: 0;
}

.page-tactics-room .tactics-sidebar-panel--slides .tactics-slides-strip-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding: 0 10px 10px;
    box-sizing: border-box;
}

.page-tactics-room .tactics-slides-strip-wrap--grid .tactics-slides-carousel-viewport,
.page-tactics-room .tactics-slides-strip-wrap--list .tactics-slides-carousel-viewport {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-tactics-room .tactics-sidebar-panel--slides .tactics-add-slide-field {
    margin-left: 10px;
    margin-right: 10px;
}

.tactics-map-modal__upload {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin-top: 0;
    padding: 14px 16px;
    border: 1px dashed rgba(255, 217, 102, 0.45);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255, 217, 102, 0.08) 0%, rgba(255, 217, 102, 0.03) 100%);
    color: var(--tactics-text-bright);
    font-size: inherit;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 0;
}

.tactics-map-modal__upload:hover:not(:disabled) {
    border-color: rgba(255, 217, 102, 0.75);
    background: linear-gradient(180deg, rgba(255, 217, 102, 0.14) 0%, rgba(255, 217, 102, 0.06) 100%);
}

.tactics-map-modal__upload:disabled,
.tactics-map-modal__upload.is-busy {
    opacity: 0.65;
    cursor: wait;
}

.tactics-map-modal__upload .tactics-custom-map-upload__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: rgba(255, 217, 102, 0.12);
    color: #ffd966;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tactics-map-modal__upload .tactics-custom-map-upload__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tactics-map-modal__upload .tactics-custom-map-upload__title {
    font-weight: 700;
    color: var(--tactics-text-bright);
}

.tactics-map-modal__upload .tactics-custom-map-upload__hint {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--tactics-muted);
    text-align: left;
    font-weight: 400;
}

.page-tactics-room .tactics-menu-section-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    margin: 0;
    box-sizing: border-box;
    background: var(--tactics-control-bg);
    border-bottom: 1px solid var(--tactics-panel-border);
    color: var(--tactics-text);
    font: inherit;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.page-tactics-room .tactics-menu-section-head__title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    color: var(--tactics-text);
}

.page-tactics-room .tactics-users-head {
    margin-bottom: 0;
}

.page-tactics-room .tactics-sidebar-title {
    font-size: inherit;
    font-weight: 600;
    color: var(--tactics-text);
    text-transform: none;
}

.page-tactics-room .tactics-users-count {
    color: var(--tactics-muted);
    font-weight: 500;
}

.page-tactics-room .tactics-editor-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--tactics-text);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.page-tactics-room .tactics-editor-inline-btn:hover {
    background: var(--tactics-hover-bg);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-users-perms-btn[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-users-perms-btn.is-active {
    color: var(--tactics-active);
}

.page-tactics-room .tactics-participant {
    background: transparent;
    border: none;
    color: var(--tactics-text);
    font-size: inherit;
    padding: 5px 10px;
}

.page-tactics-room .tactics-participant-self {
    border: none;
    color: var(--tactics-success);
}

.page-tactics-room .tactics-participant--editing-nick {
    background: transparent;
}

.page-tactics-room .tactics-participant--editing-nick:focus-within {
    border: none;
    box-shadow: none;
}

.page-tactics-room .tactics-slides-head {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 9px 10px 12px;
    align-items: center;
}

.page-tactics-room .tactics-slides-head .tactics-menu-section-head__title {
    align-self: center;
    line-height: 1;
}

.page-tactics-room .tactics-slides-head .tactics-slides-head__actions {
    margin-left: auto;
    align-self: center;
    align-items: center;
}

.page-tactics-room .tactics-slides-nav-btn,
.page-tactics-room .tactics-add-slide-btn {
    border: 1px solid var(--tactics-control-border);
    background: var(--tactics-control-bg);
    color: var(--tactics-text);
    border-radius: 4px;
    font-size: inherit;
}

.page-tactics-room .tactics-slides-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    cursor: pointer;
}

.page-tactics-room .tactics-slides-nav-btn:hover {
    border-color: var(--tactics-panel-border-strong);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-add-slide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    box-sizing: border-box;
    font-weight: 600;
    color: var(--tactics-cta);
    border-color: var(--tactics-cta-border);
    background: var(--tactics-cta-soft);
}

.page-tactics-room .tactics-slide-card--thumb {
    width: 136px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.page-tactics-room .tactics-slide-card--thumb.is-active {
    border: none;
    box-shadow: none;
    background: transparent;
}

.page-tactics-room .tactics-slide-preview {
    border-width: 2px;
    border-style: solid;
    border-color: var(--tactics-control-border);
    border-radius: 0;
}

.page-tactics-room .tactics-slide-preview__scale {
    top: 5px;
    left: 6px;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.68rem;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.92),
        0 0 8px rgba(0, 0, 0, 0.75);
}

.page-tactics-room .tactics-slide-preview .tactics-slide-change-map {
    border-radius: 0;
    background: rgba(0, 0, 0, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.page-tactics-room .tactics-slide-preview .tactics-slide-change-map:hover {
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
}

.page-tactics-room .tactics-slide-change-map__label {
    font-size: 0.68rem;
}

.page-tactics-room .tactics-slide-card--thumb.is-active .tactics-slide-preview {
    border-color: var(--tactics-active);
    box-shadow: 0 0 0 1px var(--tactics-active);
}

.page-tactics-room .tactics-slide-thumb,
.page-tactics-room .tactics-slide-preview .tactics-slide-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-tactics-room .tactics-slide-card--thumb .tactics-slide-name {
    color: var(--tactics-muted);
    font-size: inherit;
    line-height: 1.2;
}

.page-tactics-room .tactics-slide-card--thumb.is-active .tactics-slide-name {
    color: var(--tactics-text-bright);
    font-weight: 600;
}

.page-tactics-room .tactics-slide-rename-input {
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--tactics-muted);
    font-size: inherit;
    line-height: 1.2;
    text-align: center;
    padding: 0 2px;
    outline: none;
    box-shadow: none;
    appearance: none;
    caret-color: var(--tactics-active);
}

.page-tactics-room .tactics-slide-rename-input:focus,
.page-tactics-room .tactics-slide-rename-input:focus-visible {
    border: none;
    background: transparent;
    outline: none;
    box-shadow: none;
}

.page-tactics-room .tactics-slide-rename-input::selection {
    background: rgba(100, 181, 246, 0.45);
    color: var(--tactics-text-bright);
}

.page-tactics-room .tactics-slide-card--thumb.is-active .tactics-slide-rename-input {
    color: var(--tactics-text-bright);
    font-weight: 600;
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-rename-input {
    width: 100%;
    padding: 8px 10px;
    text-align: left;
    color: var(--tactics-text);
}

.page-tactics-room .tactics-slide-card--list.is-active .tactics-slide-rename-input {
    color: #07121f;
    font-weight: 600;
}

.page-tactics-room .tactics-slides-strip-wrap--grid,
.page-tactics-room .tactics-slides-strip-wrap--list {
    margin: 0;
}

.page-tactics-room .tactics-slides-list--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: 1 1 auto;
    flex-direction: unset;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0 0 8px;
    scroll-behavior: smooth;
    align-content: start;
    -webkit-overflow-scrolling: touch;
}

.page-tactics-room .tactics-slides-list--grid .tactics-slide-item {
    min-width: 0;
}

.page-tactics-room .tactics-slides-list--grid .tactics-slide-card--thumb {
    width: 100%;
}

.page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-card--thumb {
    width: auto;
    max-width: 100%;
}

.page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-item {
    min-width: 0;
}

.page-tactics-room-shell .tactics-slides-list--carousel .tactics-slide-preview .tactics-slide-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-tactics-room .tactics-slides-list--list {
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    min-height: 0;
    max-height: none;
    margin-top: 0;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.page-tactics-room .tactics-slide-card--list {
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 34px;
    position: relative;
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-btn {
    padding: 8px 10px;
    width: 100%;
    color: var(--tactics-text);
    font-size: inherit;
}

.page-tactics-room .tactics-slide-card--list.is-active {
    background: var(--tactics-active);
    border: none;
    box-shadow: none;
}

.page-tactics-room .tactics-slide-card--list.is-active .tactics-slide-btn,
.page-tactics-room .tactics-slide-card--list.is-active .tactics-slide-name {
    color: #07121f;
    font-weight: 600;
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-delete,
.page-tactics-room .tactics-slide-card--list .tactics-slide-duplicate,
.page-tactics-room .tactics-slide-card--list .tactics-slide-change-map {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    opacity: 0;
    border-radius: 0;
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-delete {
    right: 6px;
    width: 22px;
    height: 22px;
    color: rgba(7, 18, 31, 0.72);
    background: rgba(219, 233, 247, 0.42);
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-duplicate {
    right: 32px;
    width: 22px;
    height: 22px;
    color: rgba(7, 18, 31, 0.72);
    background: rgba(219, 233, 247, 0.42);
}

.page-tactics-room .tactics-slide-card--list:not(:has(.tactics-slide-delete)) .tactics-slide-duplicate {
    right: 6px;
}

.page-tactics-room .tactics-slide-card--list .tactics-slide-change-map {
    right: 60px;
    width: auto;
    height: auto;
    min-height: 22px;
    padding: 3px 6px 3px 4px;
    color: rgba(7, 18, 31, 0.72);
    background: rgba(219, 233, 247, 0.42);
}

.page-tactics-room .tactics-slide-card--list:not(.is-active) .tactics-slide-delete,
.page-tactics-room .tactics-slide-card--list:not(.is-active) .tactics-slide-duplicate,
.page-tactics-room .tactics-slide-card--list:not(.is-active) .tactics-slide-change-map {
    color: var(--tactics-muted);
    background: rgba(0, 0, 0, 0.25);
}

.page-tactics-room .tactics-slide-card--list:hover .tactics-slide-delete,
.page-tactics-room .tactics-slide-card--list:hover .tactics-slide-duplicate,
.page-tactics-room .tactics-slide-card--list:hover .tactics-slide-change-map,
.page-tactics-room .tactics-slide-card--list:focus-within .tactics-slide-delete,
.page-tactics-room .tactics-slide-card--list:focus-within .tactics-slide-duplicate,
.page-tactics-room .tactics-slide-card--list:focus-within .tactics-slide-change-map {
    opacity: 1;
}

.page-tactics-room .tactics-chat-dock {
    flex: 0 0 auto;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--tactics-panel-border);
}

.page-tactics-room .tactics-chat-panel {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    background: var(--tactics-panel-bg);
    border-radius: 0;
}

.page-tactics-room .tactics-chat-panel.is-collapsed {
    height: auto;
    min-height: 0;
    max-height: none;
}

.page-tactics-room .tactics-chat-panel:not(.is-collapsed) {
    height: var(--tactics-chat-expanded-height);
    min-height: var(--tactics-chat-expanded-height);
    max-height: var(--tactics-chat-expanded-height);
}

.page-tactics-room .tactics-chat-toggle {
    width: 100%;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    color: var(--tactics-muted);
    flex: 0 0 auto;
    background: var(--tactics-active-softer);
    border-radius: 0;
}

.page-tactics-room .tactics-chat-panel:not(.is-collapsed) .tactics-chat-toggle {
    border-bottom-color: var(--tactics-panel-border);
}

.page-tactics-room .tactics-chat-panel.is-collapsed .tactics-chat-toggle {
    border-bottom: none;
}

.page-tactics-room .tactics-chat-toggle .tactics-chat-toggle__icon {
    margin-left: auto;
    color: var(--tactics-muted);
    transition: transform 0.2s ease;
}

.page-tactics-room .tactics-chat-panel.is-collapsed .tactics-chat-toggle__icon {
    transform: none;
}

.page-tactics-room .tactics-chat-panel:not(.is-collapsed) .tactics-chat-toggle__icon {
    transform: rotate(180deg);
}

.page-tactics-room .tactics-chat-body {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.page-tactics-room .tactics-chat-panel.is-collapsed .tactics-chat-body,
.page-tactics-room .tactics-chat-panel.is-collapsed .tactics-chat-form {
    display: none;
}

.page-tactics-room .tactics-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.page-tactics-room .tactics-chat-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 12px 10px;
    color: var(--tactics-muted);
    font-size: inherit;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.page-tactics-room .tactics-chat-empty[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-chat-error {
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 10px;
    border-radius: 0;
    background: var(--tactics-active-softer);
    color: var(--tactics-danger);
    font-size: inherit;
    line-height: 1.35;
}

.page-tactics-room .tactics-chat-error[hidden] {
    display: none !important;
}

.page-tactics-room .tactics-chat-form {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-top: 1px solid var(--tactics-panel-border);
    gap: 6px;
}

.page-tactics-room .tactics-chat-input {
    background: var(--tactics-control-bg);
    border-color: var(--tactics-control-border);
    color: var(--tactics-text);
    font-size: inherit;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.page-tactics-room .tactics-chat-input:focus,
.page-tactics-room .tactics-chat-input:focus-visible {
    outline: none;
    border-color: var(--tactics-panel-border-strong);
    background: var(--tactics-control-bg-hover);
    box-shadow: none;
}

.page-tactics-room .tactics-chat-send {
    border-radius: 0;
    outline: none;
}

.page-tactics-room .tactics-chat-send:focus,
.page-tactics-room .tactics-chat-send:focus-visible {
    outline: none;
    border-color: var(--tactics-panel-border-strong);
    background: var(--tactics-hover-bg);
    box-shadow: none;
}

.page-tactics-room .tactics-editor :is(
    .tactics-chat-message,
    .tactics-chat-message__time,
    .tactics-chat-message__nick,
    .tactics-participant-name-input,
    .tactics-slide-rename-input,
    .tactics-slide-btn,
    .tactics-slide-delete,
    .tactics-slide-duplicate,
    .tactics-slide-change-map,
    .tactics-slide-change-map__label,
    .tactics-slide-preview__scale,
    .tactics-map-scale,
    .tactics-grid-top span,
    .tactics-grid-left span,
    .tactics-room-code-btn__text,
    .tactics-room-code-btn__label,
    .tactics-room-code-btn__value,
    .tactics-room-code-btn__copied,
    .tactics-map-modal__upload,
    .tactics-map-modal__upload .tactics-custom-map-upload__hint,
    .tactics-room-delete-btn,
    .tactics-room-delete-btn span,
    .tactics-room-visibility-lock-btn,
    .tactics-room-password-save-btn,
    .tactics-room-password-input,
    .tactics-remote-cursor__label,
    .tactics-ruler-label
) {
    font-size: inherit;
    line-height: var(--tactics-line);
}

.page-tactics-room #tacticsAddSlideField :is(
    .tactics-field-label,
    .tactics-select,
    .tactics-map-picker-tabs .recruiting-realm-tab,
    .tactics-map-picker-tabs--game .tactics-game-tab,
    .tactics-game-tab__label
) {
    font-size: inherit;
    line-height: var(--tactics-line);
}

.tactics-map-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.tactics-map-modal[hidden] {
    display: none !important;
}

body.tactics-map-modal-open {
    overflow: hidden;
}

.tactics-map-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.tactics-map-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(820px, 100%);
    max-height: min(90vh, 760px);
    background: linear-gradient(180deg, rgba(18, 28, 52, 0.98) 0%, rgba(12, 20, 38, 0.98) 100%);
    border: 1px solid rgba(141, 195, 255, 0.18);
    border-radius: 0;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    box-sizing: border-box;
    overflow: hidden;
}

.tactics-map-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(141, 195, 255, 0.12);
}

.tactics-map-modal__header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tactics-map-modal__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--tactics-text-bright);
    line-height: 1.2;
}

.tactics-map-modal__subtitle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--tactics-muted);
}

.tactics-map-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(141, 195, 255, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    color: var(--tactics-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    flex-shrink: 0;
}

.tactics-map-modal__close:hover {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.28);
    color: var(--tactics-danger);
}

.tactics-map-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 20px;
    min-height: 0;
    flex: 1 1 auto;
    padding: 20px 24px;
    overflow: hidden;
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__preview-label {
    display: none;
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__preview-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__controls {
    display: none;
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__upload:not([hidden]) {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    align-self: start;
    box-sizing: border-box;
}

.tactics-map-modal.is-custom-map-mode .tactics-map-modal__custom-scale:not([hidden]) {
    margin-top: 0;
}

.tactics-map-modal__left {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.tactics-map-modal__right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
}

.tactics-map-modal__preview-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tactics-map-modal__preview-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tactics-muted);
}

.tactics-map-modal__preview-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%),
        rgba(8, 14, 28, 0.85);
    border: 1px solid rgba(141, 195, 255, 0.14);
    border-radius: 0;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tactics-map-modal__preview-spawns,
.tactics-spawn-layer,
.tactics-slide-preview-spawns {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.tactics-spawn-layer {
    z-index: 3;
}

.tactics-slide-preview {
    position: relative;
}

.tactics-slide-preview-spawns {
    z-index: 1;
    border-radius: inherit;
}

.tactics-spawn-layer .tactics-map-point,
.tactics-map-modal__preview-spawns .tactics-map-point {
    width: clamp(16px, 4.8%, 30px);
    height: clamp(16px, 4.8%, 30px);
}

.tactics-slide-preview-spawns .tactics-map-point {
    width: clamp(10px, 36%, 20px);
    height: clamp(10px, 36%, 20px);
    border-width: 2px;
}

.tactics-map-point {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.tactics-map-point--base-green,
.tactics-map-point--base-red {
    border-radius: 50%;
    width: clamp(28px, 8.4%, 48px);
    height: clamp(28px, 8.4%, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 20, 0.92);
}

.tactics-map-point--base-green {
    border-color: #29d500;
    box-shadow: 0 0 8px rgba(41, 213, 0, 0.42), 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.tactics-map-point--base-red {
    border-color: #e03c3c;
    box-shadow: 0 0 8px rgba(224, 60, 60, 0.42), 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.tactics-spawn-flag {
    display: block;
    width: 41.6%;
    height: 41.6%;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' d='M7.85 4.9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0M7.25 6.1h1.2v21.9H7.25zM8.75 7.6L24.75 7.6 19.25 11.1 24.75 14.6 8.75 14.6z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

.tactics-spawn-base-number {
    font-size: 0.58em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.tactics-map-point--spawn-green {
    background: #36c736;
}

.tactics-map-point--spawn-red {
    background: #e03c3c;
}

.tactics-map-point--neutral {
    border-radius: 50%;
    width: clamp(28px, 8.4%, 48px);
    height: clamp(28px, 8.4%, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 20, 0.92);
    border-color: #c8ced8;
    box-shadow: 0 0 8px rgba(200, 206, 216, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.tactics-map-point--other {
    background: #6b7280;
}

.tactics-map-modal__preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    color: var(--tactics-muted-dim);
    text-align: center;
}

.tactics-map-modal__preview-placeholder[hidden] {
    display: none !important;
}

.tactics-map-modal__preview-placeholder i {
    font-size: 2.2rem;
    line-height: 1;
    opacity: 0.55;
}

.tactics-map-modal__preview-placeholder span {
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.3;
}

.tactics-map-modal__preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tactics-map-modal__preview[hidden] {
    display: none !important;
}

.tactics-map-modal__game .tactics-map-picker-tabs--game {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tactics-map-modal__controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.tactics-map-modal__field--mode {
    margin: 0;
}

.tactics-map-modal__field-label--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tactics-map-modal__maps-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 320px;
    width: 100%;
    border: 1px solid rgba(141, 195, 255, 0.12);
    background: rgba(8, 14, 28, 0.55);
    overflow: hidden;
}

.tactics-map-modal__maps-panel[hidden] {
    display: none !important;
}

.tactics-map-modal__search {
    width: 100%;
    flex: 0 0 auto;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid rgba(141, 195, 255, 0.12);
    background: rgba(8, 14, 28, 0.85);
    color: var(--tactics-text-bright);
    font: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.tactics-map-modal__search::placeholder {
    color: var(--tactics-muted-dim);
}

.tactics-map-modal__search:focus {
    outline: none;
    background: rgba(12, 20, 38, 0.95);
    border-bottom-color: rgba(141, 195, 255, 0.28);
}

.tactics-map-modal__search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.tactics-map-modal__map-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--tactics-scrollbar) var(--tactics-scrollbar-track);
}

.tactics-map-modal__map-list::-webkit-scrollbar {
    width: 6px;
}

.tactics-map-modal__map-list::-webkit-scrollbar-thumb {
    background: var(--tactics-scrollbar);
    border-radius: 0;
}

.tactics-map-modal__map-list::-webkit-scrollbar-track {
    background: var(--tactics-scrollbar-track);
}

.tactics-map-modal__map-item {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid rgba(141, 195, 255, 0.06);
    background: transparent;
    color: var(--tactics-text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

.tactics-map-modal__map-item:last-child {
    border-bottom: none;
}

.tactics-map-modal__map-item:hover,
.tactics-map-modal__map-item:focus-visible {
    background: rgba(100, 181, 246, 0.12);
    color: var(--tactics-text-bright);
    outline: none;
}

.tactics-map-modal__map-item.is-active {
    background: linear-gradient(90deg, rgba(100, 181, 246, 0.34) 0%, rgba(100, 181, 246, 0.16) 100%);
    color: var(--tactics-text-bright);
    font-weight: 600;
}

.tactics-map-modal__map-empty {
    padding: 18px 14px;
    color: var(--tactics-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.tactics-map-modal__select-hidden {
    display: none !important;
}

.tactics-map-modal__custom-scale {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.tactics-map-modal__custom-scale[hidden] {
    display: none !important;
}

.tactics-map-modal__scale-hint {
    display: block;
    margin: 0 0 8px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--tactics-muted);
}

.tactics-map-modal__scale-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.tactics-map-modal__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(141, 195, 255, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.02);
}

.tactics-map-modal__section--custom {
    background: linear-gradient(180deg, rgba(255, 217, 102, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 217, 102, 0.16);
}

.tactics-map-modal__section[hidden],
.tactics-map-modal__section--custom[hidden] {
    display: none !important;
}

.tactics-map-modal__section-head {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tactics-text-bright);
}

.tactics-map-modal__section-hint {
    margin: -4px 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--tactics-muted);
}

.tactics-map-modal__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0;
}

.tactics-map-modal__field[hidden] {
    display: none !important;
}

.tactics-map-modal__field-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tactics-muted);
}

.tactics-map-modal__field .recruiting-select-wrap,
.tactics-map-modal__field .recruiting-select {
    width: 100%;
}

.tactics-map-modal__field .recruiting-select-wrap.is-open {
    z-index: 130;
}

.tactics-map-modal__mode-select {
    width: 100%;
    min-height: 42px;
    padding: 10px 36px 10px 12px;
    border: 1px solid rgba(141, 195, 255, 0.16);
    border-radius: 0;
    background: rgba(8, 14, 28, 0.85);
    color: var(--tactics-text-bright);
    font: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--tactics-muted) 50%), linear-gradient(135deg, var(--tactics-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.tactics-map-modal__mode-select:focus {
    outline: none;
    border-color: rgba(141, 195, 255, 0.42);
    box-shadow: 0 0 0 3px rgba(141, 195, 255, 0.12);
}

.tactics-map-modal__field--mode .recruiting-select-wrap {
    width: 100%;
}

.tactics-map-modal__maps-panel .recruiting-select-wrap {
    display: none !important;
}

.tactics-map-modal__scale-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.tactics-map-modal__scale-input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(141, 195, 255, 0.16);
    border-radius: 0;
    background: rgba(8, 14, 28, 0.72);
    color: var(--tactics-text-bright);
    font: inherit;
    font-size: 0.98rem;
    box-sizing: border-box;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    -moz-appearance: textfield;
    appearance: textfield;
}

.tactics-map-modal__scale-input::-webkit-outer-spin-button,
.tactics-map-modal__scale-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tactics-map-modal__scale-input:focus {
    outline: none;
    border-color: rgba(141, 195, 255, 0.42);
    box-shadow: 0 0 0 3px rgba(141, 195, 255, 0.12);
}

.tactics-map-modal__footer {
    padding: 0 24px 24px;
}

.tactics-map-modal__confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 18px;
    border: none;
    border-radius: 0;
    background: linear-gradient(180deg, var(--tactics-active) 0%, var(--tactics-active-strong) 100%);
    color: var(--tactics-text-bright);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 10px 24px rgba(74, 144, 226, 0.22);
}

.tactics-map-modal__confirm:hover {
    filter: brightness(1.05);
}

.tactics-map-modal__confirm:active {
    transform: translateY(1px);
}

.tactics-map-modal.is-busy .tactics-map-modal__body,
.tactics-map-modal.is-busy .tactics-map-modal__header .tactics-map-modal__close {
    opacity: 0.55;
    pointer-events: none;
}

.tactics-map-modal.is-busy .tactics-map-modal__footer {
    opacity: 1;
    pointer-events: auto;
}

.tactics-map-modal__confirm.is-busy {
    cursor: wait;
    filter: brightness(0.96);
}

.tactics-map-modal__confirm-spinner[hidden] {
    display: none !important;
}

.tactics-map-modal__confirm-icon[hidden] {
    display: none !important;
}

.tactics-map-modal .recruiting-select-trigger,
.tactics-map-modal .recruiting-select-menu,
.tactics-map-modal .recruiting-select-menu::-webkit-scrollbar-thumb,
.tactics-map-modal .tactics-map-picker-tabs--game .tactics-game-tab,
.tactics-map-modal .tactics-game-tab__icon-wrap {
    border-radius: 0;
}

@media (max-width: 720px) {
    .tactics-map-modal__body {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        overflow: auto;
    }

    .tactics-map-modal__custom-scale,
    .tactics-map-modal__left,
    .tactics-map-modal__right {
        grid-column: 1;
        grid-row: auto;
    }

    .tactics-map-modal__preview-wrap {
        max-width: 320px;
        margin: 0 auto;
    }

    .tactics-map-modal.is-custom-map-mode .tactics-map-modal__preview-wrap {
        max-width: none;
        margin: 0;
    }

    .tactics-map-modal__right {
        align-items: stretch;
        min-height: 280px;
    }

    .tactics-map-modal.is-custom-map-mode .tactics-map-modal__upload:not([hidden]) {
        max-width: none;
        margin: 0;
    }

    .tactics-map-modal__maps-panel {
        min-height: 240px;
    }

    .tactics-map-modal__scale-grid {
        grid-template-columns: 1fr;
    }
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
) {
    scrollbar-width: thin;
    scrollbar-color: var(--tactics-scrollbar) var(--tactics-scrollbar-track);
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users
)::-webkit-scrollbar {
    width: 6px;
}

.page-tactics-room .tactics-slides-list--strip::-webkit-scrollbar {
    width: auto;
    height: 6px;
}

.page-tactics-room :is(.tactics-slides-list--grid, .tactics-slides-list--list)::-webkit-scrollbar {
    width: 6px;
    height: auto;
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
)::-webkit-scrollbar-track {
    background: transparent;
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
)::-webkit-scrollbar-thumb {
    background: var(--tactics-scrollbar);
    border: 1px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
)::-webkit-scrollbar-thumb:hover {
    background: var(--tactics-active);
    border-color: transparent;
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
)::-webkit-scrollbar-thumb:active {
    background: rgba(100, 181, 246, 0.55);
}

.page-tactics-room :is(
    .tactics-tool-context__content,
    .tactics-chat-messages,
    .tactics-sidebar-panel--users,
    .tactics-slides-list--strip,
    .tactics-slides-list--grid,
    .tactics-slides-list--list
)::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 960px) {
    .tactics-create-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tactics-create-preview-col {
        position: static;
    }

    .tactics-create-fields-row {
        grid-template-columns: 1fr;
    }

    .tactics-create-submit {
        width: 100%;
        align-self: stretch;
    }

    .tactics-lobby-grid,
    .tactics-room-workspace {
        grid-template-columns: 1fr;
    }

    .tactics-canvas-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tactics-toolbar--side {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }

    .tactics-toolbar--side .tactics-width-input {
        writing-mode: horizontal-tb;
        direction: ltr;
        width: 90px;
        height: auto;
    }
}

.tactics-confirm {
    --tactics-active: #64b5f6;
    --tactics-active-strong: #4a90e2;
    --tactics-text-bright: #f0f7ff;
    --tactics-muted: #9bb0c5;
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.tactics-confirm[hidden] {
    display: none !important;
}

body.tactics-confirm-open {
    overflow: hidden;
}

.tactics-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.tactics-confirm__dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 24px;
    background: linear-gradient(180deg, rgba(18, 28, 52, 0.98) 0%, rgba(12, 20, 38, 0.98) 100%);
    border: 1px solid rgba(141, 195, 255, 0.18);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    box-sizing: border-box;
}

.tactics-confirm__title {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--tactics-text-bright);
    line-height: 1.25;
}

.tactics-confirm__message {
    margin: 0 0 22px;
    font-size: 0.96rem;
    line-height: 1.5;
    color: var(--tactics-muted);
}

.tactics-confirm__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.tactics-confirm__actions[hidden] {
    display: none !important;
}

.tactics-confirm__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 11px 16px;
    border-radius: 0;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, filter 0.12s ease, transform 0.1s ease;
}

.tactics-confirm__btn--primary {
    border: none;
    background: linear-gradient(180deg, var(--tactics-active) 0%, var(--tactics-active-strong) 100%);
    color: var(--tactics-text-bright);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.tactics-confirm__btn--primary:hover {
    filter: brightness(1.05);
}

.tactics-confirm__btn--primary:active {
    transform: translateY(1px);
}

.tactics-confirm__btn--ghost {
    border: 1px solid rgba(141, 195, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--tactics-muted);
}

.tactics-confirm__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(141, 195, 255, 0.32);
    color: var(--tactics-text-bright);
}

.page-aim,
.page-aim-play {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(10, 18, 36, 0.55);
}

.aim-service,
.aim-play {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.aim-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
}

.aim-service-header.aim-panel {
    padding: 16px 20px;
}

.aim-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.aim-header-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 240px;
}

.aim-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.aim-section-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
}

.aim-header-intro .aim-section-hint {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.aim-section-hint,
.aim-nickname-hint,
.aim-play-desc,
.aim-results-note,
.aim-leaderboard-empty,
.aim-leaderboard-loading,
.aim-leaderboard-error {
    margin: 8px 0 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.aim-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
}

.aim-ratings-btn {
    flex-shrink: 0;
    white-space: nowrap;
    height: 38px;
    padding: 0 14px;
}

.aim-volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.78);
    min-height: 38px;
}

.aim-volume-control__label {
    font-size: 0.72rem;
    color: rgba(175, 200, 228, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.aim-volume-control__icon {
    color: rgba(142, 203, 255, 0.9);
    font-size: 0.95rem;
    flex: 0 0 1.15rem;
    width: 1.15rem;
    min-width: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.aim-volume-control__slider {
    width: 96px;
    height: 4px;
    accent-color: #8ecbff;
    cursor: pointer;
}

.aim-volume-control__value {
    min-width: 2.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e8f2ff;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.aim-volume-control--compact {
    padding: 8px 12px;
    min-height: auto;
}

.aim-hud-stat--volume {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 7px;
    min-width: 84px;
    padding: 8px 10px 9px;
    cursor: default;
}

.aim-volume-stat__head {
    text-align: center;
    line-height: 1.2;
}

.aim-volume-stat__title {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.45em;
    max-width: 100%;
}

.aim-volume-stat__label {
    font-size: 0.72rem;
    color: rgba(175, 200, 228, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.aim-volume-stat__pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: #e8f2ff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.aim-hud-stat--volume .aim-volume-control__slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 12px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.aim-hud-stat--volume .aim-volume-control__slider::-webkit-slider-runnable-track {
    height: 3px;
    background: rgba(113, 163, 230, 0.24);
    border: none;
    border-radius: 0;
}

.aim-hud-stat--volume .aim-volume-control__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 9px;
    height: 9px;
    margin-top: -3px;
    background: #8ecbff;
    border: 1px solid rgba(10, 18, 36, 0.85);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(113, 163, 230, 0.32);
}

.aim-hud-stat--volume .aim-volume-control__slider::-moz-range-track {
    height: 3px;
    background: rgba(113, 163, 230, 0.24);
    border: none;
    border-radius: 0;
}

.aim-hud-stat--volume .aim-volume-control__slider::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 1px solid rgba(10, 18, 36, 0.85);
    border-radius: 50%;
    background: #8ecbff;
    box-shadow: 0 0 0 1px rgba(113, 163, 230, 0.32);
}

.aim-volume-control--compact .aim-volume-control__slider {
    width: 72px;
}

.aim-volume-control--compact .aim-volume-control__value {
    min-width: 2.4rem;
    font-size: 0.72rem;
}

.aim-play-toolbar-stats {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.aim-play-toolbar-stats .aim-volume-mount--play {
    display: flex;
    align-items: stretch;
}

.aim-play-toolbar-stats .aim-hud-stat--volume {
    align-self: stretch;
}

.aim-volume-mount--play-side {
    display: none;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-volume-mount--play-side {
    display: block;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-toolbar-stats .aim-volume-mount--play {
    display: none;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-side-hud .aim-hud-stat--volume {
    margin-bottom: 4px;
}

.aim-ratings-header.aim-panel {
    padding: 16px 20px;
}

.aim-ratings-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.aim-ratings-toolbar .aim-section-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.aim-ratings-toolbar .aim-lb-device-field {
    margin-left: auto;
}

.aim-nick-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
    cursor: text;
}

.aim-nick-inline__label {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(175, 200, 228, 0.72);
}

.aim-nick-inline__field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 12px;
    height: 38px;
    border: 1px solid rgba(113, 163, 230, 0.32);
    background: rgba(10, 18, 36, 0.55);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.aim-nick-inline__field:focus-within {
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(10, 18, 36, 0.72);
}

.aim-nick-inline__icon {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: rgba(142, 203, 255, 0.75);
}

.aim-nick-inline__input {
    width: 168px;
    max-width: 36vw;
    border: none;
    background: transparent;
    color: #e8f2ff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0;
    outline: none;
}

.aim-nick-inline__input::placeholder {
    color: rgba(175, 200, 228, 0.45);
}

.aim-nickname-bar {
    margin-top: 20px;
    display: grid;
    gap: 8px;
    max-width: 420px;
}

.aim-field {
    display: grid;
    gap: 6px;
}

.aim-field-label {
    font-size: 0.88rem;
    color: rgba(175, 200, 228, 0.85);
}

.aim-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.65);
    color: #e8f2ff;
    font-family: inherit;
    font-size: 0.95rem;
}

.aim-input:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(10, 18, 36, 0.72);
}

.aim-trainer-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--layout-gap);
    align-items: stretch;
}

.aim-trainer-card {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
    border: 1px solid rgba(113, 163, 230, 0.24);
    background: rgba(10, 18, 36, 0.42);
    min-width: 0;
}

.aim-trainer-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.aim-trainer-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aim-trainer-card__title i {
    color: #8ecbff;
}

.aim-trainer-card__duration {
    flex-shrink: 0;
    padding: 4px 10px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(30, 51, 89, 0.55);
    color: rgba(175, 200, 228, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
}

.aim-trainer-card__desc {
    margin: 0 0 10px;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.9rem;
    line-height: 1.45;
}

.aim-trainer-card__top {
    border-top: 1px solid rgba(113, 163, 230, 0.18);
    padding-top: 14px;
}

.aim-trainer-card__top-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.aim-trainer-card__top-body {
    min-width: 0;
}

.aim-trainer-card__top-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aim-trainer-card__top-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.aim-lb-device-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.aim-lb-device-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.aim-lb-device-switch {
    display: inline-flex;
    align-items: stretch;
    flex-shrink: 0;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(10, 18, 36, 0.55);
}

.aim-lb-device-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: rgba(175, 200, 228, 0.72);
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1;
    font-family: inherit;
}

.aim-lb-device-btn + .aim-lb-device-btn {
    border-left: 1px solid rgba(113, 163, 230, 0.24);
}

.aim-lb-device-btn.is-active {
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
}

.aim-lb-device-btn:hover {
    color: #b8deff;
}

.aim-lb-device-btn:focus-visible {
    outline: 2px solid rgba(100, 181, 246, 0.65);
    outline-offset: -2px;
    z-index: 1;
}

.aim-link-btn {
    border: none;
    background: none;
    padding: 0;
    color: #8ecbff;
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
}

.aim-link-btn:hover {
    color: #b8deff;
}

.aim-trainer-card__full-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
}

.aim-trainer-card__full-top i {
    font-size: 0.88rem;
    color: #ffd966;
}

.aim-trainer-card__full-top-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aim-trainer-card__full-top:hover {
    color: #b8deff;
}

.aim-trainer-card__full-top:hover i {
    color: #ffe082;
}

html.aim-device-mobile .aim-trainer-card__top-actions .aim-trainer-card__full-top {
    padding: 5px 8px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    background: rgba(10, 18, 36, 0.55);
}

.aim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.aim-btn:hover:not(:disabled) {
    border-color: #64b5f6;
    color: #b8deff;
}

.aim-btn--primary {
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
    border-color: rgba(100, 181, 246, 0.65);
    color: #fff;
}

.aim-btn--ghost {
    background: rgba(10, 18, 36, 0.55);
}

.aim-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.aim-trainer-card__play {
    align-self: flex-start;
    margin-bottom: 10px;
}

.aim-leaderboard-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.aim-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.aim-leaderboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aim-lb-tab {
    padding: 8px 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.45);
    color: rgba(175, 200, 228, 0.9);
    font-family: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

.aim-lb-tab.is-active,
.aim-lb-tab:hover {
    border-color: rgba(100, 181, 246, 0.55);
    color: #b8deff;
}

.aim-leaderboard-table-wrap {
    overflow-x: auto;
}

.aim-leaderboard-table-wrap--compact {
    overflow-x: visible;
}

.aim-leaderboard-table--compact {
    table-layout: fixed;
    width: 100%;
    font-size: 0.82rem;
}

.aim-leaderboard-table--compact th,
.aim-leaderboard-table--compact td {
    padding: 6px 4px;
}

.aim-leaderboard-table--compact th {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.aim-leaderboard-table--compact .aim-lb-rank {
    width: 11%;
}

.aim-leaderboard-table--compact .aim-lb-player {
    width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aim-leaderboard-table--compact .aim-lb-score {
    width: 24%;
    white-space: nowrap;
}

.aim-leaderboard-table--compact .aim-lb-grade {
    width: 25%;
    text-align: right;
}

.aim-leaderboard-table--compact .aim-grade {
    font-size: 0.72rem;
    padding: 2px 5px;
    min-width: 0;
    white-space: nowrap;
}

.aim-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.aim-leaderboard-table th,
.aim-leaderboard-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(113, 163, 230, 0.16);
}

.aim-leaderboard-table th {
    color: rgba(175, 200, 228, 0.75);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aim-leaderboard-table tbody tr:last-child td {
    border-bottom: none;
    padding-bottom: 0;
}

.aim-lb-rank {
    width: 56px;
    color: rgba(175, 200, 228, 0.7);
}

.aim-lb-player {
    font-weight: 600;
    color: #e8f2ff;
}

.aim-lb-score {
    font-variant-numeric: tabular-nums;
    color: #8ecbff;
}

.aim-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
}

.aim-grade__short {
    display: none;
}

.aim-leaderboard-panel {
    min-width: 0;
}

.aim-leaderboard-panel.is-loading .aim-leaderboard-table-wrap {
    opacity: 0.55;
    pointer-events: none;
}

.aim-leaderboard-panel .aim-leaderboard-table-wrap {
    transition: opacity 0.15s ease;
}

.aim-grade--sss { background: rgba(255, 87, 34, 0.28); color: #ffab91; }
.aim-grade--ss { background: rgba(255, 152, 0, 0.28); color: #ffcc80; }
.aim-grade--s { background: rgba(255, 193, 7, 0.25); color: #ffd54f; }
.aim-grade--a { background: rgba(76, 175, 80, 0.22); color: #81c784; }
.aim-grade--b { background: rgba(66, 165, 245, 0.22); color: #64b5f6; }
.aim-grade--c { background: rgba(171, 71, 188, 0.2); color: #ce93d8; }
.aim-grade--d { background: rgba(158, 158, 158, 0.2); color: #bdbdbd; }

#aimResultsGrade.aim-grade {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    min-width: 0;
}

.page-aim-play .aim-play {
    display: flex;
    flex-direction: column;
    min-height: auto;
    height: auto;
    max-height: none;
    box-sizing: border-box;
}

.aim-play-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.aim-play-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.aim-play-title-wrap .aim-play-desc {
    margin: 0;
}

.aim-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(100, 181, 246, 0.35);
    background: rgba(10, 18, 36, 0.55);
    color: #8ecbff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.aim-back-link:hover {
    border-color: #64b5f6;
    color: #b8deff;
}

.aim-play-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.aim-play-stage {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}

.aim-play-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(8, 14, 28, 0.92);
    overflow: hidden;
}

.aim-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    touch-action: none;
}

html.aim-device-desktop body.page-aim-play-duckhunt .aim-canvas,
html.aim-device-desktop body.page-aim-play-vugich .aim-canvas {
    cursor: none;
}

body.page-aim-play-duckhunt .aim-overlay.aim-overlay--idle .aim-overlay-card--start,
body.page-aim-play-duckhunt .aim-overlay.aim-overlay--countdown .aim-overlay-card--countdown {
    padding: 22px 30px;
    border: none;
    border-radius: 0;
    background: rgba(10, 24, 42, 0.9);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.42);
}

body.page-aim-play-duckhunt .aim-overlay-hint {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

body.page-aim-play-duckhunt .aim-countdown-num {
    color: #ffffff;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.65);
}

.aim-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 0;
    justify-content: flex-end;
    align-items: stretch;
    flex-shrink: 0;
}

.aim-hud-stat {
    padding: 8px 12px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(10, 18, 36, 0.78);
    min-width: 72px;
    text-align: center;
}

.aim-hud-label {
    display: block;
    font-size: 0.72rem;
    color: rgba(175, 200, 228, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aim-hud-value {
    display: block;
    margin-top: 2px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e8f2ff;
    font-variant-numeric: tabular-nums;
}

.aim-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.aim-overlay.aim-overlay--idle,
.aim-overlay.aim-overlay--results {
    pointer-events: auto;
    cursor: pointer;
}

.aim-overlay.aim-overlay--results {
    cursor: default;
}

.aim-overlay.aim-overlay--idle .aim-overlay-card,
.aim-overlay.aim-overlay--results .aim-overlay-card {
    cursor: default;
}

.aim-overlay-card {
    pointer-events: auto;
    padding: 28px 32px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(10, 18, 36, 0.92);
    text-align: center;
    max-width: 90%;
}

.aim-overlay-card[hidden] {
    display: none !important;
}

.aim-overlay-card--start {
    padding: 20px 28px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.aim-overlay-hint {
    margin: 0;
    color: rgba(175, 200, 228, 0.9);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    user-select: none;
}

.aim-overlay-card--countdown {
    padding: 40px 56px;
}

.aim-countdown-num {
    font-size: 4rem;
    font-weight: 700;
    color: #8ecbff;
    line-height: 1;
}

.aim-results-label {
    margin: 0 0 8px;
    color: rgba(175, 200, 228, 0.8);
    font-size: 0.9rem;
}

.aim-results-score {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.aim-results-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0 0;
    text-align: left;
}

.aim-results-nickname {
    margin-top: 16px;
    text-align: left;
}

.aim-device-mobile .aim-overlay.aim-overlay--results {
    align-items: flex-start;
    justify-content: center;
    padding: 4px 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.aim-device-mobile .aim-overlay.aim-overlay--results .aim-overlay-card {
    max-width: min(94%, 220px);
    max-height: calc(100% - 4px);
    padding: 6px 8px 8px;
    overflow-y: auto;
}

.aim-device-mobile #aimOverlayResults {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 8px;
    row-gap: 4px;
}

.aim-device-mobile .aim-results-label {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.68rem;
}

.aim-device-mobile .aim-results-score {
    grid-column: 1;
    font-size: 1.2rem;
    line-height: 1;
}

.aim-device-mobile #aimResultsGrade.aim-grade {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
    padding: 2px 7px;
    font-size: 0.72rem;
}

.aim-device-mobile .aim-results-metrics {
    grid-column: 1 / -1;
    margin-top: 2px;
    gap: 2px 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aim-device-mobile .aim-results-metric dt {
    font-size: 0.6rem;
}

.aim-device-mobile .aim-results-metric dd {
    margin-top: 0;
    font-size: 0.8rem;
}

.aim-device-mobile .aim-results-nickname {
    grid-column: 1 / -1;
    margin-top: 4px;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.aim-device-mobile .aim-results-nickname .aim-field-label {
    font-size: 0.66rem;
    margin-bottom: 1px;
}

.aim-device-mobile .aim-results-nickname .aim-input {
    padding: 4px 7px;
    font-size: 0.78rem;
}

.aim-device-mobile .aim-results-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 4px;
    gap: 4px;
}

.aim-device-mobile .aim-results-actions #aimSubmitBtn {
    grid-column: 1 / -1;
}

.aim-device-mobile .aim-results-actions .aim-btn {
    width: auto;
    min-width: 0;
    padding: 5px 6px;
    font-size: 0.72rem;
    gap: 4px;
}

.aim-device-mobile .aim-results-actions .aim-btn i {
    font-size: 0.85em;
}

.aim-results-metric dt {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(175, 200, 228, 0.7);
    text-transform: uppercase;
}

.aim-results-metric dd {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: #e8f2ff;
}

.aim-results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.aim-device-mobile .aim-leaderboard-table-wrap--compact {
    overflow-x: visible;
}

.aim-device-mobile .aim-leaderboard-section.aim-panel {
    padding: 14px;
}

.aim-device-mobile .aim-ratings-header.aim-panel {
    padding: 12px 14px;
}

.aim-device-mobile .aim-lb-tab {
    padding: 7px 10px;
    font-size: 0.78rem;
}

.aim-device-mobile .aim-leaderboard-table--compact {
    font-size: 0.76rem;
}

.aim-device-mobile .aim-leaderboard-table--compact th,
.aim-device-mobile .aim-leaderboard-table--compact td {
    padding: 5px 3px;
}

.aim-device-mobile .aim-leaderboard-table tbody tr:last-child td {
    padding-bottom: 0;
}

.aim-device-mobile .aim-leaderboard-table--compact th {
    font-size: 0.65rem;
}

.aim-device-mobile .aim-leaderboard-table--compact .aim-grade {
    font-size: 0.68rem;
    padding: 2px 4px;
}

.aim-device-mobile .aim-trainer-card {
    padding: 14px;
}

.aim-device-desktop .aim-grade__short {
    display: none;
}

.aim-device-desktop .aim-grade__full {
    display: inline;
}

.aim-device-mobile .aim-canvas {
    cursor: default;
}

.aim-device-mobile .aim-play-viewport {
    touch-action: manipulation;
}

html.aim-device-mobile body.page-aim-play {
    min-height: 100dvh;
    min-height: 100svh;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play {
    overflow: hidden;
}

html.aim-device-mobile body.page-aim-play .container {
    padding: 8px 10px 6px;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .container {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100dvh;
    max-height: 100svh;
    padding: 0;
    overflow: hidden;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .container > .header,
html.aim-device-mobile.aim-play-landscape body.page-aim-play .page-bottom-spacer,
html.aim-device-mobile.aim-play-landscape body.page-aim-play footer {
    display: none;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

html.aim-device-mobile body.page-aim-play .aim-play {
    gap: 6px;
}

html.aim-device-mobile body.page-aim-play .aim-play-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

html.aim-device-mobile body.page-aim-play .aim-play-viewport {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-height: 100%;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .container {
    padding: 0;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play {
    gap: 0;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-toolbar {
    display: none;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-rotate-hint {
    display: none;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 4px 0 0;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-viewport {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    width: min(calc(100vw - 76px), calc(100dvh * 16 / 9));
    height: min(100dvh, calc((100vw - 76px) * 9 / 16));
    max-width: calc(100% - 76px);
    max-height: 100dvh;
}

.aim-play-side-hud {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 64px;
    max-width: 72px;
    align-self: center;
}

.aim-play-side-hud[hidden] {
    display: none !important;
}

html.aim-device-mobile.aim-play-landscape body.page-aim-play .aim-play-side-hud:not([hidden]) {
    display: flex;
}

.aim-play-side-hud .aim-hud-stat {
    padding: 6px 6px;
    min-width: 0;
    text-align: center;
}

.aim-play-side-hud .aim-hud-label {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.aim-play-side-hud .aim-hud-value {
    font-size: 0.92rem;
    margin-top: 2px;
    line-height: 1.15;
    word-break: break-word;
}

.aim-play-side-hud .aim-hud-label,
.aim-play-side-hud .aim-hud-value {
    display: block;
}

.aim-play-rotate-hint {
    display: none;
    margin: 10px 0 0;
    padding: 0 8px;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(175, 200, 228, 0.72);
}

.aim-play-rotate-hint i {
    display: block;
    margin: 0 auto 6px;
    font-size: 1.15rem;
    color: rgba(142, 203, 255, 0.85);
    transform: rotate(90deg);
}

html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-play-rotate-hint {
    display: block;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .aim-panel {
        padding: 18px;
    }

    .aim-service-header.aim-panel {
        padding: 14px 16px;
    }

    .aim-header-bar {
        align-items: stretch;
        gap: 12px;
    }

    .aim-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .aim-nick-inline {
        flex: 1 1 180px;
        width: 100%;
    }

    .aim-ratings-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .aim-nick-inline__field {
        flex: 1;
    }

    .aim-nick-inline__input {
        width: 100%;
        max-width: none;
    }

    .aim-play-stage {
        flex: 0 0 auto;
    }

    .aim-play-viewport {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    body.page-aim-play .aim-play-stage {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    body.page-aim-play .aim-play-viewport {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 100%;
    }

    body.page-aim-play .container {
        padding: 10px 12px;
    }

    body.page-aim-play .aim-play {
        gap: 8px;
    }

    @media (orientation: portrait) {
        body.page-aim-play .aim-play-rotate-hint {
            display: block;
            flex: 0 0 auto;
        }
    }

    @media (orientation: landscape) {
        body.page-aim-play .container > .header,
        body.page-aim-play .page-bottom-spacer,
        body.page-aim-play footer {
            display: none;
        }

        body.page-aim-play {
            overflow: hidden;
        }

        body.page-aim-play .aim-play-toolbar {
            display: none;
        }

        body.page-aim-play .aim-play-rotate-hint {
            display: none;
        }

        body.page-aim-play .container {
            padding: 0;
            max-height: 100dvh;
            max-height: 100svh;
            overflow: hidden;
        }

        body.page-aim-play .aim-play {
            flex: 1 1 auto;
            min-height: 0;
            gap: 0;
            overflow: hidden;
        }

        body.page-aim-play .aim-play-stage {
            align-items: center;
            justify-content: center;
            flex-direction: row;
            gap: 6px;
            padding-right: 4px;
        }

        body.page-aim-play .aim-play-viewport {
            flex: 0 0 auto;
            aspect-ratio: 16 / 9;
            width: min(calc(100vw - 76px), calc(100dvh * 16 / 9));
            height: min(100dvh, calc((100vw - 76px) * 9 / 16));
            max-width: calc(100% - 76px);
            max-height: 100dvh;
        }

        body.page-aim-play .aim-play-side-hud:not([hidden]) {
            display: flex;
        }
    }

    .aim-play-toolbar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 8px;
        align-items: center;
    }

    .aim-play-title-wrap {
        display: contents;
    }

    .aim-back-link {
        grid-column: 1;
        grid-row: 1;
        padding: 7px 10px;
        font-size: 0.8rem;
        align-self: center;
    }

    .aim-play-title {
        grid-column: 2;
        grid-row: 1;
        font-size: 1rem;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .aim-play-title-wrap .aim-play-desc,
    .aim-play-desc {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
        font-size: 0.76rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .aim-play-toolbar .aim-hud {
        grid-column: 3;
        grid-row: 1;
        width: auto;
        margin-left: 0;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .aim-hud-stat {
        min-width: 54px;
        padding: 5px 8px;
    }

    .aim-hud-label {
        font-size: 0.62rem;
        letter-spacing: 0.02em;
    }

    .aim-hud-value {
        font-size: 0.92rem;
        margin-top: 0;
    }

    .aim-hud-stat--volume {
        min-width: 72px;
        padding: 5px 8px 6px;
        gap: 5px;
    }

    .aim-volume-stat__label,
    .aim-volume-stat__pct {
        font-size: 0.62rem;
        letter-spacing: 0.02em;
    }

    .aim-hud-stat--volume .aim-volume-control__slider {
        height: 10px;
    }

    .aim-overlay-card {
        padding: 18px 16px;
    }

    .aim-overlay-card--start {
        padding: 12px 14px;
    }

    .aim-overlay-hint {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .aim-trainer-card {
        grid-column: span 12;
    }

    html.aim-device-mobile .aim-trainer-card__top-actions .aim-trainer-card__full-top,
    .aim-trainer-card__top-actions .aim-trainer-card__full-top {
        padding: 5px 8px;
        border: 1px solid rgba(113, 163, 230, 0.28);
        border-radius: 6px;
        background: rgba(10, 18, 36, 0.55);
    }

    .aim-results-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .aim-results-actions .aim-btn {
        width: 100%;
    }

    body.page-aim-play .aim-overlay.aim-overlay--results .aim-overlay-card {
        max-width: min(94%, 210px);
        padding: 6px 8px 8px;
    }

    body.page-aim-play .aim-results-score {
        font-size: 1.15rem;
    }

    body.page-aim-play .aim-results-nickname {
        max-width: none;
        margin-top: 4px;
        margin-left: 0;
        margin-right: 0;
    }

    body.page-aim-play .aim-results-nickname .aim-field-label {
        font-size: 0.66rem;
    }

    body.page-aim-play .aim-results-nickname .aim-input {
        padding: 4px 7px;
        font-size: 0.78rem;
    }

    body.page-aim-play .aim-results-actions {
        margin-top: 4px;
        gap: 4px;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-overlay.aim-overlay--results .aim-overlay-card {
        max-width: min(96%, 200px);
        padding: 5px 7px 7px;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-label {
        font-size: 0.64rem;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-score {
        font-size: 1.1rem;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play #aimResultsGrade.aim-grade {
        padding: 2px 6px;
        font-size: 0.68rem;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-metrics {
        margin-top: 2px;
        gap: 2px;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-nickname {
        margin-top: 3px;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-actions {
        margin-top: 3px;
        gap: 3px;
    }

    html.aim-device-mobile.aim-play-portrait body.page-aim-play .aim-results-actions .aim-btn {
        padding: 4px 5px;
        font-size: 0.68rem;
    }
}

.page-landing .project-card--online-games {
    height: auto;
    min-height: 260px;
    max-height: none;
}

.page-landing .project-card--launcher {
    height: auto;
    min-height: 260px;
    max-height: none;
}

.page-landing .project-card--online-games .project-card-body {
    gap: 10px;
}

.online-games-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.online-games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.online-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 14px 14px 12px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: linear-gradient(165deg, rgba(24, 36, 68, 0.92) 0%, rgba(12, 20, 38, 0.88) 52%, rgba(8, 14, 28, 0.94) 100%);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.online-game-card:hover {
    border-color: rgba(100, 181, 246, 0.58);
    box-shadow: 0 14px 36px rgba(20, 60, 120, 0.28);
    transform: translateY(-3px);
}

.online-game-card__watermark {
    position: absolute;
    right: -8px;
    bottom: -14px;
    font-size: 4.5rem;
    line-height: 1;
    color: rgba(142, 203, 255, 0.06);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: rotate(-10deg);
    transition: color 0.22s ease;
}

.online-game-card:hover .online-game-card__watermark {
    color: rgba(142, 203, 255, 0.1);
}

.online-game-card__visual,
.online-game-card__body,
.online-game-card__footer {
    position: relative;
    z-index: 1;
}

.online-game-card__visual {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.online-game-card__board {
    width: min(100%, 120px);
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border: 2px solid rgba(30, 40, 62, 0.95);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.32),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.online-game-card__cell {
    background: #c5b8a5;
}

.online-game-card__cell--dark {
    background: #5d4037;
}

.online-game-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid rgba(100, 181, 246, 0.35);
    background: rgba(100, 181, 246, 0.12);
    color: #81d4fa;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.online-game-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.online-game-card__title {
    margin: 0;
    color: #edf4ff;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}

.online-game-card__desc {
    margin: 0;
    color: rgba(188, 210, 236, 0.82);
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.online-game-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(113, 163, 230, 0.18);
}

.online-game-card__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8ecbff;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s ease, gap 0.2s ease;
    min-width: 0;
}

.online-game-card:hover .online-game-card__action {
    color: #b8deff;
    gap: 10px;
}

.online-game-tile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(8, 14, 28, 0.42);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.online-game-tile:hover {
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(100, 181, 246, 0.08);
}

.online-game-tile__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(12, 20, 38, 0.72);
    color: #8ecbff;
    font-size: 1rem;
}

.online-game-tile__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.online-game-tile__title {
    color: #e8f2ff;
    font-size: 0.95rem;
    font-weight: 600;
}

.online-game-tile__desc {
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.82rem;
    line-height: 1.35;
}

.online-game-tile__arrow {
    color: #8ecbff;
    font-size: 0.85rem;
}

.page-onlinegames {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(10, 18, 36, 0.55);
}

.page-onlinegames .header {
    margin-bottom: 0;
}

.page-onlinegames .container {
    gap: var(--layout-gap);
}

.page-onlinegames footer {
    margin-top: auto;
}

.onlinegames-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.onlinegames-service-header.checkers-panel {
    padding: 16px 20px;
}

.onlinegames-list-section {
    padding: 16px 18px;
}

@media (max-width: 1180px) {
    .online-games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .online-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .online-games-grid {
        grid-template-columns: 1fr;
    }
}

.page-checkers {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(10, 18, 36, 0.55);
}

.page-checkers .header {
    margin-bottom: 0;
}

.page-checkers .container {
    gap: var(--layout-gap);
}

.page-checkers footer {
    margin-top: auto;
}

.checkers-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.checkers-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid rgba(113, 163, 230, 0.28);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
}

.checkers-service-header.checkers-panel {
    padding: 16px 20px;
}

.checkers-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.checkers-section-title,
.checkers-panel-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

.checkers-panel-title {
    font-size: 1.1rem;
}

.checkers-section-hint,
.checkers-panel-desc {
    margin: 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.92rem;
    line-height: 1.5;
}

.checkers-panel-desc {
    margin-bottom: 14px;
}

.checkers-lobby-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap);
}

.checkers-lobby-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkers-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkers-field-label {
    color: rgba(175, 200, 228, 0.88);
    font-size: 0.88rem;
    font-weight: 600;
}

.checkers-field input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(12, 20, 38, 0.72);
    color: #e8f2ff;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.checkers-code-input {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 1.05rem;
}

.checkers-field input[type="text"]:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.65);
    box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.25);
}

.checkers-submit-btn,
.checkers-back-link,
.checkers-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.checkers-submit-btn:hover,
.checkers-back-link:hover,
.checkers-icon-btn:hover {
    border-color: rgba(142, 203, 255, 0.75);
    background: rgba(38, 64, 110, 0.95);
    color: #c5e4ff;
}

.checkers-submit-btn {
    align-self: flex-start;
}

.checkers-form-error {
    margin: 0;
    color: #ff8a8a;
    font-size: 0.9rem;
}

.checkers-form-error[hidden] {
    display: none !important;
}

.checkers-form-error.is-visible {
    display: block;
}

.checkers-room-bar.checkers-panel {
    padding: 14px 18px;
}

.checkers-room-bar__meta,
.checkers-room-bar__status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.checkers-room-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkers-room-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: #d7e8ff;
}

.checkers-icon-btn {
    padding: 8px 10px;
}

.checkers-connection {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: rgba(198, 214, 238, 0.8);
}

.checkers-connection[data-state="connected"] i {
    color: #69f0ae;
    font-size: 0.55rem;
}

.checkers-connection[data-state="offline"] i {
    color: #ff8a80;
    font-size: 0.55rem;
}

.checkers-form-error[hidden] {
    display: none !important;
}

.checkers-nickname-gate {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(6, 10, 20, 0.82);
    backdrop-filter: blur(3px);
}

.checkers-nickname-gate[hidden] {
    display: none !important;
}

.checkers-nickname-gate__card {
    width: min(92vw, 420px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkers-board-panel {
    position: relative;
}

.checkers-board-panel .checkers-play-layout {
    height: clamp(440px, 68vh, 760px);
}

.checkers-play-layout {
    display: grid;
    grid-template-columns: auto minmax(300px, 1fr);
    gap: 14px;
    align-items: stretch;
    width: 100%;
    min-height: clamp(440px, 68vh, 760px);
}

.checkers-play-board {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.checkers-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.checkers-play-meta {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 auto;
}

.checkers-play-meta .checkers-players {
    flex: 1 1 auto;
    min-width: 0;
}

.checkers-board-shell {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    grid-template-rows: 22px minmax(0, 1fr) 22px;
    grid-template-areas:
        "corner-tl files-top corner-tr"
        "ranks-left board ranks-right"
        "corner-bl files-bottom corner-br";
    gap: 4px;
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    align-self: stretch;
}

.checkers-board-shell__corner--tl {
    grid-area: corner-tl;
}

.checkers-board-shell__corner--tr {
    grid-area: corner-tr;
}

.checkers-board-shell__corner--bl {
    grid-area: corner-bl;
}

.checkers-board-shell__corner--br {
    grid-area: corner-br;
}

.checkers-board-shell__files {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    justify-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(198, 214, 238, 0.72);
    user-select: none;
}

.checkers-board-shell__files--top {
    grid-area: files-top;
}

.checkers-board-shell__files--bottom {
    grid-area: files-bottom;
}

.checkers-board-shell__ranks {
    display: grid;
    grid-template-rows: repeat(8, 1fr);
    align-items: center;
    justify-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(198, 214, 238, 0.72);
    user-select: none;
}

.checkers-board-shell__ranks--left {
    grid-area: ranks-left;
}

.checkers-board-shell__ranks--right {
    grid-area: ranks-right;
}

.checkers-board-stage {
    grid-area: board;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.checkers-players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.checkers-player {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid rgba(113, 163, 230, 0.22);
    background: rgba(8, 14, 28, 0.35);
    min-width: 0;
}

.checkers-player--you {
    border-color: rgba(100, 181, 246, 0.55);
    box-shadow: inset 0 0 0 1px rgba(100, 181, 246, 0.15);
}

.checkers-player__label {
    font-size: 0.75rem;
    color: rgba(198, 214, 238, 0.65);
}

.checkers-player__name {
    font-size: 0.95rem;
    color: #e8f1ff;
}

.checkers-status-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 148px;
    max-width: 168px;
    padding: 8px 12px;
    border: 1px solid rgba(113, 163, 230, 0.22);
    background: rgba(8, 14, 28, 0.35);
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(198, 214, 238, 0.85);
    word-break: break-word;
}

.checkers-status-line[hidden] {
    display: none !important;
}

.checkers-status-line--waiting {
    color: rgba(198, 214, 238, 0.85);
    border-color: rgba(113, 163, 230, 0.28);
}

.checkers-status-line--yours {
    background: rgba(46, 125, 50, 0.18);
    border-color: rgba(102, 187, 106, 0.55);
    color: #a5d6a7;
    box-shadow: inset 0 0 0 1px rgba(102, 187, 106, 0.12);
}

.checkers-status-line--opponent {
    background: rgba(198, 40, 40, 0.16);
    border-color: rgba(239, 83, 80, 0.55);
    color: #ef9a9a;
    box-shadow: inset 0 0 0 1px rgba(239, 83, 80, 0.12);
}

.checkers-board-wrap {
    width: min(92vw, 560px);
    aspect-ratio: 1;
}

.checkers-board {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    border: 3px solid rgba(30, 40, 62, 0.95);
    touch-action: manipulation;
}

.checkers-board--dragging {
    touch-action: none;
    cursor: grabbing;
}

.checkers-board--dragging .checkers-cell--dark {
    cursor: grabbing;
}

.checkers-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(8, 14, 28, 0.42);
}

.checkers-chat__head {
    flex: 0 0 auto;
}

.checkers-chat__messages {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkers-chat__message {
    font-size: 0.88rem;
    line-height: 1.4;
    color: rgba(200, 220, 245, 0.92);
    word-break: break-word;
}

.checkers-chat__nick {
    font-weight: 600;
    color: #64b5f6;
    margin-right: 6px;
}

.checkers-chat__time {
    font-size: 0.72rem;
    color: rgba(150, 170, 200, 0.65);
    margin-right: 8px;
}

.checkers-chat__text {
    display: inline;
}

.checkers-chat__messages:not(:empty) + .checkers-chat__empty {
    display: none;
}

.checkers-chat__empty {
    margin: 0;
    flex: 1 1 auto;
    display: grid;
    place-items: center;
    text-align: center;
    color: rgba(198, 214, 238, 0.55);
    font-size: 0.9rem;
    min-height: 220px;
}

.checkers-chat__empty[hidden] {
    display: none !important;
}

.checkers-chat__form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex: 0 0 auto;
}

.checkers-chat__field {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    display: flex;
}

.checkers-chat__input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 0;
    background: rgba(12, 20, 38, 0.75);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.checkers-chat__input:focus,
.checkers-chat__input:focus-visible {
    outline: none;
    border-color: rgba(100, 181, 246, 0.65);
}

.checkers-chat__send {
    flex: 0 0 auto;
    align-self: stretch;
    height: 42px;
    padding: 0 16px;
    border-radius: 0;
    white-space: nowrap;
}

.checkers-cell {
    position: relative;
    border: none;
    padding: 0;
    cursor: default;
}

.checkers-cell--light {
    background: #c5b8a5;
}

.checkers-cell--dark {
    background: #5d4037;
    cursor: pointer;
}

.checkers-cell--dark:hover {
    filter: brightness(1.08);
}

.checkers-cell--selected {
    box-shadow: inset 0 0 0 3px rgba(129, 212, 250, 0.95);
}

.checkers-cell--target {
    box-shadow: inset 0 0 0 3px rgba(129, 199, 132, 0.95);
}

.checkers-cell--drop-hover {
    box-shadow: inset 0 0 0 3px rgba(255, 241, 118, 0.95);
    filter: brightness(1.12);
}

.checkers-cell--last-from,
.checkers-cell--last-to {
    background: #795548;
}

.checkers-piece {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.35);
    cursor: grab;
    touch-action: none;
}

.checkers-piece--dragging {
    opacity: 0.2;
}

.checkers-piece--ghost {
    position: fixed;
    z-index: 1200;
    margin: 0;
    inset: auto;
    pointer-events: none;
    transform: translate(-50%, -50%);
    cursor: grabbing;
    box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.35), 0 10px 22px rgba(0, 0, 0, 0.45);
}

.checkers-piece--white {
    background: radial-gradient(circle at 30% 30%, #ffffff, #cfd8dc);
    border: 2px solid rgba(69, 90, 100, 0.45);
}

.checkers-piece--black {
    background: radial-gradient(circle at 30% 30%, #616161, #212121);
    border: 2px solid rgba(0, 0, 0, 0.55);
}

.checkers-piece--king::after {
    content: '♛';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(0.65rem, 2.8vw, 1rem);
    color: rgba(255, 215, 64, 0.95);
}

.checkers-waiting[hidden],
.checkers-overlay[hidden] {
    display: none !important;
}

.checkers-waiting {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(2px);
}

.checkers-waiting p {
    margin: 0;
    max-width: 28rem;
    color: #e8f1ff;
}

.checkers-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(6, 10, 20, 0.78);
}

.checkers-overlay__card {
    width: min(92%, 360px);
    padding: 24px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: rgba(16, 24, 46, 0.95);
    text-align: center;
}

.checkers-overlay__card h3 {
    margin: 0 0 8px;
    color: #e8f1ff;
}

.checkers-overlay__card p {
    margin: 0 0 16px;
    color: rgba(198, 214, 238, 0.85);
}

.checkers-overlay__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.checkers-open-lobbies {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkers-open-lobbies__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkers-open-lobbies__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(198, 214, 238, 0.82);
    font-size: 0.92rem;
}

.checkers-open-lobbies__status[data-state="error"] {
    color: #ff8a8a;
}

.checkers-open-lobbies__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkers-open-lobby-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(8, 14, 28, 0.42);
}

.checkers-open-lobby-row__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-width: 0;
}

.checkers-open-lobby-row__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: #e8f2ff;
    font-weight: 700;
}

.checkers-open-lobby-row__host {
    color: rgba(198, 214, 238, 0.88);
    font-size: 0.92rem;
}

.checkers-open-lobby-row__slots {
    color: #81d4fa;
    font-size: 0.82rem;
    font-weight: 600;
}

.checkers-open-lobby-row__join {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .checkers-lobby-grid {
        grid-template-columns: 1fr;
    }

    .checkers-play-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .checkers-play-board {
        min-height: min(88vw, 520px);
    }

    .checkers-board-shell {
        width: 100%;
        height: auto;
        max-height: none;
    }

    .checkers-sidebar {
        min-height: 360px;
    }
}

@media (max-width: 720px) {
    .checkers-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .checkers-room-bar__meta,
    .checkers-room-bar__status {
        justify-content: space-between;
    }

    .checkers-play-meta {
        flex-direction: column;
    }

    .checkers-status-line {
        max-width: none;
        width: 100%;
    }

    .checkers-open-lobby-row {
        flex-direction: column;
        align-items: stretch;
    }

    .checkers-open-lobby-row__join {
        width: 100%;
    }
}

/* WoT mods installation service */
.page-wotmods {
    --wotmods-accent: #8ecbff;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.55) rgba(10, 18, 36, 0.55);
}

.page-wotmods .header {
    margin-bottom: 0;
}

.page-wotmods .container {
    gap: var(--layout-gap);
}

.page-wotmods footer {
    margin-top: auto;
}

.wotmods-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
}

.wotmods-workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 26px;
}

.wotmods-workspace__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wotmods-workspace__title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.wotmods-workspace__lead {
    margin: 0;
    max-width: 52rem;
    color: rgba(175, 200, 228, 0.82);
    font-size: 0.92rem;
    line-height: 1.5;
}

.wotmods-workspace__unsupported {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 204, 128, 0.35);
    border-radius: 8px;
    background: rgba(48, 36, 12, 0.35);
    color: rgba(255, 204, 128, 0.95);
    font-size: 0.86rem;
    line-height: 1.45;
}

.wotmods-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wotmods-step {
    border: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 10px;
    background: rgba(8, 14, 28, 0.35);
    overflow: hidden;
}

.wotmods-step__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.14);
    background: rgba(12, 20, 38, 0.45);
}

.wotmods-step__num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    min-width: 26px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 50%;
    background: rgba(30, 51, 89, 0.9);
    border: 1px solid rgba(100, 181, 246, 0.45);
    color: #8ecbff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: lining-nums tabular-nums;
    text-align: center;
    user-select: none;
}

.wotmods-step__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: #f2f7ff;
}

.wotmods-step__body {
    padding: 16px;
}

.wotmods-step__hint {
    margin: 0 0 12px;
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.86rem;
}

.wotmods-step--mods.is-locked .wotmods-mod-list {
    opacity: 0.45;
    pointer-events: none;
}

.wotmods-folder-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wotmods-folder-picker__bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    gap: 0;
    height: 48px;
    border: 1px solid rgba(100, 181, 246, 0.28);
    border-radius: 10px;
    background: rgba(6, 12, 24, 0.55);
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wotmods-folder-picker.is-ready .wotmods-folder-picker__bar {
    border-color: rgba(100, 181, 246, 0.5);
    box-shadow: inset 0 0 0 1px rgba(100, 181, 246, 0.1);
}

.wotmods-folder-picker__leading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
    border-right: 1px solid rgba(113, 163, 230, 0.14);
    background: rgba(12, 20, 38, 0.55);
    flex-shrink: 0;
}

.wotmods-folder-picker__icon-slot {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
}

.wotmods-folder-picker__icon-slot > * {
    grid-area: 1 / 1;
}

.wotmods-folder-picker__folder-icon {
    font-size: 1.35rem;
    color: rgba(142, 203, 255, 0.72);
    line-height: 1;
}

.wotmods-folder-picker__folder-icon.is-visible,
.wotmods-folder-picker__game-icon.is-visible {
    opacity: 1;
    visibility: visible;
}

.wotmods-folder-picker__folder-icon:not(.is-visible),
.wotmods-folder-picker__game-icon:not(.is-visible) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wotmods-folder-picker__game-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(30, 51, 89, 0.85);
    border: 1px solid rgba(100, 181, 246, 0.35);
    padding: 3px;
    box-sizing: border-box;
}

.wotmods-folder-picker__content {
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: default;
    overflow: hidden;
}

.wotmods-folder-picker:not(.is-ready) .wotmods-folder-picker__content {
    cursor: pointer;
}

.wotmods-folder-picker:not(.is-ready) .wotmods-folder-picker__content:hover {
    background: rgba(24, 40, 68, 0.35);
}

.wotmods-folder-picker:not(.is-ready) .wotmods-folder-picker__content:focus-visible {
    outline: 2px solid rgba(142, 203, 255, 0.65);
    outline-offset: -2px;
}

.wotmods-folder-picker__placeholder {
    margin: 0;
    color: rgba(175, 200, 228, 0.62);
    font-size: 0.92rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wotmods-folder-picker:not(.is-ready) .wotmods-folder-picker__selected {
    display: none;
}

.wotmods-folder-picker.is-ready .wotmods-folder-picker__placeholder {
    display: none;
}

.wotmods-folder-picker__selected {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.wotmods-folder-picker__game-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.wotmods-folder-picker__game {
    font-size: 0.92rem;
    color: #f7f9ff;
    line-height: 1;
    white-space: nowrap;
}

.wotmods-folder-picker__version {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(100, 181, 246, 0.35);
    background: rgba(20, 36, 64, 0.8);
    color: #8ecbff;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wotmods-folder-picker__path {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    color: rgba(197, 228, 255, 0.72);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wotmods-folder-picker.is-ready .wotmods-folder-picker__path.is-editable {
    cursor: pointer;
    text-decoration: underline dotted rgba(142, 203, 255, 0.45);
}

.wotmods-folder-picker__actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-shrink: 0;
}

.wotmods-folder-picker__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    min-height: 0;
    padding: 0 18px;
    border: 0;
    border-left: 1px solid rgba(100, 181, 246, 0.28);
    background-color: rgba(30, 51, 89, 0.98);
    color: #c5e4ff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.wotmods-folder-picker__btn > i,
.wotmods-folder-picker__btn > span {
    position: relative;
    z-index: 1;
}

.wotmods-folder-picker__btn > i {
    display: block;
    line-height: 1;
    flex-shrink: 0;
}

.wotmods-folder-picker__btn--reset {
    width: 44px;
    min-width: 44px;
    padding: 0;
    background-color: rgba(12, 20, 38, 0.92);
    color: rgba(175, 200, 228, 0.82);
    border-right: 1px solid rgba(100, 181, 246, 0.18);
}

.wotmods-folder-picker__btn--reset[hidden] {
    display: none;
}

.wotmods-folder-picker__btn--reset:hover:not(:disabled) {
    background-color: rgba(24, 40, 68, 0.95);
    color: #f2f7ff;
}

.wotmods-folder-picker__btn--pick {
    background-color: rgba(38, 64, 110, 0.95);
}

.wotmods-folder-picker__btn--pick:hover:not(:disabled) {
    background-color: rgba(56, 88, 140, 0.98);
    color: #fff;
}

.wotmods-folder-picker__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wotmods-folder-picker__hint {
    margin: 0;
    color: rgba(175, 200, 228, 0.68);
    font-size: 0.84rem;
    line-height: 1.45;
}

.wotmods-folder-picker__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding-top: 2px;
}

.wotmods-folder-picker__tool {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(175, 200, 228, 0.78);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s ease;
}

.wotmods-folder-picker__tool:hover:not(:disabled) {
    color: #c5e4ff;
}

.wotmods-folder-picker__tool--warn:hover:not(:disabled) {
    color: #ffcc80;
}

.wotmods-folder-picker__tool--danger:hover:not(:disabled) {
    color: #ef9a9a;
}

.wotmods-folder-picker__tools.is-locked .wotmods-folder-picker__tool,
.wotmods-folder-picker__tool:disabled {
    opacity: 0.42;
    color: rgba(140, 158, 182, 0.55);
    cursor: not-allowed;
    pointer-events: none;
}

.wotmods-folder-picker__tools.is-locked .wotmods-folder-picker__tool--warn,
.wotmods-folder-picker__tools.is-locked .wotmods-folder-picker__tool--danger,
.wotmods-folder-picker__tool--warn:disabled,
.wotmods-folder-picker__tool--danger:disabled {
    color: rgba(140, 158, 182, 0.55);
}

.wotmods-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.wotmods-btn > i {
    display: block;
    line-height: 1;
    flex-shrink: 0;
}

.wotmods-btn:hover:not(:disabled) {
    border-color: rgba(142, 203, 255, 0.75);
    background: rgba(38, 64, 110, 0.95);
    color: #c5e4ff;
}

.wotmods-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wotmods-btn--primary {
    color: #fff;
    border-color: #64b5f6;
    background: linear-gradient(180deg, #7ec4ff 0%, #64b5f6 100%);
    box-shadow: 0 8px 20px rgba(20, 60, 120, 0.24);
}

.wotmods-btn--primary:hover:not(:disabled) {
    color: #fff;
    border-color: #8ecbff;
    transform: translateY(-1px);
}

.wotmods-btn--ghost {
    background: transparent;
    color: rgba(214, 228, 248, 0.88);
}

.wotmods-btn--warn {
    color: #ffd59a;
    border-color: rgba(255, 183, 77, 0.45);
    background: rgba(56, 36, 12, 0.55);
}

.wotmods-btn--warn:hover:not(:disabled) {
    color: #ffe8c2;
    border-color: rgba(255, 204, 128, 0.65);
    background: rgba(72, 46, 14, 0.75);
}

.wotmods-btn--danger {
    color: #ffb4b4;
    border-color: rgba(239, 83, 80, 0.45);
    background: rgba(56, 18, 18, 0.55);
}

.wotmods-btn--danger:hover:not(:disabled) {
    color: #ffd0d0;
    border-color: rgba(239, 83, 80, 0.7);
    background: rgba(72, 22, 22, 0.75);
}

.wotmods-mod-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wotmods-mod-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wotmods-mod-usage {
    margin-top: -1px;
    padding: 10px 14px 12px;
    border: 1px solid rgba(113, 163, 230, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: rgba(8, 14, 28, 0.72);
}

.wotmods-mod-block:has(.wotmods-mod-item.is-selected) .wotmods-mod-usage {
    border-color: rgba(100, 181, 246, 0.45);
}

.wotmods-mod-usage__title {
    margin: 0 0 6px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(142, 203, 255, 0.78);
}

.wotmods-mod-usage__list {
    margin: 0;
    padding: 0 0 0 1.1rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(175, 200, 228, 0.82);
}

.wotmods-mod-usage__list li + li {
    margin-top: 4px;
}

.wotmods-mod-block .wotmods-mod-item {
    border-radius: 8px 8px 0 0;
}

.wotmods-mod-block:not(:has(.wotmods-mod-usage)) .wotmods-mod-item {
    border-radius: 8px;
}

.wotmods-mod-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(113, 163, 230, 0.24);
    border-radius: 8px;
    background: rgba(12, 20, 38, 0.55);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.wotmods-mod-item:hover:not(:has(.wotmods-mod-item__check:disabled)) {
    border-color: rgba(100, 181, 246, 0.5);
    background: rgba(16, 28, 52, 0.7);
}

.wotmods-mod-item.is-selected {
    border-color: rgba(100, 181, 246, 0.75);
    box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.25);
}

.wotmods-mod-item.is-installed {
    border-color: rgba(100, 181, 246, 0.42);
}

.wotmods-mod-item.is-installed-locked {
    cursor: default;
}

.wotmods-mod-item.is-installed-locked:hover {
    border-color: rgba(100, 181, 246, 0.42);
    background: rgba(12, 20, 38, 0.55);
    box-shadow: none;
}

.wotmods-mod-item.is-installed-locked .wotmods-mod-item__tick {
    border-color: rgba(130, 142, 158, 0.65);
    background: linear-gradient(180deg, rgba(128, 138, 152, 0.9) 0%, rgba(98, 108, 122, 0.95) 100%);
    color: rgba(244, 247, 252, 0.95);
}

.wotmods-mod-item.is-installed-locked.is-selected .wotmods-mod-item__tick {
    border-color: rgba(130, 142, 158, 0.65);
    background: linear-gradient(180deg, rgba(128, 138, 152, 0.9) 0%, rgba(98, 108, 122, 0.95) 100%);
    color: rgba(244, 247, 252, 0.95);
}

.wotmods-mod-item__check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wotmods-mod-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(30, 51, 89, 0.65);
    color: rgba(142, 203, 255, 0.85);
    font-size: 0.95rem;
}

.wotmods-mod-item__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wotmods-mod-item__title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.wotmods-mod-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f2f7ff;
    line-height: 1.3;
}

.wotmods-mod-item__author {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35em;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #f2f7ff;
    white-space: nowrap;
    text-transform: none;
}

.wotmods-mod-item__author-label,
.wotmods-mod-item__author-name {
    font: inherit;
    color: inherit;
    text-transform: none;
}

.wotmods-mod-item__author-link {
    text-decoration: none;
    transition: color 0.18s ease;
}

.wotmods-mod-item__author-link:hover {
    color: #8ecbff;
}

.wotmods-mod-item__desc {
    font-size: 0.82rem;
    line-height: 1.4;
    color: rgba(175, 200, 228, 0.78);
}

.wotmods-mod-item__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.wotmods-mod-item__clients {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.wotmods-mod-item__client-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.36;
    filter: grayscale(0.9);
    transition: opacity 0.18s ease, filter 0.18s ease;
}

.wotmods-mod-item__client-row.is-active {
    opacity: 1;
    filter: none;
}

.wotmods-mod-item__client-row.is-active .wotmods-mod-item__version-label,
.wotmods-mod-item__client-row.is-active .wotmods-mod-item__version-value {
    color: rgba(142, 203, 255, 0.95);
}

.wotmods-mod-item__client-row.is-inactive {
    opacity: 0.36;
    filter: grayscale(0.9);
}

.wotmods-mod-item__game img {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
}

.wotmods-mod-item__unsupported {
    font-size: 0.68rem;
    line-height: 1.2;
    color: rgba(255, 160, 120, 0.95);
    text-align: right;
    max-width: 7rem;
}

.wotmods-mod-item.is-unsupported {
    opacity: 0.62;
    cursor: not-allowed;
}

.wotmods-mod-item.is-unsupported:hover {
    border-color: rgba(113, 163, 230, 0.24);
    background: rgba(12, 20, 38, 0.55);
    box-shadow: none;
}

.wotmods-mod-item__version {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.wotmods-mod-item__version-label {
    font-weight: 500;
    color: rgba(175, 200, 228, 0.62);
    letter-spacing: 0.01em;
}

.wotmods-mod-item__version-value {
    font-weight: 700;
    color: rgba(142, 203, 255, 0.55);
    letter-spacing: 0.03em;
}

.wotmods-mod-item__installed {
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(20, 36, 64, 0.85);
    color: #8ecbff;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

.wotmods-mod-item__update {
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 183, 77, 0.55);
    background: rgba(48, 32, 12, 0.85);
    color: #ffcc80;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

.wotmods-mod-item.is-updatable {
    border-color: rgba(255, 183, 77, 0.45);
}

.wotmods-mod-item__tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 6px;
    color: transparent;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wotmods-mod-item.is-selected .wotmods-mod-item__tick {
    border-color: #64b5f6;
    background: linear-gradient(180deg, #7ec4ff 0%, #64b5f6 100%);
    color: #fff;
}

.wotmods-workspace__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.wotmods-workspace__footer-note {
    margin: 0;
    flex: 1 1 220px;
    color: rgba(175, 200, 228, 0.68);
    font-size: 0.82rem;
    line-height: 1.45;
}

.wotmods-btn--install {
    min-width: 220px;
    min-height: 50px;
    padding: 12px 18px;
    border-color: rgba(100, 181, 246, 0.28);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(38, 64, 110, 0.95) 0%, rgba(30, 51, 89, 0.98) 100%);
    color: #c5e4ff;
    font-size: 0.9rem;
    box-shadow: none;
}

.wotmods-btn--install:hover:not(:disabled) {
    border-color: rgba(100, 181, 246, 0.45);
    background: rgba(48, 78, 128, 0.98);
    color: #fff;
    transform: none;
}

.wotmods-section-title {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #f2f7ff;
}

.wotmods-service-header--compact.checkers-panel {
    padding: 16px 20px;
}

.wotmods-service-header.checkers-panel {
    padding: 16px 20px;
}

.wotmods-list-section {
    padding: 20px 24px;
}

.wotmods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 18px;
}

.wotmods-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: linear-gradient(165deg, rgba(24, 36, 68, 0.92) 0%, rgba(12, 20, 38, 0.88) 52%, rgba(8, 14, 28, 0.94) 100%);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.wotmods-card:hover {
    border-color: rgba(100, 181, 246, 0.58);
    box-shadow: 0 14px 36px rgba(20, 60, 120, 0.28);
    transform: translateY(-3px);
}

.wotmods-card__watermark {
    position: absolute;
    right: -8px;
    bottom: -16px;
    font-size: 5.5rem;
    line-height: 1;
    color: rgba(142, 203, 255, 0.06);
    pointer-events: none;
    transform: rotate(-8deg);
    z-index: 0;
}

.wotmods-card__head,
.wotmods-card__body,
.wotmods-card__footer {
    position: relative;
    z-index: 1;
}

.wotmods-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.wotmods-card__version {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(142, 203, 255, 0.82);
}

.wotmods-card__title {
    margin: 0 0 8px;
    font-size: 1.08rem;
    line-height: 1.3;
    color: #f2f7ff;
}

.wotmods-card__desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(214, 228, 248, 0.82);
}

.wotmods-card__footer {
    margin-top: auto;
    padding-top: 16px;
}

.wotmods-card__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--wotmods-accent);
}

.wotmods-card:hover .wotmods-card__action {
    color: #fff;
}

.wotmods-detail__badges {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.wotmods-detail__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wotmods-detail-section {
    padding: 18px 22px;
}

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

.wotmods-detail__heading {
    margin: 0 0 12px;
    font-size: 1rem;
    color: #f2f7ff;
}

.wotmods-detail__list {
    margin: 0;
    padding-left: 1.2rem;
    color: rgba(214, 228, 248, 0.88);
    line-height: 1.55;
}

.wotmods-detail__list li + li {
    margin-top: 6px;
}

.wotmods-detail__note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 3px solid rgba(100, 181, 246, 0.55);
    background: rgba(12, 22, 42, 0.55);
    color: rgba(214, 228, 248, 0.78);
    font-size: 0.88rem;
    line-height: 1.5;
}

.wotmods-detail__steps {
    margin: 0;
    padding-left: 1.25rem;
    color: rgba(214, 228, 248, 0.9);
    line-height: 1.55;
}

.wotmods-detail__steps li + li {
    margin-top: 8px;
}

.wotmods-downloads {
    display: grid;
    gap: 12px;
}

.wotmods-download-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(113, 163, 230, 0.22);
    background: rgba(8, 14, 28, 0.55);
}

.wotmods-download-card__title {
    margin: 0 0 6px;
    font-size: 0.98rem;
    color: #f2f7ff;
}

.wotmods-download-card__file {
    margin: 0 0 6px;
    font-size: 0.82rem;
}

.wotmods-download-card__hint {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(214, 228, 248, 0.76);
    line-height: 1.45;
}

.wotmods-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.wotmods-download-btn--disabled {
    display: inline-flex;
    padding: 10px 14px;
    border: 1px dashed rgba(113, 163, 230, 0.35);
    color: rgba(214, 228, 248, 0.55);
    font-size: 0.84rem;
}

.wotmods-paths {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.wotmods-paths__item {
    display: grid;
    gap: 4px;
}

.wotmods-paths__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(142, 203, 255, 0.78);
}

.wotmods-paths__value {
    display: block;
    padding: 8px 10px;
    background: rgba(8, 14, 28, 0.72);
    border: 1px solid rgba(113, 163, 230, 0.18);
    font-size: 0.82rem;
    word-break: break-word;
}

.wotmods-table-wrap {
    overflow-x: auto;
}

.wotmods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.wotmods-table th,
.wotmods-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.18);
    text-align: left;
    vertical-align: top;
}

.wotmods-table th {
    color: rgba(142, 203, 255, 0.85);
    font-weight: 600;
}

.wotmods-code {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: rgba(8, 14, 28, 0.82);
    border: 1px solid rgba(113, 163, 230, 0.18);
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .wotmods-workspace {
        padding: 18px 16px;
    }

    .wotmods-folder-picker__bar {
        grid-template-columns: auto 1fr auto;
    }

    .wotmods-folder-picker__actions {
        grid-column: auto;
        flex-direction: row;
    }

    .wotmods-folder-picker__btn--reset {
        border-left: 1px solid rgba(100, 181, 246, 0.28);
        border-top: 0;
    }

    .wotmods-folder-picker__btn--pick {
        padding: 0 14px;
    }

    .wotmods-folder-picker__tools {
        flex-direction: column;
        align-items: stretch;
    }

    .wotmods-folder-picker__tool {
        justify-content: center;
        padding: 8px 0;
    }

    .wotmods-workspace__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .wotmods-btn,
    .wotmods-btn--install {
        width: 100%;
    }

    .wotmods-mod-item {
        grid-template-columns: auto 1fr auto;
    }

    .wotmods-mod-item__tick {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .wotmods-detail-section--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .wotmods-grid {
        grid-template-columns: 1fr;
    }

    .wotmods-card {
        min-height: 0;
    }

    .wotmods-download-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.page-reserves .header {
    margin-bottom: 0;
}

.page-reserves .container {
    gap: var(--layout-gap);
}

.page-reserves footer {
    margin-top: auto;
}

.reserves-service {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
}

.reserves-header-panel__head {
    margin-bottom: 0;
}

.reserves-page-title {
    margin-top: 0;
}

.reserves-account-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
}

.reserves-account-bar__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.88);
    white-space: nowrap;
}

.reserves-account-bar__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.reserves-account-bar__refresh {
    align-self: flex-start;
}

.page-reserves .reserves-account-providers {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.page-reserves .reserves-account-providers .auth-provider-form {
    flex: 1 1 0;
    min-width: 0;
}

.page-reserves .reserves-account-providers .auth-provider-actions {
    width: 100%;
    height: 100%;
}

.page-reserves .reserves-account-providers .auth-provider-form,
.page-reserves .reserves-account-providers .auth-provider-actions {
    display: flex;
}

.page-reserves {
    --reserves-action-height: 42px;
}

.page-reserves .reserves-action-btn,
.page-reserves .reserves-schedule-form .tactics-submit-btn,
.page-reserves .reserves-catalog-panel .tactics-icon-btn,
.page-reserves .reserves-account-bar__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--reserves-action-height);
    height: var(--reserves-action-height);
    padding: 0 16px;
    box-sizing: border-box;
}

.page-reserves .reserves-account-providers .auth-provider-btn {
    min-height: var(--reserves-action-height);
    height: var(--reserves-action-height);
    max-height: var(--reserves-action-height);
    padding: 0 14px;
}

.page-reserves .reserves-account-providers .auth-provider-btn--reserves.auth-provider-btn--linked .auth-provider-btn__text,
.page-reserves .reserves-account-providers .auth-provider-btn--reserves:not(.auth-provider-btn--linked) .auth-provider-btn__text {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.page-reserves .reserves-account-providers .auth-provider-btn--reserves.auth-provider-btn--linked .auth-provider-btn__api::before {
    content: '·';
    margin: 0 6px 0 2px;
    opacity: 0.72;
}

.page-reserves .reserves-account-providers .auth-provider-btn--reserves .auth-provider-btn__label,
.page-reserves .reserves-account-providers .auth-provider-btn--reserves .auth-provider-btn__api {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-reserves .reserves-account-providers .auth-provider-form:has(.reserves-linked-card) {
    flex: 1 1 100%;
}

.page-reserves .reserves-linked-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: var(--reserves-action-height);
    padding: 12px 14px 0;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(10, 18, 36, 0.72), rgba(24, 45, 82, 0.42));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

.page-reserves .reserves-linked-card__main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

.page-reserves .reserves-linked-card__emblem-slot {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    overflow: hidden;
}

.page-reserves .reserves-linked-card__emblem {
    display: block;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.page-reserves .reserves-linked-card__emblem--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    box-sizing: border-box;
    border: 1px solid rgba(113, 163, 230, 0.22);
    color: rgba(142, 203, 255, 0.55);
    font-size: 1.35rem;
}

.page-reserves .reserves-linked-card__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.page-reserves .reserves-linked-card__clan {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    height: 1.35em;
    overflow: hidden;
}

.page-reserves .reserves-linked-card__clan--reserved {
    min-height: 1.35em;
    height: 1.35em;
}

.page-reserves .reserves-linked-card--clan-loading .reserves-linked-card__clan--reserved {
    background: linear-gradient(
        90deg,
        rgba(113, 163, 230, 0.08) 0%,
        rgba(113, 163, 230, 0.16) 50%,
        rgba(113, 163, 230, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: reserves-clan-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
    min-height: 1.35em;
}

@keyframes reserves-clan-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.page-reserves .reserves-linked-card__tag {
    flex-shrink: 0;
    color: rgba(220, 235, 255, 0.95);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

.page-reserves .reserves-linked-card__clan-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(200, 220, 245, 0.88);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
}

.page-reserves .reserves-linked-card__clan--no-clan .reserves-linked-card__tag {
    display: none;
}

.page-reserves .reserves-linked-card__clan-name--no-clan {
    flex: 1 1 auto;
    color: rgba(175, 200, 228, 0.72);
    font-weight: 500;
    font-style: normal;
}

.page-reserves .reserves-linked-card__player--reserved {
    min-height: 1.25em;
    height: 1.25em;
    overflow: hidden;
}

.page-reserves .reserves-linked-card__player {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.page-reserves .reserves-linked-card__nick {
    color: #ffffff;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    word-break: break-word;
}

.page-reserves .reserves-linked-card__realm {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 999px;
}

.page-reserves .reserves-linked-card__provider {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 1.3em;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.page-reserves .reserves-linked-card__provider .fas {
    flex-shrink: 0;
    font-size: 0.82rem;
    opacity: 0.85;
}

.page-reserves .reserves-linked-card__unlink {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(175, 200, 228, 0.72);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.page-reserves .reserves-linked-card__unlink:hover:not(:disabled),
.page-reserves .reserves-linked-card__unlink:focus-visible:not(:disabled) {
    color: #ff6b6b;
    background: rgba(255, 80, 80, 0.1);
    outline: none;
}

.page-reserves .reserves-linked-card--selected {
    border-color: rgba(100, 181, 246, 0.72);
    box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.page-reserves .reserves-linked-card__foot {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 0 10px;
}

.page-reserves .reserves-linked-card__selected-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
    color: #b8deff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.page-reserves .reserves-linked-card__selected-badge--hidden {
    visibility: hidden;
}

.page-reserves .reserves-linked-card--selectable {
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-reserves .reserves-linked-card--selectable:hover:not(.reserves-linked-card--selected) {
    border-color: rgba(142, 203, 255, 0.45);
}

.page-reserves .reserves-region-account[data-reserves-usable="1"] {
    cursor: pointer;
}

.page-reserves .reserves-region-account[data-reserves-usable="1"]:focus-visible {
    outline: 2px solid rgba(100, 181, 246, 0.55);
    outline-offset: 2px;
    border-radius: 10px;
}

.page-reserves .reserves-linked-card__unlink:disabled {
    opacity: 0.6;
    cursor: wait;
}

.page-reserves .reserves-linked-card--clan-loading .reserves-linked-card__emblem--placeholder {
    animation: reserves-clan-pulse 1.4s ease-in-out infinite;
}

@keyframes reserves-clan-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.page-reserves .reserves-accounts-panel__hint {
    margin: 0 0 12px;
}

.page-reserves .reserves-regions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.page-reserves .reserves-region-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(10, 18, 36, 0.78), rgba(18, 32, 58, 0.52));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-reserves .reserves-region-column--disabled {
    opacity: 0.62;
    border-color: rgba(113, 163, 230, 0.14);
    background: rgba(8, 14, 28, 0.42);
}

.page-reserves .reserves-region-column__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}

.page-reserves .reserves-region-column__badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
}

.page-reserves .reserves-region-column__status {
    color: rgba(175, 200, 228, 0.62);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
}

.page-reserves .reserves-region-column--disabled .reserves-region-column__status {
    flex: 1 1 100%;
}

.page-reserves .reserves-region-column__accounts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 48px;
}

.page-reserves .reserves-region-column__empty {
    margin: 0;
    padding: 12px 10px;
    border: 1px dashed rgba(113, 163, 230, 0.2);
    border-radius: 8px;
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: center;
}

.page-reserves .reserves-region-account {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-reserves .reserves-linked-card-wrap {
    width: 100%;
}

.page-reserves .reserves-linked-card-wrap .reserves-linked-card {
    width: 100%;
}

.page-reserves .reserves-region-account__refresh {
    align-self: flex-start;
}

.page-reserves .reserves-region-account__profile-note {
    margin: 0;
    font-size: 0.82rem;
}

.page-reserves .reserves-region-column__foot {
    margin-top: auto;
    padding-top: 4px;
}

.page-reserves .reserves-region-column__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: var(--reserves-action-height);
    padding: 0 14px;
    border: 1px dashed rgba(100, 181, 246, 0.42);
    border-radius: 8px;
    background: rgba(20, 40, 70, 0.35);
    color: #b8deff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.page-reserves .reserves-region-column__add:hover {
    border-color: rgba(142, 203, 255, 0.55);
    background: rgba(24, 45, 82, 0.55);
    color: #ffffff;
}

.page-reserves .reserves-region-column__add--disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: var(--reserves-action-height);
    padding: 0 14px;
    border: 1px dashed rgba(113, 163, 230, 0.16);
    border-radius: 8px;
    background: rgba(8, 14, 28, 0.35);
    color: rgba(175, 200, 228, 0.55);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: not-allowed;
}

@media (max-width: 1180px) {
    .page-reserves .reserves-regions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .page-reserves .reserves-regions-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.page-reserves .reserves-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    width: 100%;
}

.page-reserves .reserves-account-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.page-reserves .reserves-account-slot__badge {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
}

.page-reserves .reserves-account-slot__empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px dashed rgba(113, 163, 230, 0.28);
    border-radius: 10px;
    background: rgba(8, 14, 28, 0.35);
    min-height: var(--reserves-action-height);
}

.page-reserves .reserves-account-slot__empty-text {
    margin: 0;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.86rem;
    line-height: 1.4;
}

.page-reserves .reserves-account-slot__link {
    width: 100%;
    text-decoration: none;
}

.page-reserves .reserves-account-slot__refresh {
    align-self: flex-start;
}

.page-reserves .reserves-account-slot__profile-note {
    margin: 0;
    font-size: 0.82rem;
}

.page-reserves .reserves-realm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.page-reserves .reserves-realm-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 10px;
    background: rgba(8, 14, 28, 0.45);
    color: rgba(200, 220, 245, 0.88);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.page-reserves .reserves-realm-tab__nick {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(175, 200, 228, 0.72);
    letter-spacing: normal;
}

.page-reserves .reserves-realm-tab:hover,
.page-reserves .reserves-realm-tab:focus-visible {
    border-color: rgba(142, 203, 255, 0.45);
    color: #ffffff;
    outline: none;
}

.page-reserves .reserves-realm-tab--active {
    border-color: rgba(100, 181, 246, 0.55);
    background: linear-gradient(145deg, rgba(10, 18, 36, 0.82), rgba(24, 45, 82, 0.55));
    color: #ffffff;
}

.page-reserves .reserves-account-bar__body > .auth-provider-form:only-child,
.page-reserves .reserves-account-bar__body > .auth-provider-form .reserves-linked-card {
    width: 100%;
}

.page-reserves .reserves-account-providers .auth-provider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(154, 167, 178, 0.32);
    background: rgba(55, 62, 72, 0.45);
    color: #9aa7b2;
    font: inherit;
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.page-reserves .reserves-account-providers .auth-provider-btn--nickname {
    white-space: normal;
}

.page-reserves .reserves-account-providers .auth-provider-btn > .fas:first-child {
    flex-shrink: 0;
}

.page-reserves .reserves-account-providers .auth-provider-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
    text-align: left;
}

.page-reserves .reserves-account-providers .auth-provider-btn__label {
    font-weight: 600;
}

.page-reserves .reserves-account-providers .auth-provider-btn__api {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(175, 200, 228, 0.72);
    letter-spacing: 0.02em;
    white-space: normal;
    word-break: break-word;
}

.page-reserves .reserves-account-providers .auth-provider-btn:hover:not(:disabled) {
    border-color: rgba(154, 167, 178, 0.5);
    background: rgba(70, 78, 88, 0.55);
    color: #c5ced6;
}

.page-reserves .reserves-account-providers .auth-provider-btn--linked {
    opacity: 1;
    cursor: default;
    border-color: rgba(125, 184, 255, 0.35);
    background: rgba(24, 45, 82, 0.35);
    color: #c5d4e4;
}

.page-reserves .reserves-account-providers .auth-provider-btn--unconfigured:disabled {
    opacity: 1;
    border-color: rgba(154, 167, 178, 0.28);
    background: rgba(55, 62, 72, 0.35);
    color: #7a8794;
    cursor: not-allowed;
}

.page-reserves .reserves-account-providers .auth-provider-btn__unlink {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(175, 200, 228, 0.72);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.page-reserves .reserves-account-providers .auth-provider-btn__unlink:hover:not(:disabled),
.page-reserves .reserves-account-providers .auth-provider-btn__unlink:focus-visible:not(:disabled) {
    color: #ff6b6b;
    background: rgba(255, 80, 80, 0.1);
    outline: none;
}

.page-reserves .reserves-account-providers .auth-provider-btn__unlink:disabled {
    opacity: 0.6;
    cursor: wait;
}

.reserves-account-bar__hint {
    margin: 0;
}

.reserves-account-bar__hint--warn {
    color: #ffd966;
}

.reserves-account-bar__nick {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(200, 220, 245, 0.92);
    font-size: 0.95rem;
}

.reserves-account-bar__nick strong {
    color: #fff;
    font-weight: 600;
}

.reserves-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: var(--layout-gap);
    align-items: start;
}

.reserves-catalog-panel .tactics-section-head {
    margin-bottom: 16px;
}

.page-reserves .reserves-catalog-body {
    position: relative;
    min-height: 1.5rem;
}

.page-reserves .reserves-catalog-body__content {
    position: relative;
    z-index: 2;
    min-height: 1.5rem;
}

.page-reserves .reserves-catalog-body__content:empty {
    min-height: 1.5rem;
}

.page-reserves .reserves-catalog-body__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    margin: 0;
}

.page-reserves .reserves-catalog-body__overlay[hidden] {
    display: none;
}

.reserves-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    min-width: 0;
}

.reserves-schedule-form__row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(112px, 0.95fr);
    gap: 12px;
    align-items: end;
}

.page-reserves .reserves-schedule-form .recruiting-select-wrap {
    width: 100%;
}

.page-reserves .reserves-schedule-form .recruiting-select-wrap.is-open {
    z-index: 24;
}

.page-reserves .reserves-schedule-form .recruiting-select-trigger {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.page-reserves .reserves-schedule-form .recruiting-select-trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reserves-schedule-field {
    min-width: 0;
}

.page-reserves .reserves-control {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(113, 163, 230, 0.35);
    border-radius: 6px;
    background-color: rgba(12, 20, 38, 0.72);
    color: #e8f2ff;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.25;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.page-reserves .reserves-control:hover {
    border-color: rgba(113, 163, 230, 0.48);
    background-color: rgba(14, 24, 44, 0.82);
}

.page-reserves .reserves-control:focus,
.page-reserves .reserves-control:focus-visible {
    outline: none;
    border-color: rgba(100, 181, 246, 0.55);
    background-color: rgba(10, 18, 36, 0.88);
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.16);
}

.page-reserves select.reserves-control {
    padding-right: 34px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238ecbff' d='M1.4 0 6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 7px;
    text-overflow: ellipsis;
}

.page-reserves select.reserves-control option {
    background: #0c1426;
    color: #e8f2ff;
}

.page-reserves .reserves-control--time {
    color-scheme: dark;
    padding-right: 10px;
}

.page-reserves .reserves-control--time::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.82;
    filter: invert(0.78) sepia(0.25) saturate(4) hue-rotate(175deg);
}

.page-reserves .reserves-control--time::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.reserves-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 14px 12px 12px;
    border: 1px solid rgba(113, 163, 230, 0.22);
    border-radius: 6px;
    background: rgba(8, 14, 28, 0.35);
}

.reserves-days legend {
    padding: 0 6px;
    color: rgba(175, 200, 228, 0.88);
    font-size: 0.88rem;
    font-weight: 600;
}

.reserves-day {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.reserves-day input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.reserves-day__chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 6px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    background: rgba(12, 20, 38, 0.72);
    color: rgba(175, 200, 228, 0.88);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.reserves-day:hover .reserves-day__chip {
    border-color: rgba(100, 181, 246, 0.42);
    color: #dbe9f7;
}

.reserves-day input:checked + .reserves-day__chip {
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(30, 51, 89, 0.95);
    color: #b8deff;
    box-shadow: inset 0 1px 0 rgba(188, 220, 255, 0.08);
}

.reserves-day input:focus-visible + .reserves-day__chip {
    outline: 2px solid rgba(100, 181, 246, 0.55);
    outline-offset: 2px;
}

.reserves-schedule-form .tactics-submit-btn {
    width: 100%;
    margin-top: 4px;
}

.page-reserves .reserves-table-btn {
    min-height: var(--reserves-action-height);
    height: var(--reserves-action-height);
    padding: 0 12px;
}

.reserves-loading {
    margin: 0;
}

.bracket-profile-table--reserves th:nth-child(1),
.bracket-profile-table--reserves td:nth-child(1) {
    width: 32%;
}

#reservesCatalog .bracket-profile-wrap {
    overflow-x: visible;
}

#reservesCatalog .bracket-profile-table--reserves {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

#reservesCatalog .bracket-profile-table--reserves th:nth-child(1),
#reservesCatalog .bracket-profile-table--reserves td:nth-child(1) {
    width: 42%;
}

#reservesCatalog .bracket-profile-table--reserves th:nth-child(2),
#reservesCatalog .bracket-profile-table--reserves td:nth-child(2) {
    width: 10%;
}

#reservesCatalog .bracket-profile-table--reserves th:nth-child(3),
#reservesCatalog .bracket-profile-table--reserves td:nth-child(3) {
    width: 16%;
}

#reservesCatalog .bracket-profile-table--reserves th:nth-child(4),
#reservesCatalog .bracket-profile-table--reserves td:nth-child(4) {
    width: 12%;
}

#reservesCatalog .bracket-profile-table--reserves th:nth-child(5),
#reservesCatalog .bracket-profile-table--reserves td:nth-child(5) {
    width: 20%;
}

#reservesCatalog .bracket-profile-table--reserves th,
#reservesCatalog .bracket-profile-table--reserves td {
    padding: 8px 6px;
    vertical-align: middle;
}

#reservesCatalog .bracket-profile-table--reserves th {
    font-size: 0.78rem;
}

.bracket-profile-table--reserves th:nth-child(2),
.bracket-profile-table--reserves td:nth-child(2) {
    width: 12%;
}

.bracket-profile-table--reserves th:nth-child(3),
.bracket-profile-table--reserves td:nth-child(3) {
    width: 16%;
}

.bracket-profile-table--reserves th:nth-child(4),
.bracket-profile-table--reserves td:nth-child(4) {
    width: 24%;
}

.bracket-profile-table--reserves th:nth-child(5),
.bracket-profile-table--reserves td:nth-child(5) {
    width: 16%;
}

.reserves-reserve-cell {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.reserves-reserve-cell__icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.reserves-reserve-cell__icon--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(113, 163, 230, 0.12);
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.85rem;
}

.reserves-reserve-cell__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.reserves-reserve-cell__name {
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.reserves-reserve-cell__sub {
    font-size: 0.74rem;
    color: rgba(175, 200, 228, 0.72);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.reserves-table-level,
.reserves-table-amount {
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.reserves-table-amount {
    font-weight: 600;
}

#reservesCatalog .reserves-table-actions {
    text-align: center;
}

#reservesCatalog .reserves-table-btn {
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reserves-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.reserves-status-badge--active {
    border-color: rgba(129, 199, 132, 0.45);
    color: #b9f6ca;
    background: rgba(20, 60, 30, 0.45);
}

.reserves-status-badge--inactive {
    border-color: rgba(144, 164, 174, 0.35);
    color: rgba(207, 216, 220, 0.88);
    background: rgba(30, 40, 48, 0.45);
}

.reserves-status-badge--ready {
    border-color: rgba(100, 181, 246, 0.45);
    color: #b8deff;
    background: rgba(20, 40, 70, 0.45);
}

.reserves-status-badge--unavailable {
    border-color: rgba(100, 108, 122, 0.45);
    color: rgba(180, 186, 198, 0.9);
    background: rgba(40, 44, 52, 0.45);
}

.reserves-status-badge--error {
    border-color: rgba(255, 138, 138, 0.45);
    color: #ffb4b4;
    background: rgba(80, 24, 24, 0.45);
}

.reserves-table-actions {
    white-space: nowrap;
}

.reserves-table-btn {
    padding: 8px 12px;
    font-size: 0.88rem;
}

.reserves-table-muted {
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.88rem;
}

#reservesRulesList {
    padding-top: 10px;
}

.reserves-rule-list {
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

.reserves-rule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(72px, auto);
    gap: 8px 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(113, 163, 230, 0.2);
}

.reserves-rule-row__info {
    min-width: 0;
    grid-column: 1;
}

.reserves-rule-row__next {
    text-align: center;
    min-width: 118px;
    max-width: 148px;
    grid-column: 2;
    justify-self: center;
}

.reserves-rule-row .reserves-rule-delete {
    grid-column: 3;
    justify-self: end;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.reserves-rule-row__title {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.35;
    word-break: break-word;
}

.reserves-rule-row__schedule {
    display: block;
    margin-top: 2px;
    color: rgba(175, 200, 228, 0.78);
    font-size: 0.82rem;
    line-height: 1.35;
}

.reserves-rule-row--paused .reserves-rule-row__title {
    color: rgba(220, 230, 245, 0.72);
}

.reserves-rule-row__next-label {
    display: block;
    color: rgba(175, 200, 228, 0.68);
    font-size: 0.72rem;
    line-height: 1.3;
}

.reserves-rule-row__next-date {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.reserves-rule-row__next-paused {
    display: block;
    margin-top: 2px;
    color: rgba(255, 168, 140, 0.92);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .reserves-rule-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "info delete"
            "next delete";
    }

    .reserves-rule-row__info {
        grid-area: info;
    }

    .reserves-rule-row__next {
        grid-area: next;
        grid-column: auto;
        text-align: left;
        justify-self: start;
        max-width: none;
    }

    .reserves-rule-row .reserves-rule-delete {
        grid-area: delete;
        grid-column: auto;
        align-self: center;
    }
}

#reservesLog {
    padding-top: 10px;
}

#reservesLogPanel .tactics-section-head {
    margin-bottom: 0;
}

#reservesLogPanel #reservesLog {
    padding-top: 10px;
}

#reservesLog .bracket-profile-wrap {
    overflow-x: visible;
}

#reservesLog .bracket-profile-table--reserves {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

#reservesLog .bracket-profile-table--reserves-log th,
#reservesLog .bracket-profile-table--reserves-log td {
    padding: 6px 4px;
    vertical-align: middle;
    font-size: 0.78rem;
    line-height: 1.25;
    word-break: keep-all;
    overflow-wrap: normal;
}

#reservesLog .bracket-profile-table--reserves-log th {
    font-size: 0.72rem;
    white-space: nowrap;
}

#reservesLog .bracket-profile-table--reserves-log th:nth-child(1),
#reservesLog .bracket-profile-table--reserves-log td:nth-child(1) {
    width: 21%;
}

#reservesLog .bracket-profile-table--reserves-log th:nth-child(2),
#reservesLog .bracket-profile-table--reserves-log td:nth-child(2) {
    width: 14%;
}

#reservesLog .bracket-profile-table--reserves-log th:nth-child(3),
#reservesLog .bracket-profile-table--reserves-log td:nth-child(3) {
    width: 49%;
    max-width: 0;
}

#reservesLog .bracket-profile-table--reserves-log th:nth-child(4),
#reservesLog .bracket-profile-table--reserves-log td:nth-child(4) {
    width: 16%;
}

#reservesLog .reserves-log-time,
#reservesLog .reserves-log-trigger,
#reservesLog .reserves-log-result {
    white-space: nowrap;
}

#reservesLog .reserves-log-reserve {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#reservesLog .reserves-log-result {
    text-align: left;
}

#reservesLog .reserves-log-status {
    cursor: help;
}

#reservesLog .reserves-status-badge {
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 2px 7px;
}

@media (max-width: 1100px) {
    .reserves-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .reserves-schedule-form__row {
        grid-template-columns: 1fr;
    }

    .reserves-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .page-reserves .reserves-account-providers {
        flex-direction: column;
    }

    .reserves-account-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .bracket-profile-table--reserves {
        min-width: 640px;
    }

    #reservesCatalog .bracket-profile-table--reserves {
        min-width: 0;
    }
}

/* Battleship online */
.page-battleship .battleship-board-size-field {
    border: 0;
    margin: 0;
    padding: 0;
}

.page-battleship .battleship-board-size-field .checkers-field-label {
    margin-bottom: 10px;
}

.battleship-board-size-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.battleship-size-card {
    position: relative;
    cursor: pointer;
    min-width: 0;
}

.battleship-size-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.battleship-size-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 12px 10px 14px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(56, 112, 168, 0.22) 0%, transparent 58%),
        linear-gradient(180deg, rgba(14, 24, 46, 0.92) 0%, rgba(8, 14, 28, 0.95) 100%);
    box-shadow: inset 0 1px 0 rgba(188, 220, 255, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.battleship-size-card:hover .battleship-size-card__inner {
    border-color: rgba(100, 181, 246, 0.55);
    transform: translateY(-1px);
}

.battleship-size-card:has(input:checked) .battleship-size-card__inner {
    border-color: rgba(79, 195, 247, 0.9);
    box-shadow:
        0 0 0 1px rgba(79, 195, 247, 0.35),
        0 10px 24px rgba(20, 60, 120, 0.28),
        inset 0 0 18px rgba(79, 195, 247, 0.12);
}

.battleship-size-card:has(input:checked) .battleship-size-card__size {
    color: #b3e5fc;
}

.battleship-size-card__preview {
    --preview-cols: 10;
    position: relative;
    width: 100%;
    max-width: 92px;
    aspect-ratio: 1;
    border: 2px solid rgba(30, 52, 88, 0.95);
    border-radius: 4px;
    overflow: hidden;
    background-color: #1a3358;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #6ea8dc 0%, #3d6f9c 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%);
    background-size:
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        44% 10%,
        28% 8%,
        16% 6%;
    background-position:
        0 0,
        0 0,
        18% 34%,
        22% 58%,
        54% 72%;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 8px 18px rgba(0, 0, 0, 0.28);
}

.battleship-size-card__preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.12) 0%, transparent 42%, rgba(2, 8, 20, 0.35) 100%);
    pointer-events: none;
}

.battleship-size-card__preview--10 {
    --preview-cols: 10;
}

.battleship-size-card__preview--20 {
    --preview-cols: 14;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size:
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        36% 8%,
        24% 6%,
        20% 5%,
        14% 4%;
    background-position:
        0 0,
        0 0,
        16% 28%,
        20% 46%,
        34% 62%,
        58% 78%;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #6ea8dc 0%, #3d6f9c 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%);
}

.battleship-size-card__preview--50 {
    --preview-cols: 18;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size:
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        calc(100% / var(--preview-cols)) calc(100% / var(--preview-cols)),
        30% 6%,
        22% 5%,
        18% 4%,
        14% 4%,
        10% 3%;
    background-position:
        0 0,
        0 0,
        14% 22%,
        18% 36%,
        28% 50%,
        42% 64%,
        62% 78%;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #6ea8dc 0%, #3d6f9c 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%),
        linear-gradient(180deg, #5b96c8 0%, #356a96 100%);
}

.battleship-size-card__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.battleship-size-card__size {
    color: #edf4ff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.battleship-size-card__hint {
    color: rgba(175, 200, 228, 0.72);
    font-size: 0.74rem;
    line-height: 1.3;
}

.battleship-board-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(36, 74, 122, 0.55);
    border: 1px solid rgba(113, 163, 230, 0.35);
    color: rgba(220, 236, 255, 0.92);
    font-size: 0.82rem;
    font-weight: 600;
}

.battleship-board-panel {
    position: relative;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-battleship-room .checkers-room-bar.checkers-panel {
    padding: 12px 16px;
}

.battleship-placement-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    flex: 0 0 auto;
}

.battleship-placement-bar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.battleship-placement-dock-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.battleship-placement-dock-row[hidden] {
    display: none !important;
}

.battleship-dock-count {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(175, 200, 228, 0.75);
    white-space: nowrap;
}

.battleship-placement-subhint {
    margin: -4px 0 0;
    color: rgba(175, 200, 228, 0.65);
    font-size: 0.82rem;
}

.battleship-placement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}

.battleship-auto-place {
    margin: 0;
}

.battleship-ship-dock {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border: 1px dashed rgba(113, 163, 230, 0.28);
    border-radius: 6px;
    background: rgba(8, 14, 28, 0.35);
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.battleship-ship-dock[hidden] {
    display: none !important;
}

.battleship-dock-ship {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid rgba(100, 181, 246, 0.4);
    background: rgba(36, 74, 122, 0.55);
    cursor: grab;
    touch-action: none;
}

.battleship-board-panel[data-bs-size="20"] .battleship-dock-ship,
.battleship-board-panel[data-bs-size="50"] .battleship-dock-ship {
    min-width: 36px;
    min-height: 28px;
    padding: 5px 7px;
}

.battleship-dock-ship:active {
    cursor: grabbing;
}

.battleship-dock-ship__bar {
    display: block;
    width: calc(var(--ship-len, 3) * 12px);
    height: 10px;
    border-radius: 2px;
    background: linear-gradient(180deg, #7eb6e8 0%, #3d6f9c 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.battleship-board-panel[data-bs-size="20"] .battleship-dock-ship__bar,
.battleship-board-panel[data-bs-size="50"] .battleship-dock-ship__bar {
    width: calc(var(--ship-len, 3) * 10px);
    height: 8px;
}

.battleship-dock-ship__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(79, 195, 247, 0.92);
    color: #0a1628;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.battleship-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 12000;
    pointer-events: none;
    will-change: transform;
}

.battleship-drag-ghost__ship {
    display: block;
    width: calc(var(--ship-len, 3) * 14px);
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(180deg, #9ecbf0 0%, #4a86b8 100%);
    border: 1px solid rgba(179, 229, 252, 0.85);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.12);
}

.battleship-drag-ghost__ship--vertical {
    width: 14px;
    height: calc(var(--ship-len, 3) * 14px);
}

body.battleship-dragging {
    cursor: none;
    user-select: none;
}

body.battleship-dragging .battleship-board[data-board="own"],
body.battleship-dragging .battleship-dock-ship {
    cursor: none;
}

.battleship-cell--preview {
    outline: 2px solid rgba(129, 212, 250, 0.85);
    outline-offset: -2px;
}

.battleship-cell--preview-invalid {
    outline-color: rgba(255, 82, 82, 0.9);
    background: rgba(120, 28, 36, 0.45) !important;
}

.battleship-cell--around::after {
    content: '';
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: rgba(176, 190, 197, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.battleship-board-panel[data-bs-size="50"] .battleship-cell--miss::after,
.battleship-board-panel[data-bs-size="50"] .battleship-cell--hit::after,
.battleship-board-panel[data-bs-size="50"] .battleship-cell--sunk::after,
.battleship-board-panel[data-bs-size="50"] .battleship-cell--around::after {
    inset: 32%;
}

.battleship-placement-hint {
    margin: 0;
    color: rgba(175, 200, 228, 0.88);
    font-size: 0.86rem;
    flex: 1 1 220px;
    min-width: 0;
}

.battleship-board-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex: 0 0 auto;
}

.battleship-board-tabs[hidden] {
    display: none !important;
}

.battleship-board-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    background: rgba(8, 14, 28, 0.35);
    color: rgba(198, 214, 238, 0.82);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.battleship-board-tab.is-active {
    border-color: rgba(100, 181, 246, 0.55);
    background: rgba(36, 74, 122, 0.55);
    color: #e8f1ff;
}

.battleship-play-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.battleship-board-panel[data-bs-layout="placement"] .battleship-play-layout,
.battleship-board-panel[data-bs-layout="tabs"] .battleship-play-layout,
.battleship-board-panel[data-bs-layout="stacked"] .battleship-play-layout {
    grid-template-columns: 1fr;
}

.battleship-board-panel[data-bs-layout="placement"] .battleship-board-block--enemy,
.battleship-board-panel[data-bs-layout="tabs"] .battleship-board-block {
    display: none;
}

.battleship-board-panel[data-bs-layout="tabs"] .battleship-board-block.is-active,
.battleship-board-panel[data-bs-layout="placement"] .battleship-board-block--own {
    display: flex;
}

.battleship-board-panel[data-bs-layout="placement"] .battleship-board-title,
.battleship-board-panel[data-bs-layout="tabs"] .battleship-board-title {
    display: none;
}

.battleship-board-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 0;
}

.battleship-board-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(220, 236, 255, 0.9);
    flex: 0 0 auto;
}

.battleship-board-wrap {
    overflow: hidden;
    max-width: 100%;
    padding: 2px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battleship-board {
    display: grid;
    grid-template-columns: repeat(var(--bs-board-size, 10), var(--bs-cell-size, 28px));
    grid-template-rows: repeat(var(--bs-board-size, 10), var(--bs-cell-size, 28px));
    gap: 1px;
    background: rgba(8, 14, 28, 0.65);
    border: 1px solid rgba(113, 163, 230, 0.35);
    width: max-content;
    max-width: 100%;
    flex: 0 0 auto;
}

.battleship-cell {
    width: var(--bs-cell-size, 28px);
    height: var(--bs-cell-size, 28px);
    padding: 0;
    border: none;
    background: rgba(24, 42, 74, 0.85);
    cursor: default;
    position: relative;
}

.battleship-cell--alt {
    background: rgba(30, 52, 88, 0.9);
}

.battleship-cell--ship {
    background: linear-gradient(180deg, rgba(72, 118, 168, 0.95), rgba(42, 78, 128, 0.95));
}

.battleship-cell--targetable {
    cursor: crosshair;
}

.battleship-cell--targetable:hover {
    outline: 1px solid rgba(144, 202, 249, 0.85);
    outline-offset: -1px;
}

.battleship-cell--miss::after,
.battleship-cell--hit::after,
.battleship-cell--sunk::after {
    content: '';
    position: absolute;
    inset: 18%;
    border-radius: 50%;
}

.battleship-cell--miss::after {
    background: rgba(176, 190, 197, 0.55);
}

.battleship-cell--hit::after {
    background: radial-gradient(circle, #ff8a80 0%, #d32f2f 70%);
    box-shadow: 0 0 6px rgba(255, 82, 82, 0.55);
}

.battleship-cell--sunk::after {
    inset: 12%;
    border-radius: 4px;
    background: radial-gradient(circle, #ff5252 0%, #b71c1c 75%);
}

.battleship-cell--sunk {
    background: rgba(120, 28, 36, 0.75) !important;
}

.battleship-board[data-board="own"] .battleship-cell:not(:disabled) {
    touch-action: none;
    cursor: crosshair;
}

.battleship-waiting {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 14, 28, 0.72);
    text-align: center;
    color: rgba(220, 236, 255, 0.92);
    z-index: 2;
    pointer-events: none;
}

.battleship-waiting[hidden],
.battleship-placement-bar[hidden] {
    display: none !important;
}

.battleship-board-panel .battleship-room-layout {
    flex: 1 1 auto;
    min-height: clamp(300px, calc(100vh - 240px), 860px);
}

.battleship-room-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 420px);
    gap: 14px;
    align-items: stretch;
    width: 100%;
    min-height: 0;
}

.battleship-room-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.battleship-sidebar.checkers-sidebar {
    height: 100%;
    min-height: 0;
}

.battleship-sidebar .checkers-play-meta {
    flex-direction: column;
    align-items: stretch;
}

.battleship-sidebar .checkers-status-line {
    width: 100%;
    max-width: none;
}

.battleship-sidebar .checkers-players {
    width: 100%;
}

.battleship-sidebar .checkers-player__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battleship-sidebar .checkers-chat__body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.battleship-sidebar .checkers-chat__messages {
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-gutter: stable;
}

.battleship-sidebar .checkers-chat__empty {
    position: absolute;
    inset: 0;
    margin: 0;
    flex: none;
    min-height: 0;
    pointer-events: none;
}

.battleship-sidebar .checkers-chat__form {
    width: 100%;
    min-width: 0;
}

.battleship-sidebar .checkers-chat__field {
    flex: 1 1 0;
    min-width: 0;
}

.battleship-room .checkers-room-bar__meta {
    flex-wrap: wrap;
    gap: 10px;
}

.online-game-card--battleship {
    --game-card-accent: #4fc3f7;
}

.online-game-card--battleship:hover {
    border-color: rgba(79, 195, 247, 0.62);
    box-shadow: 0 14px 36px rgba(12, 72, 120, 0.32);
}

.battleship-card-scene {
    position: relative;
    width: min(100%, 120px);
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(36, 74, 122, 0.95);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    isolation: isolate;
}

.battleship-card-scene__ocean {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 70% at 50% 18%, rgba(129, 212, 250, 0.22) 0%, transparent 58%),
        linear-gradient(180deg, #1f4f7a 0%, #153a5c 38%, #0d2740 100%);
}

.battleship-card-scene__grid {
    position: absolute;
    inset: 10%;
    border-radius: 4px;
    background-color: rgba(18, 42, 72, 0.72);
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 10% 10%;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.28);
}

.battleship-card-scene__ship {
    position: absolute;
    border-radius: 3px;
    background: linear-gradient(180deg, #7eb6e8 0%, #4a7fad 55%, #355f86 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.battleship-card-scene__ship--a {
    left: 22%;
    top: 30%;
    width: 34%;
    height: 7%;
}

.battleship-card-scene__ship--b {
    left: 48%;
    top: 52%;
    width: 22%;
    height: 6%;
}

.battleship-card-scene__ship--c {
    left: 28%;
    top: 68%;
    width: 14%;
    height: 5%;
}

.battleship-card-scene__shot {
    position: absolute;
    border-radius: 50%;
    z-index: 3;
}

.battleship-card-scene__shot--hit {
    left: 58%;
    top: 34%;
    width: 9%;
    height: 9%;
    background: radial-gradient(circle, #ff8a80 0%, #e53935 72%);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.65);
}

.battleship-card-scene__shot--miss {
    right: 24%;
    top: 58%;
    width: 7%;
    height: 7%;
    background: rgba(207, 216, 220, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.battleship-card-scene__shot--sunk {
    left: 36%;
    top: 70%;
    width: 10%;
    height: 10%;
    border-radius: 4px;
    background: radial-gradient(circle, #ff5252 0%, #b71c1c 75%);
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
}

.battleship-card-scene__crosshair {
    position: absolute;
    right: 18%;
    top: 22%;
    width: 18%;
    height: 18%;
    border: 1px solid rgba(129, 212, 250, 0.55);
    border-radius: 50%;
    z-index: 2;
}

.battleship-card-scene__crosshair::before,
.battleship-card-scene__crosshair::after {
    content: '';
    position: absolute;
    background: rgba(129, 212, 250, 0.45);
}

.battleship-card-scene__crosshair::before {
    left: 50%;
    top: 12%;
    width: 1px;
    height: 76%;
    transform: translateX(-50%);
}

.battleship-card-scene__crosshair::after {
    left: 12%;
    top: 50%;
    width: 76%;
    height: 1px;
    transform: translateY(-50%);
}

.online-game-card--battleship:hover .battleship-card-scene__crosshair {
    border-color: rgba(179, 229, 252, 0.85);
    box-shadow: 0 0 14px rgba(79, 195, 247, 0.35);
}

@media (max-width: 1100px) {
    .battleship-room-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .battleship-board-panel .battleship-room-layout {
        min-height: clamp(280px, calc(100vh - 280px), 720px);
    }

    .battleship-sidebar.checkers-sidebar {
        min-height: 300px;
        max-height: 42vh;
    }
}

@media (max-width: 960px) {
    .battleship-play-layout {
        grid-template-columns: 1fr;
    }

    .battleship-board-panel[data-bs-layout="dual"] .battleship-play-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .battleship-placement-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .battleship-board-size-options {
        grid-template-columns: 1fr;
    }
}
