/* /tournaments — live contests and the schedule ahead (desktop theme).
   Loaded only by pages/tournaments.tpl.

   Three states, three colours, used everywhere a state shows:
     live   — red     (the contest is running; the clock counts down to its end)
     ready  — teal    (starts within the day; the clock counts down to its start)
     later  — violet  (scheduled; shown by date)
   An age chip takes the colour of its age through --age, the same five
   colours /epoch uses.

   The modal further down is unchanged — templates and JS address it by id. */

.tn-page {
    --tn-live: 255,92,92;
    --tn-ready: 78,205,196;
    --tn-later: 150,134,248;
    --tn-ink: #f3f1ec;
    --tn-dim: rgba(243,241,236,0.62);
    --tn-faint: rgba(243,241,236,0.38);
    --tn-line: rgba(255,255,255,0.08);
    --tn-panel: rgba(255,255,255,0.028);
    min-height: 70vh;
    padding: 34px 0 90px;
    color: var(--tn-dim);
    line-height: 1.5;
}
.tn-page h1, .tn-page h2, .tn-page h3 { margin: 0; color: var(--tn-ink); font-family: inherit; }
.tn-page p { margin: 0; }
.tn-page a { text-decoration: none; }

.tnx-age--1, .tnm .tnx-age--1 { --age: 224,140,58; }
.tnx-age--2, .tnm .tnx-age--2 { --age: 212,172,84; }
.tnx-age--3, .tnm .tnx-age--3 { --age: 112,162,218; }
.tnx-age--4, .tnm .tnx-age--4 { --age: 168,134,236; }
.tnx-age--5, .tnm .tnx-age--5 { --age: 66,206,190; }

/* ── Head: what the page is, and how busy it is right now ─────── */
.tnx-head {
    position: relative; overflow: hidden; border-radius: 20px;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
    padding: 46px 48px 42px;
    border: 1px solid var(--tn-line);
    background:
        linear-gradient(95deg, #0b0c10 0%, rgba(11,12,16,0.9) 45%, rgba(11,12,16,0.6) 100%),
        var(--tn-banner, none) center 30% / cover no-repeat,
        #0b0c10;
}
.tnx-eyebrow {
    font-size: 11.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
    color: rgb(var(--theme-color));
}
.tnx-head h1 { font-size: 44px; font-weight: 800; line-height: 1.08; letter-spacing: -0.5px; margin: 12px 0 12px; }
.tnx-head p { font-size: 15.5px; line-height: 1.6; max-width: 560px; color: rgba(243,241,236,0.78); }

.tnx-tally { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex: none; }
.tnx-tally li {
    --c: 255,255,255;
    min-width: 128px; padding: 16px 18px; border-radius: 14px;
    background: rgba(0,0,0,0.45); border: 1px solid var(--tn-line); backdrop-filter: blur(6px);
    display: flex; flex-direction: column; gap: 6px;
}
.tnx-tally li.is-live  { --c: var(--tn-live); }
.tnx-tally li.is-ready { --c: var(--tn-ready); }
.tnx-tally li.is-later { --c: var(--tn-later); }
.tnx-tally b { font-size: 30px; font-weight: 800; line-height: 1; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tnx-tally span { display: flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: rgb(var(--c)); font-weight: 700; }
.tnx-tally span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--c)); }
.tnx-tally li.is-zero { opacity: 0.45; }

/* ── Section title ────────────────────────────────────────────── */
.tnx-sec { margin-top: 54px; }
.tnx-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px !important; font-size: 26px !important; font-weight: 800; letter-spacing: -0.3px; line-height: 1.15; }
.tnx-title::before { content: ""; align-self: center; width: 5px; height: 24px; border-radius: 3px; background: rgb(var(--c, var(--theme-color))); }
.tnx-title small { font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--tn-dim); }
.tnx-sec.is-live { --c: var(--tn-live); }
.tnx-sec.is-next { --c: var(--tn-ready); }

/* ── Shared chips ─────────────────────────────────────────────── */
.tnx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tnx-chip {
    display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; white-space: nowrap;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
    color: var(--tn-dim); background: rgba(8,9,12,0.7); border: 1px solid var(--tn-line);
}
.tnx-chip i { font-size: 9.5px; }
.tnx-chip.is-live  { color: rgb(var(--tn-live));  border-color: rgba(var(--tn-live),0.45);  background: rgba(var(--tn-live),0.14); }
.tnx-chip.is-ready { color: rgb(var(--tn-ready)); border-color: rgba(var(--tn-ready),0.4);  background: rgba(var(--tn-ready),0.12); }
.tnx-chip.is-later { color: rgb(var(--tn-later)); border-color: rgba(var(--tn-later),0.4);  background: rgba(var(--tn-later),0.12); }
.tnx-chip.is-age   { color: rgb(var(--age)); border-color: rgba(var(--age),0.4); background: rgba(var(--age),0.1); }
.tnx-chip.is-live > b {
    width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--tn-live));
    animation: tnxPulse 1.6s infinite;
}
@keyframes tnxPulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--tn-live),0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(var(--tn-live),0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--tn-live),0); }
}

/* ── Live now: one large card per running contest ─────────────── */
.tnx-live { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 18px; }
.tnx-live-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    border-radius: 18px; background: #101116; border: 1px solid rgba(var(--tn-live),0.28);
    color: inherit !important;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.tnx-live-card:hover { transform: translateY(-3px); border-color: rgba(var(--tn-live),0.7); box-shadow: 0 20px 46px rgba(0,0,0,0.5); }
.tnx-live-art { position: relative; height: 230px; overflow: hidden; background: radial-gradient(600px 240px at 80% 0%, rgba(var(--tn-live),0.25), transparent 70%), #14151b; }
.tnx-live-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tnx-live-card:hover .tnx-live-art img { transform: scale(1.04); }
.tnx-live-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,17,22,0.15) 0%, rgba(16,17,22,0.2) 45%, #101116 100%); }
.tnx-live-over { position: absolute; left: 24px; right: 24px; bottom: 14px; z-index: 1; }
.tnx-live-over h3 { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.3px; margin-top: 12px; text-shadow: 0 2px 14px rgba(0,0,0,0.7); }
.tnx-live-body { padding: 6px 24px 22px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.tnx-blurb { font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tnx-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.tnx-facts li { display: flex; flex-direction: column; gap: 2px; }
.tnx-facts span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--tn-faint); }
.tnx-facts b { font-size: 14.5px; font-weight: 700; color: var(--tn-ink); }
.tnx-facts li.is-prize b { color: #f5c451; }
.tnx-facts li.is-prize b i { margin-right: 7px; font-size: 12px; }

.tnx-clock {
    margin-top: auto; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 18px;
    padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,0.35); border: 1px solid var(--tn-line);
}
.tnx-clock-label { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tn-faint); }
.tnx-clock-value { font-size: 26px; font-weight: 800; line-height: 1; color: rgb(var(--tn-live)); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.tnx-clock-cta { grid-row: span 2; align-self: center; display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--tn-ink); }
.tnx-clock-cta i { transition: transform .18s; color: rgb(var(--tn-live)); }
.tnx-live-card:hover .tnx-clock-cta i { transform: translateX(5px); }
.tnx-bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.07); margin-top: 6px; }
.tnx-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--tn-live),0.5), rgb(var(--tn-live))); transition: width 1s linear; }

/* ── Up next: the schedule, soonest first ─────────────────────── */
.tnx-rows { display: flex; flex-direction: column; gap: 10px; }
.tnx-row {
    --c: var(--tn-later);
    position: relative; display: grid; align-items: center; gap: 22px;
    grid-template-columns: 78px 190px minmax(0, 1fr) 220px 170px 16px;
    padding: 12px 22px 12px 12px; border-radius: 16px;
    background: var(--tn-panel); border: 1px solid var(--tn-line);
    color: inherit !important;
    transition: border-color .15s, transform .15s, background .15s;
}
.tnx-row.is-ready { --c: var(--tn-ready); }
.tnx-row:hover { border-color: rgba(var(--c),0.6); transform: translateX(3px); background: rgba(var(--c),0.045); }
.tnx-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    height: 78px; border-radius: 12px; line-height: 1;
    background: rgba(var(--c),0.1); border: 1px solid rgba(var(--c),0.3);
}
.tnx-date b { font-size: 26px; font-weight: 800; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tnx-date span { font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: rgb(var(--c)); }
.tnx-date small { font-size: 10.5px; color: var(--tn-faint); margin-top: 3px; font-variant-numeric: tabular-nums; }
.tnx-thumb { height: 78px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 70% 20%, rgba(var(--c),0.3), transparent 70%), #14151b; display: flex; align-items: center; justify-content: center; color: rgba(var(--c),0.6); font-size: 22px; }
.tnx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tnx-row-main { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.tnx-row-main h3 { font-size: 19px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnx-row-main p { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnx-row .tnx-facts { flex-direction: column; gap: 6px; }
.tnx-row .tnx-facts li { flex-direction: row; align-items: baseline; gap: 8px; }
.tnx-row .tnx-facts b { font-size: 13px; }
.tnx-when { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.tnx-when span { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tn-faint); }
.tnx-when b { font-size: 19px; font-weight: 800; line-height: 1.1; color: rgb(var(--c)); font-variant-numeric: tabular-nums; }
.tnx-row > i { color: var(--tn-faint); font-size: 12px; transition: color .15s, transform .15s; }
.tnx-row:hover > i { color: rgb(var(--c)); transform: translateX(3px); }

.tnx-empty { text-align: center; padding: 70px 20px; margin-top: 28px; border-radius: 16px; border: 1px dashed var(--tn-line); }
.tnx-empty i { display: block; font-size: 44px; margin-bottom: 14px; color: rgba(var(--theme-color),0.6); }

@media (max-width: 1199px) {
    .tnx-head { flex-direction: column; align-items: flex-start; padding: 36px; }
    .tnx-live { grid-template-columns: 1fr; }
    .tnx-row { grid-template-columns: 78px minmax(0, 1fr) 170px 16px; }
    .tnx-row .tnx-thumb, .tnx-row .tnx-facts { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tn-page *, .tn-page *::before { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   TOURNAMENT MODAL
   Lives on <body> (the script moves it there), so it carries its own
   variables instead of inheriting .tn-page's. --c is the state colour:
   live red, starting-soon teal, scheduled violet.
═══════════════════════════════════════════════════════════ */

.tnm-wrap {
    --tn-live: 255,92,92;
    --tn-ready: 78,205,196;
    --tn-later: 150,134,248;
    --tn-ink: #f3f1ec;
    --tn-dim: rgba(243,241,236,0.62);
    --tn-faint: rgba(243,241,236,0.38);
    --tn-line: rgba(255,255,255,0.08);
    --c: var(--tn-later);
    display: none; position: fixed; inset: 0; z-index: 100000;
    align-items: center; justify-content: center; padding: 24px;
    color: var(--tn-dim); line-height: 1.5;
}
.tnm-wrap.is-live  { --c: var(--tn-live); }
.tnm-wrap.is-ready { --c: var(--tn-ready); }
.tnm-wrap.tnm-open { display: flex; }
.tnm-backdrop { position: absolute; inset: 0; background: rgba(4,5,8,0.84); backdrop-filter: blur(6px); animation: tnmFade .2s ease; }
@keyframes tnmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tnmRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.tnm {
    position: relative; z-index: 1; width: 100%; max-width: 1080px; max-height: 92vh;
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 20px; background: #0e0f14; border: 1px solid rgba(var(--c),0.3);
    box-shadow: 0 34px 90px rgba(0,0,0,0.75); animation: tnmRise .24s ease;
}
.tnm h2, .tnm h3 { margin: 0; color: var(--tn-ink); font-family: inherit; }
.tnm p { margin: 0; }
.tnm [hidden] { display: none !important; }
.tnm a { text-decoration: none; }

.tnm-close {
    position: absolute; top: 16px; right: 16px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px;
    color: var(--tn-ink); background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.14);
    transition: background .15s, transform .15s;
}
.tnm-close:hover { background: rgba(var(--c),0.35); transform: rotate(90deg); }

/* Head: banner, identity, clock */
.tnm-head {
    position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 32px; align-items: end;
    padding: 76px 34px 26px;
    background:
        linear-gradient(180deg, rgba(14,15,20,0.25) 0%, rgba(14,15,20,0.78) 55%, #0e0f14 100%),
        var(--tnm-banner, none) center 25% / cover no-repeat,
        radial-gradient(700px 260px at 85% 0%, rgba(var(--c),0.3), transparent 70%), #14151b;
}
.tnm-head-main { min-width: 0; }
.tnm-head h2 { font-size: 36px; font-weight: 800; line-height: 1.08; letter-spacing: -0.4px; margin: 12px 0 10px; text-shadow: 0 2px 16px rgba(0,0,0,0.75); }
.tnm-head p { font-size: 14px; line-height: 1.6; color: rgba(243,241,236,0.8); max-width: 620px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tnm-head p:empty { display: none; }

.tnm-clock {
    display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 14px;
    background: rgba(6,7,10,0.72); border: 1px solid rgba(var(--c),0.35); backdrop-filter: blur(8px);
}
.tnm-clock-label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tn-faint); }
.tnm-clock-value { font-size: 30px; font-weight: 800; line-height: 1; color: rgb(var(--c)); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.tnm-clock-bar { height: 5px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.08); margin-top: 4px; }
.tnm-clock-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--c),0.5), rgb(var(--c))); transition: width 1s linear; }
.tnm-clock-range { font-size: 11.5px; color: var(--tn-dim); }
.tnm-clock-range:empty { display: none; }

/* Chips in the head are the card's own, copied over */
.tnm .tnx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tnm .tnx-chip {
    display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; white-space: nowrap;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
    color: var(--tn-dim); background: rgba(8,9,12,0.7); border: 1px solid var(--tn-line);
}
.tnm .tnx-chip i { font-size: 9.5px; }
.tnm .tnx-chip.is-live  { color: rgb(var(--tn-live));  border-color: rgba(var(--tn-live),0.45);  background: rgba(var(--tn-live),0.14); }
.tnm .tnx-chip.is-ready { color: rgb(var(--tn-ready)); border-color: rgba(var(--tn-ready),0.4);  background: rgba(var(--tn-ready),0.12); }
.tnm .tnx-chip.is-later { color: rgb(var(--tn-later)); border-color: rgba(var(--tn-later),0.4);  background: rgba(var(--tn-later),0.12); }
.tnm .tnx-chip.is-age   { color: rgb(var(--age)); border-color: rgba(var(--age),0.4); background: rgba(var(--age),0.1); }
.tnm .tnx-chip.is-live > b { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--tn-live)); animation: tnxPulse 1.6s infinite; }

/* Body */
.tnm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 34px 30px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.tnm-loading { padding: 70px 0; text-align: center; font-size: 26px; color: rgba(var(--c),0.8); }
.tnm-sec { margin-top: 26px; min-width: 0; }
.tnm-sec > h3 {
    display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
    font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--tn-ink);
}
.tnm-sec > h3 > i { color: rgb(var(--c)); font-size: 12px; }
.tnm-sec > h3 > small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--tn-dim); }
.tnm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }

/* How to score */
.tnm-score { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tnm-mon { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--tn-line); }
.tnm-mon-img { width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: rgba(var(--c),0.6); font-size: 20px; background: radial-gradient(circle at 50% 70%, rgba(var(--c),0.22), rgba(0,0,0,0.4) 72%); }
.tnm-mon-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.tnm-mon-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tnm-mon-body b { font-size: 13.5px; font-weight: 700; color: var(--tn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnm-mon-body small { font-size: 11px; color: var(--tn-faint); }
.tnm-mon-pts { font-size: 18px; font-weight: 800; color: rgb(var(--c)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tnm-mon-pts small { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; margin-left: 4px; color: var(--tn-faint); }

/* Ranking prizes */
.tnm-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.tnm-pod {
    --m: 245,196,81;
    display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 13px; border-radius: 12px;
    background: linear-gradient(170deg, rgba(var(--m),0.16), rgba(var(--m),0.03) 70%); border: 1px solid rgba(var(--m),0.38);
}
.tnm-pod.is-2 { --m: 198,206,218; }
.tnm-pod.is-3 { --m: 205,142,92; }
.tnm-pod-rank { font-size: 22px; font-weight: 800; line-height: 1; color: rgb(var(--m)); font-family: Georgia, 'Times New Roman', serif; }
.tnm-pod-rank sup { font-size: 11px; margin-left: 1px; font-family: inherit; }
.tnm-pod b { font-size: 14px; font-weight: 800; color: var(--tn-ink); line-height: 1.25; }
.tnm-ranks { display: flex; flex-direction: column; gap: 6px; }
.tnm-rank { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 14px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--tn-line); }
.tnm-rank span { font-size: 12.5px; color: var(--tn-dim); font-variant-numeric: tabular-nums; }
.tnm-rank b { font-size: 13.5px; font-weight: 700; color: var(--tn-ink); }

/* Current leaders */
.tnm-leaders { display: flex; flex-direction: column; gap: 6px; }
.tnm-lead { --m: 255,255,255; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--tn-line); }
.tnm-lead.is-1 { --m: 245,196,81; border-color: rgba(var(--m),0.38); background: rgba(var(--m),0.07); }
.tnm-lead.is-2 { --m: 198,206,218; }
.tnm-lead.is-3 { --m: 205,142,92; }
.tnm-lead-pos { width: 26px; text-align: center; font-size: 15px; font-weight: 800; color: rgb(var(--m)); font-variant-numeric: tabular-nums; }
.tnm-lead-img { width: 34px; height: 34px; flex: none; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--tn-faint); background: rgba(0,0,0,0.4); }
.tnm-lead-img img { width: 100%; height: 100%; object-fit: cover; }
.tnm-lead b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--tn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnm-lead-pts { font-size: 14px; font-weight: 800; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tnm-lead-pts small { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; margin-left: 4px; color: var(--tn-faint); }
.tnm-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 150px; padding: 22px; border-radius: 12px; border: 1px dashed var(--tn-line); font-size: 13px; }
.tnm-none i { font-size: 22px; color: rgba(var(--c),0.7); }

/* Milestones */
.tnm-you { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-bottom: 14px; padding: 12px 16px; border-radius: 12px; background: rgba(var(--c),0.07); border: 1px solid rgba(var(--c),0.3); font-size: 12.5px; }
.tnm-you b { margin-left: 8px; font-size: 16px; font-weight: 800; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tnm-you-bar { height: 6px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.08); }
.tnm-you-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--c),0.5), rgb(var(--c))); }
.tnm-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 10px; }
.tnm-goal { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--tn-line); }
.tnm-goal.is-reached { border-color: rgba(120,200,140,0.45); background: rgba(120,200,140,0.06); }
.tnm-goal-head { display: flex; align-items: baseline; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid var(--tn-line); }
.tnm-goal-head b { font-size: 22px; font-weight: 800; line-height: 1; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tnm-goal-head span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--tn-faint); }
.tnm-goal-head i { margin-left: auto; align-self: center; color: #8fd49c; font-size: 13px; }
.tnm-goal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tnm-goal li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 2px 9px; }
.tnm-rw-ico { width: 26px; height: 26px; grid-row: span 2; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--tn-faint); }
.tnm-goal li:not(.is-premium) .tnm-rw-ico { grid-row: auto; }
.tnm-rw-ico img { max-width: 26px; max-height: 26px; object-fit: contain; }
.tnm-rw-name { font-size: 12.5px; font-weight: 600; color: var(--tn-ink); line-height: 1.3; }
.tnm-rw-tag { grid-column: 2; font-size: 9.5px; font-weight: 800; letter-spacing: 0.9px; text-transform: uppercase; color: var(--vip, #e67e22); line-height: 1.2; }

/* Foot */
.tnm-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 34px; border-top: 1px solid var(--tn-line); background: rgba(0,0,0,0.3); }
.tnm-foot-note { font-size: 12.5px; }
.tnm-cta {
    margin-left: auto; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
    padding: 12px 22px; border-radius: 11px; font-size: 13px; font-weight: 800; letter-spacing: 0.4px;
    color: #14110c !important; background: rgb(var(--c)); transition: filter .15s, transform .15s;
}
.tnm-cta:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tnm-cta i { transition: transform .18s; }
.tnm-cta:hover i { transform: translateX(4px); }

@media (max-width: 900px) {
    .tnm-wrap { padding: 10px; }
    .tnm-head { grid-template-columns: 1fr; padding: 64px 20px 20px; gap: 18px; }
    .tnm-head h2 { font-size: 26px; }
    .tnm-body { padding: 4px 20px 24px; }
    .tnm-cols { grid-template-columns: 1fr; }
    .tnm-foot { padding: 14px 20px; flex-direction: column; align-items: stretch; }
    .tnm-cta { margin: 0; justify-content: center; }
    .tnm-you { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .tnm-wrap *, .tnm-wrap *::before { animation: none !important; transition: none !important; }
}

/* Monster names wrap rather than truncate — "Phoenix of Darkness" must read whole */
.tnm-mon-body b { white-space: normal; overflow: visible; }
