/* Команда (/team): шапка-«паспорт» (стандарт DST-1), вкладки, обзор, доска состава с окном «Изменить», список «Мои команды».
   Основа — переменные сайта (--accent, --box, --white-1); новых утилит Tailwind не используется. */

/* ---------- шапка команды ---------- */
.tm-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 24px;
    padding: 22px 24px;
    overflow: hidden;
    border: 1px solid rgba(31, 215, 66, 0.28);
    border-radius: var(--radius);
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(31, 215, 66, 0.2), transparent 55%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px),
        linear-gradient(150deg, #0f1a14 0%, #0a0d10 60%, #11151b 100%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tm-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.tm-logo-wrap {
    flex: 0 0 auto;
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #1fd742, #3c97fe, #1fd742);
}

.tm-logo {
    display: block;
    width: 92px;
    height: 92px;
    border: 3px solid #0a0d10;
    border-radius: 50%;
    background: #0c0f14;
    object-fit: cover;
}

.tm-hero-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tm-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tm-chip {
    padding: 2px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    color: var(--white-1);
    font-size: 11.5px;
    font-weight: 600;
}

.tm-chip-game {
    border-color: rgba(31, 215, 66, 0.5);
    background: rgba(31, 215, 66, 0.12);
    color: #7dffa0;
}

.tm-name {
    margin: 0;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.tm-tag {
    margin-left: 6px;
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: var(--white-1);
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

.tm-passport-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tm-std {
    padding: 1px 7px;
    border-radius: var(--radius);
    background: #1fd742;
    color: #04100a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.tm-number {
    padding: 0;
    border: none;
    background: transparent;
    color: #e6f7ea;
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 15px;
    letter-spacing: 0.12em;
    cursor: pointer;
}

.tm-number:hover {
    color: #7dffa0;
}

.tm-number.is-copied {
    color: #1fd742;
}

.tm-hero-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.tm-hero-facts {
    display: flex;
    gap: 10px;
}

.tm-fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 96px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
}

.tm-fact-main {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.tm-fact-sub {
    color: var(--white-1);
    font-size: 11.5px;
}

.tm-hero-btn {
    padding: 11px 18px;
    white-space: nowrap;
}

/* ---------- вкладки ---------- */
.tm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: #090b0f;
}

.tm-tab,
.tm-tabs .tournament-tab {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--white-1);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.tm-tab:hover,
.tm-tabs .tournament-tab:hover {
    background: #14171d;
    color: #fff;
}

.tm-tab.is-active {
    background: rgba(31, 215, 66, 0.14);
    color: #7dffa0;
}

/* ---------- блоки страницы ---------- */
.tm-section {
    padding: 18px 20px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: var(--box);
}

.tm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.tm-section-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.tm-section-head .tm-section-title {
    margin: 0;
}

.tm-section-hint {
    color: var(--white-1);
    font-size: 12.5px;
    font-weight: 400;
}

.tm-link {
    padding: 0;
    border: none;
    background: transparent;
    color: #7dffa0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tm-link:hover {
    text-decoration: underline;
}

/* ---------- обзор ---------- */
.tm-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.tm-overview-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

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

.tm-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #1d2027;
    border-radius: var(--radius);
    background: #0c0f14;
}

.tm-stat-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
}

.tm-stat-rank {
    font-size: 16px;
}

.tm-stat-label {
    color: var(--white-1);
    font-size: 12px;
}

.tm-lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tm-lineup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: #0c0f14;
    color: #e6e7e9;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.tm-lineup-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.tm-lineup-item:hover {
    border-color: rgba(31, 215, 66, 0.5);
}

.tm-lineup-item.is-captain {
    border-color: rgba(245, 185, 66, 0.55);
}

/* паспорт команды (карточка как у банковской) */
.tm-passport {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px;
    overflow: hidden;
    border: 1px solid rgba(31, 215, 66, 0.3);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(31, 215, 66, 0.22), transparent 58%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 14px),
        linear-gradient(150deg, #0f1a14 0%, #0a0d10 55%, #11151b 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.tm-passport-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tm-passport-brand {
    color: #1fd742;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.tm-passport-kind {
    color: var(--white-1);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tm-passport-name {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tm-passport-name span {
    margin-left: 4px;
    color: var(--white-1);
    font-size: 13px;
    font-weight: 700;
}

.tm-passport > .tm-number {
    align-self: flex-start;
    width: auto;
    font-size: 17px;
    text-align: left;
}

.tm-passport-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0;
}

.tm-passport-facts dt {
    color: var(--white-1);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tm-passport-facts dd {
    margin: 2px 0 0;
    color: #e6e7e9;
    font-size: 13.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tm-passport-facts a {
    color: #7dffa0;
    text-decoration: none;
}

/* достижения: призовые места */
.tm-trophies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.tm-trophy {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #1d2027;
    border-radius: var(--radius);
    background: #0c0f14;
}

.tm-trophy-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    fill: none;
    stroke-width: 1.8;
}

.tm-trophy-gold { stroke: #f5c542; }
.tm-trophy-silver { stroke: #cfd6de; }
.tm-trophy-bronze { stroke: #d08a54; }
.tm-trophy-plain { stroke: var(--white-1); }

.tm-trophy-title {
    flex: 1;
    min-width: 0;
    color: #e6e7e9;
    font-size: 14px;
    font-weight: 600;
}

.tm-trophy-date {
    color: var(--white-1);
    font-size: 12px;
}

/* ---------- доска состава ---------- */
.tm-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tm-board-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 16px;
}

.tm-board-hint {
    max-width: 620px;
    margin: 4px 0 0;
    color: var(--white-1);
    font-size: 13px;
    line-height: 1.45;
}

.tm-board-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tm-lane {
    padding: 16px 18px 18px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: var(--box);
}

.tm-lane-main {
    border-color: rgba(31, 215, 66, 0.25);
}

.tm-lane-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tm-lane-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.tm-lane-count {
    color: var(--white-1);
    font-size: 13px;
    font-weight: 600;
}

.tm-bar {
    flex: 0 0 120px;
    height: 6px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #1a1d24;
}

.tm-bar > span {
    display: block;
    height: 100%;
    border-radius: var(--radius);
    background: #1fd742;
}

.tm-bar-sub > span {
    background: #3c97fe;
}

.tm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.tm-lane-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 2px 0;
    color: var(--white-1);
    font-size: 13px;
}

/* карточка участника */
.tm-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 14px 14px 16px;
    border: 1px solid #1d2027;
    border-radius: var(--radius);
    background: #0c0f14;
    transition: border-color var(--transition), transform var(--transition);
}

.tm-card:hover {
    border-color: rgba(31, 215, 66, 0.4);
}

.tm-card-captain {
    border-color: rgba(245, 185, 66, 0.5);
    background: linear-gradient(135deg, rgba(245, 185, 66, 0.09), #0c0f14 60%);
}

.tm-card-substitute {
    border-left: 3px solid #3c97fe;
}

.tm-card-coach {
    border-left: 3px solid #b27cff;
}

.tm-card-slot {
    position: absolute;
    top: 6px;
    right: 10px;
    color: rgba(255, 255, 255, 0.22);
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tm-card-crown {
    position: absolute;
    top: -9px;
    left: 14px;
    display: inline-flex;
    padding: 2px 6px;
    border-radius: var(--radius);
    background: #f5b942;
    line-height: 0;
}

.tm-card-crown svg {
    width: 14px;
    height: 14px;
    fill: #1b1203;
    stroke: #1b1203;
    stroke-width: 1.2;
}

.tm-card {
    flex-wrap: wrap;
}

.tm-card-avatar {
    flex: 0 0 auto;
    display: inline-flex;
}

.tm-card-avatar .roster-avatar {
    width: 52px;
    height: 52px;
}

.tm-card-body {
    display: flex;
    flex: 1 1 140px;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tm-card-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tm-card-name:hover {
    color: #7dffa0;
}

.tm-card-name-empty {
    color: var(--white-1);
    font-weight: 600;
}

.tm-card-role {
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: var(--radius);
    background: rgba(31, 215, 66, 0.12);
    color: #7dffa0;
    font-size: 11.5px;
    font-weight: 700;
}

.tm-card-captain .tm-card-role {
    background: rgba(245, 185, 66, 0.16);
    color: #f5b942;
}

.tm-card-substitute .tm-card-role {
    background: rgba(60, 151, 254, 0.16);
    color: #7fb8ff;
}

.tm-card-coach .tm-card-role {
    background: rgba(178, 124, 255, 0.16);
    color: #cfa8ff;
}

.tm-card-meta {
    color: var(--white-1);
    font-size: 12px;
}

/* значок верификации игрока (тот же вид, что в составе турнира) */
.tm-card .verify-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.tm-card .verify-mark svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke-width: 3;
}

.tm-card .verify-mark-ok {
    background: rgba(31, 215, 66, 0.2);
}

.tm-card .verify-mark-ok svg {
    stroke: #1fd742;
}

.tm-card .verify-mark-bad {
    background: rgba(230, 162, 60, 0.2);
    box-shadow: inset 0 0 0 1px rgba(230, 162, 60, 0.55);
}

.tm-card .verify-mark-bad svg {
    stroke: #f0b04c;
}

.tm-card-empty {
    border-style: dashed;
    background: transparent;
}

.tm-edit {
    display: inline-flex;
    flex: 1 0 100%;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #2c303a;
    border-radius: var(--radius);
    background: #14171d;
    color: #e6e7e9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}

.tm-edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.tm-edit:hover {
    border-color: #1fd742;
    color: #7dffa0;
}

/* ---------- окно «Изменить» ---------- */
.tm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.tm-modal-backdrop[hidden] {
    display: none;
}

.tm-modal {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(560px, 100%);
    max-height: calc(100dvh - 32px);
    padding: 20px;
    overflow-y: auto;
    border: 1px solid rgba(31, 215, 66, 0.3);
    border-radius: var(--radius);
    background: #0b0e12;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.tm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tm-modal-title {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tm-modal-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius);
    background: #14171d;
    cursor: pointer;
}

.tm-modal-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--white-1);
    stroke-width: 2;
}

.tm-modal-sub {
    margin: 0;
    color: var(--white-1);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tm-modal-note {
    margin: 0;
    color: var(--white-1);
    font-size: 13px;
    line-height: 1.45;
}

.tm-modal-note[hidden],
.tm-moves[hidden] {
    display: none;
}

/* превью обмена: «Игрок 1 (основа) ⇄ Игрок 2 (запас)» */
.tm-swap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
}

.tm-swap-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 130px;
    padding: 12px 8px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: #0e1116;
    text-align: center;
}

.tm-swap-side.is-empty {
    border-style: dashed;
    color: var(--white-1);
    font-size: 13px;
}

.tm-swap-side img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.tm-swap-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tm-swap-role {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    color: var(--white-1);
    font-size: 12px;
}

.tm-swap-role b {
    color: #7dffa0;
    font-weight: 700;
}

.tm-swap-role s {
    color: var(--white-1);
    opacity: 0.7;
}

.tm-swap-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-swap-arrows svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: #1fd742;
    stroke-width: 2;
}

.tm-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.tm-partner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background: #0e1116;
    color: #e6e7e9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.tm-partner img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.tm-partner small {
    color: var(--white-1);
    font-size: 11px;
    font-weight: 600;
}

.tm-partner:hover {
    border-color: rgba(31, 215, 66, 0.5);
}

.tm-partner.is-selected {
    border-color: #1fd742;
    background: rgba(31, 215, 66, 0.14);
}

.tm-modal-submit {
    width: 100%;
}

.tm-modal-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tm-moves-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tm-moves-row form {
    margin: 0;
}

.tm-moves-row button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tm-remove {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid #1d2027;
}

.tm-remove-btn {
    padding: 8px 14px;
    border: 1px solid #5b2a2a;
    border-radius: var(--radius);
    background: transparent;
    color: #ff9c9c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tm-remove-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* ---------- «Мои команды» ---------- */
.tm-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.tm-team-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #22242c;
    border-radius: var(--radius);
    background:
        radial-gradient(110% 120% at 100% 0%, rgba(31, 215, 66, 0.12), transparent 55%),
        var(--box);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition);
}

.tm-team-card:hover {
    border-color: rgba(31, 215, 66, 0.55);
    transform: translateY(-2px);
}

.tm-team-card-captain {
    border-color: rgba(245, 185, 66, 0.35);
}

.tm-team-logo {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(31, 215, 66, 0.5);
    border-radius: 50%;
    background: #0c0f14;
    object-fit: cover;
}

.tm-team-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tm-team-name {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tm-team-game {
    color: var(--white-1);
    font-size: 12.5px;
}

.tm-team-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e6e7e9;
    font-size: 13px;
    font-weight: 700;
}

.tm-team-trophies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f5c542;
}

.tm-team-trophies svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.tm-team-number {
    color: rgba(255, 255, 255, 0.35);
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 11.5px;
    letter-spacing: 0.1em;
}

.tm-role {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 9px;
    border-radius: var(--radius);
    background: rgba(31, 215, 66, 0.14);
    color: #7dffa0;
    font-size: 11px;
    font-weight: 700;
}

.tm-role-captain { background: rgba(245, 185, 66, 0.16); color: #f5b942; }
.tm-role-substitute { background: rgba(60, 151, 254, 0.16); color: #7fb8ff; }
.tm-role-coach { background: rgba(178, 124, 255, 0.16); color: #cfa8ff; }

/* ---------- телефон ---------- */
@media (max-width: 900px) {
    .tm-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-overview-side {
        order: -1;
    }
}

@media (max-width: 640px) {
    .tm-hero {
        padding: 16px;
    }

    .tm-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .tm-logo {
        width: 76px;
        height: 76px;
    }

    .tm-name {
        font-size: 24px;
    }

    .tm-hero-facts {
        width: 100%;
    }

    .tm-fact {
        flex: 1;
    }

    .tm-hero-btn {
        width: 100%;
        text-align: center;
    }

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

    .tm-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-modal {
        padding: 16px;
    }

    .tm-swap {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    }

    .tm-swap-arrows svg {
        width: 26px;
        height: 26px;
    }
}
