@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root{
  color-scheme: light;

  --bg:#e6e9ef;

  --shadow-dark:#b3b9c6;
  --shadow-light:#ffffff;

  --accent-pitch:#2fae6f;
  --accent-pitch-dim:#22935b;
  --accent-electric:#4f7cff;
  --accent-amber:#e8960f;
  --accent-red:#ef5164;

  --text-primary:#3b4250;
  --text-muted:#707a8a;
  --text-faint:#9aa3b2;

  --font-display:'Poppins',sans-serif;
  --font-body:'Inter',sans-serif;
  --font-mono:'JetBrains Mono',monospace;

  --radius-lg:26px;
  --radius-md:18px;
  --radius-sm:12px;

  --shadow-raised: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --shadow-raised-sm: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  --shadow-raised-lg: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
  --shadow-pressed: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --shadow-pressed-sm: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  --shadow-flat: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);

  --topbar-shadow: 0 6px 16px -8px rgba(179,185,198,.7);
  --bottomnav-shadow: 0 -6px 18px -10px rgba(179,185,198,.85);
  --modal-scrim: rgba(59,66,80,.45);
}

[data-theme="dark"]{
  color-scheme: dark;

  --bg:#171b23;

  --shadow-dark:#0e1015;
  --shadow-light:#20263a;

  --accent-pitch:#3bc987;
  --accent-pitch-dim:#2ea36c;
  --accent-electric:#7c9bff;
  --accent-amber:#f2ac3c;
  --accent-red:#ff6b7d;

  --text-primary:#eef1f7;
  --text-muted:#a2acc2;
  --text-faint:#69718a;

  --topbar-shadow: 0 6px 18px -8px rgba(0,0,0,.55);
  --bottomnav-shadow: 0 -6px 20px -10px rgba(0,0,0,.6);
  --modal-scrim: rgba(4,6,10,.65);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--text-primary);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
  transition:background .2s ease, color .2s ease;
}

::selection{ background:rgba(47,174,111,.25); }

a{ color:inherit; }

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:700;
  letter-spacing:-.01em;
  margin:0 0 .4em;
  color:var(--text-primary);
}

.mono{ font-family:var(--font-mono); }

button, input, select, textarea{ font-family:inherit; }

:focus-visible{
  outline:2px solid var(--accent-electric);
  outline-offset:2px;
  border-radius:6px;
}

.shell{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px 80px;
}

.topbar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
  padding:16px 20px;
  background:var(--bg);
  box-shadow:var(--topbar-shadow);
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:700; font-size:1.2rem;
  text-decoration:none;
  color:var(--text-primary);
}
.brand .dot{
  width:11px; height:11px; border-radius:50%;
  background:var(--accent-pitch);
  box-shadow:0 0 0 4px rgba(47,174,111,.16), var(--shadow-flat);
}

.tabs{ display:flex; gap:8px; flex-wrap:wrap; }
.tab-btn{
  display:inline-flex; align-items:center; gap:7px;
  border:none;
  background:var(--bg);
  color:var(--text-muted);
  padding:9px 16px 9px 14px;
  border-radius:999px;
  font-size:.86rem; font-weight:600;
  cursor:pointer;
  box-shadow:var(--shadow-raised-sm);
  transition:all .15s ease;
}
.tab-btn svg{ width:16px; height:16px; flex:none; }
.tab-btn:hover{ color:var(--text-primary); }
.tab-btn:active{ box-shadow:var(--shadow-pressed-sm); }
.tab-btn.active{
  color:var(--accent-pitch-dim);
  box-shadow:var(--shadow-pressed-sm);
}

.bottom-nav{
  display:none;
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background:var(--bg);
  box-shadow:var(--bottomnav-shadow);
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav-inner{
  display:flex; justify-content:space-around; gap:4px;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.bottom-nav-inner::-webkit-scrollbar{ display:none; }
.bottom-tab{
  position:relative;
  flex-direction:column; flex:1 1 64px; min-width:60px;
  display:flex; align-items:center; justify-content:center; gap:3px;
  background:transparent; box-shadow:none;
  padding:7px 4px; border-radius:14px;
  color:var(--text-faint); font-size:.66rem; font-weight:600;
  white-space:nowrap;
}
.bottom-tab svg{ width:20px; height:20px; }
.bottom-tab.active{ color:var(--accent-pitch-dim); box-shadow:var(--shadow-pressed-sm); background:var(--bg); }

@media (max-width:760px){
  .bottom-nav{ display:block; }
  .topbar .tabs{ display:none; }
  .shell{ padding-bottom:88px; }}

.view{ display:none; }
.view.active{ display:block; }

.glass{
  position:relative;
  background:var(--bg);
  border:none;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-raised);
}
.glass-pad{ padding:26px; }

.glass-strong{ box-shadow:var(--shadow-raised-lg); }

.hero{
  padding:56px 0 28px;
  text-align:left;
}
.hero .eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:.75rem; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent-pitch-dim);
  margin-bottom:14px;
  background:var(--bg);
  padding:7px 14px 7px 10px;
  border-radius:999px;
  box-shadow:var(--shadow-pressed-sm);
  width:fit-content;
}
.hero .eyebrow .live-pulse{
  width:7px; height:7px; border-radius:50%; background:var(--accent-pitch);
  box-shadow:0 0 0 0 rgba(47,174,111,.6);
  animation:pulse 1.8s infinite;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(47,174,111,.55); }
  70%{ box-shadow:0 0 0 9px rgba(47,174,111,0); }
  100%{ box-shadow:0 0 0 0 rgba(47,174,111,0); }
}


.install-banner{
  position:fixed;
  left:12px; right:12px; bottom:12px;
  z-index:200;
  display:flex; align-items:center; gap:12px;
  padding:12px 14px;
  border-radius:var(--radius-md);
  background:var(--panel, var(--bg));
  box-shadow:var(--shadow-raised-lg, 0 8px 24px rgba(0,0,0,.18));
}
.install-banner[hidden]{ display:none; }
.install-banner-icon{ width:40px; height:40px; border-radius:10px; flex-shrink:0; }
.install-banner-text{ display:flex; flex-direction:column; flex:1; min-width:0; }
.install-banner-text strong{ font-size:.88rem; color:var(--text-primary); }
.install-banner-text span{ font-size:.76rem; color:var(--text-muted); }
.install-banner .btn{ padding:9px 16px; font-size:.85rem; flex-shrink:0; }
.install-banner-close{
  background:none; border:none; color:var(--text-faint);
  font-size:1.3rem; line-height:1; cursor:pointer; padding:4px 6px; flex-shrink:0;
}
@media (min-width:520px){
  .install-banner{ left:auto; right:20px; bottom:20px; max-width:360px; }}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 24px;
  border-radius:14px;
  border:none;
  background:var(--bg);
  color:var(--text-primary);
  font-weight:600; font-size:.92rem;
  cursor:pointer;
  box-shadow:var(--shadow-raised-sm);
  transition:box-shadow .12s ease, transform .12s ease;
}
.btn:hover{ box-shadow:var(--shadow-raised); }
.btn:active{ box-shadow:var(--shadow-pressed-sm); transform:translateY(1px); }
.btn-primary{
  background:linear-gradient(145deg, var(--accent-pitch), var(--accent-pitch-dim));
  color:#f2fff8;
  box-shadow:6px 6px 14px rgba(34,147,91,.35), -6px -6px 14px rgba(255,255,255,.75);
}
.btn-primary:hover{ box-shadow:8px 8px 18px rgba(34,147,91,.4), -8px -8px 18px rgba(255,255,255,.8); }
.btn-primary:active{ box-shadow:inset 4px 4px 8px rgba(0,40,20,.35), inset -3px -3px 6px rgba(255,255,255,.25); transform:translateY(1px); }
.btn-ghost{ background:transparent; box-shadow:none; }
.btn-ghost:hover{ box-shadow:var(--shadow-raised-sm); }

.link-btn{
  background:none; border:none; padding:0; margin:0;
  font-family:inherit; font-size:.78rem; font-weight:600;
  color:var(--accent-electric); cursor:pointer; text-decoration:underline;
  text-underline-offset:2px;
}
.link-btn:hover{ color:var(--accent-pitch-dim); }
.btn:disabled{ opacity:.45; cursor:not-allowed; box-shadow:var(--shadow-flat); transform:none; }
.btn-sm{ padding:9px 15px; font-size:.8rem; border-radius:11px; }
.btn-block{ width:100%; }

label{ display:block; font-size:.8rem; color:var(--text-muted); margin:0 0 8px; font-weight:600; letter-spacing:.02em; }
input, select, textarea{
  width:100%;
  padding:13px 16px;
  border-radius:14px;
  border:none;
  background:var(--bg);
  color:var(--text-primary);
  font-size:.95rem;
  box-shadow:var(--shadow-pressed);
}
input::placeholder{ color:var(--text-faint); }
input:focus, select:focus, textarea:focus{
  box-shadow:var(--shadow-pressed), 0 0 0 2px rgba(47,174,111,.35);
  outline:none;
}
.field{ margin-bottom:18px; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:520px){ .field-row{ grid-template-columns:1fr; }}

.hint{ font-size:.78rem; color:var(--text-faint); margin-top:6px; }
.msg{ padding:13px 16px; border-radius:14px; font-size:.86rem; margin-top:16px; display:none; box-shadow:var(--shadow-pressed-sm); }
.msg.show{ display:block; }
.msg-ok{ color:var(--accent-pitch-dim); }
.msg-err{ color:var(--accent-red); }


.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:44px 0 18px; flex-wrap:wrap; }
.section-head h2{ font-size:1.5rem; }
.section-head .sub{ color:var(--text-muted); font-size:.88rem; }

.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px; border-radius:999px;
  font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  white-space:nowrap;
  background:var(--bg);
  box-shadow:var(--shadow-pressed-sm);
}
.badge-live{ color:var(--accent-pitch-dim); }
.badge-pending{ color:var(--accent-amber); }
.badge-approved{ color:var(--accent-electric); }
.badge-eliminated{ color:var(--text-faint); }
.badge-champion{ color:#f2fff8; background:linear-gradient(145deg, var(--accent-pitch), var(--accent-pitch-dim)); box-shadow:3px 3px 8px rgba(34,147,91,.4), -2px -2px 6px rgba(255,255,255,.6); }
.badge-disputed{ color:var(--accent-red); }
.teams-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:16px; }
.team-card{ padding:18px; display:flex; flex-direction:column; gap:8px; }
.team-card .name{ font-family:var(--font-display); font-weight:700; font-size:1.05rem; }
.team-card .meta{ color:var(--text-faint); font-size:.76rem; }

table{ width:100%; border-collapse:collapse; }
.table-wrap{ overflow-x:auto; background:var(--bg); border-radius:var(--radius-md); box-shadow:var(--shadow-pressed); padding:4px 8px; }
th, td{ text-align:left; padding:13px 14px; font-size:.88rem; white-space:nowrap; }
th{ color:var(--text-muted); font-weight:600; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; }
tr:not(:last-child) td{ box-shadow:0 1px 0 var(--shadow-light), 0 2px 0 rgba(179,185,198,.35); }

.bracket{ display:flex; gap:36px; overflow-x:auto; padding:10px 6px 26px; }
.bracket-round{ display:flex; flex-direction:column; justify-content:space-around; gap:20px; min-width:230px; }
.bracket-round-title{ font-family:var(--font-mono); font-size:.7rem; text-transform:uppercase; letter-spacing:.12em; color:var(--text-faint); margin-bottom:8px; text-align:center; }

.match-card{
  padding:14px 16px; display:flex; flex-direction:column; gap:9px; position:relative;
}
.match-card.is-live{ box-shadow:var(--shadow-raised), inset 0 3px 0 var(--accent-pitch); }
.match-slot{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.match-slot .team{ font-size:.88rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.match-slot.winner .team{ color:var(--accent-pitch-dim); }
.match-slot .score{ font-family:var(--font-display); font-weight:700; font-size:1.1rem; color:var(--text-muted); }
.match-slot.winner .score{ color:var(--accent-pitch-dim); }
.match-card .vs-divider{ height:2px; border-radius:2px; box-shadow:inset 1px 1px 2px var(--shadow-dark); }
.match-card .meta-row{ display:flex; justify-content:space-between; align-items:center; margin-top:2px; }
.match-card .time{ font-family:var(--font-mono); font-size:.7rem; color:var(--text-faint); }

.modal-backdrop{
  position:fixed; inset:0; background:var(--modal-scrim); backdrop-filter:blur(3px);
  display:none; align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal-backdrop.show{ display:flex; }
.modal{ width:100%; max-width:440px; padding:28px; box-shadow:var(--shadow-raised-lg); }
.modal-close{ position:absolute; top:16px; right:18px; background:var(--bg); border:none; color:var(--text-muted); font-size:1.1rem; cursor:pointer; width:32px; height:32px; border-radius:50%; box-shadow:var(--shadow-raised-sm); line-height:1; }
.modal-close:active{ box-shadow:var(--shadow-pressed-sm); }


.footer{ text-align:center; color:var(--text-faint); font-size:.8rem; padding:40px 0 10px; }

.empty-state{ text-align:center; padding:50px 20px; color:var(--text-faint); }
.empty-state .big{ font-size:2rem; margin-bottom:10px; }

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:820px){ .grid-2{ grid-template-columns:1fr; }}

.code-reveal{
  font-family:var(--font-mono); font-size:1.7rem; letter-spacing:.22em; text-align:center;
  padding:18px; border-radius:var(--radius-md); background:var(--bg);
  box-shadow:var(--shadow-pressed);
  color:var(--accent-pitch-dim); margin:16px 0;
}

.pill-row{ display:flex; gap:8px; flex-wrap:wrap; }

.loader{ width:18px; height:18px; border-radius:50%; border:2px solid var(--shadow-dark); border-top-color:var(--accent-pitch); animation:spin .7s linear infinite; display:inline-block; }
@keyframes spin{ to{ transform:rotate(360deg); } }

.list-item{ padding:16px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.list-item + .list-item{ margin-top:2px; box-shadow:0 1px 0 var(--shadow-light), 0 2px 0 rgba(179,185,198,.3); }


.theme-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border:none; border-radius:50%;
  background:var(--bg); color:var(--text-muted); cursor:pointer;
  box-shadow:var(--shadow-raised-sm); flex:none;
}
.theme-toggle:active{ box-shadow:var(--shadow-pressed-sm); }
.theme-toggle svg{ width:18px; height:18px; }
.theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }


.round-pill{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-mono); font-size:.72rem; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent-electric); background:var(--bg);
  padding:6px 12px; border-radius:999px; box-shadow:var(--shadow-pressed-sm);
}

.groups-grid{ display:grid; gap:22px; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); }
.group-card{ padding:20px 20px 10px; }
.group-card h3{ font-size:1rem; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.group-card .group-hint{ font-size:.74rem; color:var(--text-faint); margin:-6px 0 14px; }

.standings-table{ width:100%; border-collapse:collapse; }
.standings-table th{
  text-align:center; font-size:.64rem; text-transform:uppercase; letter-spacing:.04em;
  color:var(--text-faint); font-weight:700; padding:0 6px 8px;
}
.standings-table th:first-child, .standings-table th:nth-child(2){ text-align:left; }
.standings-table td{
  text-align:center; padding:9px 6px; font-size:.82rem; color:var(--text-muted);
  font-family:var(--font-mono);
}
.standings-table td:nth-child(2){
  text-align:left; font-family:var(--font-body); color:var(--text-primary); font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:1px;
}
.standings-table td.pts{ font-weight:800; color:var(--text-primary); }
.standings-table tbody tr{ box-shadow:0 1px 0 var(--shadow-light), 0 2px 0 rgba(179,185,198,.25); }
.standings-table .pos-cell{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:6px; font-weight:800; color:var(--text-faint); }
.standings-table tr.qualified .pos-cell{ background:var(--accent-pitch); color:#f2fff8; }
.standings-table tr.qualified td:nth-child(2){ color:var(--accent-pitch-dim); }
.standings-legend{ display:flex; align-items:center; gap:8px; font-size:.72rem; color:var(--text-faint); padding:12px 4px 6px; }
.standings-legend .dot{ width:9px; height:9px; border-radius:3px; background:var(--accent-pitch); box-shadow:var(--shadow-flat); }


.bracket{ position:relative; }
.bracket-svg{ position:absolute; top:0; left:0; pointer-events:none; overflow:visible; }
.bracket-svg path{ fill:none; stroke:var(--shadow-dark); stroke-width:2; }
.bracket-svg path.is-decided{ stroke:var(--accent-pitch-dim); }
.bracket-svg polygon{ fill:var(--shadow-dark); }
.bracket-svg polygon.is-decided{ fill:var(--accent-pitch-dim); }

.bracket-round{ position:relative; z-index:1; }
.bracket-trophy{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; min-width:150px; text-align:center; position:relative; z-index:1;
}
.bracket-trophy .cup{
  font-size:2.6rem; line-height:1;
  filter:drop-shadow(0 4px 10px rgba(232,150,15,.35));
}
.bracket-trophy .cup.is-pending{ opacity:.35; filter:none; }
.bracket-trophy .champ-label{ font-family:var(--font-mono); font-size:.66rem; text-transform:uppercase; letter-spacing:.1em; color:var(--text-faint); }
.bracket-trophy .champ-name{ font-family:var(--font-display); font-weight:700; font-size:1rem; color:var(--accent-pitch-dim); max-width:160px; }

/* ===================================================================
   v2 additions — logos, home feed, fixture cards, team profile,
   registration / "My team" screens
   =================================================================== */
.muted{ color:var(--text-faint); }
[hidden]{ display:none !important; }
.hp-field{ position:absolute !important; left:-9999px; width:1px; height:1px; opacity:0; pointer-events:none; }

/* team logos */
.crest{ width:28px; height:28px; flex:none; object-fit:contain; border-radius:8px; }
.crest-sm{ width:22px; height:22px; border-radius:6px; }
.crest-lg{ width:44px; height:44px; border-radius:12px; }
.crest-xl{ width:72px; height:72px; border-radius:18px; }
.crest-empty{ display:inline-block; background:var(--bg); box-shadow:var(--shadow-pressed-sm); }

/* clickable team name / logo */
.team-link{
  display:inline-flex; align-items:center; gap:9px; min-width:0;
  background:none; border:none; padding:4px; margin:0;
  color:inherit; font:inherit; text-align:left; cursor:pointer;
  border-radius:12px;
}
.team-link:hover .tl-name{ color:var(--accent-pitch-dim); }
.tl-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.slot-link{ flex:1; min-width:0; padding:2px; }
.slot-link .team{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-card{ cursor:pointer; transition:box-shadow .15s ease; }
.team-card:hover{ box-shadow:var(--shadow-raised-lg); }
.tc-top{ display:flex; align-items:center; gap:12px; min-width:0; }
.tc-top .name{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
.st-team{ display:flex; align-items:center; gap:8px; min-width:0; }
.st-team span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.standings-table td:nth-child(2){ max-width:none; }
.standings-table tr.is-me td{ background:rgba(79,124,255,.10); }
.standings-table tbody tr{ cursor:pointer; }

/* champion banner */
.champ-banner{ display:flex; align-items:center; gap:16px; padding:18px 22px; margin-top:6px; width:fit-content; max-width:100%; }
.champ-banner[hidden]{ display:none; }
.champ-cup{ font-size:2.4rem; line-height:1; filter:drop-shadow(0 4px 10px rgba(232,150,15,.35)); }
.champ-kicker{ margin:0 0 2px; text-transform:uppercase; letter-spacing:.1em; font-family:var(--font-mono); font-size:.68rem; }
.champ-name{ font-family:var(--font-display); font-weight:700; font-size:1.25rem; color:var(--accent-pitch-dim); }

/* home feed */
.hero{ padding:34px 0 10px; }
.feed-title{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  margin:26px 2px 12px; font-family:var(--font-display); font-weight:700; font-size:1.08rem;
}
.feed-sub{ font-family:var(--font-mono); font-size:.72rem; font-weight:400; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }
.empty-inline{ text-align:center; color:var(--text-muted); font-size:.92rem; margin-top:10px; }
.empty-inline .big{ font-size:1.8rem; margin-bottom:6px; }
.cta-card{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; margin-top:18px; }
.cta-card h3{ margin:0; }

/* fixture row (sports-app style) */
.fx-row{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px;
  padding:16px 14px 10px; margin-bottom:14px;
}
.fx-team{ justify-self:start; max-width:100%; font-size:.95rem; }
.fx-team.right{ justify-self:end; flex-direction:row-reverse; text-align:right; }
.fx-team.is-win .tl-name{ color:var(--accent-pitch-dim); }
.fx-mid{ display:flex; flex-direction:column; align-items:center; gap:6px; min-width:74px; }
.fx-score{ font-family:var(--font-display); font-weight:800; font-size:1.7rem; line-height:1; letter-spacing:.02em; }
.fx-score i{ font-style:normal; color:var(--text-faint); margin:0 6px; }
.fx-time{ font-family:var(--font-mono); font-weight:600; font-size:1.05rem; color:var(--text-primary); }
.fx-pens{ font-family:var(--font-mono); font-size:.68rem; color:var(--text-faint); }
.fx-foot{ grid-column:1 / -1; text-align:center; font-family:var(--font-mono); font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint); padding-top:4px; }
@media (max-width:480px){
  .fx-row{ grid-template-columns:1fr; justify-items:center; gap:6px; }
  .fx-team, .fx-team.right{ justify-self:center; flex-direction:row; }
  .fx-mid{ order:0; }
}

/* my-team submission cards */
.me-card{ display:flex; align-items:center; gap:18px; }
.fx-card{ margin-bottom:16px; }
.fx-card-head{ display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.sub-vs{ font-family:var(--font-display); font-weight:700; font-size:1.05rem; }
.sub-summary{ font-size:.95rem; }
.fx-form .score-input{ text-align:center; font-family:var(--font-mono); font-size:1.4rem; font-weight:600; padding:14px 8px; }
.fx-form .field label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pens-line{ font-family:var(--font-mono); font-size:.68rem; color:var(--text-faint); text-align:right; }
.pen-wrap[hidden]{ display:none; }
.code-input{ text-transform:uppercase; letter-spacing:.14em; text-align:center; font-size:1.05rem; }
.how-list{ margin:6px 0 18px; padding-left:20px; color:var(--text-muted); font-size:.86rem; line-height:1.7; }

/* register / sign-in segmented toggle */
.seg-btn{ flex:1; justify-content:center; }
.seg-btn.active{ color:var(--accent-pitch-dim); }
.pill-row .seg-btn{ flex:1 1 140px; }

/* logo picker */
.logo-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(58px,1fr)); gap:10px; }
.logo-opt{ position:relative; margin:0; cursor:pointer; border-radius:14px; padding:6px; background:var(--bg); box-shadow:var(--shadow-raised-sm); transition:box-shadow .12s ease; display:block; }
.logo-opt input{ position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.logo-opt img{ display:block; width:100%; aspect-ratio:1; object-fit:contain; border-radius:8px; }
.logo-opt:has(input:checked){ box-shadow:var(--shadow-pressed-sm), 0 0 0 2px var(--accent-pitch); }
.logo-opt:has(input:focus-visible){ outline:2px solid var(--accent-electric); outline-offset:2px; }

/* team profile modal */
.modal-wide{ max-width:640px; max-height:90vh; overflow-y:auto; }
.tp-head{ display:flex; align-items:center; gap:16px; margin:0 34px 18px 0; }
.tp-head h3{ margin:0 0 6px; }
.tp-h{ font-size:.78rem; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.1em; color:var(--text-faint); margin:22px 0 10px; }
.tp-pos{ color:var(--accent-pitch-dim); }
.stat-tiles{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.stat-tile{ text-align:center; padding:12px 4px; border-radius:var(--radius-sm); background:var(--bg); box-shadow:var(--shadow-pressed-sm); }
.stat-tile .num{ font-family:var(--font-display); font-weight:700; font-size:1.35rem; line-height:1.1; }
.stat-tile .lbl{ font-size:.62rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); margin:4px 0 0; font-weight:600; }
.form-chip{ display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:8px; font-size:.72rem; font-weight:800; color:#fff; flex:none; }
.chip-w{ background:var(--accent-pitch); }
.chip-d{ background:var(--accent-amber); }
.chip-l{ background:var(--accent-red); }
.res-item{ flex-wrap:nowrap; padding:12px 6px; }
.res-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.res-right{ text-align:right; flex:none; }
.res-score{ font-weight:700; font-size:1rem; }

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
