/* ==========================================================================
   Engagement features: tournaments, discount codes, Super Points, waitlist
   ========================================================================== */

/* ---------- Tournaments: hero + 3D trophy ---------- */
.tour-hero { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 4vw, 48px); background: radial-gradient(120% 120% at 85% 10%, #2a2410 0%, var(--ink-bg) 55%); color: #fff; }
.tour-hero::after { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 60%; background: radial-gradient(50% 60% at 50% 0%, rgba(255,91,20,.25), transparent 70%); pointer-events: none; }
.tour-hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.tour-hero .lead { color: rgba(255,255,255,.78); max-width: 52ch; }
.tour-hero .eyebrow { color: #FFC857; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: var(--fs-sm); letter-spacing: .04em; text-transform: uppercase; }
.tour-hero .btn-outline { color: #fff; background: transparent; border-color: rgba(255,255,255,.45); }
.tour-hero .btn-outline:hover { background: rgba(255,255,255,.1); }
.tour-hero .btn-primary { background: #fff; color: var(--ink-fixed); }
.trophy3d { position: relative; height: 300px; display: grid; place-items: center; perspective: 900px; }
.tr-spin { position: relative; width: 150px; height: 230px; transform-style: preserve-3d; animation: trSpin 9s ease-in-out infinite; }
@keyframes trSpin { 0%, 100% { transform: rotateY(-22deg) rotateX(6deg); } 50% { transform: rotateY(22deg) rotateX(2deg) translateY(-8px); } }
.tr-cup { position: absolute; inset-inline-start: 15px; top: 0; width: 120px; height: 120px; border-radius: 10px 10px 60px 60px; background: linear-gradient(100deg, #8a6405 0%, #FFD86B 30%, #fff3c4 42%, #E3AE2A 60%, #8a6405 100%); box-shadow: inset 0 -12px 24px rgba(0,0,0,.25), 0 20px 40px -18px rgba(255,200,87,.7); }
.tr-cup::before { content: ""; position: absolute; inset-inline-start: 6px; inset-inline-end: 6px; top: 0; height: 16px; border-radius: 50%; background: radial-gradient(60% 80% at 50% 40%, #7a5604, #4b3502); }
.tr-handle { position: absolute; top: 18px; width: 40px; height: 62px; border: 10px solid #D9A22A; border-radius: 50%; }
.tr-handle.l { inset-inline-start: -16px; border-inline-end-color: transparent; transform: rotate(10deg); }
.tr-handle.r { inset-inline-end: -16px; border-inline-start-color: transparent; transform: rotate(-10deg); }
.tr-stem { position: absolute; inset-inline-start: 62px; top: 116px; width: 26px; height: 52px; background: linear-gradient(90deg, #8a6405, #FFD86B 45%, #8a6405); }
.tr-base { position: absolute; inset-inline-start: 20px; top: 166px; width: 110px; height: 46px; border-radius: 8px; background: linear-gradient(180deg, #1f2a25, #0b100e); box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 18px 30px -12px rgba(0,0,0,.7); }
.tr-base::after { content: "CHAMPIONS"; position: absolute; inset: 0; display: grid; place-items: center; color: #FFD86B; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.tr-shine { position: absolute; inset-inline-start: 34px; top: 14px; width: 18px; height: 84px; border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0)); transform: rotate(8deg); animation: trShine 4.5s ease-in-out infinite; }
@keyframes trShine { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
.tr-glow { position: absolute; bottom: 30px; width: 220px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,200,87,.45), transparent); filter: blur(4px); }
@media (max-width: 760px) { .tour-hero-in { grid-template-columns: minmax(0, 1fr); } .trophy3d { height: 230px; order: -1; } .tr-spin { transform: scale(.8); } }

/* Cards */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.tour-card { overflow: hidden; display: flex; flex-direction: column; animation: vtIn 550ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.tour-card.is-cancelled { opacity: .55; }
.tour-media { aspect-ratio: 16 / 9; position: relative; }
.tour-media img { transition: transform 700ms var(--ease); }
.tour-card:hover .tour-media img { transform: scale(1.06); }
.tour-media .media-top { position: absolute; inset: 12px 12px auto; display: flex; justify-content: space-between; gap: 6px; }
.tour-champ { position: absolute; inset-inline-start: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: var(--r-pill); background: linear-gradient(100deg, #E3AE2A, #FFD86B); color: #2b1d00; font-weight: 800; font-size: var(--fs-xs); box-shadow: 0 8px 18px -8px rgba(227,174,42,.9); }
.tour-body { padding: 16px; display: grid; gap: 6px; }
.tour-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.tour-facts span { display: inline-flex; gap: 6px; align-items: center; }
.tour-spots { display: grid; gap: 6px; margin-top: 6px; }
.tour-spots .meter span { background: linear-gradient(90deg, var(--blaze), #FFB48F); }

/* Detail head */
.tour-head { position: relative; color: #fff; background: linear-gradient(180deg, rgba(13,20,17,.45), rgba(13,20,17,.92)), var(--cover) center / cover; padding: clamp(28px, 5vw, 56px) 0; }
.tour-head .crumbs, .tour-head .crumbs a { color: rgba(255,255,255,.75); }
.tour-head .lead { color: rgba(255,255,255,.8); }
.tour-head .lead a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tour-title { margin-top: 10px; max-width: 18ch; }
.tour-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tour-stats > div { display: grid; gap: 2px; min-width: 130px; padding: 12px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); animation: vtIn 600ms var(--ease) backwards; }
.tour-stats > div:nth-child(2) { animation-delay: 80ms; } .tour-stats > div:nth-child(3) { animation-delay: 160ms; }
.tour-stats .xs { color: rgba(255,255,255,.7); }
.tour-stats b { font-size: 1.25rem; }
.tour-in { padding: 8px 12px; }
.tour-panel { margin-top: 18px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tour-panel > *, .dash-card > div { min-width: 0; }
.tour-over { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .tour-over { grid-template-columns: minmax(0, 1fr); } }
.tour-timeline { display: grid; gap: 0; margin-top: 12px; }
.tour-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 16px 22px; border-inline-start: 2px solid var(--line); margin-inline-start: 6px; }
.tour-timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blaze); }
.tour-timeline li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.tour-strip { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: linear-gradient(100deg, #fff6dc, var(--surface)); border: 1px solid #f1d98a; color: var(--ink); transition: transform 300ms var(--ease), box-shadow 300ms; }
.tour-strip > svg:first-child { color: #B07D06; }
.tour-strip:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* Fixtures */
.fx-day { display: grid; gap: 8px; animation: vtIn 500ms var(--ease) backwards; animation-delay: calc(var(--i) * 50ms); }
.fx-day ul { display: grid; gap: 6px; }
.fx { display: grid; grid-template-columns: 64px minmax(0, 1fr) 70px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-2); }
.fx.is-mine { border-color: var(--turf); box-shadow: inset 4px 0 0 var(--turf); }
.fx-time { color: var(--ink-3); font-size: var(--fs-sm); }
.fx-team { font-weight: 650; text-align: end; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-team.away { text-align: start; }
.fx-team.is-win { color: var(--turf); }
.fx-score { text-align: center; font-weight: 800; padding: 4px 0; border-radius: 8px; background: var(--surface-2); }
.fx-pens { grid-column: 2 / -1; text-align: center; }
@media (max-width: 520px) { .fx { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); } .fx-time { grid-column: 1 / -1; } }

/* Standings */
.standings th, .standings td { white-space: nowrap; }
.standings tr.is-top td:first-child { color: #B07D06; font-weight: 800; }
.standings tr.is-mine td { background: var(--turf-tint); }
.form { display: inline-flex; gap: 3px; }
.form i { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; }
.form .f-W { background: var(--turf-fill); } .form .f-D { background: var(--ink-3); } .form .f-L { background: var(--danger-fill); }

/* Bracket */
.bracket { display: grid; grid-template-columns: repeat(calc(var(--rounds) + 1), minmax(170px, 1fr)); gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.br-round { display: grid; grid-template-rows: auto 1fr; gap: 10px; animation: vtIn 550ms var(--ease) backwards; animation-delay: calc(var(--i) * 120ms); }
.br-name { color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.br-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.br-match { position: relative; display: grid; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-1); }
.br-match > span { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: var(--fs-sm); }
.br-match > span + span { border-top: 1px solid var(--line-2); }
.br-match b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-match i { font-style: normal; font-weight: 800; }
.br-match .is-win { background: var(--turf-tint); }
.br-match .is-win b { color: var(--turf-deep); font-weight: 800; }
.br-match.is-tbd { opacity: .55; border-style: dashed; }
.br-match::after { content: ""; position: absolute; inset-inline-end: -19px; top: 50%; width: 18px; height: 2px; background: var(--line); }
.br-round:last-child .br-match::after, .br-champ .br-match::after { display: none; }
.champ-card { display: grid; justify-items: center; gap: 8px; padding: 18px 12px; border-radius: var(--r-md); text-align: center; background: linear-gradient(140deg, #fff3c4, #E3AE2A); color: #2b1d00; box-shadow: 0 16px 30px -16px rgba(227,174,42,.9); animation: champIn 900ms var(--ease-spring) backwards; }
@keyframes champIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }

/* Team lists */
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.team-list li { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-2); animation: vtIn 450ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.team-list li.is-mine { border-color: var(--turf); background: var(--turf-tint); }
.team-list li.is-empty { border-style: dashed; background: transparent; }
.team-list .team-ava, .team-ava.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; transform: none; }
.result-list { display: grid; gap: 8px; margin-top: 12px; }
.result-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr) 64px auto 64px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.rs-team { font-weight: 650; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-team.away { text-align: start; }
.rs-in { text-align: center; padding: 6px; height: 38px; }
.rs-pens { height: 38px; font-size: var(--fs-xs); }
@media (max-width: 760px) { .result-list li { grid-template-columns: minmax(0, 1fr) 56px auto 56px minmax(0, 1fr); } .result-list .fx-time { grid-column: 1 / -1; } .result-list .rs-pens, .result-list [data-save-result] { grid-column: 1 / -1; } }

/* ---------- Discount codes ---------- */
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.code-card { position: relative; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--line); box-shadow: var(--shadow-1); animation: vtIn 500ms var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); transition: transform 350ms var(--ease); }
.code-card:hover { transform: translateY(-3px); }
.code-card.is-paused, .code-card.is-expired, .code-card.is-used-up { opacity: .7; }
.code-top { display: flex; justify-content: space-between; gap: 8px; }
.code-big { display: inline-flex; gap: 8px; align-items: center; margin: 12px 0 6px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--ink-bg); color: #fff; font-size: 1.3rem; font-weight: 850; letter-spacing: .08em; }
.code-big:hover { background: var(--blaze); }
.code-use { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin: 10px 0; }
.code-input { text-transform: uppercase; letter-spacing: .06em; flex: 1; }
.ticket-code-card { position: relative; display: grid; gap: 4px; justify-items: start; padding: 18px 22px; border-radius: var(--r-md); color: #fff; background: linear-gradient(120deg, var(--blaze), #ff8a4d); box-shadow: 0 16px 30px -18px rgba(255,91,20,.9); overflow: hidden; }
.ticket-code-card b { font-size: 1.6rem; letter-spacing: .1em; }
.tcc-cut { position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--surface); }
.tcc-cut.l { inset-inline-start: -11px; } .tcc-cut.r { inset-inline-end: -11px; }

/* ---------- Super Points ---------- */
.points-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin-top: 24px; }
@media (max-width: 860px) { .points-wrap { grid-template-columns: minmax(0, 1fr); } }
.points-card { position: relative; overflow: hidden; display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--r-lg); color: #fff; min-height: 260px; background: radial-gradient(120% 120% at 100% 0%, #4a3a12, #1a1508 60%); box-shadow: var(--shadow-3); transform-style: preserve-3d; }
.points-card.tier-silver { background: radial-gradient(120% 120% at 100% 0%, #6b7780, #1c2226 60%); }
.points-card.tier-gold { background: radial-gradient(120% 120% at 100% 0%, #8a6405, #241a02 60%); }
.pc-label { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.pc-tier { padding: 4px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pc-bal { font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.4rem); line-height: 1; letter-spacing: -.02em; }
.pc-sub { color: rgba(255,255,255,.75); }
.pc-prog { height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; margin-top: 8px; }
.pc-prog span { display: block; height: 100%; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, #FFD86B, #fff3c4); animation: msGrow 1300ms var(--ease) backwards; }
.pc-btn { justify-self: start; margin-top: 10px; background: #fff; color: #1a1508; }
.pc-btn:disabled { opacity: .5; }
.pc-coin { position: absolute; inset-inline-end: -20px; bottom: -30px; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 80px; font-weight: 900; color: rgba(255,216,107,.18); border: 10px solid rgba(255,216,107,.12); transform: translateZ(30px) rotate(-14deg); animation: coinFloat 6s ease-in-out infinite; }
@keyframes coinFloat { 50% { transform: translateZ(30px) rotate(-4deg) translateY(-8px); } }
.how-list { display: grid; gap: 10px; margin-top: 12px; }
.how-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.how-list svg { color: var(--blaze); flex: none; margin-top: 2px; }
.points-earn { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: linear-gradient(100deg, #fff6dc, transparent); color: #6b4d00; font-size: var(--fs-sm); }

/* ---------- Waitlist ---------- */
.slot .wl-on { position: absolute; top: 3px; inset-inline-start: 3px; color: var(--info); }
.slot[data-wait] { cursor: pointer; }
.slot[data-wait]:hover { outline: 2px dashed var(--info); outline-offset: -2px; }
.wl-box { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 8px 4px; }
.wl-bell { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--info); background: var(--info-tint); animation: bellRing 1.6s ease-in-out 2; }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }
.wl-row.is-free { border-color: var(--turf); box-shadow: inset 4px 0 0 var(--turf); }
.wl-tag { font-size: 10px; padding: 2px 6px; }
.home-tours h2 svg { vertical-align: -3px; color: #B07D06; }

/* Tournaments "coming soon" (2026-11-15) */
.tour-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tour-perk { display: grid; gap: 6px; padding: 18px; }
.tour-perk svg { color: var(--blaze, #E8590C); }
.tour-soon-lg { font-size: var(--fs-sm); padding: 8px 14px; align-self: center; }
@media (max-width: 720px) { .tour-perks { grid-template-columns: 1fr; } }
