/* ── THESPURSWATCH SHARED STYLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:      #0e1555;
  --navy-mid:  #141c6a;
  --navy-dark: #090e3a;
  --yellow:    #d4c44a;
  --yellow-h:  #bfb038;
  --white:     #ffffff;
  --bg:        #f5f5f5;
  --text:      #111;
  --muted:     #888;
  --border:    #e2e2e2;
  --light:     #f0f0f0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 1.2rem; }

/* Battle is a game screen, not an article - locking it to a phone-width
   column (rather than the site's normal 780px reading width) means it
   never floats in the middle of a wide desktop window with dead space
   either side, and since every Battle layout below the 560px breakpoint
   was specifically designed and measured at mobile widths, staying
   under that breakpoint here keeps it in that intended mode always,
   regardless of the actual browser window size. */
body.tsw-battle-page .wrap { max-width: 480px; }

/* ── HEADER ── */
header { background: var(--navy-dark); border-bottom: 3px solid var(--yellow); }
.header-inner {
  max-width: 780px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.2rem; gap: 1rem;
}
.logo-name { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--white); line-height: 1; }
.logo-name span { color: var(--yellow); }
.logo-tag { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.28); margin-top: 0.12rem; }
.header-right { display: flex; align-items: center; gap: 0.7rem; }
.header-right a { font-size: 0.7rem; color: rgba(255,255,255,0.4); font-weight: 600; transition: color 0.2s; }
.header-right a:hover { color: var(--yellow); }
.btn-sub { background: var(--yellow); color: var(--navy); padding: 0.42rem 1rem; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; transition: background 0.2s; display: inline-block; white-space: nowrap; }
.btn-sub:hover { background: var(--yellow-h); color: white; }

/* ── NAV — two-tier dark neon gaming UI: 5-tab primary bar with
   icon-over-label tabs, 3-tab segmented control underneath ── */
nav { background: #060a1c; position: sticky; top: 0; z-index: 100; padding: 0.55rem 0.9rem 0.7rem; }

.nav-primary {
  display: flex; max-width: 480px; margin: 0 auto 0.45rem;
  background: #0a0f28; border: 1px solid rgba(212,196,74,0.28); border-radius: 16px;
  overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.nav-primary-tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.22rem; padding: 0.48rem 0.15rem 0.4rem; text-decoration: none;
  border-right: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav-primary-tab:last-child { border-right: none; }
.nav-tab-icon { width: 17px; height: 17px; color: #7b81a3; transition: color 0.2s ease; }
.nav-tab-icon svg { width: 100%; height: 100%; display: block; }
.nav-tab-label {
  font-size: 0.54rem; font-weight: 700; color: #7b81a3; letter-spacing: 0.01em;
  text-align: center; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  transition: color 0.2s ease;
}
.nav-primary-tab.active {
  background: linear-gradient(155deg, rgba(212,196,74,0.4), rgba(160,130,15,0.22));
  box-shadow: inset 0 0 14px rgba(212,196,74,0.22), 0 0 12px rgba(212,196,74,0.35);
}
.nav-primary-tab.active .nav-tab-icon, .nav-primary-tab.active .nav-tab-label { color: #fff; }
.nav-primary-tab:hover .nav-tab-icon, .nav-primary-tab:hover .nav-tab-label { color: #cfd3ee; }

.nav-secondary {
  display: flex; max-width: 400px; margin: 0 auto; gap: 4px;
  background: #0a0f28; border: 1px solid rgba(103,150,255,0.22); border-radius: 14px; padding: 4px;
}
.nav-secondary-tab {
  flex: 1; text-align: center; padding: 0.4rem 0.3rem; border-radius: 10px;
  font-size: 0.66rem; font-weight: 700; color: #7b81a3; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-secondary-tab.active {
  background: linear-gradient(155deg, rgba(212,196,74,0.42), rgba(160,130,15,0.26));
  border-color: #d4c44a; color: #fff; font-weight: 800;
  box-shadow: 0 0 12px rgba(212,196,74,0.5), inset 0 0 8px rgba(212,196,74,0.22);
}
.nav-secondary-tab:hover:not(.active) { color: #cfd3ee; }

@media (max-width: 400px) {
  .nav-tab-label { font-size: 0.5rem; }
}

/* ── SECTION LABEL ── */
.section-label { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid rgba(212,196,74,0.45); padding-bottom: 0.5rem; margin: 1.8rem 0 1rem; }
.section-label h2 { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #d4c44a; }
.section-label a { font-size: 0.62rem; color: var(--muted); font-weight: 600; transition: color 0.2s; }
.section-label a:hover { color: #d4c44a; }

/* ── CATEGORY TAG ── */
.cat { display: inline-block; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border-left: 3px solid var(--yellow); padding-left: 0.45rem; color: #67e8ff; margin-bottom: 0.4rem; }

/* ── ARTICLE CARD (image left, text right) ── */
.article-list { display: flex; flex-direction: column; background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; margin-bottom: 1.8rem; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.article-item { display: grid; grid-template-columns: 180px 1fr; border-bottom: 1px solid rgba(103,232,255,0.12); overflow: hidden; transition: background 0.15s; }
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: rgba(103,232,255,0.06); }
.article-item-img { width: 180px; height: 125px; background: linear-gradient(135deg, #1a2d6e, #06102e); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; position: relative; }
.article-item-img span { font-size: 2.8rem; color: rgba(255,255,255,0.85); transition: transform 0.3s; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.article-item:hover .article-item-img span { transform: scale(1.1); }
.article-item-img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(212,196,74,0.15), transparent 60%); }

.col-card-img { width: 100%; height: 155px; background: linear-gradient(135deg, #1a2d6e, #06102e); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.col-card-img span { font-size: 3.6rem; color: rgba(255,255,255,0.85); transition: transform 0.3s; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.col-card:hover .col-card-img span { transform: scale(1.08); }
.col-card-img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(212,196,74,0.15), transparent 60%); }

/* Category-themed thumbnail backgrounds so different story types look visually distinct */
.thumb-transfer { background: linear-gradient(135deg, #7a1f1f, #2b0a0a) !important; }
.thumb-match { background: linear-gradient(135deg, #145c3a, #052414) !important; }
.thumb-feature { background: linear-gradient(135deg, #4a2170, #1c0b30) !important; }
.thumb-news { background: linear-gradient(135deg, #1a2d6e, #06102e) !important; }
.thumb-opinion { background: linear-gradient(135deg, #7a4a12, #2e1a05) !important; }
.article-item-body { padding: 0.9rem 1rem; display: flex; flex-direction: column; justify-content: center; }
.article-item-title { font-family: 'Source Serif 4', serif; font-size: 0.9rem; font-weight: 700; line-height: 1.4; color: #f1f4ff; margin-bottom: 0.3rem; transition: color 0.2s; }
.article-item:hover .article-item-title { color: #ffd63d; }
.article-item-excerpt { font-size: 0.76rem; color: rgba(230,233,255,0.65); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0.3rem; }
.article-item-meta { font-size: 0.62rem; color: rgba(230,233,255,0.5); font-weight: 500; }

/* ── TWO COL GRID ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1.8rem; }
.col-card { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; display: block; overflow: hidden; transition: background 0.15s; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.col-card:hover { background: linear-gradient(155deg, #1a237a 0%, #0d123f 100%); }
.col-card-body { padding: 0.85rem; }
.col-card-title { font-family: 'Source Serif 4', serif; font-size: 0.86rem; font-weight: 700; line-height: 1.38; color: #f1f4ff; margin-bottom: 0.28rem; transition: color 0.2s; }
.col-card:hover .col-card-title { color: #ffd63d; }
.col-card-excerpt { font-size: 0.72rem; color: rgba(230,233,255,0.65); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0.28rem; }
.col-card-meta { font-size: 0.6rem; color: rgba(230,233,255,0.5); }

/* ── HERO ── */
.hero { display: block; background: var(--navy-dark); position: relative; overflow: hidden; margin: 1.2rem 0; }
.hero-visual { height: 340px; background: linear-gradient(160deg, #1a2d6e 0%, #060b2a 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.hero-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(6,11,42,0.1) 30%, rgba(6,11,42,0.96) 100%); }
.hero-bg-word { font-weight: 800; font-size: 10rem; color: rgba(255,255,255,0.025); letter-spacing: -0.04em; user-select: none; line-height: 1; }
.hero-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.4rem; z-index: 2; }
.hero-cat { display: inline-block; background: var(--yellow); color: var(--navy); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.18rem 0.55rem; margin-bottom: 0.5rem; }
.hero-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.35rem; color: var(--white); line-height: 1.25; margin-bottom: 0.4rem; transition: color 0.2s; }
.hero:hover .hero-title { color: var(--yellow); }
.hero-meta { font-size: 0.67rem; color: rgba(255,255,255,0.4); font-weight: 500; }

/* ── NEWSLETTER BLOCK ── */
.nl-block { background: var(--navy); padding: 2rem 1.5rem; text-align: center; margin-bottom: 1.8rem; }
.nl-block h2 { font-family: 'Source Serif 4', serif; font-weight: 700; font-style: italic; font-size: 1.2rem; color: var(--white); margin-bottom: 0.3rem; }
.nl-block p { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-bottom: 1.1rem; }
.nl-form { display: flex; max-width: 380px; margin: 0 auto; }
.nl-form input { flex: 1; border: none; padding: 0.65rem 0.85rem; font-family: 'Inter', sans-serif; font-size: 0.78rem; outline: none; color: var(--text); }
.nl-form button { background: var(--yellow); color: var(--navy); border: none; padding: 0.65rem 1rem; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.nl-form button:hover { background: var(--yellow-h); color: white; }
.nl-note { font-size: 0.6rem; color: rgba(255,255,255,0.22); margin-top: 0.55rem; }

/* ── FIXTURES ── */
.mini { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; overflow: hidden; margin-bottom: 1.8rem; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.mini-head { background: rgba(2,7,25,0.4); border-bottom: 1px solid rgba(103,232,255,0.16); padding: 0.55rem 0.9rem; display: flex; align-items: center; justify-content: space-between; }
.mini-head h3 { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: white; }
.mini-head h3 em { color: var(--yellow); font-style: normal; }
.mini-head a { font-size: 0.58rem; color: rgba(255,255,255,0.38); transition: color 0.2s; }
.mini-head a:hover { color: var(--yellow); }
.fix-lbl { padding: 0.28rem 0.9rem; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(230,233,255,0.55); background: rgba(2,7,25,0.35); border-bottom: 1px solid rgba(103,232,255,0.14); }
.fx { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: center; padding: 0.45rem 0.9rem; border-bottom: 1px solid rgba(103,232,255,0.12); font-size: 0.7rem; color: rgba(230,233,255,0.85); }
.fx:last-child { border-bottom: none; }
.fx-h { font-weight: 600; }
.fx-a { font-weight: 600; text-align: right; }
.fx-h.sp, .fx-a.sp { color: #ffd63d; }
.fx-sc { text-align: center; font-weight: 700; font-size: 0.68rem; color: #d4c44a; background: rgba(212,196,74,0.12); border-radius: 2px; padding: 0.14rem 0.25rem; }
.fx-sc.up { color: rgba(230,233,255,0.5); font-weight: 500; font-size: 0.62rem; background: none; }

/* ── TABLE ── */
.tbl-h { display: grid; grid-template-columns: 18px 1fr 22px 22px 22px 28px; padding: 0.28rem 0.9rem; background: rgba(2,7,25,0.35); border-bottom: 1px solid rgba(103,232,255,0.14); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(230,233,255,0.55); }
.tbl-h span:not(:nth-child(2)) { text-align: center; }
.tbl-r { display: grid; grid-template-columns: 18px 1fr 22px 22px 22px 28px; padding: 0.36rem 0.9rem; border-bottom: 1px solid rgba(103,232,255,0.12); font-size: 0.7rem; color: rgba(230,233,255,0.85); transition: background 0.15s; }
.tbl-r:last-child { border-bottom: none; }
.tbl-r:hover { background: rgba(103,232,255,0.06); }
.tbl-r.spurs { background: rgba(212,196,74,0.1); font-weight: 700; }
.t-pos { color: rgba(230,233,255,0.5); font-size: 0.64rem; text-align: center; }
.t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.7rem; }
.t-name.sp { color: #ffd63d; }
.t-n { text-align: center; color: rgba(230,233,255,0.5); font-size: 0.66rem; }
.t-pts { text-align: center; font-weight: 700; color: #d4c44a; }
.rel { border-left: 3px solid #e74c3c; }
.eur { border-left: 3px solid #3498db; }

/* ── SUPPORT ── */
.support-block { background: var(--white); border: 1px solid var(--border); padding: 1.6rem 1.4rem; text-align: center; margin-bottom: 1.8rem; }
.support-block h3 { font-family: 'Source Serif 4', serif; font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 0.3rem; }
.support-block p { font-size: 0.76rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.9rem; max-width: 400px; margin-left: auto; margin-right: auto; }
.bmc-btn { display: inline-block; background: var(--yellow); color: var(--navy); padding: 0.55rem 1.4rem; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; transition: background 0.2s; }
.bmc-btn:hover { background: var(--yellow-h); color: white; }

/* ── FOOTER ── */
footer { background: var(--navy-dark); border-top: 3px solid var(--yellow); }
.footer-inner { max-width: 780px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; padding: 2rem 1.2rem; }
.footer-logo { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1rem; color: white; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.footer-logo span { color: var(--yellow); }
.footer-about { font-size: 0.72rem; color: rgba(255,255,255,0.33); line-height: 1.65; margin-bottom: 0.8rem; }
.footer-soc { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.footer-soc a { font-size: 0.68rem; color: rgba(255,255,255,0.38); font-weight: 600; transition: color 0.2s; }
.footer-soc a:hover { color: var(--yellow); }
.footer-col h4 { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--yellow); margin-bottom: 0.7rem; padding-bottom: 0.35rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.footer-col ul li a { font-size: 0.72rem; color: rgba(255,255,255,0.38); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--yellow); }
.footer-bottom { background: #050830; padding: 0.7rem 1.2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }
.footer-copy { font-size: 0.62rem; color: rgba(255,255,255,0.18); }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { font-size: 0.62rem; color: rgba(255,255,255,0.2); letter-spacing: 0.07em; text-transform: uppercase; transition: color 0.2s; }
.footer-links a:hover { color: var(--yellow); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .article-item { grid-template-columns: 1fr; }
  .article-item-img { width: 100%; height: 170px; }
  .two-col { grid-template-columns: 1fr; }
  .hero-visual { height: 240px; }
  .hero-bg-word { font-size: 5rem; }
  .nl-form { flex-direction: column; }
  .header-inner { flex-wrap: wrap; gap: 0.6rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 400px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: #0a0f35; border-top: 3px solid var(--yellow);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-text { font-size: 0.78rem; color: rgba(255,255,255,0.75); line-height: 1.6; flex: 1; min-width: 200px; }
.cookie-banner-text a { color: var(--yellow); text-decoration: underline; }
.cookie-banner-btns { display: flex; gap: 0.6rem; flex-shrink: 0; flex-wrap: wrap; }
.cookie-btn-accept { background: var(--yellow); color: var(--navy); border: none; padding: 0.5rem 1.2rem; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.cookie-btn-accept:hover { background: var(--yellow-h); }
.cookie-btn-decline { background: transparent; color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.2); padding: 0.5rem 1.2rem; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.cookie-btn-decline:hover { color: white; border-color: white; }

/* ── NOTIFICATION PROMPT ── */
.notif-prompt {
  position: fixed; top: 80px; right: 1.2rem; z-index: 9998;
  background: white; border: 1px solid var(--border);
  border-top: 3px solid var(--yellow);
  padding: 1.1rem 1.2rem; max-width: 300px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transform: translateX(120%);
  transition: transform 0.4s ease;
}
.notif-prompt.show { transform: translateX(0); }
.notif-prompt-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
.notif-prompt-title { font-weight: 700; font-size: 0.82rem; color: var(--navy); margin-bottom: 0.3rem; }
.notif-prompt-text { font-size: 0.74rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.9rem; }
.notif-prompt-btns { display: flex; gap: 0.5rem; }
.notif-btn-yes { background: var(--navy); color: white; border: none; padding: 0.45rem 1rem; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: background 0.2s; flex: 1; }
.notif-btn-yes:hover { background: var(--navy-mid, #141c6a); }
.notif-btn-no { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 0.45rem 1rem; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.7rem; cursor: pointer; transition: all 0.2s; flex: 1; }
.notif-btn-no:hover { color: var(--text); border-color: #aaa; }

/* ============================================================
   STATS PAGE
   ============================================================ */
.stats-hero {
  background: var(--navy-dark, #090e3a);
  border-bottom: 3px solid var(--yellow);
  padding: 2.2rem 1.2rem 1.6rem;
  text-align: center;
}
.stats-hero h1 {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--white);
  margin-bottom: 0.4rem;
}
.stats-hero h1 span { color: var(--yellow); font-style: italic; }
.stats-hero p { font-size: 0.8rem; color: rgba(255,255,255,0.45); max-width: 460px; margin: 0 auto; line-height: 1.6; }

.stats-tabs {
  display: flex; gap: 0; overflow-x: auto;
  background: var(--navy-mid, #141c6a);
  position: sticky; top: 0; z-index: 90;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stats-tabs::-webkit-scrollbar { display: none; }
.stats-tab-btn {
  flex-shrink: 0; padding: 0.75rem 1.1rem;
  font-family: 'Barlow', 'Inter', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); background: none; border: none;
  border-bottom: 3px solid transparent; cursor: pointer;
  transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.stats-tab-btn.active, .stats-tab-btn:hover { color: var(--yellow); border-bottom-color: var(--yellow); }

.stats-panel { display: none; padding: 1.5rem 0; }
.stats-panel.active { display: block; }

/* stat card grid for current season */
.stat-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.stat-card { background: var(--white); padding: 1.2rem 0.8rem; text-align: center; }
.stat-card .num { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.7rem; color: var(--navy); line-height: 1; }
.stat-card .lbl { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.4rem; }

/* legacy records tables */
.legacy-table { width: 100%; background: var(--white); border: 1px solid var(--border); border-collapse: collapse; font-size: 0.78rem; margin-bottom: 1.5rem; }
.legacy-table th { background: var(--navy); color: white; padding: 0.5rem 0.7rem; text-align: left; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
.legacy-table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); }
.legacy-table tr:nth-child(even) td { background: var(--light); }
.legacy-table tr.gold td { background: rgba(212,196,74,0.12); font-weight: 700; }
.legacy-rank { color: var(--muted); font-weight: 700; width: 24px; }
.legacy-name { font-weight: 700; color: var(--text); }
.legacy-sub { font-size: 0.68rem; color: var(--muted); display: block; margin-top: 0.1rem; }

/* honours grid */
.honours-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.honour-card { background: var(--white); padding: 1.2rem 0.8rem; text-align: center; }
.honour-card .trophy-count { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2.2rem; color: var(--yellow-h, #bfb038); line-height: 1; }
.honour-card .trophy-name { font-size: 0.68rem; font-weight: 700; color: var(--navy); margin-top: 0.4rem; }
.honour-card .trophy-years { font-size: 0.6rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.5; }

/* season history table */
.season-hist-table { width: 100%; background: var(--white); border: 1px solid var(--border); border-collapse: collapse; font-size: 0.76rem; margin-bottom: 1.5rem; }
.season-hist-table th { background: var(--navy); color: white; padding: 0.5rem 0.6rem; text-align: center; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; }
.season-hist-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); text-align: center; }
.season-hist-table tr:nth-child(even) td { background: var(--light); }
.season-hist-table td.season-label { text-align: left; font-weight: 700; }
.pos-pill { display: inline-block; min-width: 22px; padding: 0.1rem 0.4rem; border-radius: 2px; font-weight: 700; color: white; font-size: 0.72rem; }
.pos-top { background: #2563eb; }
.pos-mid { background: #6b7280; }
.pos-low { background: #dc2626; }

/* compare tool */
.compare-wrap { background: var(--white); border: 1px solid var(--border); padding: 1.2rem; margin-bottom: 1.5rem; }
.compare-selects { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.8rem; align-items: center; margin-bottom: 1.2rem; }
.compare-vs { font-family: 'Source Serif 4', serif; font-weight: 700; font-style: italic; font-size: 1.1rem; color: var(--yellow-h, #bfb038); text-align: center; }
.compare-select {
  width: 100%; padding: 0.6rem 0.7rem; border: 2px solid var(--navy);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.82rem;
  background: var(--navy); color: white; cursor: pointer;
}
.compare-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.compare-card { background: var(--white); padding: 1.2rem; }
.compare-card-name { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.05rem; color: var(--navy); margin-bottom: 0.2rem; }
.compare-card-years { font-size: 0.68rem; color: var(--muted); margin-bottom: 1rem; }
.compare-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.compare-stat-row:last-child { border-bottom: none; }
.compare-stat-row .stat-label { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; }
.compare-stat-row .stat-val { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.compare-stat-row .stat-val.winner { color: var(--navy); background: rgba(212,196,74,0.25); padding: 0.1rem 0.5rem; }

/* squad list live */
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.squad-card { background: var(--white); padding: 0.8rem; text-align: center; }
.squad-card .num { font-family: 'Source Serif 4', serif; font-weight: 700; color: var(--yellow-h, #bfb038); font-size: 1.2rem; }
.squad-card .name { font-size: 0.75rem; font-weight: 700; color: var(--text); margin: 0.2rem 0; }
.squad-card .pos { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.stats-note { font-size: 0.7rem; color: var(--muted); background: var(--light); border-left: 3px solid var(--yellow); padding: 0.7rem 0.9rem; margin-bottom: 1.5rem; line-height: 1.6; }

@media (max-width: 640px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .honours-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-cards { grid-template-columns: 1fr; }
  .compare-selects { grid-template-columns: 1fr; }
  .compare-vs { display: none; }
  .legacy-table, .season-hist-table { font-size: 0.68rem; }
}

/* ============================================================
   COMPARE TOOL — SEARCH AS YOU TYPE
   ============================================================ */
.tsw-search-wrap { position: relative; }
.tsw-search-input {
  width: 100%; padding: 0.7rem 0.9rem; border: 2px solid var(--navy);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.85rem;
  background: var(--navy); color: white; outline: none;
}
.tsw-search-input::placeholder { color: rgba(255,255,255,0.4); font-weight: 500; }
.tsw-search-list {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: white; border: 2px solid var(--navy); border-top: none;
  max-height: 260px; overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.tsw-search-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0.9rem; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.tsw-search-item:last-child { border-bottom: none; }
.tsw-search-item:hover { background: var(--light); }
.tsw-search-name { font-weight: 700; font-size: 0.8rem; color: var(--text); }
.tsw-search-years { font-size: 0.66rem; color: var(--muted); }
.tsw-search-empty { padding: 0.8rem; font-size: 0.78rem; color: var(--muted); text-align: center; }
.compare-count-note { font-size: 0.68rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }

/* ============================================================
   GAMES HUB
   ============================================================ */
.game-card {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #131a3d 0%, #0a0e28 55%, #070a1c 100%);
  border: 1px solid rgba(139,92,246,0.28); border-radius: 22px;
  padding: 1.4rem; margin-bottom: 1.8rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 1px 0 rgba(255,255,255,0.06) inset, 0 12px 40px rgba(76,29,149,0.18), 0 4px 16px rgba(0,0,0,0.4);
}
/* Extremely faint tactical-pitch lines behind the content - a centre
   circle and halfway line, purple at near-zero opacity so it reads as
   texture, never competes with real content. */
.game-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 17%, rgba(167,139,250,0.05) 17.4%, rgba(167,139,250,0.05) 17.6%, transparent 18%),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(167,139,250,0.06) calc(50% - 0.5px), rgba(167,139,250,0.06) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.game-card > * { position: relative; z-index: 1; }
.game-card h3 { font-family: 'Source Serif 4', serif; font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.game-card p.game-desc { font-size: 0.8rem; color: rgba(230,233,255,0.65); line-height: 1.65; margin-bottom: 1rem; }

/* Guess the Spur */
.gts-input-wrap { position: relative; margin-bottom: 1rem; }
.gts-guesses { display: flex; flex-direction: column; gap: 1px; background: rgba(139,92,246,0.18); border: 1px solid rgba(139,92,246,0.28); border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.gts-guess-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 1px; background: rgba(139,92,246,0.18); }
.gts-guess-row.header { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(230,233,255,0.55); }
.gts-cell { background: #0e1230; padding: 0.6rem 0.5rem; text-align: center; font-size: 0.78rem; font-weight: 600; color: #fff; display: flex; align-items: center; justify-content: center; gap: 0.2rem; }
.gts-cell.name-cell { justify-content: flex-start; font-weight: 700; }
.gts-cell.correct { background: rgba(46,125,70,0.28); color: #6ee89a; }
.gts-cell.wrong { background: rgba(184,48,47,0.25); color: #ff8b96; }
.gts-arrow { font-weight: 900; font-size: 0.9rem; }
.gts-arrow.up { color: #6ea8ff; }
.gts-arrow.down { color: #ff6978; }
.gts-arrow.eq { color: #6ee89a; }
.gts-status { text-align: center; font-weight: 700; font-size: 0.9rem; padding: 0.8rem; border-radius: 8px; margin-bottom: 1rem; }
.gts-status.win { background: rgba(46,125,70,0.25); color: #6ee89a; }
.gts-status.playing { background: rgba(139,92,246,0.14); color: rgba(230,233,255,0.7); }
.gts-count { font-size: 0.7rem; color: rgba(230,233,255,0.5); text-align: center; margin-bottom: 0.8rem; }

/* Higher or Lower */
.hl-wrap { display: flex; flex-direction: column; gap: 1px; background: rgba(139,92,246,0.18); border: 1px solid rgba(139,92,246,0.28); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.hl-player { background: linear-gradient(155deg, #171d47, #0d1130); color: white; padding: 1.5rem; text-align: center; }
.hl-player.revealed { background: linear-gradient(155deg, #0d1130, #070a1c); }
.hl-player-name { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.3rem; margin-bottom: 0.3rem; }
.hl-player-pos { font-size: 0.7rem; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.8rem; }
.hl-player-stat { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2.4rem; color: #ffd63d; }
.hl-player-stat-label { font-size: 0.68rem; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; text-transform: uppercase; }
.hl-vs { background: rgba(139,92,246,0.14); text-align: center; padding: 0.5rem; font-family: 'Source Serif 4', serif; font-style: italic; font-weight: 700; color: rgba(230,233,255,0.6); font-size: 0.9rem; }
.hl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.hl-btn { padding: 0.9rem; border-radius: 10px; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; border: 2px solid rgba(139,92,246,0.4); background: rgba(139,92,246,0.1); color: #a78bfa; cursor: pointer; transition: all 0.2s; }
.hl-btn:hover { background: rgba(139,92,246,0.3); color: #fff; }
.hl-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.hl-streak-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: rgba(230,233,255,0.55); padding-top: 0.6rem; border-top: 1px solid rgba(139,92,246,0.2); }
.hl-streak-num { font-weight: 700; color: #ffd63d; font-size: 1rem; text-shadow: 0 0 8px rgba(255,214,61,0.35); }

/* Trivia Quiz */
.quiz-progress { font-size: 0.68rem; color: rgba(230,233,255,0.5); text-align: center; margin-bottom: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.quiz-question { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 1.2rem; text-align: center; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.quiz-opt { padding: 0.85rem 1rem; border-radius: 10px; border: 2px solid rgba(139,92,246,0.28); background: rgba(2,7,25,0.5); color: #fff; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.85rem; text-align: left; cursor: pointer; transition: all 0.2s; }
.quiz-opt:hover { border-color: #a78bfa; }
.quiz-opt.correct { border-color: #6ee89a; background: rgba(46,125,70,0.28); color: #6ee89a; }
.quiz-opt.wrong { border-color: #ff8b96; background: rgba(184,48,47,0.25); color: #ff8b96; }
.quiz-opt:disabled { cursor: default; }
.quiz-score-final { text-align: center; padding: 2rem 1rem; }
.quiz-score-final .big-score { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 3rem; color: #ffd63d; text-shadow: 0 0 14px rgba(255,214,61,0.35); }
.quiz-score-final p { font-size: 0.85rem; color: rgba(230,233,255,0.55); margin: 0.5rem 0 1.2rem; }
.quiz-retry-btn { display: inline-block; border-radius: 10px; background: linear-gradient(155deg, #7c5cd6, #4c2a99); color: white; padding: 0.7rem 1.6rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; border: none; cursor: pointer; box-shadow: 0 3px 10px rgba(124,92,214,0.3); }

@media (max-width: 640px) {
  .gts-guess-row { grid-template-columns: 1.3fr 0.8fr 0.8fr 0.8fr 0.8fr; }
  .gts-cell { font-size: 0.68rem; padding: 0.5rem 0.3rem; }
  .hl-player-name { font-size: 1.05rem; }
  .hl-player-stat { font-size: 1.8rem; }
}

/* ============================================================
   SPURDLE — WORDLE-STYLE GAME
   ============================================================ */
.spurdle-grid { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-bottom: 1.2rem; }
.spurdle-row { display: flex; gap: 6px; }
.spurdle-tile {
  width: 42px; height: 42px;
  border: 2px solid rgba(139,92,246,0.3); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.2rem;
  text-transform: uppercase; color: #fff;
  background: rgba(2,7,25,0.5);
  transition: transform 0.15s;
}
.spurdle-tile.filled { border-color: rgba(230,233,255,0.4); }
.spurdle-tile.correct { background: #2e7d46; border-color: #2e7d46; color: white; }
.spurdle-tile.present { background: #d4c44a; border-color: #d4c44a; color: #1a1400; }
.spurdle-tile.absent { background: #3a3f52; border-color: #3a3f52; color: rgba(255,255,255,0.6); }
.spurdle-tile.pop { animation: spurdlePop 0.15s ease; }
@keyframes spurdlePop { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.spurdle-shake { animation: spurdleShake 0.35s; }
@keyframes spurdleShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }

.spurdle-msg { text-align: center; font-weight: 700; font-size: 0.85rem; border-radius: 8px; padding: 0.7rem; margin-bottom: 1rem; min-height: 2.4rem; }
.spurdle-msg.win { background: rgba(46,125,70,0.25); color: #6ee89a; }
.spurdle-msg.lose { background: rgba(184,48,47,0.22); color: #ff8b96; }
.spurdle-msg.info { background: rgba(139,92,246,0.14); color: rgba(230,233,255,0.6); }

.spurdle-input-row { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.2rem; }
.spurdle-input {
  flex: 1; max-width: 280px; border-radius: 8px;
  padding: 0.7rem; border: 2px solid rgba(139,92,246,0.4); background: rgba(2,7,25,0.5); color: #fff; text-align: center;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1rem; letter-spacing: 0.15em;
  text-transform: uppercase; outline: none;
}
.spurdle-input:focus { border-color: #a78bfa; box-shadow: 0 0 10px rgba(139,92,246,0.4); }
.spurdle-input::placeholder { color: rgba(230,233,255,0.35); }
.spurdle-submit-btn {
  background: linear-gradient(155deg, #7c5cd6, #4c2a99); color: white; border: none; border-radius: 8px; padding: 0.7rem 1.3rem;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 3px 10px rgba(124,92,214,0.3);
}
.spurdle-submit-btn:hover { filter: brightness(1.12); }

.spurdle-keyboard { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-bottom: 1rem; }
.spurdle-kb-row { display: flex; gap: 4px; }
.spurdle-key {
  min-width: 30px; height: 42px; padding: 0 6px;
  background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.2); border-radius: 4px;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.75rem;
  text-transform: uppercase; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.spurdle-key:hover { background: rgba(139,92,246,0.3); }
.spurdle-key.wide { min-width: 50px; font-size: 0.62rem; }
.spurdle-key.correct { background: #2e7d46; border-color: #2e7d46; color: white; }
.spurdle-key.present { background: #d4c44a; border-color: #d4c44a; color: #1a1400; }
.spurdle-key.absent { background: #3a3f52; border-color: #3a3f52; color: rgba(255,255,255,0.6); }

@media (max-width: 400px) {
  .spurdle-tile { width: 34px; height: 34px; font-size: 1rem; }
  .spurdle-key { min-width: 24px; height: 38px; font-size: 0.68rem; }
  .spurdle-key.wide { min-width: 40px; font-size: 0.56rem; }
}

/* ============================================================
   SPURSBOXD
   ============================================================ */
.sb-profile-bar {
  background: var(--navy); color: white; padding: 1rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.8rem;
}
.sb-profile-left { display: flex; align-items: center; gap: 0.8rem; }
.sb-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; font-family: 'Source Serif 4', serif; flex-shrink: 0; }
.sb-username { font-weight: 700; font-size: 0.95rem; }
.sb-username-sub { font-size: 0.65rem; color: rgba(255,255,255,0.4); letter-spacing: 0.05em; }
.sb-edit-btn { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 0.4rem 0.9rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; }
.sb-edit-btn:hover { background: rgba(255,255,255,0.1); }

.sb-filters { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.sb-filter-select, .sb-filter-search { padding: 0.55rem 0.8rem; border: 1px solid var(--border); font-family: 'Inter', sans-serif; font-size: 0.78rem; background: white; color: var(--text); }
.sb-filter-search { flex: 1; min-width: 140px; }

.sb-match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.7rem; margin-bottom: 1.5rem; }
.sb-match-card {
  position: relative; background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%);
  border: 1px solid rgba(103,232,255,0.16); border-left: 3px solid var(--sb-outcome-color, rgba(212,196,74,0.55));
  border-radius: 4px; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sb-match-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.45), 0 0 0 1px rgba(103,232,255,0.3); }
.sb-match-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.sb-match-comp { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #67e8ff; }
.sb-match-badge { font-size: 0.62rem; font-weight: 800; padding: 0.1rem 0.4rem; color: white; border-radius: 2px; flex-shrink: 0; }
.sb-match-badge.W { background: #2e7d46; }
.sb-match-badge.D { background: #6b7280; }
.sb-match-badge.L { background: #b8302f; }
.sb-match-opp { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1rem; color: #f1f4ff; }
.sb-match-meta { font-size: 0.68rem; color: rgba(230,233,255,0.55); }
.sb-match-score { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.3rem; color: #d4c44a; text-shadow: 0 0 10px rgba(212,196,74,0.25); }
.sb-match-user-stars { margin-top: 0.2rem; }

/* Star widget */
.sb-stars { position: relative; display: inline-block; font-size: 1.3rem; line-height: 1; height: 1.3rem; user-select: none; }
.sb-stars .sb-stars-back, .sb-stars .sb-stars-front { white-space: nowrap; letter-spacing: 2px; }
.sb-stars .sb-stars-back { color: #d8d8d8; }
.sb-stars .sb-stars-front { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--yellow-h, #bfb038); pointer-events: none; }
.sb-stars.interactive { cursor: pointer; }
.sb-stars-zones { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; }
.sb-star-zone { flex: 1; position: relative; }
.sb-star-zone::before, .sb-star-zone::after { content: ''; position: absolute; top: 0; bottom: 0; width: 50%; }
.sb-star-zone::before { left: 0; }
.sb-star-zone::after { left: 50%; }

/* Match modal */
.sb-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(2,4,20,0.75); z-index: 500; align-items: center; justify-content: center; padding: 1.2rem; }
.sb-modal-overlay.show { display: flex; }
.sb-modal { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.2); border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); max-width: 440px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 1.5rem; position: relative; }
.sb-modal-close { position: absolute; top: 0.8rem; right: 0.8rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: rgba(230,233,255,0.6); }
.sb-modal-comp { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #67e8ff; margin-bottom: 0.4rem; }
.sb-modal-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.3rem; color: #f1f4ff; margin-bottom: 0.3rem; }
.sb-modal-meta { font-size: 0.75rem; color: rgba(230,233,255,0.55); margin-bottom: 1rem; }
.sb-modal-score-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.sb-modal-score { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2rem; color: #d4c44a; text-shadow: 0 0 10px rgba(212,196,74,0.25); }
.sb-modal-rate-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(230,233,255,0.55); margin-bottom: 0.5rem; }
.sb-modal-stars-big { font-size: 2.2rem; margin-bottom: 1rem; }
.sb-modal-review { width: 100%; background: rgba(2,7,25,0.55); border: 1px solid rgba(103,232,255,0.2); border-radius: 4px; color: #f1f4ff; padding: 0.7rem; font-family: 'Inter', sans-serif; font-size: 0.82rem; resize: vertical; min-height: 70px; margin-bottom: 1rem; }
.sb-modal-review::placeholder { color: rgba(230,233,255,0.4); }
.sb-modal-save-btn { width: 100%; background: var(--yellow); color: var(--navy); border: none; border-radius: 4px; padding: 0.8rem; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: background 0.2s; }
.sb-modal-save-btn:hover { background: var(--yellow-h); }

/* Diary */
.sb-diary-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; border-bottom: 1px solid rgba(103,232,255,0.14); background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); }
.sb-diary-row:first-child { border-radius: 6px 6px 0 0; }
.sb-diary-row:last-child { border-bottom: none; border-radius: 0 0 6px 6px; }
.sb-diary-date { font-size: 0.68rem; color: rgba(230,233,255,0.55); }
.sb-diary-match { font-weight: 700; font-size: 0.85rem; color: #f1f4ff; }
.sb-diary-review { font-size: 0.72rem; color: rgba(230,233,255,0.6); margin-top: 0.2rem; font-style: italic; }

/* Profile stats */
.sb-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.6rem; margin-bottom: 1.5rem; }
.sb-stat-box { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; padding: 1.2rem 0.8rem; text-align: center; }
.sb-stat-box .n { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.8rem; color: #d4c44a; text-shadow: 0 0 10px rgba(212,196,74,0.25); }
.sb-stat-box .l { font-size: 0.62rem; color: rgba(230,233,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.3rem; }

/* Import/export */
.sb-io-box { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; padding: 1.2rem; margin-bottom: 1.2rem; }
.sb-io-textarea { width: 100%; background: rgba(2,7,25,0.55); border: 1px solid rgba(103,232,255,0.2); border-radius: 4px; color: #f1f4ff; padding: 0.7rem; font-family: monospace; font-size: 0.68rem; min-height: 80px; margin-bottom: 0.8rem; }
.sb-follow-card { background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; padding: 1rem 1.2rem; margin-bottom: 0.8rem; display: flex; justify-content: space-between; align-items: center; color: #f1f4ff; }

.sb-user-profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.6rem; margin-bottom: 1rem; }
.sb-user-profile-stat { background: rgba(2,7,25,0.5); border: 1px solid rgba(103,232,255,0.16); border-radius: 4px; padding: 0.6rem 0.4rem; text-align: center; }
.sb-user-profile-stat strong { display: block; font-family: 'Source Serif 4', serif; font-size: 1.2rem; color: #d4c44a; }
.sb-user-profile-stat span { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: rgba(230,233,255,0.55); }
.sb-user-profile-actions { display: flex; gap: 0.6rem; }
.sb-user-profile-actions .sb-modal-save-btn { flex: 1; }
.sb-invite-btn { background: linear-gradient(155deg, #7f4ca7, #4a1f6e) !important; }

@media (max-width: 640px) {
  .sb-stat-grid { grid-template-columns: repeat(2,1fr); }
  .sb-match-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================================
   SPURSBOXD AUTH GATE + PROFILE EDIT
   ============================================================ */
.sb-auth-wrap { max-width: 380px; margin: 0 auto; padding: 1rem 0; }
.sb-auth-box { background: white; border: 1px solid var(--border); padding: 1.5rem; }
.sb-auth-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.2rem; color: var(--navy); margin-bottom: 0.4rem; text-align: center; }
.sb-auth-msg { font-size: 0.78rem; color: var(--muted); text-align: center; margin-bottom: 1.2rem; line-height: 1.6; }
.sb-auth-field { margin-bottom: 0.9rem; }
.sb-auth-field label { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.sb-auth-field input { width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--border); font-family: 'Inter', sans-serif; font-size: 0.85rem; }
.sb-auth-submit-btn { width: 100%; background: var(--navy); color: white; border: none; padding: 0.8rem; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; margin-top: 0.3rem; }
.sb-auth-toggle-row { text-align: center; margin-top: 1.2rem; font-size: 0.78rem; color: var(--muted); }
.sb-auth-toggle-row button { background: none; border: none; color: var(--navy); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 0.78rem; margin-left: 0.3rem; }
.sb-auth-error { color: #b8302f; font-size: 0.75rem; text-align: center; margin-top: 0.6rem; min-height: 1rem; }

.sb-avatar-upload-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sb-avatar-preview { width: 60px; height: 60px; border-radius: 50%; background: var(--light); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.sb-search-results { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }

/* ============================================================
   3D TILT + LIVELY THUMBNAILS
   ============================================================ */
.article-item, .col-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.article-item:hover, .col-card:hover {
  box-shadow: 0 16px 32px rgba(10,16,64,0.2);
  z-index: 2;
  position: relative;
}

.article-item-img, .col-card-img { position: relative; overflow: hidden; }

.article-item-img span, .col-card-img span {
  display: inline-block;
  animation: tswIconFloat 3.2s ease-in-out infinite;
}
@keyframes tswIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-7px) rotate(-3deg); }
}

/* diagonal light sweep on hover */
.article-item-img::before, .col-card-img::before {
  content: '';
  position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
  pointer-events: none;
}
.article-item:hover .article-item-img::before,
.col-card:hover .col-card-img::before { left: 130%; }

/* subtle depth ring so tiles feel raised even at rest */
.article-item-img::after, .col-card-img::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), inset 0 -20px 30px rgba(0,0,0,0.25);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .article-item-img span, .col-card-img span { animation: none; }
  .article-item, .col-card { transition: none; }
}

/* ============================================================
   BUILD YOUR XI — AUCTION DRAFT GAME
   ============================================================ */
.bxi-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.bxi-trophy-badge {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.4rem; background: radial-gradient(circle at 35% 30%, #2a2410, #0d0a02 75%);
  border: 1px solid rgba(212,196,74,0.5); box-shadow: 0 0 14px rgba(212,196,74,0.35), inset 0 0 10px rgba(212,196,74,0.15);
}

.bxi-record-bar {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 1px;
  background: rgba(139,92,246,0.22); border: 1px solid rgba(139,92,246,0.22); border-radius: 12px; overflow: hidden;
  margin-bottom: 1.1rem;
}
.bxi-record-box { background: #0e1230; padding: 1rem 0.7rem; text-align: center; }
.bxi-record-icon {
  width: 34px; height: 34px; margin: 0 auto 0.5rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.35); color: #a78bfa;
}
.bxi-record-icon svg { width: 18px; height: 18px; }
.bxi-record-icon.gold { background: rgba(212,196,74,0.14); border-color: rgba(212,196,74,0.45); color: #ffd63d; filter: drop-shadow(0 0 5px rgba(255,214,61,0.5)); }
.bxi-record-box .n { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.6rem; color: #fff; line-height: 1; }
.bxi-record-box .l { font-size: 0.6rem; color: rgba(230,233,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.3rem; font-weight: 700; }
.bxi-record-box.streak .n { color: #ffd63d; text-shadow: 0 0 10px rgba(255,214,61,0.4); }

.bxi-duel-record-line { text-align: center; font-size: 0.76rem; color: rgba(230,233,255,0.6); margin-bottom: 0.8rem; }

.bxi-mode-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
.bxi-mode-card {
  border-radius: 5px; padding: 1.4rem 0.9rem; text-align: center; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bxi-mode-card:active { transform: translateY(1px) scale(0.98); }
.bxi-mode-card-icon { width: 30px; height: 30px; margin: 0 auto 0.5rem; }
.bxi-mode-card-icon svg { width: 100%; height: 100%; }
.bxi-mode-card .title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.bxi-mode-card .sub { font-size: 0.66rem; line-height: 1.4; }
.bxi-mode-card.solo {
  background: linear-gradient(155deg, #171d47 0%, #0d1130 100%); border: 1px solid rgba(139,92,246,0.32); color: #a78bfa;
  box-shadow: 0 4px 14px rgba(76,29,149,0.2);
}
.bxi-mode-card.solo .title { color: #fff; }
.bxi-mode-card.solo .sub { color: rgba(230,233,255,0.55); }
.bxi-mode-card.solo:active { box-shadow: 0 0 14px rgba(139,92,246,0.35); }
.bxi-mode-card.duel {
  background: linear-gradient(155deg, #2a2410, #14100a 70%); border: 1px solid rgba(212,196,74,0.4); color: #ffd63d;
  box-shadow: 0 4px 14px rgba(212,169,23,0.2);
}
.bxi-mode-card.duel .title { color: #fff; }
.bxi-mode-card.duel .sub { color: rgba(255,214,61,0.6); }
.bxi-mode-card.duel:active { box-shadow: 0 0 14px rgba(255,214,61,0.4); }

.bxi-info-row {
  display: flex; align-items: flex-start; gap: 0.6rem; padding-top: 1rem; margin-bottom: 1rem;
  border-top: 1px solid rgba(139,92,246,0.22);
}
.bxi-info-icon {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(139,92,246,0.18); border: 1px solid rgba(139,92,246,0.5); color: #a78bfa;
  font-size: 0.68rem; font-weight: 800; font-style: normal; margin-top: 0.1rem;
}
.bxi-info-row p { margin: 0; font-size: 0.78rem; color: rgba(230,233,255,0.65); line-height: 1.55; text-align: left; }

.bxi-join-btn {
  background: linear-gradient(155deg, #ffe066, #d4a917 55%, #b8890a); color: #12082b; border: none; border-radius: 10px;
  padding: 0.6rem 1.2rem; font-weight: 900; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em;
  cursor: pointer; box-shadow: 0 3px 10px rgba(212,169,23,0.3);
}

.bxi-budget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1rem; }
.bxi-budget-bar { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); border-radius: 4px; color: white; padding: 0.7rem 0.5rem; font-family: 'Inter', sans-serif; }
.bxi-budget-bar .lbl { font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.5); white-space: nowrap; }
.bxi-budget-bar .val { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.35rem; color: #ffd63d; line-height: 1.4; }

.bxi-squads { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1rem; }
.bxi-squad-col h4 { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(230,233,255,0.6); margin-bottom: 0.5rem; }
.bxi-slot { background: rgba(2,7,25,0.5); border: 1px dashed rgba(139,92,246,0.3); border-radius: 4px; padding: 0.5rem 0.65rem; margin-bottom: 0.5rem; font-size: 0.78rem; line-height: 1.3; color: rgba(230,233,255,0.45); display: flex; justify-content: space-between; align-items: center; }
.bxi-slot.filled { border: 1px solid rgba(139,92,246,0.28); border-left: 4px solid #ffd63d; color: #fff; }
.bxi-slot .stars { color: #ffd63d; font-size: 0.72rem; }
.bxi-slot .price { font-weight: 700; color: #ffd63d; }

.bxi-auction-card { background: linear-gradient(155deg, #171d47 0%, #0d1130 100%); border: 1px solid rgba(139,92,246,0.28); border-radius: 6px; padding: 1.3rem 1.1rem; text-align: center; margin-bottom: 1rem; }
.bxi-player-name { display: inline; font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.5rem; color: #fff; line-height: 1.2; }
.bxi-player-pos { display: inline; font-size: 0.82rem; color: rgba(230,233,255,0.55); }
.bxi-player-pos::before { content: ' · '; }
.bxi-player-stars { font-size: 1.25rem; color: #ffd63d; margin: 0.5rem 0 0.3rem; }
.bxi-player-value { font-size: 0.85rem; color: rgba(230,233,255,0.6); margin-bottom: 1rem; }
.bxi-bid-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.bxi-bid-row button { width: 42px; height: 42px; border-radius: 8px; border: 2px solid rgba(139,92,246,0.4); background: rgba(139,92,246,0.12); color: #a78bfa; font-weight: 800; font-size: 1.3rem; cursor: pointer; }
.bxi-bid-row button:hover { background: rgba(139,92,246,0.35); color: #fff; }
.bxi-bid-amount { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.7rem; color: #fff; min-width: 90px; }
.bxi-submit-bid-btn { -webkit-appearance: none; appearance: none; width: 100%; min-height: 3rem; border-radius: 8px; background: linear-gradient(155deg, #7c5cd6, #4c2a99); color: #fff; border: none; padding: 0.85rem; font-weight: 700; font-size: 0.88rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 14px rgba(124,92,214,0.3); margin-bottom: 0.6rem; }
.bxi-submit-bid-btn:hover:not(:disabled) { filter: brightness(1.12); }
.bxi-submit-bid-btn:disabled { background: rgba(139,92,246,0.18); color: rgba(255,255,255,0.4); opacity: 1; cursor: not-allowed; box-shadow: none; }

.bxi-result-flash { border-radius: 4px; padding: 0.8rem; text-align: center; font-weight: 700; font-size: 0.85rem; margin-bottom: 1rem; }
.bxi-result-flash.won { background: rgba(46,125,70,0.22); border: 1px solid rgba(78,232,138,0.35); color: #6ee89a; }
.bxi-result-flash.lost { background: rgba(184,48,47,0.2); border: 1px solid rgba(255,105,120,0.35); color: #ff8b96; }

.bxi-rating-cards { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.bxi-rating-card { background: linear-gradient(155deg, #171d47 0%, #0d1130 100%); border: 1px solid rgba(139,92,246,0.28); border-radius: 4px; padding: 1.2rem; text-align: center; }
.bxi-rating-card.you { border-top: 3px solid #ffd63d; }
.bxi-rating-card.ai { border-top: 3px solid #a78bfa; }
.bxi-rating-card .rating-num { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2.2rem; color: #fff; }
.bxi-rating-vs { font-family: 'Source Serif 4', serif; font-style: italic; font-weight: 700; color: rgba(230,233,255,0.5); font-size: 1.1rem; }

.bxi-sim-score { text-align: center; padding: 2rem 1rem; }
.bxi-sim-score .score-line { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2.4rem; color: #fff; margin-bottom: 0.5rem; }
.bxi-sim-score .verdict { font-size: 0.95rem; font-weight: 700; margin-bottom: 1.2rem; }
.bxi-sim-score .verdict.win { color: #6ee89a; }
.bxi-sim-score .verdict.loss { color: #ff8b96; }
.bxi-sim-score .verdict.draw { color: rgba(230,233,255,0.55); }

/* Squads stay side by side even on narrow phones now - the whole
   point of the compact redesign was fitting both without stacking. */
/* ============================================================
   BIDDING WAR + SKIP UI ADDITIONS
   ============================================================ */
.bxi-budget-bar.ai { background: linear-gradient(155deg, #141c6a, #0a0e35); margin-top: -1px; }
.bxi-skip-row { display: flex; justify-content: space-between; font-size: 0.72rem; color: rgba(230,233,255,0.5); margin-bottom: 0.9rem; padding: 0 0.2rem; }
.bxi-skip-row span strong { color: #fff; }
.bxi-war-flash { background: rgba(139,92,246,0.12); border-left: 3px solid #ffd63d; border-radius: 3px; padding: 0.8rem 1rem; font-size: 0.82rem; margin-bottom: 1rem; text-align: center; font-weight: 700; color: #fff; }
.bxi-war-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.bxi-raise-btn { -webkit-appearance: none; appearance: none; border-radius: 4px; background: linear-gradient(155deg, #7c5cd6, #4c2a99); color: #fff; border: none; padding: 0.85rem; min-height: 3rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.bxi-raise-btn:hover:not(:disabled) { filter: brightness(1.12); }
.bxi-raise-btn:disabled { background: rgba(139,92,246,0.18); color: rgba(255,255,255,0.4); opacity: 1; cursor: not-allowed; }
.bxi-concede-btn { -webkit-appearance: none; appearance: none; border-radius: 4px; background: rgba(184,48,47,0.14); color: #ff8b96; border: 2px solid rgba(255,105,120,0.4); padding: 0.85rem; min-height: 3rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.bxi-concede-btn:hover { background: rgba(184,48,47,0.25); }
.bxi-skip-btn { width: 100%; background: transparent; border: none; color: rgba(230,233,255,0.55); padding: 0.4rem; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: underline; cursor: pointer; margin-top: 0.2rem; }
.bxi-skip-btn:hover:not(:disabled) { border-color: #a78bfa; color: #fff; }
.bxi-skip-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============================================================
   THE GAUNTLET — SPEED ROUND + ROUTE CHOICE + HEAD-TO-HEAD
   ============================================================ */
.gnt-mode-select { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
.gnt-mode-btn { background: linear-gradient(155deg, #171d47, #0d1130); border: 2px solid rgba(139,92,246,0.28); padding: 1.1rem; text-align: center; cursor: pointer; transition: all 0.2s; }
.gnt-mode-btn:hover { border-color: #fff; }
.gnt-mode-btn.active { border-color: var(--yellow); background: rgba(212,196,74,0.08); }
.gnt-mode-btn .title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1rem; color: #fff; }
.gnt-mode-btn .sub { font-size: 0.68rem; color: rgba(230,233,255,0.55); margin-top: 0.2rem; }

.gnt-diff-row { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }
.gnt-diff-btn { flex: 1; padding: 0.6rem; border: 2px solid rgba(139,92,246,0.28); background: linear-gradient(155deg, #171d47, #0d1130); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.gnt-diff-btn.active { border-color: #fff; background: var(--navy); color: white; }

.gnt-start-btn { width: 100%; background: var(--yellow); color: #fff; border: none; padding: 1rem; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; margin-bottom: 1rem; }
.gnt-start-btn:hover { background: var(--yellow-h, #bfb038); }

.gnt-stats-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid rgba(139,92,246,0.28); margin-bottom: 1.2rem; }
.gnt-stats-strip .box { background: linear-gradient(155deg, #171d47, #0d1130); padding: 0.7rem 0.4rem; text-align: center; }
.gnt-stats-strip .box .n { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.2rem; color: #fff; }
.gnt-stats-strip .box .l { font-size: 0.56rem; color: rgba(230,233,255,0.55); text-transform: uppercase; letter-spacing: 0.04em; }

/* Round 1: speed round */
.gnt-timer { text-align: center; font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 2.6rem; color: #fff; margin-bottom: 0.3rem; }
.gnt-timer.low { color: #b8302f; }
.gnt-r1-score { text-align: center; font-size: 0.78rem; color: rgba(230,233,255,0.55); margin-bottom: 1rem; }
.gnt-r1-score strong { color: #fff; font-size: 1rem; }
.gnt-question-card { background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); padding: 1.3rem; margin-bottom: 1rem; }
.gnt-q-cat { display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #a78bfa; background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.3); border-radius: 4px; padding: 0.15rem 0.5rem; margin-bottom: 0.6rem; }
.gnt-q-text { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.05rem; color: #fff; line-height: 1.4; margin-bottom: 1rem; }
.gnt-opts { display: flex; flex-direction: column; gap: 0.55rem; }
.gnt-opt-btn { padding: 0.8rem 1rem; border: 2px solid rgba(139,92,246,0.28); background: linear-gradient(155deg, #171d47, #0d1130); font-weight: 600; font-size: 0.85rem; text-align: left; cursor: pointer; transition: all 0.15s; }
.gnt-opt-btn:hover { border-color: #fff; }
.gnt-opt-btn.correct { border-color: #1a7a3c; background: #d4f4dd; color: #1a7a3c; }
.gnt-opt-btn.wrong { border-color: #b8302f; background: #fbe4e4; color: #b8302f; }
.gnt-tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.gnt-tf-btn { padding: 1rem; border: 2px solid rgba(139,92,246,0.28); background: linear-gradient(155deg, #171d47, #0d1130); font-weight: 800; font-size: 0.95rem; text-transform: uppercase; cursor: pointer; }
.gnt-tf-btn.true-btn:hover { border-color: #1a7a3c; }
.gnt-tf-btn.false-btn:hover { border-color: #b8302f; }

/* Round 2: route choice */
.gnt-route-grid { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1rem; }
.gnt-route-card { background: linear-gradient(155deg, #171d47, #0d1130); border: 2px solid rgba(139,92,246,0.28); padding: 1.1rem 1.3rem; cursor: pointer; transition: all 0.2s; display: flex; justify-content: space-between; align-items: center; }
.gnt-route-card:hover { border-color: #fff; }
.gnt-route-card .name { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.05rem; color: #fff; }
.gnt-route-card .desc { font-size: 0.72rem; color: rgba(230,233,255,0.55); margin-top: 0.2rem; }
.gnt-route-card.safe { border-left: 4px solid #2563eb; }
.gnt-route-card.standard { border-left: 4px solid var(--yellow); }
.gnt-route-card.risk { border-left: 4px solid #b8302f; }
.gnt-route-reward { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.3rem; color: #fff; }

/* Round 3: the track */
.gnt-track-wrap { background: var(--navy-dark, #090e3a); padding: 1.3rem 1rem; margin-bottom: 1.2rem; }
.gnt-track { position: relative; height: 46px; background: rgba(255,255,255,0.06); border-radius: 4px; margin-bottom: 0.6rem; overflow: hidden; }
.gnt-track-finish { position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: var(--yellow); }
.gnt-track-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: left 0.5s ease; }
.gnt-track-marker.you { background: var(--yellow); }
.gnt-track-marker.ai { background: #b8302f; }
.gnt-track-labels { display: flex; justify-content: space-between; font-size: 0.65rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; }
.gnt-turn-indicator { text-align: center; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.5rem; margin-bottom: 0.8rem; }
.gnt-turn-indicator.you-turn { background: rgba(212,196,74,0.15); color: #fff; }
.gnt-turn-indicator.ai-turn { background: rgba(184,48,47,0.1); color: #b8302f; }

.gnt-result-screen { text-align: center; padding: 2rem 1rem; }
.gnt-result-screen .big-result { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 2rem; margin-bottom: 0.5rem; }
.gnt-result-screen .big-result.win { color: #1a7a3c; }
.gnt-result-screen .big-result.lose { color: #b8302f; }
.gnt-badge-earned { display: inline-block; background: var(--yellow); color: #fff; padding: 0.5rem 1rem; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; margin: 0.8rem 0; }

.gnt-score-card { background: var(--navy); color: white; padding: 1.5rem; margin: 1.2rem 0; text-align: center; }
.gnt-score-card .sc-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.2rem; color: var(--yellow); margin-bottom: 0.8rem; }
.gnt-score-card .sc-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.gnt-score-card .sc-row:last-child { border-bottom: none; }
.gnt-share-btn { width: 100%; background: linear-gradient(155deg, #171d47, #0d1130); color: #fff; border: none; padding: 0.8rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; margin-top: 1rem; }

.gnt-leaderboard-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0.9rem; border-bottom: 1px solid rgba(139,92,246,0.18); background: linear-gradient(155deg, #171d47, #0d1130); font-size: 0.8rem; }
.gnt-leaderboard-row:last-child { border-bottom: none; }
.gnt-leaderboard-row .rank { font-family: 'Source Serif 4', serif; font-weight: 800; color: rgba(230,233,255,0.55); }
.gnt-leaderboard-row.me { background: rgba(212,196,74,0.1); }

.gnt-badges-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
.gnt-badge-item { background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); padding: 0.8rem 0.5rem; text-align: center; }
.gnt-badge-item.locked { opacity: 0.3; }
.gnt-badge-item .icon { font-size: 1.6rem; margin-bottom: 0.3rem; }
.gnt-badge-item .name { font-size: 0.62rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.03em; }

@media (max-width: 640px) {
  .gnt-mode-select { grid-template-columns: 1fr; }
  .gnt-stats-strip { grid-template-columns: repeat(2,1fr); }
  .gnt-badges-grid { grid-template-columns: repeat(2,1fr); }
}

/* ============================================================
   GAUNTLET — START GATES + BIGGER FINAL ROUND DISPLAY
   ============================================================ */
.gnt-round-gate { text-align: center; padding: 1.5rem 1rem; }
.gnt-round-gate .gate-title { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.4rem; color: #fff; margin-bottom: 0.5rem; }
.gnt-round-gate .gate-desc { font-size: 0.85rem; color: rgba(230,233,255,0.55); line-height: 1.6; margin-bottom: 1.3rem; max-width: 380px; margin-left: auto; margin-right: auto; }

.gnt-dual-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.gnt-dual-score .side { text-align: center; }
.gnt-dual-score .side .lbl { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(230,233,255,0.55); margin-bottom: 0.2rem; }
.gnt-dual-score .side .val { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 3.2rem; line-height: 1; }
.gnt-dual-score .side.you .val { color: #fff; }
.gnt-dual-score .side.ai .val { color: #b8302f; }
.gnt-dual-score .vs { font-family: 'Source Serif 4', serif; font-style: italic; font-weight: 700; color: rgba(230,233,255,0.55); font-size: 1.1rem; }

.gnt-chase-bar-wrap { background: var(--navy-dark, #090e3a); padding: 1rem; margin-bottom: 1rem; }
.gnt-chase-bar { position: relative; height: 40px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; margin-bottom: 0.4rem; }
.gnt-chase-bar-caught-zone { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #b8302f; }
.gnt-chase-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: left 0.5s ease; }
.gnt-chase-marker.you-marker { background: var(--yellow); right: 4%; left: auto !important; transform: translate(50%, -50%); }
.gnt-chase-marker.ai-marker { background: #b8302f; }
.gnt-chase-label { text-align: center; font-size: 0.65rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   NEWS PAGE — FILTERABLE SUBSECTIONS
   ============================================================ */
.news-filter-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.news-filter-btn {
  background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.22);
  color: rgba(230,233,255,0.75); padding: 0.55rem 1rem; font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 0.78rem; cursor: pointer; transition: all 0.2s; border-radius: 4px;
}
.news-filter-btn:hover { border-color: #67e8ff; color: #fff; }
.news-filter-btn.active { background: linear-gradient(155deg, #2a3390, #141c6a); border-color: #d4c44a; color: #ffd63d; }

.news-toolbar { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; margin-bottom: 1.5rem; }
.news-toolbar-field { display: flex; align-items: center; gap: 0.5rem; }
.news-toolbar-field label { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(230,233,255,0.55); }
.news-toolbar-field select {
  background: linear-gradient(155deg, #141c6a 0%, #0a0e35 100%); border: 1px solid rgba(103,232,255,0.22);
  color: #fff; padding: 0.4rem 0.6rem; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.76rem;
  border-radius: 4px; cursor: pointer;
}
.news-toolbar-field select:hover, .news-toolbar-field select:focus { border-color: #67e8ff; outline: none; }
.news-toolbar-field select option { background: #0a0e35; color: #fff; }

/* ============================================================
   "WRITE FOR US" CTA CARD
   ============================================================ */
.cta-write-img { background: linear-gradient(135deg, #7a6a1a, #3a3008) !important; }
.cta-write-item .article-item-title, .cta-write-item .col-card-title { color: #ffd63d; }
.cta-write-item:hover { background: var(--light); }

/* ============================================================
   SPURSBOXD — COMMUNITY RATINGS & REVIEWS
   ============================================================ */
.sb-match-community { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; color: rgba(230,233,255,0.5); margin-top: 0.3rem; padding-top: 0.4rem; border-top: 1px solid rgba(103,232,255,0.14); }

.sb-modal-community { border-top: 1px solid rgba(103,232,255,0.14); margin-top: 1.2rem; padding-top: 1.2rem; }
.sb-modal-community-avg { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: rgba(230,233,255,0.85); margin-bottom: 1rem; }
.sb-reviews-title { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin-bottom: 0.7rem; }
.sb-reviews-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.9rem; }
.sb-review-row { display: flex; gap: 0.7rem; }
.sb-review-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--yellow); font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.sb-review-body { flex: 1; }
.sb-review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2rem; }
.sb-review-username { font-weight: 700; font-size: 0.78rem; color: #f1f4ff; }
.sb-review-text { font-size: 0.8rem; color: rgba(230,233,255,0.85); line-height: 1.5; font-style: italic; margin-bottom: 0.2rem; }
.sb-review-date { font-size: 0.62rem; color: rgba(230,233,255,0.5); }

/* ============================================================
   XP / LEVEL / PRESTIGE SYSTEM
   ============================================================ */
.xp-widget { background: white; border: 1px solid var(--border); padding: 1.2rem; margin-bottom: 1.5rem; }
.xp-widget-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.xp-widget-rank { display: flex; align-items: center; gap: 0.5rem; }
.xp-widget-level { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1rem; color: var(--navy); }
.xp-widget-badges-count { font-size: 0.68rem; color: var(--muted); }
.xp-bar-track { height: 10px; background: var(--light); border-radius: 5px; overflow: hidden; margin-bottom: 0.4rem; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--yellow-h,#bfb038), var(--yellow)); border-radius: 5px; transition: width 0.5s ease; }
.xp-bar-label { font-size: 0.68rem; color: rgba(230,233,255,0.6); text-align: center; margin-bottom: 0.8rem; }
.xp-prestige-btn { width: 100%; background: var(--navy); color: var(--yellow); border: none; padding: 0.8rem; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; margin-bottom: 0.8rem; animation: xpPrestigePulse 1.6s ease-in-out infinite; }
@keyframes xpPrestigePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,196,74,0.5); } 50% { box-shadow: 0 0 0 8px rgba(212,196,74,0); } }
.xp-guest-note { font-size: 0.72rem; color: var(--muted); background: var(--light); padding: 0.7rem; margin-bottom: 0.8rem; line-height: 1.5; }
.xp-guest-note a { color: var(--navy); font-weight: 700; }

.xp-badges-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5rem; }
.xp-badge-item { background: var(--light); padding: 0.6rem 0.3rem; text-align: center; }
.xp-badge-item.locked { opacity: 0.35; filter: grayscale(1); }
.xp-badge-item .icon { width: 34px; height: 34px; margin: 0 auto 0.3rem; }
.xp-badge-item .name { font-size: 0.56rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; }

/* Prestige icon — animated, shown next to usernames everywhere */
.xp-prestige-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--prestige-color, #8a8a8a);
  font-weight: 800;
  animation: xpPrestigeSpin 3s linear infinite, xpPrestigeGlow 2s ease-in-out infinite;
  filter: drop-shadow(0 0 3px var(--prestige-color, #8a8a8a));
}
@keyframes xpPrestigeSpin { 0%,92%,100% { transform: rotate(0deg); } 96% { transform: rotate(15deg); } }
@keyframes xpPrestigeGlow { 0%,100% { opacity: 0.85; } 50% { opacity: 1; filter: drop-shadow(0 0 6px var(--prestige-color, #8a8a8a)); } }
.xp-prestige-icon.xp-prestige-rainbow {
  animation: xpPrestigeSpin 3s linear infinite, xpRainbowShift 3s linear infinite;
}
@keyframes xpRainbowShift {
  0% { color: #ff004c; filter: drop-shadow(0 0 6px #ff004c); }
  20% { color: #ff9500; filter: drop-shadow(0 0 6px #ff9500); }
  40% { color: #ffe600; filter: drop-shadow(0 0 6px #ffe600); }
  60% { color: #35d46a; filter: drop-shadow(0 0 6px #35d46a); }
  80% { color: #4a90ff; filter: drop-shadow(0 0 6px #4a90ff); }
  100% { color: #ff004c; filter: drop-shadow(0 0 6px #ff004c); }
}
.xp-level-badge { background: var(--navy); color: var(--yellow); padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 700; font-family: 'Inter', sans-serif; }

/* Toasts */
.xp-toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.xp-toast {
  background: var(--navy); color: white; padding: 0.7rem 1.1rem; display: flex; flex-direction: column; gap: 0.1rem;
  min-width: 180px; box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transform: translateX(120%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease;
}
.xp-toast.show { transform: translateX(0); opacity: 1; }
.xp-toast-amount { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 0.95rem; color: var(--yellow); }
.xp-toast-level { font-size: 0.68rem; color: rgba(255,255,255,0.7); }
.xp-toast-badge { flex-direction: row; align-items: center; gap: 0.7rem; }
.xp-toast-badge-icon { width: 42px; height: 42px; flex-shrink: 0; }

@media (max-width: 500px) {
  .xp-badges-grid { grid-template-columns: repeat(3,1fr); }
  .xp-toast-container { left: 1rem; right: 1rem; align-items: stretch; }
  .xp-toast { min-width: 0; }
}

/* ============================================================
   PROFILE TAB — full badge collection with progress bars
   ============================================================ */
.xp-profile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.8rem; }
.xp-profile-rank { display: flex; align-items: center; gap: 0.8rem; }
.xp-profile-level { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.2rem; color: #fff; }
.xp-profile-sub { font-size: 0.7rem; color: var(--muted); }
.xp-profile-badge-count { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.1rem; color: #fff; text-align: right; }
.xp-profile-badge-count span { display: block; font-family: 'Inter', sans-serif; font-weight: 400; font-size: 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.xp-profile-category { margin-top: 1.6rem; color: #fff; }
.xp-profile-category h3 { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; border-bottom: 2px solid var(--yellow); padding-bottom: 0.5rem; margin-bottom: 0.9rem; }
.xp-profile-badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.xp-profile-badge-card { background: white; border: 1px solid var(--border); padding: 0.8rem 0.6rem; text-align: center; }
.xp-profile-badge-card.locked { background: var(--light); }
.xp-profile-badge-card.locked .icon { opacity: 0.35; filter: grayscale(1); }
.xp-profile-badge-card .icon { width: 40px; height: 40px; margin: 0 auto 0.4rem; }
.xp-profile-badge-card .name { font-size: 0.68rem; font-weight: 800; color: var(--navy); margin-bottom: 0.2rem; line-height: 1.2; }
.xp-profile-badge-card .desc { font-size: 0.6rem; color: var(--muted); line-height: 1.4; min-height: 2.2em; }
.xp-badge-progress { margin-top: 0.5rem; }
.xp-badge-progress-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 0.2rem; }
.xp-badge-progress-fill { height: 100%; background: var(--yellow-h, #bfb038); }
.xp-badge-progress-text { font-size: 0.58rem; color: var(--muted); font-weight: 700; }

@media (max-width: 640px) {
  .xp-profile-badge-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   DUEL A FRIEND — real-time 1v1 quiz via Supabase Realtime
   ============================================================ */
.duel-lobby { text-align: center; padding: 1rem; }
.duel-lobby-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
.duel-choice-card { background: linear-gradient(155deg, #171d47 0%, #0d1130 100%); border: 1px solid rgba(139,92,246,0.28); border-radius: 12px; padding: 1.3rem 1rem; cursor: pointer; transition: all 0.2s; }
.duel-choice-card:hover { border-color: #a78bfa; box-shadow: 0 0 12px rgba(139,92,246,0.3); }
.duel-choice-card .title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: 0.3rem; }
.duel-choice-card .sub { font-size: 0.7rem; color: rgba(230,233,255,0.55); }

.duel-code-input-row { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.duel-code-input {
  flex: 1; padding: 0.8rem; border-radius: 10px; background: rgba(2,7,25,0.55); border: 2px solid rgba(139,92,246,0.3);
  color: #fff; text-align: center; font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.duel-code-input:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 10px rgba(139,92,246,0.4); }
.duel-code-input::placeholder { color: rgba(230,233,255,0.3); }
.duel-code-display { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 2.6rem; letter-spacing: 0.25em; color: #ffd63d; text-shadow: 0 0 16px rgba(255,214,61,0.4); background: rgba(2,7,25,0.55); border: 1px solid rgba(212,196,74,0.3); border-radius: 12px; padding: 1.2rem; margin-bottom: 1rem; }
.duel-copy-link-btn { background: linear-gradient(155deg, #ffe066, #d4a917 55%, #b8890a); color: #12082b; border: none; border-radius: 10px; padding: 0.7rem 1.2rem; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; margin-bottom: 1rem; box-shadow: 0 3px 10px rgba(212,169,23,0.3); }

.duel-waiting { text-align: center; padding: 2rem 1rem; }
.duel-waiting-spinner { width: 40px; height: 40px; border: 4px solid rgba(139,92,246,0.2); border-top-color: #a78bfa; border-radius: 50%; margin: 0 auto 1rem; animation: duelSpin 1s linear infinite; }
@keyframes duelSpin { to { transform: rotate(360deg); } }

.duel-vs-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.duel-player-box { text-align: center; background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); border-radius: 12px; padding: 0.9rem 0.5rem; }
.duel-player-box.you { border-top: 3px solid #ffd63d; }
.duel-player-box.opponent { border-top: 3px solid #a78bfa; }
.duel-player-name { font-weight: 700; font-size: 0.82rem; color: #fff; margin-bottom: 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-player-score { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.7rem; color: #fff; }
.duel-vs-label { font-family: 'Source Serif 4', serif; font-style: italic; font-weight: 700; color: rgba(230,233,255,0.5); font-size: 0.95rem; }

.duel-question-progress { text-align: center; font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; }
.duel-timer-bar { height: 6px; background: rgba(139,92,246,0.15); border-radius: 3px; overflow: hidden; margin-bottom: 1rem; }
.duel-timer-fill { height: 100%; background: var(--yellow-h,#bfb038); transition: width 1s linear; }
.duel-opponent-status { text-align: center; font-size: 0.72rem; color: var(--muted); margin-top: 0.6rem; min-height: 1.2rem; }

.duel-result-screen { text-align: center; padding: 2rem 1rem; }
.duel-result-verdict { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.7rem; margin-bottom: 1rem; }
.duel-result-verdict.win { color: #6ee89a; }
.duel-result-verdict.lose { color: #ff8b96; }
.duel-result-verdict.draw { color: rgba(230,233,255,0.6); }

@media (max-width: 500px) {
  .duel-lobby-choice { grid-template-columns: 1fr; }
  .duel-code-display { font-size: 1.8rem; letter-spacing: 0.18em; }
}

/* ============================================================
   TOP TENS — name-the-top-10 ranked list game
   ============================================================ */
.tt-setup-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid rgba(139,92,246,0.28); margin-bottom: 1.2rem; }
.tt-setup-stats .box { background: linear-gradient(155deg, #171d47, #0d1130); padding: 0.7rem 0.4rem; text-align: center; }
.tt-setup-stats .box .n { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.2rem; color: #fff; }
.tt-setup-stats .box .l { font-size: 0.56rem; color: rgba(230,233,255,0.55); text-transform: uppercase; letter-spacing: 0.04em; }

.tt-diff-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tt-diff-btn { flex: 1; padding: 0.6rem; border: 2px solid rgba(139,92,246,0.28); background: linear-gradient(155deg, #171d47, #0d1130); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; cursor: pointer; }
.tt-diff-btn.active { border-color: #fff; background: var(--navy); color: white; }

.tt-mode-btns { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.2rem; }
.tt-mode-launch-btn { background: var(--yellow); color: #fff; border: none; padding: 0.9rem; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.tt-mode-launch-btn.secondary { background: var(--navy); color: var(--yellow); }

.tt-pack-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.tt-pack-btn { background: linear-gradient(155deg, #171d47, #0d1130); border: 2px solid rgba(139,92,246,0.28); padding: 0.5rem 0.9rem; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.tt-pack-btn.active, .tt-pack-btn:hover { border-color: #fff; }

.tt-play-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; gap: 0.8rem; }
.tt-category-title { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.05rem; color: #fff; line-height: 1.3; }
.tt-play-stats { display: flex; gap: 0.8rem; font-size: 0.68rem; color: rgba(230,233,255,0.55); flex-wrap: wrap; margin-bottom: 0.8rem; }
.tt-play-stats strong { color: #fff; font-family: 'Source Serif 4', serif; font-size: 0.95rem; }

.tt-rank-slots { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.tt-rank-slot { display: flex; align-items: center; gap: 0.8rem; background: rgba(2,7,25,0.5); border: 1px dashed rgba(139,92,246,0.3); border-radius: 8px; color: #fff; padding: 0.55rem 0.8rem; min-height: 2.3rem; transition: all 0.25s ease; }
.tt-rank-slot .rank-num { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.1rem; color: rgba(230,233,255,0.55); width: 22px; flex-shrink: 0; }
.tt-rank-slot.filled { background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); border-left: 4px solid var(--yellow); }
.tt-rank-slot.filled .rank-num { color: #fff; }
.tt-rank-slot .rank-name { font-weight: 700; font-size: 0.85rem; color: #fff; }
.tt-rank-slot.pop { animation: ttPop 0.4s ease; }
@keyframes ttPop { 0% { transform: scale(1); } 40% { transform: scale(1.03); background: rgba(212,196,74,0.25); } 100% { transform: scale(1); } }

.tt-input-row { display: flex; gap: 0.6rem; margin-bottom: 0.6rem; }
.tt-input { flex: 1; padding: 0.75rem; border: 2px solid var(--navy); font-family: 'Inter', sans-serif; font-size: 0.9rem; }
.tt-submit-btn { background: var(--navy); color: white; border: none; padding: 0.75rem 1.2rem; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }

.tt-feedback { min-height: 1.4rem; font-size: 0.8rem; font-weight: 700; margin-bottom: 1rem; text-align: center; }
.tt-feedback.correct { color: #1a7a3c; }
.tt-feedback.wrong { color: #b8302f; }
.tt-feedback.info { color: rgba(230,233,255,0.55); }

.tt-hint-buttons { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.5rem; }
.tt-hint-btn { background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); padding: 0.55rem 0.5rem; font-size: 0.66rem; font-weight: 700; color: #fff; cursor: pointer; text-transform: uppercase; letter-spacing: 0.02em; }
.tt-hint-btn:hover:not(:disabled) { border-color: #fff; }
.tt-hint-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.tt-hint-btn .cost { color: #b8302f; font-weight: 800; }

.tt-result-screen { text-align: center; padding: 1.5rem 1rem; }
.tt-result-verdict { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.5rem; margin-bottom: 0.8rem; }
.tt-result-verdict.perfect { color: #d4af00; }
.tt-result-verdict.win { color: #1a7a3c; }
.tt-result-verdict.partial { color: #fff; }
.tt-result-verdict.lose { color: #b8302f; }
.tt-result-stats-row { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; }
.tt-result-stats-row .stat { text-align: center; }
.tt-result-stats-row .stat .n { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.6rem; color: #fff; }
.tt-result-stats-row .stat .l { font-size: 0.62rem; color: rgba(230,233,255,0.55); text-transform: uppercase; letter-spacing: 0.04em; }
.tt-missed-list { text-align: left; background: rgba(2,7,25,0.5); border-radius: 8px; color: rgba(230,233,255,0.8); padding: 1rem; margin-top: 1rem; font-size: 0.8rem; }
.tt-missed-list .title { font-weight: 800; color: #fff; margin-bottom: 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }

.tt-stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
.tt-stats-grid .box { background: linear-gradient(155deg, #171d47, #0d1130); border: 1px solid rgba(139,92,246,0.28); padding: 0.8rem; text-align: center; }
.tt-stats-grid .box .n { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.3rem; color: #fff; }
.tt-stats-grid .box .l { font-size: 0.62rem; color: rgba(230,233,255,0.55); text-transform: uppercase; letter-spacing: 0.03em; }
.tt-missed-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid rgba(139,92,246,0.18); font-size: 0.8rem; }
.tt-empty-msg { padding: 1rem; text-align: center; font-size: 0.8rem; color: rgba(230,233,255,0.55); }

@media (max-width: 500px) {
  .tt-setup-stats { grid-template-columns: repeat(3,1fr); }
  .tt-hint-buttons { grid-template-columns: 1fr; }
  .tt-result-stats-row { gap: 1.2rem; }
}

/* ============================================================
   MULTIPLAYER REMATCH FLOW — shared across all duel modes
   ============================================================ */
.duel-rematch-status { min-height: 1.3rem; font-size: 0.78rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.duel-leave-btn { width: 100%; background: none; border: 1px solid rgba(139,92,246,0.3); color: rgba(230,233,255,0.6); border-radius: 10px; padding: 0.6rem; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; margin-top: 0.5rem; }
.duel-leave-btn.compact { width: auto; display: inline-block; padding: 0.4rem 0.9rem; font-size: 0.68rem; margin-top: 0; margin-bottom: 1rem; border-radius: 7px; }
.duel-leave-btn:hover { border-color: #a78bfa; color: #fff; }

/* TSW 5-A-Side Duel — visible standing-bid negotiation text */
.bxi-standing-bid-text { text-align: center; font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 1rem; line-height: 1.5; }

/* Connection error feedback for multiplayer waiting rooms */
.duel-connection-error { background: #fbe4e4; color: #b8302f; padding: 0.8rem 1rem; margin-top: 1rem; font-size: 0.78rem; font-weight: 600; line-height: 1.5; text-align: left; }

/* ============================================================
   LIVE MATCH SIMULATION — fast-forwarded 90 minutes
   ============================================================ */
.bxi-sim-live-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.bxi-sim-live-team { text-align: center; }
.bxi-sim-live-team .name { font-size: 0.78rem; font-weight: 700; color: #fff; margin-bottom: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bxi-sim-live-team .score { font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 2.4rem; color: #fff; line-height: 1; }
.bxi-sim-live-clock { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.1rem; color: #fff; background: linear-gradient(155deg, #7c5cd6, #4c2a99); padding: 0.5rem 0.9rem; border-radius: 4px; }

.bxi-sim-progress-track { height: 6px; background: rgba(139,92,246,0.15); border-radius: 3px; overflow: hidden; margin-bottom: 1.2rem; }
.bxi-sim-progress-fill { height: 100%; background: var(--yellow-h, #bfb038); transition: width 0.1s linear; }

.bxi-sim-goal-banner { text-align: center; font-family: 'Source Serif 4', serif; font-weight: 800; font-size: 1.1rem; padding: 0; max-height: 0; overflow: hidden; opacity: 0; transition: all 0.3s ease; color: #fff; border-radius: 6px; }
.bxi-sim-goal-banner.show { max-height: 4rem; opacity: 1; padding: 0.8rem; margin-bottom: 1rem; }
.bxi-sim-goal-banner.mine { background: rgba(46,125,70,0.28); color: #6ee89a; }
.bxi-sim-goal-banner.theirs { background: rgba(184,48,47,0.25); color: #ff8b96; }

.bxi-sim-feed { display: flex; flex-direction: column; gap: 0.4rem; max-height: 180px; overflow-y: auto; }
.bxi-sim-feed-row { background: rgba(139,92,246,0.1); border-radius: 6px; padding: 0.5rem 0.8rem; font-size: 0.78rem; font-weight: 600; color: #fff; }

/* ============================================================
   WIN THE TREBLE — dark mode, EA FC Draft style. Scoped entirely
   to .wtt-panel so it doesn't affect the rest of the site.
   ============================================================ */
.wtt-panel { position: relative; overflow: hidden; background: #0e1555; color: #ffffff; margin: -1.5rem; padding: 1.5rem; min-height: 500px; }
.wtt-panel h3, .wtt-panel .game-desc { display: none; } /* this mode speaks through visuals, not headers */

.wtt-logo, .wtt-screen { position: relative; z-index: 10; }
.wtt-screen { display: none; }
.wtt-screen.active { display: block; animation: wttFadeIn 0.35s ease; }
@keyframes wttFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.wtt-logo { text-align: center; font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1.5rem; color: #d4c44a; letter-spacing: -0.01em; margin-bottom: 1.4rem; }
.wtt-logo span { color: #ffffff; }

/* Setup */
.wtt-setup-section { margin-bottom: 1.6rem; }
.wtt-setup-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: #a9adda; margin-bottom: 0.6rem; font-weight: 700; }
.wtt-club-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5rem; }
.wtt-pick-btn { background: #141c6a; border: 2px solid #26307d; color: #ffffff; padding: 0.6rem 0.4rem; font-size: 0.66rem; font-weight: 700; text-align: center; cursor: pointer; transition: all 0.15s; }
.wtt-pick-btn:hover { border-color: #d4c44a; }
.wtt-pick-btn.selected { border-color: #d4c44a; background: #3a3418; color: #d4c44a; }
.wtt-name-input { width: 100%; background: #141c6a; border: 2px solid #26307d; color: #ffffff; padding: 0.8rem; font-size: 0.9rem; font-weight: 700; text-align: center; }
.wtt-name-input:focus { outline: none; border-color: #d4c44a; }
.wtt-formation-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.6rem; }
.wtt-diff-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
.wtt-start-btn { width: 100%; background: #d4c44a; color: #0e1555; border: none; padding: 1.1rem; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; margin-top: 0.6rem; }

/* Scoped animated background - same visual recipe as Battle's page-wide
   one, but position:absolute + contained by .wtt-panel's own
   position:relative/overflow:hidden above, rather than position:fixed
   spanning the whole viewport. Keeps this dark, animated "gaming" feel
   isolated to the Treble panel without touching the rest of games.html,
   which stays light-themed for every other mini-game. */
.wtt-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.wtt-aurora {
  position: absolute; width: 160%; height: 160%; left: -30%; top: -30%;
  background:
    radial-gradient(circle at 20% 40%, rgba(0,68,255,.26), transparent 25%),
    radial-gradient(circle at 75% 25%, rgba(157,0,255,.28), transparent 27%),
    radial-gradient(circle at 80% 75%, rgba(255,0,190,.2), transparent 28%);
  filter: blur(45px);
  animation: wttAuroraMove 18s ease-in-out infinite alternate;
}
@keyframes wttAuroraMove {
  0% { transform: translate3d(-3%,-2%,0) scale(1); }
  35% { transform: translate3d(5%,3%,0) scale(1.08); }
  70% { transform: translate3d(-2%,7%,0) scale(1.12); }
  100% { transform: translate3d(7%,-3%,0) scale(1.05); }
}
.wtt-streaks {
  position: absolute; inset: -40%; opacity: .32;
  background: repeating-linear-gradient(132deg,
    transparent 0px, transparent 48px,
    rgba(81,60,255,.07) 49px, rgba(165,40,255,.13) 51px,
    transparent 54px, transparent 105px);
  animation: wttStreakMove 16s linear infinite;
}
@keyframes wttStreakMove {
  from { transform: translate3d(-80px,-80px,0); }
  to { transform: translate3d(120px,120px,0); }
}
.wtt-glow-blue {
  position: absolute; width: 380px; height: 380px; left: -200px; top: 20%; border-radius: 50%; filter: blur(70px); opacity: .55;
  background: radial-gradient(circle, rgba(0,71,255,.6), rgba(0,45,190,.18) 45%, transparent 72%);
  animation: wttBlueGlowMove 14s ease-in-out infinite alternate;
}
@keyframes wttBlueGlowMove { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(120px,80px,0) scale(1.2); } }
.wtt-glow-purple {
  position: absolute; width: 420px; height: 420px; right: -220px; top: 6%; border-radius: 50%; filter: blur(70px); opacity: .55;
  background: radial-gradient(circle, rgba(133,0,255,.6), rgba(96,0,200,.18) 45%, transparent 72%);
  animation: wttPurpleGlowMove 18s ease-in-out infinite alternate;
}
@keyframes wttPurpleGlowMove { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-110px,130px,0) scale(1.18); } }
.wtt-particles { position: absolute; inset: 0; overflow: hidden; }
.wtt-particle {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(190,150,255,.75);
  box-shadow: 0 0 4px rgba(185,110,255,.85), 0 0 8px rgba(140,40,255,.45);
  animation: wttParticleFloat var(--duration) linear infinite;
  animation-delay: var(--delay);
}
@keyframes wttParticleFloat {
  0% { transform: translate3d(0,60px,0); opacity: 0; }
  15% { opacity: .75; }
  75% { opacity: .45; }
  100% { transform: translate3d(var(--drift),-420px,0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wtt-aurora, .wtt-streaks, .wtt-glow-blue, .wtt-glow-purple, .wtt-particle { animation: none !important; }
}

/* Club tiles - replace the plain .wtt-pick-btn for club selection with
   real per-club colour identity. Same CSS variable convention as the
   Battle Collection club rows (--club-a/b/c, --club-bar, --c1/--c2) so
   both features share one visual language for club colour, driven by
   the exact same tswClubColors() data - no colours are duplicated or
   hard-coded here, only assigned inline per tile from that shared source.  */
.wtt-club-tile {
  position: relative; display: flex; align-items: center; gap: 0.7rem; min-height: 4.4rem;
  padding: 0.7rem 0.85rem; border-radius: 8px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--club-bar); color: #fff;
  background: linear-gradient(110deg, var(--club-a) 0%, var(--club-b) 52%, var(--club-c) 100%);
  box-shadow: inset 0 0 18px rgba(255,255,255,.035), 0 0 8px rgba(0,0,0,.25);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}
.wtt-club-tile:hover { transform: translateY(-2px); filter: brightness(1.09); box-shadow: inset 0 0 20px rgba(255,255,255,.05), 0 0 14px rgba(255,255,255,.14); }
.wtt-club-tile:active { transform: scale(0.98); }
.wtt-club-tile .wtt-club-ball {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; position: relative; z-index: 2;
  border: 2px solid rgba(255,255,255,.85);
  background: linear-gradient(90deg, var(--c1) 0 50%, var(--c2) 50% 100%);
  box-shadow: 0 2px 7px rgba(0,0,0,.35), inset 0 0 6px rgba(255,255,255,.15);
}
.wtt-club-tile .wtt-club-tile-name { position: relative; z-index: 2; font-size: 0.82rem; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.wtt-club-tile.selected {
  transform: scale(1.015); box-shadow: 0 0 0 2px rgba(255,255,255,.75), 0 0 16px var(--club-bar), inset 0 0 22px rgba(255,255,255,.08);
}
.wtt-club-tile.selected::after {
  content: "\2713"; position: absolute; right: 8px; top: 6px; z-index: 5; width: 20px; height: 20px;
  display: grid; place-items: center; border-radius: 50%; color: #071019; background: #fff; font-size: 0.68rem; font-weight: 900;
}

/* Formation tiles - dark purple game tiles with a small pitch-dot icon
   built entirely from each formation's real DEF/MID/FWD split (see
   wttFormationIconHTML in wtt-live.js), not a fixed placeholder pattern. */
.wtt-formation-tile {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  min-height: 4.6rem; padding: 0.7rem; border-radius: 9px; cursor: pointer; color: #fff;
  border: 1px solid #7234c9;
  background: linear-gradient(120deg, rgba(30,12,61,.8), rgba(7,10,35,.92));
  box-shadow: inset 0 0 20px rgba(137,44,255,.04);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.wtt-formation-tile:hover { transform: translateY(-2px); border-color: #b142ff; box-shadow: 0 0 14px rgba(177,66,255,.2); }
.wtt-formation-tile:active { transform: scale(0.98); }
.wtt-formation-tile.selected {
  border-color: #d747ff;
  background: linear-gradient(120deg, rgba(93,17,141,.6), rgba(12,10,44,.95));
  box-shadow: 0 0 20px rgba(204,45,255,.33);
}
.wtt-pitch-icon { flex: 0 0 auto; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.wtt-pitch-row { display: flex; gap: 3px; justify-content: center; }
.wtt-pitch-dot { width: 6px; height: 6px; border-radius: 50%; background: #8d3be0; box-shadow: 0 0 5px rgba(141,59,224,.55); }
.wtt-pitch-dot.gk { background: #d4c44a; box-shadow: 0 0 5px rgba(212,196,74,.55); }
.wtt-formation-tile.selected .wtt-pitch-dot { background: #e766ff; box-shadow: 0 0 6px rgba(231,102,255,.7); }
.wtt-formation-tile.selected .wtt-pitch-dot.gk { background: #f0dc7a; }
.wtt-formation-name { font-size: 0.9rem; font-weight: 900; }

@media (max-width: 640px) {
  .wtt-club-tile { min-height: 4rem; gap: 0.55rem; padding: 0.6rem 0.65rem; }
  .wtt-club-tile .wtt-club-ball { flex-basis: 30px; width: 30px; height: 30px; }
  .wtt-club-tile .wtt-club-tile-name { font-size: 0.74rem; }
  .wtt-formation-tile { min-height: 4rem; gap: 0.7rem; }
}
.wtt-start-btn:hover { background: #fff; }
.wtt-start-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Draft screen */
.wtt-draft-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 0.72rem; color: #a9adda; }
.wtt-draft-header strong { color: #d4c44a; }
.wtt-formation-slots { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-bottom: 1.2rem; }
.wtt-slot { width: 78px; background: #141c6a; border: 2px dashed #26307d; padding: 0.5rem 0.3rem; text-align: center; }
.wtt-slot.filled { border-style: solid; border-color: #d4c44a; background: #0f1a14; }
.wtt-slot .pos { font-size: 0.56rem; color: #a9adda; text-transform: uppercase; letter-spacing: 0.03em; }
.wtt-slot .nm { font-size: 0.62rem; font-weight: 800; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0.15rem; }
.wtt-slot.filled .nm { color: #d4c44a; }
.wtt-slot .rt { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.3rem; color: #d4c44a; margin-top: 0.1rem; }

.wtt-avg-bar { display: grid; grid-template-columns: repeat(5,1fr); gap: 0.35rem; margin-bottom: 1rem; }
.wtt-avg-box { background: #141c6a; border: 1px solid #26307d; padding: 0.5rem 0.2rem; text-align: center; }
.wtt-avg-box .l { font-size: 0.52rem; color: #a9adda; text-transform: uppercase; letter-spacing: 0.02em; }
.wtt-avg-box .v { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.15rem; color: #ffffff; }
.wtt-avg-box.overall .v { color: #d4c44a; }

.wtt-spin-area { text-align: center; margin: 1.5rem 0; }
.wtt-spin-btn { width: 140px; height: 140px; border-radius: 50%; background: linear-gradient(135deg, #d4c44a, #bfb038); border: none; font-weight: 900; font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; color: #0e1555; cursor: pointer; box-shadow: 0 0 0 6px rgba(212,196,74,0.18); transition: transform 0.15s; }
.wtt-spin-btn:hover:not(:disabled) { transform: scale(1.04); }
.wtt-spin-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.wtt-spin-btn.spinning { animation: wttPulse 0.5s ease infinite; }
@keyframes wttPulse { 0%,100% { box-shadow: 0 0 0 6px rgba(212,196,74,0.18); } 50% { box-shadow: 0 0 0 14px rgba(212,196,74,0.06); } }
.wtt-reroll-note { font-size: 0.7rem; color: #a9adda; margin-top: 0.7rem; }

.wtt-club-reveal { text-align: center; font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1.3rem; color: #d4c44a; margin-bottom: 1rem; min-height: 1.8rem; }
.wtt-squad-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.5rem; margin-bottom: 1rem; }
.wtt-squad-player { background: #141c6a; border: 2px solid #26307d; padding: 0.7rem; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 0.7rem; }
.wtt-squad-player:hover:not(.locked-out) { border-color: #d4c44a; }
.wtt-squad-player.locked-out { opacity: 0.25; cursor: not-allowed; }
.wtt-sp-rating-badge { flex-shrink: 0; width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; background: #3a3418; border: 2px solid #d4c44a; font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.4rem; color: #d4c44a; }
.wtt-sp-info { flex: 1; min-width: 0; }
.wtt-sp-name { font-weight: 800; font-size: 0.85rem; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtt-sp-meta { font-size: 0.66rem; color: #a9adda; margin-top: 0.15rem; }
.wtt-reroll-btn { background: none; border: 1px solid #26307d; color: #a9adda; padding: 0.75rem 1.4rem; min-height: 2.75rem; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; cursor: pointer; margin-bottom: 1rem; }
.wtt-reroll-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Squad complete / ratings */
.wtt-ratings-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 0.4rem; margin-bottom: 1.2rem; }
.wtt-rating-box { background: #141c6a; border: 2px solid #26307d; padding: 0.7rem 0.3rem; text-align: center; }
.wtt-rating-box.overall { border-color: #d4c44a; }
.wtt-rating-box .l { font-size: 0.54rem; color: #a9adda; text-transform: uppercase; letter-spacing: 0.02em; }
.wtt-rating-box .v { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.9rem; color: #ffffff; }
.wtt-rating-box.overall .v { color: #d4c44a; }
.wtt-projection-box { background: #141c6a; border: 1px solid #26307d; padding: 1rem; text-align: center; font-size: 0.8rem; color: #c9cdf0; margin-bottom: 1.2rem; }

/* Simulating */
.wtt-sim-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.wtt-sim-phase { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: #d4c44a; font-weight: 800; }
.wtt-sim-progress-track { height: 5px; background: #141c6a; margin-bottom: 1rem; overflow: hidden; }
.wtt-sim-progress-fill { height: 100%; background: #d4c44a; transition: width 0.3s linear; }
.wtt-sim-scoreflash { text-align: center; font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1rem; color: #ffffff; min-height: 1.6rem; margin-bottom: 0.8rem; }
.wtt-sim-scoreflash .scorer { display: block; font-size: 0.66rem; font-weight: 400; color: #a9adda; margin-top: 0.15rem; }
.wtt-table { width: 100%; border-collapse: collapse; font-size: 0.66rem; }
.wtt-table th { text-align: left; color: #a9adda; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; padding: 0.3rem 0.2rem; border-bottom: 1px solid #26307d; }
.wtt-table td { padding: 0.28rem 0.2rem; border-bottom: 1px solid #141c6a; color: #c9cdf0; }
.wtt-table tr.me td { color: #d4c44a; font-weight: 800; }
.wtt-table td:first-child { width: 20px; }

/* Summary */
.wtt-treble-banner { text-align: center; padding: 2rem 1rem; margin-bottom: 1.2rem; }
.wtt-treble-banner.won { background: linear-gradient(135deg, #d4c44a, #bfb038); }
.wtt-treble-banner.won .headline { color: #0e1555; }
.wtt-treble-banner.lost { background: #141c6a; border: 2px solid #26307d; }
.wtt-treble-banner .headline { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.5rem; color: #ffffff; }
.wtt-treble-banner .sub { font-size: 0.78rem; margin-top: 0.4rem; opacity: 0.85; }
.wtt-summary-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.5rem; margin-bottom: 1.2rem; }
.wtt-summary-box { background: #141c6a; border: 1px solid #26307d; padding: 0.7rem; text-align: center; }
.wtt-summary-box .l { font-size: 0.58rem; color: #a9adda; text-transform: uppercase; letter-spacing: 0.02em; }
.wtt-summary-box .v { font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1rem; color: #ffffff; }
.wtt-playagain-btn { width: 100%; background: #d4c44a; color: #0e1555; border: none; padding: 1rem; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; cursor: pointer; }

@media (max-width: 640px) {
  .wtt-panel { margin: -1rem; padding: 1rem; overflow-x: hidden; }
  .wtt-club-grid { grid-template-columns: repeat(2,1fr); }
  .wtt-formation-grid, .wtt-diff-grid { grid-template-columns: repeat(2,1fr); }
  .wtt-squad-grid { grid-template-columns: 1fr; }
  .wtt-ratings-grid { grid-template-columns: repeat(3,1fr); }
  .wtt-summary-grid { grid-template-columns: 1fr; }
  .wtt-avg-bar { grid-template-columns: repeat(3,1fr); gap: 0.4rem 0.35rem; }
  .wtt-pick-btn { min-height: 2.75rem; font-size: 0.7rem; padding: 0.7rem 0.4rem; }
  .wtt-spin-btn { width: 120px; height: 120px; font-size: 1rem; }
  .wtt-slot { width: 70px; }
  .wtt-squad-player { padding: 0.8rem 0.7rem; }
  .wtt-sp-rating-badge { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
  .wtt-start-btn, .wtt-playagain-btn { min-height: 3rem; }
}

/* Win the Treble — end-of-run squad list with per-player goals/assists */
.wtt-squad-stat-row { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0.2rem; border-bottom: 1px solid #26307d; }
.wtt-sqs-pos { font-size: 0.6rem; color: #a9adda; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.wtt-sqs-name { font-weight: 800; font-size: 0.82rem; color: #ffffff; }
.wtt-sqs-ga { font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 0.85rem; color: #d4c44a; white-space: nowrap; }

/* ============================================================
   TSW CARDS — pack shop, opening reveal, collection browser
   ============================================================ */
.tsw-cards-header-bar { display: flex; justify-content: center; gap: 1.5rem; background: var(--navy); color: white; padding: 0.9rem; margin-bottom: 1.2rem; }
.tsw-cards-balance { display: flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 0.95rem; }
.tsw-cards-balance .icon { font-size: 1.1rem; }
.tsw-cards-balance .coins { color: var(--yellow); }
.tsw-cards-balance .points { color: #4a90e2; }

.tsw-cards-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--border); }
.tsw-cards-tab-btn { background: none; border: none; padding: 0.7rem 1.1rem; font-weight: 700; font-size: 0.8rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tsw-cards-tab-btn.active { color: #fff; border-bottom-color: #a78bfa; }

.tsw-pack-shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.9rem; }

.tsw-pack-card {
  --pack-accent: #7a7f97; --pack-accent-rgb: 122,127,151;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 1rem; border-radius: 16px; border: 1.5px solid rgba(var(--pack-accent-rgb),0.7);
  background:
    radial-gradient(circle at 72% 14%, rgba(var(--pack-accent-rgb),0.22), transparent 32%),
    linear-gradient(150deg, rgba(var(--pack-accent-rgb),0.1), #080c20 45%, #050713);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), inset 0 -20px 34px rgba(0,0,0,0.35), 0 8px 22px rgba(0,0,0,0.28);
  color: #f7f8ff;
}
.tsw-pack-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background: repeating-linear-gradient(135deg, transparent 0 26px, rgba(var(--pack-accent-rgb),0.05) 26px 28px);
}
.tsw-pack-card::after {
  content: ""; position: absolute; width: 85%; height: 2px; right: -18%; top: 30%;
  transform: rotate(-40deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--pack-accent), transparent);
  box-shadow: 0 0 10px rgba(var(--pack-accent-rgb),0.4);
}

.tsw-pack-bronze    { --pack-accent: #ad7b52; --pack-accent-rgb: 173,123,82; }
.tsw-pack-silver    { --pack-accent: #c0c8db; --pack-accent-rgb: 192,200,219; }
.tsw-pack-gold      { --pack-accent: #f7cf3b; --pack-accent-rgb: 247,207,59; }
.tsw-pack-elite     { --pack-accent: #b954ff; --pack-accent-rgb: 185,84,255; }
.tsw-pack-legendary {
  --pack-accent: #ff9b28; --pack-accent-rgb: 255,155,40; border-width: 2px;
  box-shadow: inset 0 0 30px rgba(255,155,40,0.1), 0 0 20px rgba(255,155,40,0.24);
}

.tsw-pack-card.featured { transform: translateY(-3px); }
.tsw-pack-ribbon {
  position: absolute; top: 16px; right: -32px; width: 130px; padding: 0.3rem 0;
  z-index: 6; transform: rotate(45deg); text-align: center; color: #191306;
  background: linear-gradient(180deg,#fff180,#eebd22); font-size: 0.56rem; font-weight: 900; letter-spacing: 0.04em;
}

.tsw-pack-top { position: relative; z-index: 2; }
.tsw-pack-tag {
  display: inline-block; padding: 0.25rem 0.5rem; border: 1px solid rgba(var(--pack-accent-rgb),0.6);
  color: var(--pack-accent); background: rgba(0,0,0,0.25); font-size: 0.6rem; font-weight: 900; letter-spacing: 0.06em;
}

.tsw-pack-art-area { position: relative; z-index: 2; height: 96px; display: grid; place-items: center; }
.tsw-pack-art-glow { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: rgba(var(--pack-accent-rgb),0.28); filter: blur(30px); }
.tsw-pack-art {
  position: relative; width: 64px; height: 82px; display: grid; place-items: center; transform: rotate(-4deg);
  clip-path: polygon(7% 0, 93% 0, 100% 8%, 96% 92%, 90% 100%, 10% 100%, 4% 92%, 0 8%);
  background: linear-gradient(145deg, rgba(var(--pack-accent-rgb),0.85), rgba(var(--pack-accent-rgb),0.25) 40%, #060912);
  border: 2px solid var(--pack-accent); box-shadow: 0 0 14px rgba(var(--pack-accent-rgb),0.4);
}
.tsw-pack-art::before, .tsw-pack-art::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 7px;
  background: repeating-linear-gradient(90deg, var(--pack-accent) 0 5px, rgba(255,255,255,0.4) 5px 7px);
}
.tsw-pack-art::before { top: 0; }
.tsw-pack-art::after { bottom: 0; }
.tsw-pack-logo { position: relative; z-index: 2; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 900; font-style: italic; letter-spacing: -0.04em; color: #fff; }

.tsw-pack-info { position: relative; z-index: 2; text-align: center; margin-top: 0.3rem; }
.tsw-pack-info h3 { margin: 0; font-family: 'Source Serif 4', serif; font-size: 1.15rem; }
.tsw-pack-info p { margin: 0.25rem 0 0; color: #a7acc9; font-size: 0.66rem; line-height: 1.3; min-height: 1.7em; }

.tsw-pack-contents { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.7rem; }
.tsw-pack-pill { padding: 0.4rem; text-align: center; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.035); }
.tsw-pack-pill span { display: block; color: #a7acc9; font-size: 0.52rem; font-weight: 800; letter-spacing: 0.03em; }
.tsw-pack-pill strong { display: block; margin-top: 0.15rem; color: #fff; font-size: 0.82rem; }
.tsw-pack-pill.support { border-color: rgba(247,207,59,0.3); }
.tsw-pack-pill.support strong { color: #f7cf3b; }

.tsw-pack-odds-area { position: relative; z-index: 2; margin-top: 0.7rem; padding: 0.6rem; border-radius: 10px; background: rgba(2,5,15,0.5); border: 1px solid rgba(255,255,255,0.06); }
.tsw-pack-odds-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.tsw-pack-odds-title span { color: #c5c9dd; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.03em; }
.tsw-pack-odds-toggle { padding: 0; border: 0; cursor: pointer; color: var(--pack-accent); background: transparent; font-size: 0.56rem; font-weight: 900; }
.tsw-pack-odds-strip { display: flex; width: 100%; height: 9px; overflow: hidden; border-radius: 99px; background: #090c18; }
.tsw-pack-odds-strip i { height: 100%; }
.tsw-pack-odds-list { display: none; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.5rem; margin-top: 0.55rem; }
.tsw-pack-odds-list.open { display: grid; }
.tsw-pack-odds-row { display: flex; justify-content: space-between; gap: 0.4rem; font-size: 0.58rem; color: #bcc0d3; }
.tsw-pack-odds-row strong { color: #fff; }

.tsw-pack-guarantee {
  position: relative; z-index: 2; margin-top: 0.6rem; padding: 0.5rem 0.6rem; display: flex; align-items: center; gap: 0.4rem;
  border-radius: 8px; color: #f6e89b; background: rgba(247,207,59,0.08); border: 1px solid rgba(247,207,59,0.2);
  font-size: 0.62rem; font-weight: 800; line-height: 1.3;
}
.tsw-pack-guarantee-icon { width: 14px; height: 14px; flex-shrink: 0; color: #f7cf3b; }

.tsw-pack-purchase { position: relative; z-index: 2; margin-top: auto; padding-top: 0.7rem; }
.tsw-pack-buy-btn {
  width: 100%; min-height: 46px; border: 1px solid var(--pack-accent); border-radius: 10px; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(var(--pack-accent-rgb),0.45), rgba(var(--pack-accent-rgb),0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 10px rgba(var(--pack-accent-rgb),0.2);
  font-size: 0.8rem; font-weight: 900; transition: filter 0.15s ease, transform 0.15s ease;
}
.tsw-pack-buy-btn:active { transform: scale(0.98); filter: brightness(1.1); }
.tsw-pack-coin-icon { width: 15px; height: 15px; flex-shrink: 0; }
.tsw-pack-buy-btn small { flex-basis: 100%; color: rgba(255,255,255,0.75); font-size: 0.52rem; font-weight: 700; letter-spacing: 0.03em; }

@media (max-width: 640px) {
  .tsw-pack-shop-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .tsw-pack-card { padding: 0.85rem; }
  .tsw-pack-art-area { height: 78px; }
  .tsw-pack-art { width: 52px; height: 68px; }
  .tsw-pack-info h3 { font-size: 1.05rem; }
  .tsw-pack-contents { margin-top: 0.55rem; }
  .tsw-pack-odds-area { margin-top: 0.55rem; }
  .tsw-pack-guarantee { margin-top: 0.5rem; }
  .tsw-pack-purchase { padding-top: 0.55rem; }
}

#tswCardsRevealArea { scroll-margin-top: 90px; }
.tsw-reveal-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.4rem; gap: 0.6rem; }
.tsw-reveal-eyebrow { color: #ffc928; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; }
.tsw-reveal-heading { margin: 0.2rem 0 0; font-family: 'Source Serif 4', serif; font-size: 1.5rem; color: var(--text, #1a1a2e); }
body.tsw-battle-page .tsw-reveal-heading { color: #f6f7ff; }
.tsw-reveal-counter { color: #8f8fa8; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.tsw-reveal-counter strong { color: #ffc928; font-size: 1.2rem; }

.tsw-reveal-row {
  min-height: 470px; display: flex; align-items: center; justify-content: flex-start; gap: 0.7rem;
  perspective: 1400px; overflow-x: auto; padding: 0.8rem 0.3rem; scrollbar-width: none;
}
.tsw-reveal-row::-webkit-scrollbar { display: none; }

.tsw-reveal-slot { position: relative; flex: 0 0 auto; perspective: 1100px; transition: transform 0.25s ease, filter 0.25s ease; }
.tsw-reveal-slot .tswb-card, .tsw-reveal-slot .tswb-support-card { width: 200px; }
.tsw-reveal-slot.current { transform: translateY(-12px) scale(1.06); filter: drop-shadow(0 0 14px rgba(195,71,255,0.5)); }
.tsw-reveal-slot.just-revealed { animation: tswRevealPulse 0.65s ease; }
@keyframes tswRevealPulse {
  0% { transform: translateY(-12px) scale(1.06); }
  45% { transform: translateY(-18px) scale(1.14); }
  100% { transform: translateY(0) scale(1); }
}

.tsw-flip-card {
  position: relative; width: 200px; height: 460px; /* width matches the content's real needs - the old 130px was too narrow for the 3-column stat grid, clipping it on the right; height re-measured below once width was fixed */
  transform-style: preserve-3d; transition: transform 0.72s cubic-bezier(.2,.75,.2,1);
}
.tsw-reveal-slot.revealed .tsw-flip-card { transform: rotateY(180deg); }
.tsw-flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tsw-flip-back { display: flex; align-items: center; justify-content: center; } /* the back is just a small logo mark, not the front's dense content - centered at its own normal size rather than stretched to fill the front's taller box */
.tsw-flip-front { transform: rotateY(180deg); }
.tsw-flip-front .tswb-card, .tsw-flip-front .tswb-support-card { width: 200px; height: auto; }

.tsw-cardback-inner {
  width: 200px; aspect-ratio: 0.64; height: auto; display: grid; place-items: center; border-radius: 6px;
  border: 2px solid #ba47ff; clip-path: polygon(10% 0%, 90% 0%, 100% 6%, 100% 94%, 90% 100%, 10% 100%, 0% 94%, 0% 6%);
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,0.03) 22px 24px),
    radial-gradient(circle at 50% 40%, rgba(181,46,255,0.18), transparent 45%),
    linear-gradient(145deg, #18102f, #050713);
  box-shadow: 0 0 14px rgba(187,54,255,0.32), inset 0 0 20px rgba(126,32,255,0.14);
}
.tsw-cardback-inner span { color: #b84cff; font-size: 1.6rem; font-weight: 1000; font-style: italic; text-shadow: 0 0 12px rgba(194,70,255,0.5); }

.tsw-reveal-badge {
  position: relative; z-index: 5; text-align: center; margin-top: 0.4rem;
  padding: 0.25rem 0.3rem; border-radius: 6px; font-size: 0.56rem; font-weight: 900; line-height: 1.2;
}
.tsw-reveal-badge.new { background: #1a7a3c; color: #fff; }
.tsw-reveal-badge.dup { background: #142a52; color: #8fc0f5; border: 1px solid #4a90e2; }

/* Sits directly under the card row, in normal flow - not pinned to the
   viewport edge, just snug against the cards themselves. */
.tsw-reveal-actions {
  margin-top: 0.3rem;
  padding: 0.4rem 0.5rem 0;
  text-align: center;
}
.tsw-reveal-message { margin-top: 0; text-align: center; color: #d3b5f7; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.03em; animation: tswTapPulse 1.4s ease-in-out infinite; }
@keyframes tswTapPulse { 50% { opacity: 0.45; } }

.tsw-reveal-all-btn { display: block; margin: 0.6rem auto 0.8rem; padding: 0.5rem 0.9rem; border: 1px solid #7f4ca7; border-radius: 8px; color: #d7b5ee; background: #110b22; font-size: 0.62rem; font-weight: 900; cursor: pointer; }
.tsw-reveal-continue-btn { display: block; margin: 0.7rem auto 0.8rem; background: var(--navy); color: white; border: none; padding: 0.9rem 2rem; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }

@media (min-width: 640px) {
  .tsw-reveal-slot .tswb-card, .tsw-reveal-slot .tswb-support-card, .tsw-flip-card, .tsw-flip-front .tswb-card, .tsw-flip-front .tswb-support-card, .tsw-cardback-inner { width: 230px; }
  .tsw-reveal-row { flex-wrap: wrap; overflow-x: visible; min-height: 470px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .tsw-flip-card, .tsw-reveal-slot { transition: none; }
  .tsw-reveal-slot.just-revealed, .tsw-reveal-message { animation: none; }
}

.tsw-cards-overall-progress { margin-bottom: 1.3rem; }
body.tsw-battle-page .tsw-cards-overall-progress { color: #f6f7ff; }

/* Shared progress bar fill transition - used by the overall panel,
   Special Collection panels, and (separately, its own rule below) the
   club rows. Width is set to 0 on render and animated to the real
   target by tswAnimateBarsIn() once the section scrolls into view. */
.tsw-scc-bar-track { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.tsw-scc-bar-fill { height: 100%; border-radius: 3px; background: rgba(var(--scc-rgb,184,84,255),0.9); box-shadow: 0 0 8px rgba(var(--scc-rgb,184,84,255),0.5); transition: width 1.1s cubic-bezier(.16,.84,.44,1); }

.tsw-collection-overall-panel {
  --scc-rgb: 184,84,255; display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem;
  border-radius: 12px; border: 1px solid rgba(var(--scc-rgb),0.55);
  background: radial-gradient(circle at 15% 20%, rgba(var(--scc-rgb),0.16), transparent 55%), linear-gradient(155deg, #14102c 0%, #0a0818 60%, #06050f 100%);
  box-shadow: 0 0 18px rgba(var(--scc-rgb),0.14);
}
.tsw-collection-overall-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #d6a8fc; background: rgba(var(--scc-rgb),0.14); border: 1px solid rgba(var(--scc-rgb),0.4); }
.tsw-collection-overall-icon svg { width: 22px; height: 22px; }
.tsw-collection-overall-body { flex: 1; min-width: 0; }
.tsw-collection-overall-text { font-weight: 800; font-size: 0.82rem; color: #f3edff; margin-bottom: 0.5rem; }
.tsw-collection-overall-text .pct { color: #d6a8fc; font-weight: 900; }

/* Section headers (Special Collections / Clubs), shared style */
.tsw-collection-section-head { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 0 0.7rem; }
.tsw-collection-section-title { display: flex; align-items: center; gap: 0.45rem; font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1rem; color: #f3edff; }
body.tsw-battle-page .tsw-collection-section-title { color: #f3edff; }
.tsw-section-star, .tsw-section-trophy { width: 18px; height: 18px; color: #d4c44a; flex-shrink: 0; }
.tsw-view-all-btn {
  display: inline-flex; align-items: center; gap: 0.25rem; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; color: #d7d9f5; font-size: 0.68rem; font-weight: 800;
  padding: 0.4rem 0.7rem; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.tsw-view-all-btn svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.tsw-view-all-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
.tsw-view-all-btn:active { transform: scale(0.96); }
.tsw-view-all-btn.open svg { transform: rotate(90deg); }
body.tsw-battle-page .tsw-view-all-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #d7d9f5; }
body.tsw-battle-page .tsw-view-all-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }

/* Special Collections — dark neon panels, one colour identity per card
   via --scc-rgb (purple/blue/teal/red for GK/DEF/MID/FWD, rarity
   colours reused for everything behind View All). */
.tsw-scc-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.3rem; }
.tsw-scc-panel {
  position: relative; display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 0.9rem;
  border-radius: 12px; border: 1px solid rgba(var(--scc-rgb),0.5);
  background: radial-gradient(circle at 12% 15%, rgba(var(--scc-rgb),0.15), transparent 55%), linear-gradient(155deg, #131025 0%, #0a0916 55%, #07060e 100%);
  box-shadow: 0 0 14px rgba(var(--scc-rgb),0.1); transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tsw-scc-panel:hover { box-shadow: 0 0 20px rgba(var(--scc-rgb),0.24); border-color: rgba(var(--scc-rgb),0.8); }
.tsw-scc-panel:active { transform: scale(0.99); }
.tsw-scc-panel.complete { border-color: rgba(var(--scc-rgb),0.9); box-shadow: 0 0 20px rgba(var(--scc-rgb),0.28); }
.tsw-scc-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: rgb(var(--scc-rgb)); background: rgba(var(--scc-rgb),0.14); border: 1.5px solid rgba(var(--scc-rgb),0.55);
}
.tsw-scc-icon svg { width: 22px; height: 22px; }
.tsw-scc-body { flex: 1; min-width: 0; }
.tsw-scc-title { font-weight: 800; font-size: 0.82rem; color: #f3edff; margin-bottom: 0.4rem; }
.tsw-scc-count { font-size: 0.66rem; color: #a9adda; font-weight: 700; margin-top: 0.3rem; }
.tsw-scc-reward-line { font-size: 0.62rem; color: #8a8fc0; margin-top: 0.35rem; }
.tsw-scc-reward-line .coins { color: #d4c44a; font-weight: 800; }
.tsw-scc-reward-line .packname { color: rgb(var(--scc-rgb)); font-weight: 800; }

/* Reuses the real Pack Store art (.tsw-pack-art / .tsw-pack-{id}) at a
   smaller size instead of a text placeholder for the reward preview. */
.tsw-scc-pack-mini { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; background: none; border: none; padding: 0; }
.tsw-scc-pack-mini .tsw-pack-art { width: 40px; height: 51px; }
.tsw-scc-pack-mini .tsw-pack-logo { font-size: 0.5rem; }
.tsw-scc-pack-label { font-size: 0.48rem; font-weight: 900; letter-spacing: 0.04em; text-align: center; line-height: 1.15; color: var(--pack-accent, #b954ff); }

/* Clubs — one dark gradient row per club, derived from real club
   colours via --club-a/b/c (light -> dark) and a two-tone circular
   marker via --c1/--c2, both set inline per row from TSW_CLUB_COLORS.
   No badges or logos - colour identity only. */
.tsw-club-list { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.3rem; }
.tsw-club-row {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.8rem; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--club-a) 0%, var(--club-b) 28%, var(--club-c) 78%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), 0 3px 10px rgba(0,0,0,0.25);
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.tsw-club-row:hover { filter: brightness(1.08); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), 0 4px 14px rgba(0,0,0,0.32); }
.tsw-club-row:active { transform: scale(0.99); }
.tsw-club-row.complete { border-color: rgba(212,196,74,0.7); box-shadow: 0 0 12px rgba(212,196,74,0.25); }
.tsw-club-circle {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%);
  border: 2px solid rgba(255,255,255,0.55); box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.tsw-club-mid { flex: 1; min-width: 0; }
.tsw-club-name { font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.45); margin-bottom: 0.35rem; }
.tsw-club-bar-track { height: 5px; border-radius: 3px; background: rgba(0,0,0,0.32); overflow: hidden; }
.tsw-club-bar-fill { height: 100%; border-radius: 3px; background: var(--club-bar); box-shadow: 0 0 6px rgba(255,255,255,0.35); transition: width 1.1s cubic-bezier(.16,.84,.44,1); }
.tsw-club-count { flex-shrink: 0; font-size: 0.72rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.45); }
.tsw-club-chevron { flex-shrink: 0; width: 16px; height: 16px; color: rgba(255,255,255,0.75); }

@media (prefers-reduced-motion: reduce) {
  .tsw-scc-bar-fill, .tsw-club-bar-fill { transition: none; }
}


.tsw-collection-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
.tsw-mini-card { position: relative; border-radius: 6px; border: 2px solid #8a8a8a; padding: 0.6rem 0.3rem; text-align: center; background: linear-gradient(160deg,#5a5a5a 0%,#2a2a2a 55%,#111 100%); color: #fff; overflow: hidden; }
.tsw-mini-card::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 10px, rgba(255,255,255,0.05) 10px 12px); pointer-events: none; z-index: 0; }
.tsw-mini-card > * { position: relative; z-index: 1; }
.tsw-mini-card.rarity-academy { border-color: #8a8a8a; background: linear-gradient(160deg,#8a8a8a 0%,#2a2a2a 55%,#111 100%); }
.tsw-mini-card.rarity-prospect { border-color: #22c55e; background: linear-gradient(160deg,#4ade80 0%,#14532d 55%,#052e16 100%); }
.tsw-mini-card.rarity-first-team { border-color: #4a90e2; background: linear-gradient(160deg,#6fa8f5 0%,#1a3a6b 55%,#0a1730 100%); }
.tsw-mini-card.rarity-star { border-color: #3b5bdb; background: linear-gradient(160deg,#5c78e8 0%,#1c2a70 55%,#0a1030 100%); }
.tsw-mini-card.rarity-elite { border-color: #a855f7; background: linear-gradient(160deg,#c084fc 0%,#5a1f8a 55%,#1a0a30 100%); }
.tsw-mini-card.rarity-world-class { border-color: #f97316; background: linear-gradient(160deg,#fb923c 0%,#7c2d12 55%,#2a0d04 100%); }
.tsw-mini-card.rarity-icon { border-color: #d4c44a; background: linear-gradient(160deg,#f0dc7a 0%,#8a6f00 55%,#2a2000 100%); box-shadow: 0 0 12px rgba(212,196,74,0.4); }
.tsw-mini-card.rarity-legend { border-color: #ef4444; background: linear-gradient(160deg,#f87171 0%,#7f1d1d 55%,#2a0808 100%); box-shadow: 0 0 12px rgba(239,68,68,0.35); }
.tsw-mini-card.rarity-immortal { border-color: #e5e7eb; background: linear-gradient(160deg,#f3f4f6 0%,#4b5563 55%,#0a0a0c 100%); box-shadow: 0 0 16px rgba(229,231,235,0.5); }
.tsw-mini-card.locked { opacity: 0.35; filter: grayscale(1); }
.tsw-mc-ovr { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.1rem; color: var(--navy); }
.tsw-mc-name { font-size: 0.62rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsw-mc-version { font-size: 0.52rem; color: var(--muted); text-transform: uppercase; }
.tsw-mc-level-badge { position: absolute; top: 0.3rem; left: 0.3rem; background: #1a7a3c; color: #fff; font-size: 0.5rem; font-weight: 800; padding: 0.05rem 0.3rem; border-radius: 2px; }

.tsw-cards-toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.tsw-cards-toast { background: var(--navy); color: var(--yellow); padding: 0.7rem 1.1rem; font-weight: 800; font-size: 0.85rem; box-shadow: 0 6px 16px rgba(0,0,0,0.25); transform: translateX(120%); opacity: 0; transition: all 0.3s ease; }
.tsw-cards-toast.show { transform: translateX(0); opacity: 1; }

@media (max-width: 640px) {
  .tsw-collection-grid { grid-template-columns: repeat(2,1fr); }
}

/* TSW Cards — pending packs, special collections, completion celebration */
.tsw-pending-packs-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.5rem; }
.tsw-pending-pack-btn { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--yellow); color: var(--navy); border: none; padding: 0.7rem 1.1rem; font-weight: 800; font-size: 0.78rem; cursor: pointer; }
.tsw-pending-pack-icon { width: 16px; height: 16px; flex-shrink: 0; }
.tsw-pending-pack-btn .count { background: var(--navy); color: var(--yellow); padding: 0.05rem 0.4rem; margin-left: 0.4rem; font-size: 0.7rem; }

.tsw-completion-list { max-width: 480px; margin: 0 auto 1.5rem; }
.tsw-completion-row { background: white; border: 2px solid var(--yellow); padding: 1rem; margin-bottom: 0.6rem; text-align: center; }
.tsw-completion-label { font-family: 'Russo One', sans-serif; font-weight: 800; color: var(--navy); font-size: 0.95rem; margin-bottom: 0.3rem; }
.tsw-completion-reward { font-size: 0.72rem; color: var(--muted); }

/* ============================================================
   TSW BATTLE
   ============================================================ */
.tsw-deckslots-header { text-align: center; margin-bottom: 0.6rem; }
.tsw-battle-deck-count { font-weight: 800; color: #f5f5f5; font-size: 1rem; }

.tsw-deckslots-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; background: #0b0f1e; border: 1px solid #232a45; padding: 0.9rem 0.6rem; margin-bottom: 1.1rem; }
.tsw-deck-slot { width: 64px; height: 86px; border: 2px dashed #3a4266; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tsw-deck-slot.filled { border-style: solid; cursor: pointer; }
.tsw-deck-slot.filled.rarity-academy { border-color: #8a8a8a; background: linear-gradient(160deg,#2a2a2a,#111); }
.tsw-deck-slot.filled.rarity-prospect { border-color: #22c55e; background: linear-gradient(160deg,#14532d,#052e16); }
.tsw-deck-slot.filled.rarity-first-team { border-color: #4a90e2; background: linear-gradient(160deg,#1a3a6b,#0a1730); }
.tsw-deck-slot.filled.rarity-star { border-color: #3b5bdb; background: linear-gradient(160deg,#1c2a70,#0a1030); }
.tsw-deck-slot.filled.rarity-elite { border-color: #a855f7; background: linear-gradient(160deg,#5a1f8a,#1a0a30); }
.tsw-deck-slot.filled.rarity-world-class { border-color: #f97316; background: linear-gradient(160deg,#7c2d12,#2a0d04); }
.tsw-deck-slot.filled.rarity-icon { border-color: #d4c44a; background: linear-gradient(160deg,#8a6f00,#2a2000); }
.tsw-deck-slot.filled.rarity-legend { border-color: #ef4444; background: linear-gradient(160deg,#7f1d1d,#2a0808); }
.tsw-deck-slot.filled.rarity-immortal { border-color: #e5e7eb; background: linear-gradient(160deg,#4b5563,#0a0a0c); }
.tsw-deck-slot .ovr { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.1rem; color: #fff; }
.tsw-deck-slot .nm { font-size: 0.48rem; font-weight: 700; color: #c9cdf0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 90%; }
.tsw-deck-slot .empty-icon { font-size: 1.3rem; color: #3a4266; }

.tsw-binder-toolbar { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1rem; }
.tsw-binder-sort, .tsw-binder-filter { display: flex; align-items: center; gap: 0.4rem; }
.tsw-binder-sort label, .tsw-binder-filter label { font-size: 0.66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.tsw-binder-sort select, .tsw-binder-filter select { border: 1px solid var(--border); padding: 0.4rem 0.5rem; font-size: 0.74rem; font-weight: 700; background: white; }

.tsw-card-binder { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.7rem; margin-bottom: 1.2rem; }
.tsw-binder-card {
  position: relative; aspect-ratio: 3/4.6; border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: rgba(212,196,74,0.3); display: flex; flex-direction: column; padding: 0.5rem 0.4rem; text-align: center; border: 3px solid #8a8a8a; background: linear-gradient(160deg,#5a5a5a 0%,#2a2a2a 55%,#111 100%); overflow: hidden;
  /* A club can run to 80+ cards in this grid at once - skip layout/paint
     work for whichever ones are currently offscreen so fast scrolling
     stays smooth instead of the browser trying to keep everything
     (including per-card animations) fully rendered at all times. The
     browser still reserves this approximate box size up front, so nothing
     jumps around as real content swaps in while scrolling. */
  content-visibility: auto;
  contain-intrinsic-height: auto 230px;
}
.tsw-binder-card::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 14px, rgba(255,255,255,0.05) 14px 16px); pointer-events: none; z-index: 0; }
.tsw-binder-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.22) 45%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.22) 55%, transparent 100%);
  transform: rotate(8deg) translateX(0);
  animation: tswCardShine 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}
@keyframes tswCardShine {
  0% { transform: rotate(8deg) translateX(0); }
  35%, 100% { transform: rotate(8deg) translateX(340%); }
}
.tsw-binder-card > * { position: relative; z-index: 2; }
.tsw-binder-card:nth-child(3n+1)::after { animation-delay: 0s; }
.tsw-binder-card:nth-child(3n+2)::after { animation-delay: 1.2s; }
.tsw-binder-card:nth-child(3n)::after { animation-delay: 2.4s; }
/* Large browsing grids skip the continuous loop for mobile performance */
#tswCatalogueGrid .tsw-binder-card::after, #tswBattleOwnedGrid .tsw-binder-card::after {
  animation: none; display: none;
}
.tsw-binder-card.rarity-academy { border-color: #8a8a8a; background: linear-gradient(160deg,#8a8a8a 0%,#2a2a2a 55%,#111 100%); }
.tsw-binder-card.rarity-prospect { border-color: #22c55e; background: linear-gradient(160deg,#4ade80 0%,#14532d 55%,#052e16 100%); }
.tsw-binder-card.rarity-first-team { border-color: #4a90e2; background: linear-gradient(160deg,#6fa8f5 0%,#1a3a6b 55%,#0a1730 100%); }
.tsw-binder-card.rarity-star { border-color: #3b5bdb; background: linear-gradient(160deg,#5c78e8 0%,#1c2a70 55%,#0a1030 100%); }
.tsw-binder-card.rarity-elite { border-color: #a855f7; background: linear-gradient(160deg,#c084fc 0%,#5a1f8a 55%,#1a0a30 100%); }
.tsw-binder-card.rarity-world-class { border-color: #f97316; background: linear-gradient(160deg,#fb923c 0%,#7c2d12 55%,#2a0d04 100%); }
.tsw-binder-card.rarity-icon { border-color: #d4c44a; background: linear-gradient(160deg,#f0dc7a 0%,#8a6f00 55%,#2a2000 100%); box-shadow: 0 0 12px rgba(212,196,74,0.4); }
.tsw-binder-card.rarity-legend { border-color: #ef4444; background: linear-gradient(160deg,#f87171 0%,#7f1d1d 55%,#2a0808 100%); box-shadow: 0 0 12px rgba(239,68,68,0.35); }
.tsw-binder-card.rarity-immortal { border-color: #e5e7eb; background: linear-gradient(160deg,#f3f4f6 0%,#4b5563 55%,#0a0a0c 100%); box-shadow: 0 0 16px rgba(229,231,235,0.5); }
.tsw-binder-card.in-deck { outline: 3px solid #fff; outline-offset: -3px; }

.tsw-bc-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; }
.tsw-bc-ratingblock { text-align: left; line-height: 1; }
.tsw-bc-ratingblock .ovr { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.4rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.tsw-bc-ratingblock .pos { font-size: 0.58rem; font-weight: 800; color: rgba(255,255,255,0.85); margin-top: 0.1rem; }
.tsw-binder-card .indeck-check { z-index: 2; background: #1a7a3c; color: white; font-size: 0.6rem; font-weight: 900; width: 1.15rem; height: 1.15rem; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tsw-binder-card .level-badge { position: absolute; top: 0.4rem; left: 50%; transform: translateX(-50%); z-index: 2; background: #1a7a3c; color: #fff; font-size: 0.5rem; font-weight: 800; padding: 0.05rem 0.3rem; border-radius: 2px; }

.tsw-bc-portrait { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.tsw-bc-portrait svg { width: 62%; height: 62%; fill: rgba(0,0,0,0.4); filter: drop-shadow(0 0 6px rgba(255,255,255,0.15)); }

.tsw-binder-card .name-badge { position: relative; z-index: 1; font-size: 0.68rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.85); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; padding: 0.3rem 0; border-top: 1px solid rgba(255,255,255,0.3); border-bottom: 1px solid rgba(255,255,255,0.3); margin-bottom: 0.3rem; }

.tsw-bc-statgrid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.4rem; }
.tsw-bc-statcol { display: flex; flex-direction: column; gap: 0.12rem; }
.tsw-bc-stat { display: flex; justify-content: space-between; align-items: baseline; }
.tsw-bc-stat .l { font-size: 0.5rem; font-weight: 700; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.tsw-bc-stat .v { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 0.8rem; color: #fff; }

.tsw-binder-card .hand-relevant-stat { position: relative; z-index: 1; background: rgba(212,196,74,0.9); color: #0e1555; font-weight: 900; font-size: 0.62rem; padding: 0.15rem 0.3rem; margin-bottom: 0.25rem; border-radius: 3px; }

.tsw-battle-deck-summary { text-align: center; color: #a9adda; margin-bottom: 1.2rem; font-size: 0.85rem; }

.tsw-ability-log { text-align: center; color: #d4c44a; font-size: 0.72rem; font-weight: 700; margin-bottom: 0.8rem; }
.tsw-battle-difficulty-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.7rem; }
.tsw-battle-difficulty-btn { background: white; border: 2px solid var(--border); padding: 1.2rem 0.8rem; text-align: center; cursor: pointer; }
.tsw-battle-difficulty-btn:hover { border-color: var(--navy); }
.tsw-battle-difficulty-btn .name { font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1rem; color: var(--navy); margin-bottom: 0.3rem; }
.tsw-battle-difficulty-btn .desc { font-size: 0.66rem; color: var(--muted); }

.tsw-battle-arena-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 0.78rem; color: var(--muted); }
.tsw-battle-scoreline { text-align: center; font-family: 'Russo One', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--navy); margin-bottom: 1.2rem; }

.tsw-battle-stat-choices { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.5rem; }
.tsw-stat-choice-btn { display: flex; justify-content: space-between; align-items: center; background: white; border: 2px solid var(--border); padding: 0.8rem 1rem; cursor: pointer; font-weight: 700; }
.tsw-stat-choice-btn:hover { border-color: var(--navy); }
.tsw-stat-choice-btn .label { font-size: 0.78rem; color: var(--text); }
.tsw-stat-choice-btn .value { font-family: 'Russo One', sans-serif; font-weight: 900; font-size: 1.2rem; color: var(--navy); }


.tsw-battle-result-score { text-align: center; color: var(--muted); margin-bottom: 0.8rem; }
.tsw-battle-result-reward { text-align: center; font-weight: 800; color: var(--yellow-h); background: var(--navy); padding: 0.7rem; margin-bottom: 1.2rem; }

@media (max-width: 640px) {
  .tsw-card-binder { grid-template-columns: repeat(2,1fr); }
  .tsw-deck-slot { width: 54px; height: 74px; }
  .tsw-battle-difficulty-grid { grid-template-columns: 1fr; }
  .tsw-battle-stat-choices { grid-template-columns: 1fr; }
}

.tsw-empty-owned-msg { grid-column: 1 / -1; text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.82rem; }
.tsw-empty-owned-msg a { color: var(--navy); text-decoration: underline; font-weight: 700; }

.tsw-rtg-status-box { background: var(--navy); padding: 1rem; margin-bottom: 0.8rem; }
.tsw-rtg-division-name { font-family: 'Russo One', sans-serif; font-weight: 800; color: var(--yellow); font-size: 1.05rem; margin-bottom: 0.5rem; }
.tsw-rtg-status-box .tsw-cpc-bar-track { background: rgba(255,255,255,0.15); }
.tsw-rtg-status-box .tsw-cpc-bar-fill { background: var(--yellow); }
.tsw-rtg-status-box .tsw-cpc-count { color: rgba(255,255,255,0.8); }

/* ============================================================
   TSW BATTLE — full-stat-visible hand table, inspired by (not
   copied from) the "all stats stacked per card" reference layout:
   one shared label column, then every card in hand gets its own
   column showing every stat value at once — no digging required.
   ============================================================ */

@media (max-width: 640px) {
}

/* ============================================================
   TSW BATTLE — card-carousel hand + head-to-head matchup reveal,
   built as flex-wrap grids (no horizontal scroll containers —
   that's exactly the pattern that caused mobile tap/overflow
   issues in the deck builder before, not repeating it here).
   ============================================================ */




@media (max-width: 640px) {
}

/* ============================================================
   TSW BATTLE — tab bar + condensed one-screen arena + pitch visual
   ============================================================ */
.tsw-battle-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; overflow-x: auto; }
.tsw-battle-tab-btn { flex-shrink: 0; background: none; border: none; border-bottom: 3px solid transparent; padding: 0.5rem 0.7rem; font-weight: 700; font-size: 0.76rem; color: #a9adda; cursor: pointer; }
.tsw-battle-tab-btn.active { color: #d4c44a; border-bottom-color: #d4c44a; }

/* Condensed arena — every element trimmed to fit one mobile screen */
#tswBattleArena .tsw-battle-scoreline { font-size: 1.05rem; margin-bottom: 0.4rem; }
#tswBattleArena .tsw-battle-scoreline span { color: #d4c44a; font-weight: 700; font-size: 0.88rem; }

@keyframes tswBallDrift { from { transform: translate(0,0); } to { transform: translate(8px, -6px); } }

#tswBattleArena .tsw-battle-hand { grid-template-columns: repeat(3,1fr); gap: 0.4rem; margin-bottom: 0.6rem; }
#tswBattleArena #tswBattleConfirmCardBtn { padding: 0.7rem; font-size: 0.8rem; margin-bottom: 0.6rem; }

@media (max-width: 640px) {
  #tswBattleArena .tsw-battle-hand { gap: 0.3rem; }
}

/* ============================================================
   TSW BATTLE — game-feel animations: this is the actual "gameplay"
   layer that was missing — tap feedback, a real clash sequence on
   reveal, and a celebration on match win, not static content swaps.
   ============================================================ */

.wtt-start-btn, .tsw-pending-pack-btn, .wtt-playagain-btn { transition: transform 0.1s ease; }
.wtt-start-btn:active, .tsw-pending-pack-btn:active, .wtt-playagain-btn:active { transform: scale(0.96); }






/* The tab bar and toolbar stick to the top of the viewport as you scroll
   through the cards — cards themselves flow normally in the page (no
   fixed-height container, which is what caused them to collapse on top
   of each other last time). Sticky positioning is the robust, standard
   way to do "header stays, content scrolls" without nested scroll
   regions or fragile viewport-height math. */
.tsw-battle-tabs { position: sticky; top: 0; z-index: 20; background: #0e1555; padding-top: 0.4rem; }
#tswTabCatalogue .tsw-binder-toolbar, #tswTabDeck .tsw-binder-toolbar {
  position: sticky; top: 44px; z-index: 19; background: #0e1555; padding: 0.5rem 0; margin-bottom: 0.6rem;
}

/* ============================================================
   Reward Board — face-down tile grid, per spec
   ============================================================ */
.tsw-reward-board-title { text-align: center; font-family: 'Russo One', sans-serif; font-size: 1rem; color: #d4c44a; margin: 1rem 0 0.6rem; }
.tsw-reward-board-title span { display: block; font-family: 'Inter', sans-serif; font-size: 0.7rem; color: #a9adda; font-weight: 700; margin-top: 0.2rem; }
.tsw-reward-board-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5rem; margin-bottom: 1rem; }
.tsw-reward-tile { aspect-ratio: 1; background: linear-gradient(160deg,#1a2270,#0e1555); border: 2px solid #4a4fb8; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.15s ease; }
.tsw-reward-tile:active { transform: scale(0.93); }
.tsw-reward-tile-q { font-family: 'Russo One', sans-serif; font-size: 1.6rem; color: #4a4fb8; }
.tsw-reward-tile.revealed { cursor: default; border-color: #d4c44a; background: linear-gradient(160deg,#2a2410,#0e1555); animation: tswResultPop 0.35s cubic-bezier(.34,1.56,.64,1); }
.tsw-reward-tile-label { font-size: 0.6rem; font-weight: 800; color: #d4c44a; text-align: center; padding: 0.2rem; line-height: 1.25; }

/* Tiebreaker banner in the round reveal */
.tsw-tiebreak-banner { text-align: center; font-family: 'Russo One', sans-serif; font-size: 0.85rem; letter-spacing: 0.02em; color: #ff8a80; background: rgba(184,48,47,0.2); border: 1px solid #b8302f; padding: 0.5rem; margin-bottom: 0.6rem; border-radius: 4px; }

/* ============================================================
   TSW BATTLE — arena rebuilt to closely match the provided
   reference implementation: scoreboard, round heading, reveal
   zone with VS, hand section, and the card component itself.
   ============================================================ */
.tsw-scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0.8rem 0; }
.tsw-sb-player { display: flex; flex-direction: column; }
.tsw-sb-player.right { text-align: right; }
.tsw-sb-name { font-size: 0.7rem; color: #8fa2b8; letter-spacing: 0.05em; margin-bottom: 3px; }
.tsw-sb-score { font-family: 'Russo One', sans-serif; font-size: 1.8rem; }
.tsw-sb-label { color: #8fa2b8; font-size: 0.65rem; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }

.tsw-round-heading { text-align: center; margin: 0.6rem 0; }
.tsw-round-num { color: #8498ae; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 4px; }
.tsw-round-instruction { color: #91a3b8; margin-top: 6px; font-size: 0.78rem; }

.tsw-reveal-zone { min-height: 60px; display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 0.8rem 0; flex-wrap: wrap; }
.tsw-versus { font-size: 0.9rem; color: #64748b; font-weight: 800; }

.tsw-round-result-banner { text-align: center; font-family: 'Russo One', sans-serif; font-size: 1.1rem; margin: 0.6rem 0; }
.tsw-round-result-banner.win { color: #47dd91; }
.tsw-round-result-banner.loss { color: #ff6978; }

.tsw-hand-section { border-top: 1px solid rgba(255,255,255,0.08); padding: 0.9rem 0 0.5rem; margin-top: 0.6rem; }
.tsw-hand-title { color: #8498ae; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6rem; margin-bottom: 0.6rem; text-align: center; }
.tsw-hand { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

.tsw-match-history { display: grid; gap: 0.4rem; text-align: left; margin: 0.8rem 0; }
.tsw-history-item { background: rgba(255,255,255,0.035); padding: 0.6rem 0.7rem; border-radius: 6px; color: #b8c5d4; font-size: 0.68rem; line-height: 1.4; }

/* Card component — the core visual matching the reference exactly */
.tsw-matchcard { position: relative; width: 130px; min-height: 175px; padding: 0.6rem; background: linear-gradient(160deg,#16263a,#0d1827); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease; }
.tsw-matchcard.selectable { cursor: pointer; }
.tsw-matchcard.selectable:active { transform: translateY(-4px) scale(0.98); border-color: #38bdf8; }
.tsw-matchcard.winner { border-color: #46d98c; box-shadow: 0 0 0 2px rgba(70,217,140,0.15); animation: tswWinnerGlow 0.8s ease 2; }
.tsw-matchcard.loser { opacity: 0.55; }
.tsw-mc-rating { position: absolute; right: 0.5rem; top: 0.5rem; font-family: 'Russo One', sans-serif; font-size: 1.05rem; }
.tsw-mc-position { display: inline-block; font-size: 0.56rem; padding: 0.15rem 0.35rem; border-radius: 5px; background: rgba(255,255,255,0.08); color: #aad3ee; margin-bottom: 1.2rem; }
.tsw-mc-name { font-size: 0.78rem; font-weight: 800; line-height: 1.1; min-height: 1.7rem; }
.tsw-mc-club { color: #8296ab; font-size: 0.56rem; margin: 0.2rem 0 0.5rem; }
.tsw-mc-stats { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.4rem; display: grid; gap: 0.2rem; }
.tsw-mc-stat-row { display: flex; justify-content: space-between; font-size: 0.56rem; color: #c3cedb; }
.tsw-mc-stat-row.active { color: #38bdf8; font-weight: 800; }
.tsw-mc-total { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 0.35rem; padding-top: 0.4rem; display: flex; justify-content: space-between; font-weight: 800; color: #f1f5f9; font-size: 0.72rem; }

@media (max-width: 640px) {
  .tsw-matchcard { width: calc(50% - 0.3rem); }
  .tsw-hand .tsw-matchcard { width: calc(50% - 0.25rem); }
}

/* ============================================================
   TSW PROFILE GATE — shared Create Profile / Sign In modal.
   Self-contained dark-card design so it reads identically well
   regardless of the host page's own background (light pages like
   Cards/Games/Profile, or the dark Battle background).
   ============================================================ */
.tsw-gate-overlay {
  position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center;
  padding: 1.2rem; background: rgba(3, 9, 25, 0.82);
}
.tsw-gate-overlay.visible { display: flex; }

.tsw-gate-panel {
  position: relative; width: 100%; max-width: 360px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(165deg, #141c6a 0%, #0e1555 55%, #090e3a 100%);
  border: 1px solid #2a3390; border-radius: 14px; padding: 1.6rem 1.4rem; color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.tsw-gate-close {
  position: absolute; top: 0.7rem; right: 0.8rem; background: none; border: none;
  color: #a9adda; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0.2rem;
}
.tsw-gate-eyebrow { color: #d4c44a; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
.tsw-gate-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.3rem; text-align: center; margin: 0.3rem 0 0.5rem; }
.tsw-gate-msg { font-size: 0.78rem; color: #c4c8e8; text-align: center; margin-bottom: 1.3rem; line-height: 1.55; }

.tsw-gate-field { margin-bottom: 0.85rem; }
.tsw-gate-field label { display: block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #a9adda; margin-bottom: 0.3rem; }
.tsw-gate-field input {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid #2a3390; border-radius: 8px;
  background: #0a103f; color: #fff; font-family: 'Inter', sans-serif; font-size: 0.85rem;
}
.tsw-gate-field input::placeholder { color: #6a70a8; }
.tsw-gate-field input:focus { outline: none; border-color: #d4c44a; }

.tsw-gate-submit-btn {
  width: 100%; background: var(--yellow, #d4c44a); color: #0e1555; border: none; border-radius: 8px;
  padding: 0.8rem; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; margin-top: 0.2rem; transition: filter 0.15s ease;
}
.tsw-gate-submit-btn:hover { filter: brightness(1.08); }
.tsw-gate-submit-btn:disabled { opacity: 0.6; cursor: default; }

.tsw-gate-error { color: #ff8a80; font-size: 0.74rem; text-align: center; margin-top: 0.7rem; min-height: 1rem; }

.tsw-gate-toggle-row { text-align: center; margin-top: 1.3rem; font-size: 0.76rem; color: #a9adda; }
.tsw-gate-toggle-row button { background: none; border: none; color: #d4c44a; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 0.76rem; margin-left: 0.3rem; }

/* ============================================================
   TSW PROFILE DASHBOARD (Phase 4) — cross-site profile page.
   Light theme, matching the rest of profile.html/games.html.
   ============================================================ */
.tsw-pf-signedout {
  max-width: 420px; margin: 2rem auto; text-align: center;
  background: var(--white); border: 1px solid var(--border); padding: 2rem 1.6rem;
}
.tsw-pf-signedout-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.3rem; color: var(--navy); margin-bottom: 0.6rem; }
.tsw-pf-signedout p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.3rem; }
.tsw-pf-signin-btn {
  background: var(--navy); color: white; border: none; padding: 0.8rem 1.6rem;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
}

.tsw-pf-identity { display: flex; align-items: center; gap: 1rem; }
.tsw-pf-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy); color: white; display: grid; place-items: center;
  font-family: 'Source Serif 4', serif; font-size: 1.5rem; font-weight: 700;
}
.tsw-pf-username { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.15rem; color: #fff; display: flex; align-items: center; gap: 0.4rem; }
.tsw-pf-level-sub { font-size: 0.76rem; color: var(--muted); margin-top: 0.2rem; }

.tsw-pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 700px) { .tsw-pf-grid { grid-template-columns: 1fr; } }

.tsw-pf-card-title { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 0.9rem; }
.tsw-pf-stat-row { display: flex; gap: 0.8rem; margin-bottom: 1.1rem; }
.tsw-pf-stat { flex: 1; text-align: center; background: var(--light); padding: 0.7rem 0.4rem; }
.tsw-pf-stat strong { display: block; font-family: 'Source Serif 4', serif; font-size: 1.15rem; color: var(--navy); }
.tsw-pf-stat span { display: block; font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.2rem; }

.tsw-pf-rtg-line { font-size: 0.78rem; color: var(--navy); background: var(--light); padding: 0.5rem 0.7rem; margin-bottom: 1rem; }
.tsw-pf-rtg-line strong { color: #a1841f; }

.tsw-pf-recent-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; margin-bottom: 0.5rem; }
.tsw-pf-recent-list { margin-bottom: 1.1rem; }
.tsw-pf-recent-item { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid rgba(139,92,246,0.2); font-size: 0.78rem; color: #fff; }
.tsw-pf-recent-item:last-child { border-bottom: none; }
.tsw-pf-recent-stars { color: #d4a72c; letter-spacing: 0.05em; }
.tsw-pf-empty { font-size: 0.78rem; color: rgba(230,233,255,0.6); padding: 0.6rem 0; margin-bottom: 1rem; }

.tsw-pf-link-btn { display: inline-block; font-size: 0.76rem; font-weight: 700; color: #a78bfa; text-decoration: underline; }

.tsw-pf-minigame-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-bottom: 1.1rem; }
@media (max-width: 500px) { .tsw-pf-minigame-grid { grid-template-columns: 1fr; } }
.tsw-pf-minigame-item { background: var(--light); padding: 0.6rem 0.7rem; }
.tsw-pf-minigame-name { display: block; font-size: 0.7rem; font-weight: 700; color: var(--navy); margin-bottom: 0.15rem; }
.tsw-pf-minigame-stat { display: block; font-size: 0.72rem; color: var(--muted); }

/* ============================================================
   TSW 5-A-SIDE — more rectangular than curved, and given more
   vertical presence now that the coffee-support box below it is
   gone. Scoped to #panel-bxi so the standalone Duel a Friend quiz
   (which shares .duel-choice-card / .duel-code-input / etc.) keeps
   its own rounder look untouched.
   ============================================================ */
#panel-bxi .game-card { border-radius: 6px; padding: 1.8rem 1.5rem 2.2rem; }
#panel-bxi .duel-choice-card { border-radius: 4px; }
#panel-bxi .duel-code-input { border-radius: 3px; }
#panel-bxi .duel-code-display { border-radius: 4px; }
#panel-bxi .duel-copy-link-btn { border-radius: 4px; }
#panel-bxi .duel-leave-btn { border-radius: 4px; }
#panel-bxi .duel-waiting-spinner { border-radius: 50%; } /* the spin animation still wants a circle */
