/*
 * Metin5 — "mountain" skin: steel rails, dark leather windows, amber gems.
 * The chrome is raster: every frame, plate, button and field is assembled
 * from sliced bitmaps (see docs/THEME_ASSETS.md), so it can take any width
 * while all text stays live HTML. The small parts are the --img-* custom
 * properties of the generated theme.css, loaded before this file; only the
 * header art, the leather tile and the logo are separate files. No graphics
 * or styles from the old site are reused.
 */

:root {
    --page: #07090b;
    --text: #cdd6d8;
    --dim: #8494a0;
    --head: #e6eef0;
    --link: #e8b860;
    --ink: #f2fbff;
    --plate-ink: #0c1216;
    --line: rgba(138, 144, 148, 0.24);
    --danger: #f0a08a;
    --ok: #b8cf9a;
    --header-art: url('../img/theme/bg-castle-wide.webp?v=1');
    --ui: Tahoma, Verdana, 'DejaVu Sans', 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    background: var(--page);
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
}

/* No @view-transition here on purpose. With cross-document transitions on,
   Chromium (Brave, Chrome) paints one frame of bare page background between
   two pages, which reads as the whole page blinking; without them it keeps
   the old page on screen until the new one is painted with its content. */

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--ui);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text);
    background: var(--page);
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

::selection {
    background: rgba(232, 184, 96, 0.35);
    color: #fff;
}

p {
    margin: 0 0 9px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: 8px 14px;
    background: #141a20;
    color: var(--head);
    border: 1px solid #8a9094;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-width: 976px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 8px 26px;
}

/* Header: painted backdrop, logo, and the login strip standing on the edge
   of the board floor, in line with the content window below it. */

.site-header {
    position: relative;
    width: 100vw;
    height: 370px;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    background: var(--header-art) center top no-repeat;
}

.header-inner {
    position: relative;
    max-width: 960px;
    height: 100%;
    margin: 0 auto;
}

.logo {
    position: absolute;
    top: 85px;
    left: 60px;
    display: block;
}

.logo img {
    display: block;
    width: 502px;
}

/* Windows. A window is a leather field with a thin steel strip on each side;
   its rails are separate 34 px rows hung over the top and bottom edges. */

.login-strip,
.main-col,
.block-body {
    position: relative;
    background:
        var(--img-side-l) left top repeat-y,
        var(--img-side-r) right top repeat-y,
        url('../img/theme/leather.png?v=1');
    box-shadow: inset 0 9px 8px -6px rgba(0, 0, 0, 0.6);
}

.login-strip::before,
.login-strip::after,
.main-col::before,
.main-col::after,
.block-body::after,
.plate::before,
.plate::after {
    content: '';
    position: absolute;
    right: -20px;
    left: -20px;
    z-index: 1;
    height: 34px;
    padding: 0 48px;
    pointer-events: none;
    background:
        var(--img-rail-l) left top no-repeat,
        var(--img-rail-r) right top no-repeat,
        var(--img-rail-x) left top repeat-x;
    background-origin: border-box, border-box, content-box;
    background-clip: border-box, border-box, content-box;
}

.login-strip::before,
.main-col::before,
.plate::before {
    top: -18px;
}

.login-strip::after,
.main-col::after,
.block-body::after {
    bottom: -19px;
}

/* Top rails carry the gem emblem; the content window also gets two studs
   and closes with a second emblem. */
.login-strip::before,
.plate::before,
.main-col::after {
    background:
        var(--img-emblem) center top no-repeat,
        var(--img-rail-l) left top no-repeat,
        var(--img-rail-r) right top no-repeat,
        var(--img-rail-x) left top repeat-x;
    background-origin: border-box, border-box, border-box, content-box;
    background-clip: border-box, border-box, border-box, content-box;
}

.main-col::before {
    background:
        var(--img-emblem) center top no-repeat,
        var(--img-stud) 25% top no-repeat,
        var(--img-stud) 75% top no-repeat,
        var(--img-rail-l) left top no-repeat,
        var(--img-rail-r) right top no-repeat,
        var(--img-rail-x) left top repeat-x;
    background-origin: border-box, border-box, border-box, border-box, border-box, content-box;
    background-clip: border-box, border-box, border-box, border-box, border-box, content-box;
}

/* Login strip */

.login-strip {
    position: absolute;
    top: 284px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 668px;
    min-height: 72px;
    padding: 6px 22px;
}

.strip-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.strip-form .field {
    flex: 0 1 170px;
    margin: 0;
}

.strip-form .btn {
    flex: 0 0 auto;
    min-width: 126px;
}

.strip-links {
    margin: 0 0 0 auto;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
}

.strip-links a {
    display: block;
}

.strip-links a::before {
    content: '» ';
}

.strip-account {
    flex: 1;
    min-width: 0;
}

.strip-account p {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.strip-account strong {
    color: var(--head);
}

.shop-balance a {
    margin-left: 6px;
}

.account-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.account-actions form {
    margin: 0;
}

/* Content grid: menu and side blocks on the left, the content window on the
   right; one column below 900 px (menu, content, side blocks). */

.content-wrap {
    position: relative;
    display: grid;
    flex: 1;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        'menu main'
        'side main';
    column-gap: 16px;
    align-items: start;
    align-content: start;
    padding-top: 6px;
}

/* Board floor behind the windows, starting with a ledge under the header. */
.content-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    z-index: -1;
    width: 100vw;
    height: 672px;
    margin-left: -50vw;
    background: var(--img-planks) repeat-x;
}

.main-menu {
    grid-area: menu;
}

.sidebar {
    grid-area: side;
    min-width: 0;
}

.main-col {
    grid-area: main;
    min-width: 0;
    margin: 18px 20px 21px;
    padding: 30px 16px 26px;
}

/* Side blocks: a steel plate with the title, then a narrow window. */

.block {
    margin: 0 0 19px;
    padding: 18px 20px 0;
}

.plate {
    position: relative;
    height: 40px;
    margin: 0 -4px 16px;
    border-style: solid;
    border-width: 8px;
    border-color: transparent;
    border-image: var(--img-plate) 10 12 14 12 fill / 10px 12px 14px 12px / 2px 4px 6px 4px stretch;
    font-size: 12px;
    font-weight: bold;
    line-height: 23px;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--plate-ink);
    text-shadow: 0 1px 0 rgba(255, 243, 208, 0.5);
}

.plate::before,
.plate::after {
    right: -24px;
    left: -24px;
}

.plate::before {
    top: -26px;
}

.plate::after {
    bottom: -28px;
}

.block-body {
    margin: 0;
    padding: 8px 8px 7px;
}

/* Menu: forged buttons with barbed ends that reach over the side strips. */

.main-menu .block-body {
    list-style: none;
    padding: 6px 0 2px;
}

.main-menu a {
    display: block;
    height: 38px;
    margin: 0 -8px 5px;
    overflow: hidden;
    border-style: solid;
    border-width: 0 30px;
    border-color: transparent;
    border-image: var(--img-btn) 0 30 fill / 0 30px stretch;
    font-size: 10px;
    font-weight: bold;
    line-height: 36px;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink);
    text-shadow: 0 1px 0 #000, 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.main-menu a:hover,
.main-menu a:focus-visible,
.main-menu a[aria-current='page'] {
    border-image-source: var(--img-btn-hi);
    color: #fff;
    text-decoration: none;
}

.main-menu a[aria-current='page'] {
    color: var(--link);
}

.main-menu a:focus-visible {
    outline-offset: -4px;
}

.menu-sep {
    height: 5px;
    margin: 9px 0 10px;
    background: var(--img-hr) center no-repeat;
}

/* Server status */

.status-line,
.status-players {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 2px 10px;
}

.status-line strong,
.status-players strong {
    color: var(--head);
}

.status-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: -4px;
    background: var(--img-gem-unknown) no-repeat;
}

.status-online {
    background-image: var(--img-gem-on);
}

.status-offline {
    background-image: var(--img-gem-off);
}

/* Top lists */

.top-list {
    list-style: none;
}

.top-list li {
    display: flex;
    align-items: center;
    height: 26px;
    background:
        var(--img-rank-box) 0 0 no-repeat,
        var(--img-rank-line) 28px 100% / calc(100% - 28px) 2px no-repeat;
}

.top-list .pos {
    flex: 0 0 23px;
    font-weight: bold;
    text-align: center;
    color: var(--head);
}

.top-list .name {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-list .name a {
    color: var(--text);
}

.top-list .lvl {
    padding-right: 2px;
    color: var(--head);
}

/* Panels: sections inside the content window, each under a leather title bar. */

.panel {
    min-width: 0;
    padding: 0 12px 16px;
}

.panel-title {
    min-height: 30px;
    margin: 0 -12px 12px;
    padding: 6px 14px 6px 30px;
    font-size: 11px;
    font-weight: bold;
    line-height: 18px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--head);
    background:
        var(--img-diamond) 8px center no-repeat,
        var(--img-title-x) 0 0 / auto 100% repeat-x;
    text-shadow: 0 1px 0 #000;
}

.panel h2:not(.panel-title),
.panel h3,
.section-title {
    margin: 18px 0 8px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--head);
}

/* Forms */

.field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--head);
}

input[type='text'],
input[type='password'],
input[type='email'],
input[type='search'],
select {
    width: 100%;
    min-height: 30px;
    padding: 0 5px;
    border-style: solid;
    border-width: 6px;
    border-color: transparent;
    border-image: var(--img-slot) 6 fill / 6px stretch;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font: 12px/16px var(--ui);
    appearance: none;
}

select {
    padding-right: 22px;
    background: var(--img-diamond) right 2px center no-repeat;
}

input[type='text']:focus,
input[type='password']:focus,
input[type='email']:focus,
input[type='search']:focus,
select:focus {
    outline: 1px solid var(--head);
    outline-offset: -2px;
}

input::placeholder {
    color: #73818c;
    opacity: 1;
}

select option {
    background: #141a20;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 8px;
    border-style: solid;
    border-width: 8px 9px;
    border-color: transparent;
    border-image: var(--img-go) 12 14 14 14 fill / 12px 14px 14px 14px / 4px 5px 6px 5px stretch;
    border-radius: 0;
    background: none;
    font: bold 11px/16px var(--ui);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--plate-ink);
    text-shadow: 0 1px 0 rgba(255, 243, 208, 0.5);
    cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
    border-image-source: var(--img-go-hi);
    color: #000;
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled='true'] {
    cursor: not-allowed;
    filter: grayscale(0.6);
    opacity: 0.55;
    transform: none;
}

.btn-secondary {
    border-image-source: var(--img-go2);
    color: var(--ink);
    text-shadow: 0 1px 0 #000;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-image-source: var(--img-go2-hi);
    color: #fff;
}

.search-form .field {
    margin-bottom: 6px;
}

.search-form .btn {
    width: 100%;
}

.account-form {
    max-width: 420px;
}

.account-form .btn {
    margin-top: 4px;
}

.field-error {
    margin: 2px 0 0;
    color: var(--danger);
}

.flash {
    margin: 0 0 12px;
    padding: 3px 8px;
    border-style: solid;
    border-width: 6px;
    border-color: transparent;
    border-image: var(--img-slot) 6 fill / 6px stretch;
}

.flash-success {
    color: var(--ok);
}

.flash-error {
    color: var(--danger);
}

.form-note,
.muted,
.empty-note {
    color: var(--dim);
}

.form-note {
    margin-top: 12px;
}

.empty-note {
    margin: 12px 0 4px;
}

.logged-in-as {
    overflow-wrap: anywhere;
}

/* Rendered Markdown content (news bodies and static pages) */

.md-content {
    overflow-wrap: break-word;
}

.md-content p {
    text-align: justify;
}

.md-content :first-child {
    margin-top: 0;
}

.md-content :last-child {
    margin-bottom: 0;
}

.md-content h1,
.md-content h2,
.md-content h3 {
    margin: 1.4em 0 0.5em;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--head);
}

.md-content h1 {
    font-size: 14px;
}

.md-content ul,
.md-content ol {
    margin: 0.6em 0;
    padding-left: 1.6em;
}

.md-content li {
    margin: 0.25em 0;
}

.md-content code {
    padding: 1px 5px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--line);
    color: var(--head);
    word-break: break-all;
}

.md-content pre {
    padding: 4px 6px;
    overflow-x: auto;
    border-style: solid;
    border-width: 6px;
    border-color: transparent;
    border-image: var(--img-slot) 6 fill / 6px stretch;
}

.md-content pre code {
    padding: 0;
    background: none;
    border: 0;
    color: var(--text);
    word-break: normal;
}

.checksum {
    user-select: all;
}

/* News: the date closes each entry under a thin ruled line. */

.news-item {
    display: flex;
    flex-direction: column;
}

.news-meta {
    margin: 0 0 8px;
    color: var(--dim);
}

.news-item .news-meta {
    order: 1;
    margin: 12px 0 0;
    padding-top: 9px;
    text-align: right;
    background: var(--img-hr) center top no-repeat;
}

.news-item .news-meta::before {
    content: '~ ';
}

.news-teaser {
    padding: 7px 4px 6px;
    border-bottom: 1px solid var(--line);
}

.news-teaser:last-of-type {
    border-bottom: 0;
}

.news-teaser h2 {
    margin: 0;
    text-transform: none;
}

.news-teaser .news-meta {
    margin: 0;
}

.archive-link {
    margin: 0;
    padding: 0 12px;
    text-align: center;
}

/* Home: the way into the server presentation, above the news */
.presentation-cta {
    margin: 0 0 14px;
    text-align: center;
}

.presentation-cta .btn {
    min-height: 40px;
    padding: 0 18px;
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* Ranking pages */

.ranking-tabs {
    display: flex;
    gap: 14px;
    margin: 0 0 12px;
    padding: 0 8px;
}

.ranking-tabs a {
    flex: 1 1 0;
    height: 38px;
    overflow: hidden;
    border-style: solid;
    border-width: 0 30px;
    border-color: transparent;
    border-image: var(--img-btn) 0 30 fill / 0 30px stretch;
    font-size: 10px;
    font-weight: bold;
    line-height: 36px;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink);
    text-shadow: 0 1px 0 #000;
}

.ranking-tabs a:hover,
.ranking-tabs a:focus-visible,
.ranking-tabs a[aria-current='page'] {
    border-image-source: var(--img-btn-hi);
    color: #fff;
    text-decoration: none;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 0 0 12px;
    padding: 4px 6px 6px;
    border-style: solid;
    border-width: 6px;
    border-color: transparent;
    border-image: var(--img-slot) 6 fill / 6px stretch;
}

.filter-bar .field {
    margin-bottom: 0;
}

.filter-bar select {
    min-width: 140px;
}

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

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--head);
    background: var(--img-title-x) 0 0 / auto 100% repeat-x;
    text-shadow: 0 1px 0 #000;
}

.ranking-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.ranking-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.045);
    color: var(--head);
}

.ranking-table .empty-row {
    padding: 20px 10px;
    text-align: center;
    color: var(--dim);
}

/* Pagination (custom Blade view, see resources/views/vendor/pagination) */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin: 16px 0 0;
    padding: 0;
}

.pagination a,
.pagination span {
    display: block;
    min-width: 34px;
    min-height: 32px;
    padding: 0 4px;
    border-style: solid;
    border-width: 8px 9px;
    border-color: transparent;
    border-image: var(--img-go2) 12 14 14 14 fill / 12px 14px 14px 14px / 4px 5px 6px 5px stretch;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    color: var(--ink);
}

.pagination a:hover,
.pagination a:focus-visible {
    border-image-source: var(--img-go2-hi);
    color: #fff;
    text-decoration: none;
}

.pagination span[aria-current='page'] {
    border-image-source: var(--img-go);
    color: var(--plate-ink);
    text-shadow: 0 1px 0 rgba(255, 243, 208, 0.5);
}

.pagination span.disabled {
    color: var(--dim);
    opacity: 0.55;
}

/* Profiles and search */

.profile-link:hover,
.profile-link:focus-visible {
    text-decoration: underline;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin: 0 0 6px;
}

.profile-stats .stat {
    padding: 2px 6px 3px;
    border-style: solid;
    border-width: 6px;
    border-color: transparent;
    border-image: var(--img-slot) 6 fill / 6px stretch;
}

.profile-stats dt {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dim);
}

.profile-stats dd {
    margin: 0;
    font-size: 13px;
    color: var(--head);
}

.leader-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border: 1px solid var(--link);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--link);
}

.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--line);
}

.search-results li:last-child {
    border-bottom: 0;
}

/* Dragon Coins. Tables reuse .ranking-table inside .table-scroll. */

.shop-balance {
    overflow-wrap: anywhere;
}

.shop-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin: 0 0 4px;
}

.shop-intro p {
    margin: 0;
    overflow-wrap: anywhere;
}

.shop-balance-value {
    font-size: 15px;
    color: var(--link);
}

.shop-num {
    text-align: right;
}

.ranking-table th.shop-num {
    text-align: right;
}

.shop-negative {
    color: var(--danger);
}

.shop-positive {
    color: var(--ok);
}

/* Footer */

.site-footer {
    margin-top: 6px;
    padding-top: 10px;
    text-align: center;
    color: var(--dim);
}

.site-footer p {
    margin: 0;
}

/* One column below 900 px: logo, login strip, menu, content, side blocks.
   Text and touch targets grow; the same sliced chrome stretches to fit. */

@media (max-width: 900px) {
    :root {
        --header-art: url('../img/theme/bg-castle-720.webp?v=1');
    }

    body {
        font-size: 14px;
    }

    .site-header {
        height: auto;
        min-height: 300px;
        padding: 0 8px;
    }

    .header-inner {
        height: auto;
        padding: 34px 0 27px;
    }

    .logo {
        position: static;
        width: min(84vw, 420px);
        margin: 0 auto 54px;
    }

    .logo img {
        width: 100%;
    }

    .login-strip {
        position: relative;
        top: auto;
        right: auto;
        width: auto;
        margin: 0 20px;
        padding: 10px 16px 12px;
    }

    .strip-form,
    .login-strip {
        flex-wrap: wrap;
    }

    .strip-form .field {
        flex: 1 1 130px;
    }

    .strip-form .btn {
        flex: 1 1 100%;
    }

    .strip-links {
        display: flex;
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 12px;
        margin: 2px 0 0;
        font-size: 13px;
        line-height: 20px;
    }

    .account-actions {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .account-actions .btn,
    .account-actions form {
        flex: 1 1 auto;
    }

    .account-actions form .btn {
        width: 100%;
    }

    .content-wrap {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas:
            'menu'
            'main'
            'side';
    }

    .main-menu .block-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
        padding: 8px 14px 4px;
    }

    .main-menu a {
        font-size: 11px;
    }

    .menu-sep {
        display: none;
    }

    .main-col {
        margin-top: 12px;
        padding: 28px 8px 24px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
        column-gap: 16px;
        align-items: start;
    }

    label,
    .panel-title,
    .ranking-table th,
    .profile-stats dt {
        font-size: 12px;
    }

    input[type='text'],
    input[type='password'],
    input[type='email'],
    input[type='search'],
    select {
        min-height: 40px;
        font-size: 16px;
    }

    .btn,
    .pagination a,
    .pagination span {
        min-height: 40px;
        padding-top: 4px;
        padding-bottom: 4px;
        font-size: 12px;
    }

    .top-list li {
        height: 30px;
        background-position: 0 2px, 28px 100%;
    }
}

@media (max-width: 420px) {
    .main-menu .block-body {
        column-gap: 18px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .main-menu a {
        font-size: 10px;
        letter-spacing: 0;
    }

    .panel {
        padding-right: 6px;
        padding-left: 6px;
    }

    .panel-title {
        margin-right: -6px;
        margin-left: -6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
