/* The card tournament (public/card-tournament): the first page, the duels, the result and the ranking.
   Dark and solid like the rest of the site. The cards are the loudest thing on every screen. */

.ct {
    --ct-violet: #7a42ee;
    --ct-violet-soft: #a77bff;
    --ct-lilac: #d9c4ff;
    --ct-gold: #fbbf24;
    --ct-green: #4ade80;
    --ct-card: #15101f;
    --ct-deep: #0f0b17;
    --ct-line: rgba(255, 255, 255, 0.1);
    --ct-muted: #a99fc4;
    max-width: 66rem; margin: 0 auto; padding: 1.25rem 1rem 4rem;
    display: flex; flex-direction: column; gap: 1.5rem;
    color: var(--text-primary, #f8f9fa);
}
.ct [hidden] { display: none !important; }

/* ------------------------------------------------------------------ the top of the page */
.ct-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 1.5rem; padding: 2rem 2rem 2rem 2.2rem; border-radius: 26px; overflow: hidden; border: 1px solid rgba(167, 123, 255, 0.28); background: radial-gradient(80% 120% at 85% 20%, rgba(122, 66, 238, 0.4), transparent 60%), radial-gradient(60% 90% at 0% 100%, rgba(251, 191, 36, 0.12), transparent 60%), linear-gradient(160deg, #1d1240, #0d0818 70%); }
.ct-hero--slim { grid-template-columns: minmax(0, 1fr); padding: 1.8rem 2rem; }
.ct-hero__text { position: relative; z-index: 1; min-width: 0; }
.ct-hero h1 { margin: 0 0 0.7rem; font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
.ct-hero h1 span { background: linear-gradient(95deg, #e6d3ff, #a77bff 50%, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ct-hero p { margin: 0; max-width: 52ch; color: #cfc6e6; font-size: 1.04rem; line-height: 1.6; }
.ct-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #e0b8ff; }
.ct-eyebrow i { color: var(--ct-gold); }
.ct-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.3rem 0 0; padding: 0; }
.ct-facts li { display: flex; flex-direction: column; padding: 0.55rem 0.9rem; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.ct-facts b { font-size: 1.05rem; font-weight: 800; }
.ct-facts span { font-size: 0.72rem; color: var(--ct-muted); font-weight: 700; }

/* three cards fanned out */
.ct-fan { position: relative; height: 21rem; min-width: 0; }
.ct-fan__card { position: absolute; top: 50%; left: 50%; width: 9.4rem; aspect-ratio: 488 / 680; border-radius: 4.5%; background: var(--ct-deep); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65); transition: transform 0.4s ease; }
.ct-fan__card--1 { transform: translate(-125%, -52%) rotate(-12deg); }
.ct-fan__card--2 { transform: translate(-50%, -56%) rotate(0deg); z-index: 2; }
.ct-fan__card--3 { transform: translate(25%, -50%) rotate(12deg); }
.ct-hero:hover .ct-fan__card--1 { transform: translate(-135%, -54%) rotate(-15deg); }
.ct-hero:hover .ct-fan__card--3 { transform: translate(35%, -52%) rotate(15deg); }

/* ------------------------------------------------------------------ set up */
.ct-panel { padding: 1.5rem 1.6rem; border-radius: 22px; background: var(--ct-card); border: 1px solid var(--ct-line); display: flex; flex-direction: column; gap: 1.5rem; }
.ct-note { margin: 0; color: var(--ct-muted); font-size: 0.92rem; line-height: 1.55; }
.ct-error { margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; background: #321418; border: 1px solid #c2414f; color: #ffd9de; font-size: 0.9rem; }

.ct-step h2 { display: flex; align-items: center; gap: 0.65rem; margin: 0 0 0.85rem; font-size: 1.08rem; font-weight: 700; }
.ct-step h2 span { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: linear-gradient(135deg, #7a42ee, #a77bff); color: #fff; font-size: 0.85rem; box-shadow: 0 4px 12px rgba(122, 66, 238, 0.45); }

.ct-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.ct-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 54px; padding: 0.55rem 1.1rem; border-radius: 14px; background: var(--ct-deep); border: 1px solid rgba(255, 255, 255, 0.14); color: #f4efff; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease; }
.ct-chip b { font-size: 0.98rem; font-weight: 700; }
.ct-chip small { font-size: 0.74rem; color: var(--ct-muted); font-weight: 600; }
.ct-chip:hover:not(:disabled) { border-color: var(--ct-violet-soft); transform: translateY(-2px); }
.ct-chip[aria-checked="true"], .ct-chip.is-on { background: linear-gradient(160deg, #35206b, #231546); border-color: var(--ct-violet-soft); box-shadow: 0 0 0 1px var(--ct-violet-soft), 0 8px 22px rgba(122, 66, 238, 0.3); }
.ct-chip:disabled { opacity: 0.38; cursor: not-allowed; }
.ct-chip:focus-visible { outline: 2px solid #d998ff; outline-offset: 2px; }
.ct-chips--sizes { gap: 0.7rem; }
.ct-chip--size { align-items: center; min-width: 8.4rem; padding: 0.7rem 1.2rem; text-align: center; }
.ct-chip--size strong { font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.ct-chip--size b { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-lilac); }
.ct-chip--size small { margin-top: 0.15rem; }
.ct-chips--tabs { margin-top: -0.3rem; }

.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.1rem; }
.ct-actions--center { justify-content: center; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 46px; padding: 0 1.3rem; border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.2); background: #1c1530; color: #f4efff; font: inherit; font-size: 0.95rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease; }
.ct-btn:hover:not(:disabled) { background: #2a1c52; color: #fff; transform: translateY(-1px); }
.ct-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ct-btn:focus-visible, .ct-card:focus-visible { outline: 2px solid #d998ff; outline-offset: 3px; }
.ct-btn--primary { background: linear-gradient(135deg, #7a42ee, #9a63ff); border-color: #8d57fb; color: #fff; box-shadow: 0 10px 26px rgba(122, 66, 238, 0.45); }
.ct-btn--primary:hover:not(:disabled) { background: linear-gradient(135deg, #8a55f6, #a874ff); box-shadow: 0 14px 32px rgba(122, 66, 238, 0.55); }
.ct-btn--big { min-height: 54px; padding: 0 1.8rem; font-size: 1.05rem; border-radius: 15px; }
.ct-btn--quiet { background: transparent; border-color: transparent; color: var(--ct-muted); }
.ct-link { color: var(--ct-lilac); font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.ct-link:hover { text-decoration: underline; }

.ct-rules { font-size: 0.92rem; color: var(--text-secondary, #c4d1e3); border-top: 1px solid var(--ct-line); padding-top: 1rem; }
.ct-rules summary { cursor: pointer; font-weight: 700; color: #e0d4f7; }
.ct-rules ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.ct-rules li { display: flex; gap: 0.8rem; padding: 0.85rem 1rem; border-radius: 14px; background: var(--ct-deep); border: 1px solid var(--ct-line); line-height: 1.5; }
.ct-rules li i { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: #2a1c52; color: var(--ct-lilac); font-size: 0.85rem; }
.ct-rules b { color: #fff; }

/* ------------------------------------------------------------------ the duels */
.ct-play { display: flex; flex-direction: column; gap: 1rem; scroll-margin-top: 5.5rem; }
.ct-bar { display: flex; flex-direction: column; gap: 0.6rem; }
.ct-track { list-style: none; display: flex; gap: 0.4rem; margin: 0; padding: 0; }
.ct-track li { flex: 1; min-width: 0; padding: 0.4rem 0.5rem; border-radius: 10px; text-align: center; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ct-deep); border: 1px solid var(--ct-line); color: #756a92; }
.ct-track li.is-done { color: var(--ct-green); border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.06); }
.ct-track li.is-now { color: #fff; border-color: var(--ct-violet-soft); background: linear-gradient(160deg, #35206b, #231546); box-shadow: 0 0 0 1px var(--ct-violet-soft); }
.ct-bar__line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ct-bar__line b { font-size: 1.15rem; font-weight: 800; }
.ct-bar__line span { font-size: 0.85rem; color: var(--ct-muted); font-variant-numeric: tabular-nums; }
.ct-progress { height: 6px; border-radius: 999px; background: var(--ct-deep); overflow: hidden; }
.ct-progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6d3fd6, #d998ff); transition: width 0.3s ease; }

.ct-stage { position: relative; padding: 1.4rem 1rem; border-radius: 26px; border: 1px solid var(--ct-line); background: radial-gradient(60% 70% at 50% 45%, rgba(122, 66, 238, 0.22), transparent 70%), linear-gradient(180deg, #120d1d, #0b0813); }
.ct-arena { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: center; max-width: 52rem; margin: 0 auto; }
.ct-vs { display: grid; place-items: center; z-index: 1; }
.ct-vs span { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: linear-gradient(135deg, #7a42ee, #d998ff); color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; box-shadow: 0 0 0 5px rgba(122, 66, 238, 0.25), 0 10px 26px rgba(122, 66, 238, 0.55); }

.ct-card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; padding: 0.55rem 0.55rem 0.8rem; border-radius: 22px; background: transparent; border: 2px solid transparent; color: #fff; font: inherit; cursor: pointer; min-width: 0; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.2s ease; }
.ct-card:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(167, 123, 255, 0.55); }
.ct-pic { position: relative; display: block; width: min(100%, 21rem); aspect-ratio: 488 / 680; border-radius: 4.5%; background: var(--ct-deep); overflow: hidden; box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6); transition: box-shadow 0.18s ease; }
.ct-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ct-pic::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.28), transparent 45%); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.ct-card:hover .ct-pic::after { opacity: 1; }
.ct-card:hover .ct-pic { box-shadow: 0 28px 56px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(167, 123, 255, 0.5); }
.ct-badge { position: absolute; top: 0.7rem; right: 0.7rem; z-index: 1; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ct-green); color: #052e13; font-size: 1.1rem; transform: scale(0); transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1); }
.ct-name { font-weight: 700; font-size: 1.08rem; text-align: center; overflow-wrap: anywhere; line-height: 1.25; }
.ct-key { padding: 0.1rem 0.55rem; border-radius: 7px; background: #231a38; border: 1px solid rgba(255, 255, 255, 0.18); border-bottom-width: 3px; font: inherit; font-size: 0.8rem; font-weight: 700; color: #cbbfe6; }
.ct-card.is-picked { border-color: var(--ct-green); background: rgba(74, 222, 128, 0.07); transform: scale(1.03); }
.ct-card.is-picked .ct-pic { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.45), 0 0 50px rgba(74, 222, 128, 0.35); }
.ct-card.is-picked .ct-badge { transform: scale(1); }
.ct-card.is-left { opacity: 0.3; transform: scale(0.94); filter: grayscale(0.7); }
.ct-card.is-entering { animation: ct-in 0.38s ease both; }
.ct-slot:last-child .ct-card.is-entering { animation-delay: 0.06s; }
@keyframes ct-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }

.ct-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.ct-hint { font-size: 0.82rem; color: #8f84ab; }

/* ------------------------------------------------------------------ the result */
.ct-result { position: relative; display: grid; grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); gap: 1.8rem; align-items: start; scroll-margin-top: 5.5rem; }
.ct-champion { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; padding: 1.4rem 1.2rem 1.5rem; border-radius: 26px; background: radial-gradient(90% 60% at 50% 30%, rgba(251, 191, 36, 0.28), transparent 70%), linear-gradient(170deg, #241a3d, #120d1d); border: 1px solid rgba(251, 191, 36, 0.55); box-shadow: 0 0 60px rgba(251, 191, 36, 0.12); text-align: center; }
.ct-crown { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem; border-radius: 999px; background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.4); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fcd34d; }
.ct-champion__pic { width: 100%; max-width: 19rem; aspect-ratio: 488 / 680; border-radius: 4.5%; overflow: hidden; background: var(--ct-deep); box-shadow: 0 0 0 4px #fbbf24, 0 26px 60px rgba(0, 0, 0, 0.65), 0 0 70px rgba(251, 191, 36, 0.3); animation: ct-glow 2.6s ease-in-out infinite alternate; }
.ct-champion__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes ct-glow { from { box-shadow: 0 0 0 4px #fbbf24, 0 26px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(251, 191, 36, 0.2); } to { box-shadow: 0 0 0 4px #fcd34d, 0 26px 60px rgba(0, 0, 0, 0.65), 0 0 90px rgba(251, 191, 36, 0.45); } }
.ct-champion h2 { margin: 0.2rem 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ct-community { margin: 0; padding: 0.5rem 0.8rem; border-radius: 12px; background: rgba(125, 186, 255, 0.1); border: 1px solid rgba(125, 186, 255, 0.25); font-size: 0.88rem; color: #d6eaff; }

.ct-podium { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.ct-podium h3 { margin: 0.4rem 0 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-muted); }
.ct-tiles { display: grid; gap: 0.8rem; }
.ct-tiles--lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ct-tiles--sm { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ct-tile { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.ct-tile__pic { position: relative; aspect-ratio: 488 / 680; border-radius: 4.5%; overflow: hidden; background: var(--ct-deep); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55); }
.ct-tile__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ct-tile--final .ct-tile__pic { box-shadow: 0 0 0 3px #cbd5e1, 0 12px 28px rgba(0, 0, 0, 0.55); }
.ct-tile--semi .ct-tile__pic { box-shadow: 0 0 0 3px #d08a52, 0 12px 28px rgba(0, 0, 0, 0.55); }
.ct-tile__tag { align-self: flex-start; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; background: #231a38; color: #cbbfe6; }
.ct-tile--final .ct-tile__tag { background: #cbd5e1; color: #1e293b; }
.ct-tile--semi .ct-tile__tag { background: #d08a52; color: #2b1606; }
.ct-tile__name { font-size: 0.86rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ct-tiles--sm .ct-tile__name { font-size: 0.76rem; color: #cbbfe6; }
.ct-result > .ct-actions, .ct-result > .ct-note, .ct-result > .ct-error { grid-column: 1 / -1; }
.ct-canvas { display: none; }

.ct-confetti { position: absolute; inset: -1rem 0 auto; height: 0; overflow: visible; pointer-events: none; z-index: 3; }
.ct-confetti i { position: absolute; top: 0; width: 0.55rem; height: 0.9rem; border-radius: 2px; opacity: 0; animation: ct-fall 2.6s ease-out forwards; }
@keyframes ct-fall { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(32rem) rotate(560deg); } }

/* ------------------------------------------------------------------ the ranking */
.ct-week { display: flex; align-items: center; gap: 1.5rem; padding: 1.3rem 1.6rem; border-radius: 22px; background: radial-gradient(60% 120% at 0% 50%, rgba(251, 191, 36, 0.22), transparent 70%), var(--ct-card); border: 1px solid rgba(251, 191, 36, 0.5); }
.ct-week img { flex: none; width: 7.5rem; aspect-ratio: 488 / 680; border-radius: 4.5%; background: var(--ct-deep); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6); transform: rotate(-4deg); }
.ct-week h2 { margin: 0 0 0.4rem; font-size: 1.7rem; font-weight: 800; }
.ct-week p { margin: 0; color: #e6dcfb; }
.ct-week b { color: var(--ct-gold); }

.ct-top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; padding-top: 0.9rem; }
.ct-top3__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.5rem 0.9rem 1.2rem; border-radius: 22px; background: var(--ct-card); border: 1px solid var(--ct-line); text-align: center; min-width: 0; }
.ct-top3__item--gold { order: 2; padding-top: 2rem; padding-bottom: 1.5rem; background: radial-gradient(90% 55% at 50% 25%, rgba(251, 191, 36, 0.24), transparent 70%), var(--ct-card); border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 0 50px rgba(251, 191, 36, 0.12); }
.ct-top3__item--silver { order: 1; border-color: rgba(203, 213, 225, 0.45); }
.ct-top3__item--bronze { order: 3; border-color: rgba(208, 138, 82, 0.5); }
.ct-medal { position: absolute; top: -0.9rem; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-weight: 800; font-size: 1rem; color: #1b1203; background: linear-gradient(135deg, #fde68a, #fbbf24); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.ct-top3__item--silver .ct-medal { background: linear-gradient(135deg, #f1f5f9, #94a3b8); color: #0f172a; }
.ct-top3__item--bronze .ct-medal { background: linear-gradient(135deg, #f0b27a, #b0652e); color: #2b1606; }
.ct-top3__pic { width: 100%; max-width: 15rem; aspect-ratio: 488 / 680; border-radius: 4.5%; overflow: hidden; background: var(--ct-deep); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); }
.ct-top3__item--gold .ct-top3__pic { max-width: 17rem; box-shadow: 0 0 0 3px #fbbf24, 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 50px rgba(251, 191, 36, 0.25); }
.ct-top3__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ct-top3__item h2 { margin: 0.2rem 0 0; font-size: 1.12rem; font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.ct-top3__rate { display: flex; flex-direction: column; line-height: 1.1; }
.ct-top3__rate b { font-size: 2rem; font-weight: 800; color: var(--ct-green); letter-spacing: -0.02em; }
.ct-top3__rate span { font-size: 0.78rem; color: var(--ct-muted); font-weight: 600; }
.ct-top3__titles { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.7rem; border-radius: 999px; background: rgba(251, 191, 36, 0.12); color: #fcd34d; font-size: 0.78rem; font-weight: 700; }

.ct-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ct-rank li { display: grid; grid-template-columns: 2rem 3.75rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.55rem 0.9rem 0.55rem 0.7rem; border-radius: 14px; background: #120d1b; border: 1px solid rgba(255, 255, 255, 0.07); }
.ct-rank__n { font-weight: 800; font-size: 1.05rem; color: var(--ct-muted); text-align: center; font-variant-numeric: tabular-nums; }
.ct-rank img, .ct-rank__none { width: 3.75rem; aspect-ratio: 488 / 680; border-radius: 5px; background: var(--ct-deep); }
.ct-top3__pic .ct-rank__none { display: block; width: 100%; height: 100%; }
.ct-rank__main { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.ct-rank__main b { overflow-wrap: anywhere; }
.ct-rank__main small { color: var(--ct-muted); font-size: 0.78rem; }
.ct-rank__rate { font-size: 1.3rem; font-weight: 800; color: var(--ct-green); font-variant-numeric: tabular-nums; }
.ct-bar-rate { height: 7px; border-radius: 999px; background: var(--ct-deep); overflow: hidden; }
.ct-bar-rate i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #16a34a, #4ade80); }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 899.98px) {
    .ct-hero { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.3rem; }
    .ct-fan { height: 15rem; }
    .ct-fan__card { width: 8rem; }
    .ct-rules ul { grid-template-columns: minmax(0, 1fr); }
    .ct-result { grid-template-columns: minmax(0, 1fr); }
    .ct-champion { max-width: 26rem; margin: 0 auto; width: 100%; }
}
@media (max-width: 767.98px) {
    .ct-week { flex-direction: column; text-align: center; }
    .ct-panel { padding: 1.15rem 1rem; }
}
@media (max-width: 479.98px) {
    .ct { padding-left: 0.75rem; padding-right: 0.75rem; gap: 1.2rem; }
    .ct-chip--size { min-width: 6.6rem; padding: 0.6rem 0.8rem; }
    .ct-stage { padding: 0.8rem 0.4rem; border-radius: 20px; }
    .ct-arena { gap: 0.2rem; }
    .ct-vs span { width: 2.3rem; height: 2.3rem; font-size: 0.75rem; box-shadow: 0 0 0 3px rgba(122, 66, 238, 0.25); }
    .ct-vs { margin: 0 -1.1rem; }
    .ct-card { padding: 0.3rem 0.3rem 0.6rem; border-radius: 16px; }
    .ct-name { font-size: 0.86rem; }
    .ct-key, .ct-hint { display: none; }
    .ct-track li { font-size: 0.62rem; padding: 0.3rem 0.2rem; }
    .ct-track li:not(.is-now) { flex: 0 0 1.6rem; font-size: 0; padding: 0.3rem 0; }
    .ct-track li:not(.is-now)::before { content: ''; display: block; height: 0.5rem; }
    .ct-tiles--lg { gap: 0.5rem; }
    .ct-tiles--sm { gap: 0.4rem; }
    .ct-tiles--sm .ct-tile__name { display: none; }
    .ct-rank li { grid-template-columns: 1.4rem 3rem minmax(0, 1fr) auto; gap: 0.6rem; }
    .ct-rank img, .ct-rank__none { width: 3rem; }
}
@media (hover: none) { .ct-card:hover { background: transparent; border-color: transparent; } .ct-card:hover .ct-pic { box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6); } .ct-card:hover .ct-pic::after { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .ct-card, .ct-progress i, .ct-chip, .ct-btn, .ct-fan__card, .ct-badge { transition: none; }
    .ct-card.is-entering, .ct-champion__pic, .ct-confetti i { animation: none; }
    .ct-confetti { display: none; }
}

/* ------------------------------------------------------------------ the new parts: modes, narrowing, a friend's bracket, a closer look */
.ct button, .ct a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ct-step h2 em { margin-left: 0.2rem; padding: 0.12rem 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-style: normal; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ct-muted); }

.ct-chip--mode { flex: 1 1 14rem; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.8rem; row-gap: 0; padding: 0.7rem 1.1rem; }
.ct-chip--mode i { grid-row: 1 / span 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: #2a1c52; color: var(--ct-lilac); font-size: 1rem; }
.ct-chip--mode[aria-checked="true"] i { background: linear-gradient(135deg, #7a42ee, #a77bff); color: #fff; }

.ct-chips--variants { gap: 0.45rem; }
.ct-chip--variant { flex-direction: row; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.9rem; border-radius: 999px; }
.ct-chip--variant small { font-size: 0.7rem; }
.ct-dot { flex: none; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); }
.ct-dot--W { background: #f8f3d6; }
.ct-dot--U { background: #4aa3e8; }
.ct-dot--B { background: #4b3f55; }
.ct-dot--R { background: #e8573c; }
.ct-dot--G { background: #3fa35c; }
.ct-dot--M { background: linear-gradient(135deg, #fbbf24, #e8573c 50%, #4aa3e8); }
.ct-dot--C { background: #b9bec7; }
.ct-dot--L { background: #a87b4f; }

.ct-challenge { align-items: flex-start; }
.ct-challenge h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.ct-challenge p { margin: 0; color: #cfc6e6; line-height: 1.55; max-width: 56ch; }
.ct-challenge__icon { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 16px; background: linear-gradient(135deg, #7a42ee, #d998ff); color: #fff; font-size: 1.3rem; box-shadow: 0 10px 26px rgba(122, 66, 238, 0.45); }

.ct-versus { margin-top: 0.4rem; padding: 1rem 1.1rem; border-radius: 18px; background: linear-gradient(160deg, rgba(122, 66, 238, 0.2), rgba(122, 66, 238, 0.05)); border: 1px solid rgba(167, 123, 255, 0.4); }
.ct-versus h3 { margin: 0 0 0.6rem; }
.ct-versus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ct-versus li { position: relative; padding-left: 1.5rem; line-height: 1.5; font-size: 0.95rem; color: #ece4ff; }
.ct-versus li::before { content: '\f007'; font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif; font-weight: 800; position: absolute; left: 0; top: 0.1rem; font-size: 0.8rem; color: var(--ct-violet-soft); }
.ct-btn--challenge { border-color: rgba(167, 123, 255, 0.6); background: rgba(122, 66, 238, 0.18); }
.ct-chips--modes { margin-top: -0.6rem; }
.ct-chips--modes .ct-chip { flex-direction: row; align-items: center; gap: 0.5rem; }

/* the two cards of a duel sit in a slot, with the magnifier next to them */
.ct-slot { position: relative; min-width: 0; }
.ct-slot .ct-card { width: 100%; }
.ct-zoom { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: 0.1rem auto 0; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #e6dcfb; font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.ct-zoom:hover { background: rgba(122, 66, 238, 0.55); color: #fff; }
.ct-zoom:focus-visible { outline: 2px solid #d998ff; outline-offset: 2px; }

.ct-hint__touch { display: none; }
@media (hover: none) { .ct-hint__touch { display: inline; } .ct-hint__keys { display: none; } }

.ct-zoombox { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 1rem; }
.ct-zoombox__back { position: absolute; inset: 0; border: 0; background: rgba(5, 3, 12, 0.88); cursor: zoom-out; }
.ct-zoombox__panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; width: min(94vw, 27rem); max-height: 94dvh; }
.ct-zoombox__panel img { display: block; width: auto; max-width: 100%; max-height: 66dvh; aspect-ratio: 488 / 680; object-fit: contain; border-radius: 4.5%; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8); background: var(--ct-deep); }
.ct-zoombox__name { font-size: 1.2rem; font-weight: 800; text-align: center; }

@media (max-width: 575.98px) {
    .ct { padding-top: 0.75rem; }
    .ct-hero { padding: 1.2rem 1.1rem; border-radius: 20px; }
    .ct-hero h1 { font-size: 2.1rem; }
    .ct-hero p { font-size: 0.96rem; }
    .ct-facts li { padding: 0.45rem 0.7rem; }
    .ct-fan { height: 12.5rem; }
    .ct-fan__card { width: 6.8rem; }
    .ct-step h2 { font-size: 1rem; }
    .ct-chips { gap: 0.45rem; }
    .ct-chip { padding: 0.5rem 0.85rem; min-height: 48px; }
    .ct-chip--mode { flex-basis: 100%; }
    .ct-chip--size { flex: 1 1 calc(50% - 0.35rem); min-width: 0; }
    .ct-chip--variant { padding: 0.35rem 0.75rem; }
    .ct-btn--big { width: 100%; }
    .ct-actions .ct-link { width: 100%; text-align: center; padding: 0.4rem 0; }
    .ct-actions--center .ct-btn { flex: 1 1 calc(50% - 0.6rem); min-width: 0; padding: 0 0.8rem; }

    .ct-play { gap: 0.7rem; }
    .ct-stage { padding: 0.6rem 0.25rem 0.8rem; }
    .ct-arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.15rem; }
    .ct-vs { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; z-index: 3; pointer-events: none; }
    .ct-card { padding: 0.25rem 0.25rem 0.55rem; }
    .ct-zoom { min-height: 2.6rem; padding: 0 0.8rem; font-size: 0.8rem; }
    .ct-badge { width: 2rem; height: 2rem; font-size: 0.9rem; top: 0.45rem; right: 0.45rem; }
    .ct-tools { gap: 0.5rem; }
    .ct-tools .ct-btn { flex: 1 1 0; min-width: 0; }
    .ct-tools .ct-hint { order: 3; flex: 1 1 100%; text-align: center; }

    .ct-result { gap: 1.2rem; }
    .ct-champion { padding: 1.1rem 0.9rem 1.2rem; }
    .ct-champion h2 { font-size: 1.35rem; }
    .ct-versus { padding: 0.9rem; }
    .ct-top3__item--gold .ct-top3__pic, .ct-top3__pic { max-width: 14rem; }
    .ct-week img { width: 6rem; }
    .ct-zoombox { padding: 0.6rem; }
    .ct-zoombox__panel img { max-height: 62dvh; }
}.ct-zoombox .ct-actions { flex-wrap: nowrap; width: 100%; }
.ct-zoombox .ct-btn { flex: 1 1 auto; white-space: nowrap; }
.ct-zoombox__panel img { cursor: zoom-out; }
/* an image with width and height attributes keeps its height unless told otherwise */
.ct-fan__card, .ct-rank img, .ct-week img { height: auto; }
@media (max-width: 575.98px) {
    .ct-fan { height: 10rem; }
    .ct-fan__card { width: 5.9rem; }
}

/* the mana symbols of Magic (Mana Font), on the cards, the winners, the filters and the ranking */
.ct-mana { display: inline-flex; align-items: center; justify-content: center; gap: 0.22rem; min-height: 1.2rem; font-size: 0.95rem; line-height: 1; }
.ct-mana:empty { display: none; }
.ct-mana--lg { font-size: 1.2rem; }
.ct-mana .ms { font-size: inherit; }
.ct-tile .ct-mana { align-self: flex-start; font-size: 0.82rem; }
.ct-tiles--sm .ct-tile .ct-mana { font-size: 0.74rem; }
.ct-card .ct-mana { margin-top: -0.1rem; }
.ct-rank__main .ct-mana { align-self: flex-start; font-size: 0.8rem; }
.ct-top3__item .ct-mana { font-size: 1rem; }
.ct-chip--variant .ms { font-size: 1.05rem; }
.ct-chip--variant .ms-land { font-size: 1.15rem; color: #d9b98f; }
.ct-gem { font-size: 0.9rem; }
.ct-gem--common { color: #9aa0a6; }
.ct-gem--uncommon { color: #b8d4e8; }
.ct-gem--rare { color: #fbbf24; }
.ct-gem--mythic { color: #f97316; }

/* the ranking page: the format and the kind of ranking, two rows that line up */
.ct-filters { display: flex; flex-direction: column; gap: 0.8rem; }
.ct-filter { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.ct-filter__label { flex: none; width: 6.2rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-muted); }
.ct-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.ct-tab { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.15rem; border-radius: 14px; background: var(--ct-deep); border: 1px solid rgba(255, 255, 255, 0.14); color: #f4efff; font-size: 0.95rem; font-weight: 700; text-decoration: none; transition: border-color 0.12s ease, background 0.12s ease; }
.ct-tab:hover { border-color: var(--ct-violet-soft); color: #fff; }
.ct-tab.is-on { background: linear-gradient(160deg, #35206b, #231546); border-color: var(--ct-violet-soft); box-shadow: inset 0 0 0 1px var(--ct-violet-soft); }
.ct-tab:focus-visible, .ct-seg__item:focus-visible { outline: 2px solid #d998ff; outline-offset: 2px; }
.ct-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 16px; background: var(--ct-deep); border: 1px solid rgba(255, 255, 255, 0.14); }
.ct-seg__item { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-width: 9.5rem; min-height: 38px; padding: 0 1.1rem; border-radius: 12px; color: #cbbfe6; font-size: 0.95rem; font-weight: 700; text-decoration: none; transition: background 0.12s ease, color 0.12s ease; }
.ct-seg__item:hover { color: #fff; }
.ct-seg__item.is-on { background: linear-gradient(135deg, #7a42ee, #9a63ff); color: #fff; box-shadow: 0 6px 16px rgba(122, 66, 238, 0.4); }
@media (max-width: 575.98px) {
    .ct-filter { flex-direction: column; align-items: stretch; gap: 0.45rem; }
    .ct-filter__label { width: auto; }
    .ct-tab { min-height: 44px; padding: 0 0.95rem; }
    .ct-seg { display: flex; }
    .ct-seg__item { flex: 1 1 0; min-width: 0; }
}

/* a phone: the podium of the most loved cards looks like the one on a computer, and the text is a little smaller */
@media (max-width: 767.98px) {
    .ct-top3 { gap: 0.45rem; padding-top: 0.9rem; }
    .ct-top3__item { gap: 0.35rem; padding: 1.3rem 0.4rem 0.8rem; border-radius: 16px; }
    .ct-top3__item--gold { padding-top: 1.6rem; padding-bottom: 1rem; }
    .ct-medal { top: -0.8rem; width: 1.8rem; height: 1.8rem; font-size: 0.85rem; }
    .ct-top3__pic, .ct-top3__item--gold .ct-top3__pic { max-width: 100%; border-radius: 4%; }
    .ct-top3__item h2 { font-size: 0.76rem; line-height: 1.2; }
    .ct-top3__rate b { font-size: 1.2rem; }
    .ct-top3__rate span { font-size: 0.6rem; }
    .ct-top3__titles { padding: 0.1rem 0.45rem; font-size: 0.62rem; gap: 0.25rem; }
    .ct-top3__item .ct-mana { font-size: 0.78rem; gap: 0.15rem; }
}
@media (max-width: 575.98px) {
    .ct-top3__pic, .ct-top3__item--gold .ct-top3__pic { max-width: 100%; }
    .ct-hero h1 { font-size: 1.95rem; }
    .ct-hero p { font-size: 0.9rem; }
    .ct-eyebrow { font-size: 0.68rem; }
    .ct-facts b { font-size: 0.95rem; }
    .ct-facts span { font-size: 0.66rem; }
    .ct-step h2 { font-size: 0.94rem; }
    .ct-chip b { font-size: 0.9rem; }
    .ct-chip small { font-size: 0.68rem; }
    .ct-chip--size strong { font-size: 1.7rem; }
    .ct-chip--size b { font-size: 0.68rem; }
    .ct-chip--mode small { font-size: 0.68rem; }
    .ct-chip--variant small { font-size: 0.64rem; }
    .ct-btn { font-size: 0.9rem; }
    .ct-btn--big { font-size: 0.98rem; }
    .ct-link { font-size: 0.86rem; }
    .ct-note, .ct-error { font-size: 0.86rem; }
    .ct-rules { font-size: 0.86rem; }
    .ct-bar__line b { font-size: 1.05rem; }
    .ct-bar__line span { font-size: 0.78rem; }
    .ct-track li { font-size: 0.6rem; }
    .ct-name { font-size: 0.8rem; }
    .ct-zoom { font-size: 0.76rem; }
    .ct-crown { font-size: 0.68rem; }
    .ct-champion h2 { font-size: 1.25rem; }
    .ct-community { font-size: 0.82rem; }
    .ct-podium h3 { font-size: 0.72rem; }
    .ct-tile__name { font-size: 0.8rem; }
    .ct-tile__tag { font-size: 0.62rem; }
    .ct-versus li { font-size: 0.88rem; }
    .ct-week h2 { font-size: 1.45rem; }
    .ct-week p { font-size: 0.9rem; }
    .ct-rank__main b { font-size: 0.9rem; }
    .ct-rank__main small { font-size: 0.72rem; }
    .ct-rank__rate { font-size: 1.15rem; }
    .ct-tab { font-size: 0.9rem; }
    .ct-seg__item { font-size: 0.9rem; }
    .ct-filter__label { font-size: 0.68rem; }
    .ct-challenge h2 { font-size: 1.3rem; }
    .ct-challenge p { font-size: 0.9rem; }
    .ct-zoombox__name { font-size: 1.1rem; }
}

/* the ranking, better looking: the art of each card, the number that ranks in front and the raw result behind it */
.ct-top3__item { background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%), var(--ct-card); }
.ct-top3__item--gold { background: radial-gradient(90% 50% at 50% 18%, rgba(251, 191, 36, 0.3), transparent 70%), linear-gradient(180deg, rgba(251, 191, 36, 0.08), transparent 45%), var(--ct-card); }
.ct-top3__rate { align-items: center; gap: 0.1rem; }
.ct-top3__rate b { line-height: 1; }
.ct-top3__cap { font-size: 0.64rem !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #86efac !important; }
.ct-top3__rate em { margin-top: 0.15rem; font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--ct-muted); }

.ct-rank li { grid-template-columns: 2.2rem 3.6rem minmax(0, 1fr) auto; gap: 0.9rem; padding: 0.6rem 1rem 0.6rem 0.7rem; border-radius: 16px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)); border: 1px solid rgba(255, 255, 255, 0.08); }
.ct-rank__n { font-size: 1.15rem; color: #d6c8f5; }
.ct-rank__art { position: relative; display: block; width: 3.6rem; height: 3.6rem; border-radius: 13px; overflow: hidden; background: var(--ct-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 14px rgba(0, 0, 0, 0.45); }
.ct-rank__art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.6); transform-origin: 50% 26%; border-radius: 0; }
.ct-rank__main { gap: 0.28rem; }
.ct-rank__main b { font-size: 1rem; }
.ct-bar-rate { height: 8px; }
.ct-bar-rate i { background: linear-gradient(90deg, #7a42ee, #4ade80); box-shadow: 0 0 10px rgba(74, 222, 128, 0.35); }
.ct-rank__rate { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.ct-rank__rate b { font-size: 1.45rem; font-weight: 800; color: var(--ct-green); letter-spacing: -0.02em; }
.ct-rank__rate small { margin-top: 0.2rem; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ct-muted); }

@media (max-width: 767.98px) {
    .ct-top3__rate em { font-size: 0.6rem; line-height: 1.2; text-align: center; }
    .ct-top3__cap { font-size: 0.52rem !important; }
}
@media (max-width: 575.98px) {
    .ct-rank li { grid-template-columns: 1.5rem 3rem minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.5rem 0.7rem 0.5rem 0.5rem; }
    .ct-rank__art { width: 3rem; height: 3rem; border-radius: 11px; }
    .ct-rank__n { font-size: 1rem; }
    .ct-rank__main b { font-size: 0.88rem; }
    .ct-rank__rate b { font-size: 1.2rem; }
    .ct-rank__rate small { font-size: 0.54rem; }
}