.chess-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    font-family: "Inter", sans-serif;
}

.chess-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.chess-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.chess-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chess-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chess-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.chess-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.chess-card-title {
    font-size: 17px;
    font-weight: 600;
}

.chess-card-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}

.chess-form {
    display: grid;
    gap: var(--space-3);
}

.chess-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.chess-field-time {
    gap: 10px;
}

.chess-lobby-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
}

.chess-toggle-inline {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    white-space: nowrap;
    justify-content: flex-end;
    min-height: 44px;
}

.chess-time-mode-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: var(--space-3);
    align-items: center;
}

.segmented {
    position: relative;
    display: grid;
    --seg-count: 3;
    --seg-index: 0;
    grid-template-columns: repeat(var(--seg-count), minmax(0, 1fr));
    background: var(--chess-surface-2);
    border-radius: 999px;
    padding: 3px;
    border: 1px solid var(--border-color);
}

.segmented-indicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / var(--seg-count, 3));
    transform: translateX(calc(var(--seg-index, 0) * 100%));
    background: var(--accent);
    border-radius: 999px;
    transition: transform 0.2s ease;
    z-index: 0;
}

.segmented button {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 6px;
    cursor: pointer;
    white-space: nowrap;
}

.segmented button.active {
    color: var(--chess-text-invert);
}

.segmented.seg-count-2 { --seg-count: 2; }
.segmented.seg-count-3 { --seg-count: 3; }
.segmented.seg-count-5 { --seg-count: 5; }
.segmented.seg-index-0 { --seg-index: 0; }
.segmented.seg-index-1 { --seg-index: 1; }
.segmented.seg-index-2 { --seg-index: 2; }
.segmented.seg-index-3 { --seg-index: 3; }
.segmented.seg-index-4 { --seg-index: 4; }

.segmented button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.chess-time-controls-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-3);
    align-items: stretch;
}

.chess-increment-block {
    background: var(--chess-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    min-width: 84px;
}

.chess-time-select-slot {
    background: var(--chess-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    min-height: 70px;
}

.chess-time-presets {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    min-height: 38px;
}

.chess-time-mode-row .chess-time-presets {
    flex-wrap: nowrap;
    gap: 0;
    padding: 3px;
}

.time-preset {
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 62px;
    text-align: center;
    flex: 1 1 0;
}

.time-preset.active {
    color: var(--chess-text-invert);
}

.chess-time-mode-row .time-preset {
    border: none;
    background: transparent;
    border-radius: 999px;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.chess-time-mode-row .time-preset.active {
    color: var(--chess-text-invert);
}

.chess-custom-block {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.chess-custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-main);
    font-size: 12px;
}

.chess-custom-row-compact {
    gap: 6px;
}

.vstepper {
    display: grid;
    grid-template-rows: 22px 28px 22px;
    align-items: stretch;
    width: 44px;
    border: 1px solid var(--chess-border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--chess-surface-1);
}

.vstepper button {
    border: none;
    background: var(--chess-surface-4);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.vstepper button:hover {
    background: var(--chess-surface-5);
}

.vstepper input {
    border: none;
    background: var(--chess-surface-1);
    color: var(--text-main);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.vstepper input::-webkit-outer-spin-button,
.vstepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.chess-note {
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.chess-toggle {
    align-items: flex-start;
}

.chess-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 10px 0;
}

.chess-live-list,
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    background: var(--bg-sidebar);
}

.live-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--chess-live-bg);
    border: 1px solid var(--chess-live-border);
    color: var(--chess-live-text);
    font-size: 11px;
    width: fit-content;
}

.live-players {
    color: var(--text-main);
    font-weight: 600;
}

.live-meta {
    color: var(--text-muted);
    font-size: 12px;
}

.live-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-sidebar);
}

.leaderboard-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-main img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.leaderboard-name {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}

.leaderboard-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-main-link {
    display: block;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    padding: 8px;
    text-decoration: none;
    color: var(--text-main);
}

.profile-link-block {
    text-decoration: none;
    color: var(--text-main);
}

.profile-main-link:hover {
    border-color: var(--border-color);
    background: var(--chess-hover-soft);
}

.profile-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.profile-row img {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
}

.profile-hint,
.profile-guest,
.opponent-meta {
    color: var(--text-muted);
    font-size: 12px;
}

.profile-hint.is-online {
    color: var(--chess-online);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.profile-stat {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 8px;
    border-radius: var(--radius-md);
    background: var(--chess-hover-soft);
}

.profile-card .profile-stat {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.stat-win {
    color: var(--chess-win);
    font-weight: 600;
}

.stat-loss {
    color: var(--chess-loss);
    font-weight: 600;
}

.stat-draw {
    color: var(--chess-draw);
    font-weight: 600;
}

.stat-wr {
    color: var(--accent);
    font-weight: 600;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.stats-strip.stats-inline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
}

.stat {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 17px;
    font-weight: 600;
}

.history-card {
    gap: 14px;
}

.history-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.chess-profile-hero {
    align-items: center;
    margin-top: 6px;
}

.profile-stats-row {
    justify-self: end;
    width: 100%;
    max-width: 560px;
}

.profile-stats-row.stats-strip.stats-inline {
    grid-template-columns: repeat(5, minmax(78px, 96px));
    justify-content: end;
}

.history-table {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--chess-field-shadow);
}

.history-head,
.history-item {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr) 110px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
}

.history-head > div,
.history-item > div,
.history-item > a {
    justify-self: start;
    text-align: left;
    min-width: 0;
}

.history-head {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
    background: var(--chess-panel-soft);
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    border-bottom: 1px solid var(--chess-line-soft);
}

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

.history-opponent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-opponent img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.opponent-link {
    color: var(--text-main);
    text-decoration: none;
}

.opponent-link:hover {
    color: var(--accent);
}

.history-type-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
}

.history-result {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-result.win {
    color: var(--chess-win);
}

.history-result.loss {
    color: var(--chess-loss);
}

.history-result.draw {
    color: var(--chess-draw-strong);
}

.chess-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.chess-modal.active {
    display: flex;
}

.chess-modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--chess-modal-backdrop);
}

.chess-modal-card {
    position: relative;
    z-index: 1;
    width: min(360px, 92vw);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chess-modal-title {
    font-size: 17px;
    font-weight: 600;
}

.chess-modal-text {
    color: var(--text-muted);
    font-size: 13px;
}

.chess-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.chess-match-main {
    background: var(--bg-main);
    color: var(--text-main);
    padding: 0;
}

.chess-match-page {
    min-height: calc(100vh - 400px);
    padding: var(--space-5);
    display: flex;
    overflow: hidden;
    font-family: "Inter", sans-serif;
}

.match-layout {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    flex: 1 1 auto;
    min-height: calc(100vh - 110px);
    max-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: auto 520px;
    gap: var(--space-5);
    align-items: start;
    justify-content: center;
}

.match-left {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    justify-self: start;
    align-self: stretch;
}

.match-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    max-width: 100%;
}

.match-board {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: min(100%, calc(100vw - 500px));
    max-height: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--chess-surface-0);
}

.chess-board {
    width: 100%;
    height: 100%;
}

.match-player {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-main);
    max-width: calc(100% - 130px);
}

.match-player:hover {
    background: var(--chess-hover-soft);
}

.match-player.is-empty {
    pointer-events: none;
    cursor: default;
}

.match-player.is-empty:hover {
    background: transparent;
}

.match-player img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.player-meta {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
}

.match-player.is-empty img {
    display: none;
}

.match-player.is-active-turn {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.match-timer {
    width: 122px;
    min-width: 122px;
    height: 60px;
    min-height: 60px;
    text-align: center;
    border-radius: var(--radius-md);
    padding: 0 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.match-timer.show-ms {
    width: 142px;
    min-width: 142px;
}

.match-timer.is-active {
    background: var(--chess-timer-active-bg);
    color: var(--chess-timer-active-text);
    border: none;
    box-shadow: none;
}

.match-timer.is-inactive {
    background: var(--btn-secondary-bg);
    color: var(--chess-text-strong);
    border: 1px solid var(--chess-border-soft);
}

.match-timer.is-active.is-low {
    background: var(--chess-timer-low-bg);
    color: var(--chess-timer-low-text);
    border: none;
}

.match-timer.is-inactive.is-low {
    border-color: var(--chess-border-muted);
}

.match-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-height: 0;
    align-self: center;
}

.match-spectators {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 240px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--chess-field-shadow);
    padding: 8px;
}

.spectator-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spectator-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-main);
}

.spectator-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.match-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    background: var(--bg-card);
    min-height: calc((100vh - 500px));
}

.match-top {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-status {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.match-time {
    font-size: 13px;
    color: var(--text-main);
}

.match-time-details {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 16px;
}

.match-invite {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-invite-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.match-invite-label {
    font-size: 11px;
    color: var(--text-muted);
}

.match-invite-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.match-invite-controls input,
.match-pgn-field input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-main);
    padding: 8px 10px;
    font-size: 13px;
}

.match-moves-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    max-height: 380px;
    height: 100%;
}

.match-moves-head {
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--chess-panel-soft);
}

.match-moves {
    flex: 1;
    overflow-y: auto;
}

.move-list {
    display: flex;
    flex-direction: column;
}

.move-row {
    display: grid;
    grid-template-columns: 42px 1fr 1fr;
    gap: 6px;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid var(--chess-line-soft);
}

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

.move-index {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1;
}

.move-cell {
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
}

.move-cell:hover {
    background: var(--chess-hover-soft-2);
}

.move-cell.active {
    background: var(--chess-hover-soft-3);
}

.match-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    justify-content: center;
}

.match-actions .btn {
    width: auto;
    min-width: max-content;
    min-height: 42px;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    font-family: inherit;
}


.match-pgn {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.match-pgn-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.match-pgn-field {
    min-width: 0;
}

.match-board.is-finished::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--chess-overlay);
}

.match-board.is-finished {
    pointer-events: none;
}

.promotion-picker {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 72px);
    gap: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--chess-border-soft);
    background: var(--chess-surface-0);
    padding: 10px;
    z-index: 8;
}

.promotion-picker button {
    width: 72px;
    height: 72px;
    border: 1px solid var(--chess-border-soft);
    border-radius: var(--radius-lg);
    background: var(--chess-surface-3);
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.promotion-picker button:hover {
    background: var(--chess-surface-6);
    border-color: var(--chess-border-strong);
}

.promotion-picker button img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    pointer-events: none;
}

.replay-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.replay-title {
    font-size: 14px;
    font-weight: 600;
}

.replay-date {
    font-size: 12px;
    color: var(--text-muted);
}

.replay-controls {
    display: flex;
    gap: 8px;
}

.chess-board .square-55d63 {
    position: relative;
}

.chess-board .highlight1-32417,
.chess-board .highlight2-9c5d2 {
    box-shadow: none !important;
}

.chess-square--selected {
    box-shadow: inset 0 0 0 1000px var(--chess-highlight-dark);
}

.chess-square--move {
    box-shadow: none;
}

.chess-square--move::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28%;
    height: 28%;
    border-radius: 999px;
    background: var(--chess-select-dot);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.chess-board.is-premove-select .chess-square--move::after {
    background: color-mix(in srgb, var(--chess-timer-low-bg) 72%, transparent);
}

.chess-square--hover {
    box-shadow: inset 0 0 0 1000px var(--chess-highlight-hover);
}

.chess-square--last-move {
    box-shadow: inset 0 0 0 1000px color-mix(in srgb, var(--accent) 34%, transparent);
}

.chess-square--check {
    box-shadow: inset 0 0 0 1000px color-mix(in srgb, var(--chess-timer-low-bg) 42%, transparent);
}

.chess-square--premove {
    box-shadow: inset 0 0 0 1000px color-mix(in srgb, var(--chess-timer-low-bg) 32%, transparent);
}

.hidden {
    display: none !important;
}

@media (max-width: 1240px) {
    .match-layout {
        grid-template-columns: 1fr 440px;
    }
}

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

    .match-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        max-height: none;
    }

    .match-left {
        width: 100%;
        max-width: 100%;
    }

    .match-panel {
        height: auto;
        min-height: 0;
    }

    .match-right {
        align-self: stretch;
        justify-content: flex-start;
    }

    .chess-match-page {
        overflow: visible;
    }

    .match-board {
        width: min(100%, calc(100vh - 220px));
    }

    .match-moves-wrap {
        max-height: 300px;
    }
}

@media (max-width: 860px) {
    .chess-lobby-top-row {
        grid-template-columns: 1fr;
    }

    .chess-time-mode-row {
        grid-template-columns: 1fr;
    }

    .chess-time-controls-row {
        grid-template-columns: 1fr;
    }

    .chess-custom-block {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-strip.stats-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-head {
        display: none;
    }

    .history-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .match-player {
        max-width: calc(100% - 100px);
    }

    .match-board {
        width: 100%;
    }

    .match-timer {
        width: 98px;
        min-width: 98px;
        font-size: 18px;
    }

    .match-timer.show-ms {
        width: 116px;
        min-width: 116px;
    }

    .match-pgn {
        grid-template-columns: 1fr;
    }
}
