/* ==========================================================================
   Раздел «Турниры» (/turniry) — серии, афиши, расписание серии
   Подключается только на страницах раздела. --acc — цвет серии (static/data/tournaments.json)
   ========================================================================== */
:root { --acc: #d8ad57; }
.tn-hero::before { background: radial-gradient(60% 90% at 80% 10%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 65%), radial-gradient(50% 80% at 0% 100%, rgba(58, 11, 18, .5), transparent 70%); }
.tn-hero__grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.tn-hero__grid > * { min-width: 0; }
@media (min-width: 900px) { .tn-hero__grid { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (min-width: 1200px) { .tn-hero__grid { grid-template-columns: minmax(0, 1fr) 430px; } }
.tn-hero .mt-badge { background: var(--acc); color: #0a0607; }
.tn-hero h1 { margin-top: 16px; }
.tn-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 575px) { .tn-hero__actions .mt-btn { flex: 1 1 100%; } }

.tn-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
@media (min-width: 640px) { .tn-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) and (max-width: 1199px) { .tn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tn-fact { position: relative; padding: 14px 14px 12px; border-radius: var(--radius-sm); background: rgba(10, 6, 7, .62); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.tn-fact::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); }
.tn-fact span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tn-fact b { display: block; margin: 4px 0 2px; font-family: var(--f-display); font-size: clamp(20px, 2.1vw, 26px); font-weight: 400; line-height: 1.1; color: var(--ivory); font-variant-numeric: tabular-nums; }
.tn-fact small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); }

.tn-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 16%, transparent), transparent 80%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent); }
.tn-next[hidden] { display: none; }
.tn-next p { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tn-next p b { display: block; margin-top: 2px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ivory); }
.tn-next .mt-countdown div { min-width: 54px; padding: 8px 4px; }
.tn-next .mt-countdown b { font-size: 26px; }
.tn-next .mt-countdown span { font-size: 10px; }

.tn-poster { position: relative; isolation: isolate; margin: 0 auto; width: min(100%, 430px); }
.tn-poster::before { content: ''; position: absolute; inset: 8% -6% -4%; z-index: -2; border-radius: 50%; background: var(--acc); filter: blur(70px); opacity: .3; }
.tn-poster__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 20px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .9); }
.tn-poster--duo { padding: 0 13% 8% 0; }
.tn-poster--duo .tn-poster__img + .tn-poster__img { position: absolute; z-index: -1; width: 60%; right: 0; bottom: 0; transform: rotate(5deg); }
@media (max-width: 899px) { .tn-poster { width: min(100%, 380px); } }

.tn-typeposter { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; aspect-ratio: 4 / 5; width: 100%; padding: 16px; border-radius: 20px; text-align: center; background: radial-gradient(80% 60% at 50% 30%, rgba(216, 173, 87, .28), transparent 70%), linear-gradient(160deg, #1d1210, #0a0607 70%); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tn-typeposter span { text-transform: uppercase; font-size: 13px; font-weight: 800; letter-spacing: .4em; color: var(--muted); }
.tn-typeposter b { font-family: var(--f-display); font-size: clamp(64px, 9vw, 120px); font-weight: 400; line-height: .9; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tn-typeposter i { font-style: normal; font-weight: 800; font-size: clamp(15px, 1.6vw, 20px); color: var(--ivory); }
.tn-card .tn-typeposter { border-radius: 0; box-shadow: none; }
.tn-card .tn-typeposter b { font-size: clamp(40px, 5vw, 64px); }

/* Расписание серии */
.tn-sess .mt-table td { white-space: normal; vertical-align: top; }
.tn-sess .mt-table td:nth-child(2) { min-width: 0; font-weight: 800; color: var(--ivory); font-variant-numeric: tabular-nums; }
.tn-sess .mt-table td:first-child { white-space: nowrap; }
.tn-sess .mt-table td small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.tn-sess .mt-table td b { color: var(--ivory); }
.tn-sess .mt-table .mt-tag { margin-left: 4px; font-size: 11px; }
.tn-sess .tn-acc, .tn-sess .tn-acc b, b.tn-acc { color: var(--acc, var(--gold)); white-space: nowrap; }
@media (max-width: 719px) {
    .tn-sess .mt-table thead { display: none; }
    .tn-sess .mt-table, .tn-sess .mt-table tbody, .tn-sess .mt-table tr { display: block; width: 100%; }
    .tn-sess .mt-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
    .tn-sess .mt-table td, .tn-sess .mt-table td:nth-child(3) { position: relative; display: block; padding: 3px 0 3px 86px; border: 0; text-align: left !important; white-space: normal; }
    .tn-sess .mt-table td::before { content: attr(data-l); position: absolute; left: 0; top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
    .tn-sess .mt-table tr:hover td { background: none; }
}
.tn-sess + .tn-subhead { margin-top: 44px; }
.tn-sess td a { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.tn-sess td a:hover { color: var(--acc); }
.tn-subhead { margin: 36px 0 14px; font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; text-transform: uppercase; color: var(--gold-hi); }
.tn-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.tn-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Карточки серий */
.tn-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tn-filter .mt-chip small { opacity: .6; font-size: 11px; margin-left: 2px; }
.tn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 720px) { .tn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1100px) { .tn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tn-card { --acc: var(--gold); position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s, box-shadow .3s; }
.tn-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 70%, transparent), 0 24px 50px -24px color-mix(in srgb, var(--acc) 60%, transparent); }
.tn-card[hidden] { display: none; }
.tn-card__img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #000; }
.tn-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tn-card:hover .tn-card__img img { transform: scale(1.04); }
.tn-card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 14px 16px; border-top: 3px solid var(--acc); }
.tn-card__tag { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.tn-card h3 { margin: 6px 0 4px; font-family: var(--f-display); font-size: clamp(19px, 1.9vw, 24px); font-weight: 400; line-height: 1.1; text-transform: uppercase; color: var(--ivory); }
.tn-card__when { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tn-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.tn-card dt { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tn-card dd { margin: 2px 0 0; font-size: 14px; font-weight: 800; color: var(--ivory); font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .tn-card__body { padding: 12px 11px 13px; } .tn-card dl { grid-template-columns: 1fr; } }

/* Неделя крупных турниров */
.tn-week { display: grid; grid-template-columns: repeat(7, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
@media (min-width: 1200px) { .tn-week { grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; } }
.tn-day { scroll-snap-align: start; padding: 14px 10px; border-radius: 14px; background: rgba(18, 10, 11, .8); box-shadow: inset 0 0 0 1px var(--line); }
.tn-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong), var(--glow-gold); }
.tn-day h3 { margin: 0 0 10px 4px; font-family: var(--f-body); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.tn-day.is-today h3::after { content: ' · сегодня'; color: var(--ivory); }
.tn-day ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-day li { --acc: var(--muted); }
.tn-day a, .tn-day__plain { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; padding: 8px 9px; border-radius: 9px; color: var(--text); text-decoration: none; background: rgba(255, 255, 255, .025); border-left: 3px solid var(--acc); }
.tn-day a:hover { background: rgba(255, 255, 255, .07); }
.tn-day time { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; grid-row: span 2; padding-top: 1px; }
.tn-day__name { font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--ivory); overflow-wrap: anywhere; }
.tn-day b { font-size: 12.5px; color: var(--acc); font-variant-numeric: tabular-nums; }
.tn-day li.is-top a, .tn-day li.is-top .tn-day__plain { background: color-mix(in srgb, var(--acc) 14%, transparent); }

.tn-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; max-width: 920px; }
@media (min-width: 720px) { .tn-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
