/* =========================================================================
   World Cup "Smart Money" MiniApp — Material Design 3 (Material You)
   Mobile-first restyle. Token-driven tonal color system + type scale.
   ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Flex:opsz,wght@8..144,400;8..144,500;8..144,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0&display=swap");

/* -------------------------------------------------------------------------
   1. Design tokens — MD3 tonal color system (LIGHT, default)
   Primary = Google-ish green for a sports app; secondary = teal-blue.
   ------------------------------------------------------------------------- */
:root {
  /* ---- Color: primary ---- */
  --md-sys-color-primary: #006d3b;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #6dfca0;
  --md-sys-color-on-primary-container: #00210f;

  /* ---- Color: secondary ---- */
  --md-sys-color-secondary: #4e6355;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d0e8d6;
  --md-sys-color-on-secondary-container: #0c1f14;

  /* ---- Color: tertiary (used for accents / odds) ---- */
  --md-sys-color-tertiary: #3b6470;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #bfeaf7;
  --md-sys-color-on-tertiary-container: #001f27;

  /* ---- Color: error ---- */
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;

  /* ---- Color: surfaces (MD3 surface-container family) ---- */
  --md-sys-color-surface: #f6fbf4;
  --md-sys-color-on-surface: #181d19;
  --md-sys-color-on-surface-variant: #404943;
  --md-sys-color-surface-dim: #d6dbd4;
  --md-sys-color-surface-bright: #f6fbf4;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f0f5ee;
  --md-sys-color-surface-container: #eaefe8;
  --md-sys-color-surface-container-high: #e4eae2;
  --md-sys-color-surface-container-highest: #dfe4dd;

  /* ---- Color: outlines ---- */
  --md-sys-color-outline: #707972;
  --md-sys-color-outline-variant: #c0c9c0;

  /* ---- Color: custom semantic for win-rate / confidence ---- */
  --app-positive: #1e7c41;
  --app-warning: #8a6500;
  --app-warning-container: #ffdf99;
  --app-neutral: var(--md-sys-color-surface-container-highest);

  /* ---- State-layer opacities (MD3) ---- */
  --md-sys-state-hover-opacity: 0.08;
  --md-sys-state-focus-opacity: 0.12;
  --md-sys-state-pressed-opacity: 0.12;

  /* ---- Elevation shadows (MD3 levels 1-3) ---- */
  --md-elevation-1:
    0 1px 2px rgba(0, 0, 0, 0.30),
    0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-2:
    0 1px 2px rgba(0, 0, 0, 0.30),
    0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-elevation-3:
    0 4px 8px 3px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.30);

  /* ---- Shape (corner radius) ---- */
  --md-sys-shape-corner-xs: 4px;
  --md-sys-shape-corner-sm: 8px;
  --md-sys-shape-corner-md: 12px;
  --md-sys-shape-corner-lg: 16px;
  --md-sys-shape-corner-xl: 28px;
  --md-sys-shape-corner-full: 999px;

  /* ---- Typography scale ---- */
  --md-sys-typescale-font: "Roboto Flex", "Roboto", -apple-system,
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --md-sys-typescale-display-small: 700 28px/36px var(--md-sys-typescale-font);
  --md-sys-typescale-headline-small: 500 22px/28px var(--md-sys-typescale-font);
  --md-sys-typescale-title-large: 500 18px/24px var(--md-sys-typescale-font);
  --md-sys-typescale-title-medium: 500 16px/24px var(--md-sys-typescale-font);
  --md-sys-typescale-title-small: 500 14px/20px var(--md-sys-typescale-font);
  --md-sys-typescale-body-large: 400 15px/22px var(--md-sys-typescale-font);
  --md-sys-typescale-body-medium: 400 14px/20px var(--md-sys-typescale-font);
  --md-sys-typescale-body-small: 400 12px/16px var(--md-sys-typescale-font);
  --md-sys-typescale-label-large: 500 14px/20px var(--md-sys-typescale-font);
  --md-sys-typescale-label-medium: 500 12px/16px var(--md-sys-typescale-font);
  --md-sys-typescale-label-small: 500 11px/16px var(--md-sys-typescale-font);

  --md-sys-motion-easing: cubic-bezier(0.2, 0, 0, 1);
}

/* -------------------------------------------------------------------------
   2. Dark theme
   ------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #50e08c;
    --md-sys-color-on-primary: #003920;
    --md-sys-color-primary-container: #00522e;
    --md-sys-color-on-primary-container: #6dfca0;

    --md-sys-color-secondary: #b4ccba;
    --md-sys-color-on-secondary: #213528;
    --md-sys-color-secondary-container: #374b3e;
    --md-sys-color-on-secondary-container: #d0e8d6;

    --md-sys-color-tertiary: #a3cedd;
    --md-sys-color-on-tertiary: #033542;
    --md-sys-color-tertiary-container: #224c59;
    --md-sys-color-on-tertiary-container: #bfeaf7;

    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;

    --md-sys-color-surface: #101510;
    --md-sys-color-on-surface: #dfe4dd;
    --md-sys-color-on-surface-variant: #c0c9c0;
    --md-sys-color-surface-dim: #101510;
    --md-sys-color-surface-bright: #353a34;
    --md-sys-color-surface-container-lowest: #0b0f0b;
    --md-sys-color-surface-container-low: #181d19;
    --md-sys-color-surface-container: #1c211d;
    --md-sys-color-surface-container-high: #262b27;
    --md-sys-color-surface-container-highest: #313631;

    --md-sys-color-outline: #8a938b;
    --md-sys-color-outline-variant: #404943;

    --app-positive: #50e08c;
    --app-warning: #ffdf99;
    --app-warning-container: #4a3a00;
    --app-neutral: var(--md-sys-color-surface-container-highest);

    --md-elevation-1:
      0 1px 2px rgba(0, 0, 0, 0.45),
      0 1px 3px 1px rgba(0, 0, 0, 0.30);
    --md-elevation-2:
      0 1px 2px rgba(0, 0, 0, 0.45),
      0 2px 6px 2px rgba(0, 0, 0, 0.30);
    --md-elevation-3:
      0 4px 8px 3px rgba(0, 0, 0, 0.30),
      0 1px 3px rgba(0, 0, 0, 0.45);
  }
}

/* -------------------------------------------------------------------------
   3. Base / reset
   ------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: var(--md-sys-typescale-body-large);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* leave room for the fixed disclaimer bar + safe-area */
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  accent-color: var(--md-sys-color-primary);
}

::selection {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

/* -------------------------------------------------------------------------
   4. Top app bar (.topbar) + tabs (#tabs a)
   ------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.topbar strong { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-tertiary) 22%, var(--md-sys-color-surface)), color-mix(in srgb, var(--md-sys-color-primary) 16%, var(--md-sys-color-surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--md-sys-color-tertiary) 35%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
}
.brand-mark svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25)); }
.brand-word { font: var(--md-sys-typescale-title-large); font-weight: 700; letter-spacing: 0.2px; color: var(--md-sys-color-on-surface); }

/* Tabs styled as a segmented / nav-rail-ish pill group */
#tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--md-sys-shape-corner-full);
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 5%, transparent);
}

#tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s var(--md-sys-motion-easing),
    color 0.15s var(--md-sys-motion-easing);
  -webkit-tap-highlight-color: transparent;
}

#tabs a:hover {
  background: color-mix(in srgb,
      var(--md-sys-color-on-surface) calc(var(--md-sys-state-hover-opacity) * 100%),
      transparent);
  color: var(--md-sys-color-on-surface);
}

#tabs a:active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

#tabs a:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 1px;
}

/* -------------------------------------------------------------------------
   5. Layout
   ------------------------------------------------------------------------- */
main,
#app {
  display: block;
}

main {
  padding: 16px 12px 8px;
  max-width: 640px;
  margin: 0 auto;
}

/* -------------------------------------------------------------------------
   6. Cards (.card) — MD3 elevated surface container
   ------------------------------------------------------------------------- */
.card {
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-lg);
  box-shadow: var(--md-elevation-1);
  padding: 16px;
  margin-bottom: 14px;
  transition: box-shadow 0.2s var(--md-sys-motion-easing);
}

.card h2 {
  margin: 0 0 12px;
  font: var(--md-sys-typescale-title-large);
  color: var(--md-sys-color-on-surface);
  letter-spacing: 0;
}

.card h3 {
  margin: 18px 0 6px;
  font: var(--md-sys-typescale-title-small);
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.1px;
  text-transform: none;
}

/* -------------------------------------------------------------------------
   7. List rows (.row) — MD3 list items w/ dividers + 48dp touch targets
   ------------------------------------------------------------------------- */
.row {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: var(--md-sys-shape-corner-sm);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.row:first-of-type {
  border-top: 0;
}

.row b {
  font: var(--md-sys-typescale-title-medium);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

.row span {
  color: var(--md-sys-color-on-surface);
}

.row small {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-small);
}

/* tappable list items (links) */
.row.link {
  cursor: pointer;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  transition: background-color 0.15s var(--md-sys-motion-easing);
  -webkit-tap-highlight-color: transparent;
}

.row.link::after {
  content: "chevron_right";
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  line-height: 1;
  margin-left: auto;
  color: var(--md-sys-color-on-surface-variant);
  align-self: center;
}

.row.link:hover {
  background: color-mix(in srgb,
      var(--md-sys-color-on-surface) calc(var(--md-sys-state-hover-opacity) * 100%),
      transparent);
}

.row.link:active {
  background: color-mix(in srgb,
      var(--md-sys-color-on-surface) calc(var(--md-sys-state-pressed-opacity) * 100%),
      transparent);
}

.row.link:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
}

/* -------------------------------------------------------------------------
   8. Badge (.badge) — trader style label
   ------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: var(--md-sys-shape-corner-sm);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font: var(--md-sys-typescale-label-large);
}

/* -------------------------------------------------------------------------
   9. Stats tiles (.stats) — MD3 stat tiles
   ------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--md-sys-shape-corner-md);
  background: var(--md-sys-color-surface-container-high);
}

.stats span {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-medium);
}

.stats b {
  font: var(--md-sys-typescale-headline-small);
  color: var(--md-sys-color-on-surface);
}

.stats small {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-small);
}

/* -------------------------------------------------------------------------
   10. Odds (.odds) — outcome price tiles
   ------------------------------------------------------------------------- */
.odds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.odds > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--md-sys-shape-corner-md);
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}

.odds span {
  color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 80%, transparent);
  font: var(--md-sys-typescale-label-medium);
}

.odds b {
  font: var(--md-sys-typescale-title-large);
  color: var(--md-sys-color-on-tertiary-container);
}

.odds small {
  color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 75%, transparent);
  font: var(--md-sys-typescale-body-small);
}

/* -------------------------------------------------------------------------
   11. Recommendation (.rec) — emphasized primary-container surface
   ------------------------------------------------------------------------- */
.rec {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-md);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font: var(--md-sys-typescale-title-medium);
}

.rec b {
  font-weight: 700;
}

.rec .muted {
  color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 85%, transparent);
  margin-top: 6px;
}

.rec p {
  margin: 8px 0 0;
  font: var(--md-sys-typescale-body-medium);
  color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 90%, transparent);
}

/* -------------------------------------------------------------------------
   12. Tags (.tag) — MD3 small badges / confidence labels
   ------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: var(--md-sys-shape-corner-full);
  font: var(--md-sys-typescale-label-small);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tag-high {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.tag-med {
  background: var(--app-warning-container);
  color: var(--app-warning);
}

.tag-low {
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}

/* On the primary-container .rec surface, keep the high tag readable */
.rec .tag-high {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* -------------------------------------------------------------------------
   13. Chips (.chip) — MD3 filter chips
   ------------------------------------------------------------------------- */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-sm);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s var(--md-sys-motion-easing),
    color 0.15s var(--md-sys-motion-easing),
    border-color 0.15s var(--md-sys-motion-easing);
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  background: color-mix(in srgb,
      var(--md-sys-color-on-surface-variant) calc(var(--md-sys-state-hover-opacity) * 100%),
      transparent);
}

.chip:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 1px;
}

.chip.on {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}

.chip.on::before {
  content: "check";
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  line-height: 1;
  margin-right: 2px;
}

/* -------------------------------------------------------------------------
   14. Buttons (button) — MD3 filled + tonal variants
   ------------------------------------------------------------------------- */
button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 24px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: var(--md-sys-typescale-label-large);
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.15s var(--md-sys-motion-easing),
    filter 0.15s var(--md-sys-motion-easing);
  -webkit-tap-highlight-color: transparent;
}

/* state layer (ripple-ish) */
button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s var(--md-sys-motion-easing);
  pointer-events: none;
}

button:hover::after {
  opacity: var(--md-sys-state-hover-opacity);
}

button:active::after {
  opacity: var(--md-sys-state-pressed-opacity);
}

button:hover {
  box-shadow: var(--md-elevation-1);
}

button:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  box-shadow: none;
}

button:disabled::after {
  opacity: 0;
}

/* Tonal / secondary buttons used inline in list rows */
button.rm,
button.pref {
  min-height: 36px;
  padding: 6px 16px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

button.rm {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

/* -------------------------------------------------------------------------
   15. Select (select) — MD3 outlined-ish field
   ------------------------------------------------------------------------- */
select {
  min-height: 40px;
  padding: 8px 36px 8px 14px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-sm);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font: var(--md-sys-typescale-body-medium);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23404943'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s var(--md-sys-motion-easing);
}

select:hover {
  border-color: var(--md-sys-color-on-surface);
}

select:focus-visible {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

/* -------------------------------------------------------------------------
   16. Utility text
   ------------------------------------------------------------------------- */
.muted {
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-medium);
}

p.muted {
  margin: 8px 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  padding: 48px 16px;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-large);
}

.loading::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid var(--md-sys-color-outline-variant);
  border-top-color: var(--md-sys-color-primary);
  border-radius: 50%;
  animation: md-spin 0.8s linear infinite;
}

@keyframes md-spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------------------------------
   17. Disclaimer bar (.disclaimer) — fixed MD3 surface
   ------------------------------------------------------------------------- */
.disclaimer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9;
  text-align: center;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 94%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-small);
}

/* -------------------------------------------------------------------------
   18. Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------------------------------------------------------------
   Additions: language toggle + team-strength bars (MD3 tokens)
   ------------------------------------------------------------------------- */
.lang-toggle {
  cursor: pointer;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  padding: 2px 12px !important;
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface-variant);
  min-width: 40px;
  text-align: center;
}
.lang-toggle:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
  color: var(--md-sys-color-primary);
}

.sbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.sbar > span {
  flex: 0 0 56px;
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface);
}
.sbar > b {
  flex: 0 0 28px;
  text-align: right;
  font: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-on-surface-variant);
}
.sbar-track {
  flex: 1;
  height: 10px;
  background: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-corner-full);
  overflow: hidden;
}
.sbar-fill {
  height: 100%;
  background: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full);
  transition: width 0.4s var(--md-sys-motion-easing, ease);
}

/* =========================================================================
   v3 sports skin — match hero, flags, avatars, metric tiles, rec rows
   ========================================================================= */
.flag { border-radius: 3px; object-fit: cover; vertical-align: middle; box-shadow: 0 0 0 0.5px var(--md-sys-color-outline-variant); }

.match-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-lg); padding: 18px 14px; margin-bottom: 12px;
  box-shadow: var(--md-elevation-1);
}
.mh-team { flex: 1; text-align: center; }
.mh-flag { margin-bottom: 8px; }
.mh-name { font: var(--md-sys-typescale-title-small); color: var(--md-sys-color-on-surface); }
.mh-odd { font: var(--md-sys-typescale-headline-small); margin-top: 4px; color: var(--md-sys-color-primary); }
.mh-mid { flex: 0 0 84px; text-align: center; padding-top: 8px; }
.mh-kick { font: var(--md-sys-typescale-label-medium); color: var(--md-sys-color-on-surface-variant); }
.mh-draw { font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface-variant); margin-top: 6px; }
.mh-eu { font-size: 10px; color: var(--md-sys-color-outline); margin-top: 10px; letter-spacing: 1px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--md-sys-color-surface-container); border-radius: var(--md-sys-shape-corner-md); padding: 10px 12px; }
.tile span { display: block; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.tile b { font: var(--md-sys-typescale-title-medium); }
.pos { color: var(--app-positive); }
.neg { color: var(--md-sys-color-error); }

.rec-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 0.5px solid var(--md-sys-color-outline-variant); }
.rec-row:first-of-type { border-top: 0; }
.rec-row .cat { font-size: 12px; color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-high); padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.rec-row .mut, .mut { color: var(--md-sys-color-on-surface-variant); font-size: 13px; }

.trader-row { display: flex; align-items: center; gap: 10px; }
.trader-row .tn { flex: 1; }
.trader-row .rk { font: var(--md-sys-typescale-title-small); color: var(--md-sys-color-on-surface-variant); width: 22px; text-align: center; }
.ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ava-i { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500;
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }

.match-row { display: flex; align-items: center; gap: 8px; }
.match-row .mr-team { flex: 1; font-size: 14px; }
.match-row .mr-r { text-align: right; }
.match-row .mr-mid { display: flex; flex-direction: column; align-items: center; padding: 0 8px; flex: 0 0 auto; }
.match-row .mr-time { font-size: 10px; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; margin-bottom: 1px; }
.match-row .mr-odds { font: var(--md-sys-typescale-title-small); color: var(--md-sys-color-primary); }

.btn-tonal { margin-top: 12px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }

/* v4: trader profile header + bigger avatar */
.trader-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.trader-hdr .ava { width: 48px; height: 48px; font-size: 16px; }
.trader-hdr .th-name { font: var(--md-sys-typescale-title-large); }
.trader-row .ava { flex: 0 0 auto; }
.trader-row small { color: var(--md-sys-color-on-surface-variant); }

/* =========================================================================
   v4: 3-zone match screen — predictions, formation pitch, player modal
   ========================================================================= */
.zone-tag { font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-primary);
  margin: 16px 2px 8px; padding-left: 8px; border-left: 3px solid var(--md-sys-color-primary); }
.mh-logo { width: 44px; height: 44px; object-fit: contain; margin: 0 auto 6px; display: block; }
.mh-score { font: var(--md-sys-typescale-headline-small); }
.mh-status { font-size: 10px; color: var(--md-sys-color-error); margin-top: 6px; }
.mh-venue { text-align: center; font-size: 12px; margin: -4px 0 12px; }

/* prediction win% bar */
.pred-bar { display: flex; height: 26px; border-radius: var(--md-sys-shape-corner-sm); overflow: hidden; margin-bottom: 4px; font-size: 12px; }
.pred-bar > div { display: flex; align-items: center; justify-content: center; color: #fff; min-width: 24px; }
.pb-h { background: var(--md-sys-color-primary); }
.pb-d { background: var(--md-sys-color-outline); }
.pb-a { background: var(--md-sys-color-tertiary); }
.pred-leg { display: flex; justify-content: space-between; font-size: 11px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 10px; }
.cmp-wrap { display: flex; flex-direction: column; gap: 6px; }
.cmp { display: flex; align-items: center; gap: 8px; }
.cmp-l { flex: 0 0 44px; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.cmp-track { flex: 1; height: 8px; background: var(--md-sys-color-surface-container-highest); border-radius: 999px; overflow: hidden; }
.cmp-h { height: 100%; background: var(--md-sys-color-primary); border-radius: 999px; }
.cmp-v { flex: 0 0 32px; text-align: right; font-size: 12px; }

/* match stat bars */
.sb { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; }
.sb-label { color: var(--md-sys-color-on-surface-variant); font-size: 12px; }
.sb-track { height: 6px; background: var(--md-sys-color-tertiary-container); border-radius: 999px; margin: 3px 0 2px; overflow: hidden; }
.sb-h { height: 100%; background: var(--md-sys-color-primary); }

/* formation pitch */
.pitch { position: relative; width: 100%; height: 300px; background: linear-gradient(180deg, #1f7a43, #176235);
  border-radius: var(--md-sys-shape-corner-md); overflow: hidden; margin-top: 8px; }
.pitch-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); }
.pitch-circle { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }
.pitch { height: 340px; }
.pdot { position: absolute; transform: translate(-50%,-50%); background: none; border: 0; padding: 0; cursor: pointer; text-align: center; width: 28px; }
.pdot > span { display: block; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; margin: 0 auto;
  font-size: 10px; font-weight: 500; color: #04140a; }
.pdot.h > span { background: #6dfca0; }
.pdot.a > span { background: #bfeaf7; color: #001f27; }
.pdot > em { position: absolute; left: 50%; transform: translateX(-50%); top: 25px; font-style: normal; font-size: 8px;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* player modal */
.modal-ov { min-height: 100vh; position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--md-sys-color-surface-container-high); border-radius: var(--md-sys-shape-corner-lg);
  padding: 18px; width: 100%; max-width: 320px; }
.pm-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pm-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.pm-name { font: var(--md-sys-typescale-title-large); }

/* =========================================================================
   v5: Sofascore-style data, odds board, trader analytics
   ========================================================================= */
/* zone① tab bar */
.ztabs { display: flex; gap: 6px; margin: 0 0 10px; }
.ztab { flex: 1; text-align: center; padding: 8px 0; border-radius: 999px; font: var(--md-sys-typescale-label-large);
  background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); cursor: pointer; }
.ztab.on { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.zpanel { display: none; }
.zpanel.show { display: block; }

/* win-probability 3-segment bar */
.wb { margin: 4px 0 8px; }
.wb-track { display: flex; height: 28px; border-radius: 8px; overflow: hidden; }
.wb-seg { display: flex; align-items: center; justify-content: center; min-width: 0; }
.wb-seg span { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; }
.wb-h { background: #4aa3ff; } .wb-d { background: var(--md-sys-color-surface-container-highest); }
.wb-d span { color: var(--md-sys-color-on-surface); } .wb-a { background: #e08a2e; }

/* two-tone comparison bars */
.tt-wrap { margin-top: 10px; }
.tt { margin: 9px 0; }
.tt-label { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; text-align: center;
  color: var(--md-sys-color-on-surface-variant); margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 8px; }
.tt-num { font-size: 12px; font-weight: 600; min-width: 34px; }
.tt-num.th { text-align: right; color: #4aa3ff; } .tt-num.ta { text-align: left; color: #e08a2e; }
.tt-bar { flex: 1; display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--md-sys-color-surface-container-high); }
.tt-h { background: #4aa3ff; } .tt-a { background: #e08a2e; }

/* radar */
.radar-wrap { max-width: 300px; margin: 0 auto; }
.radar-leg { text-align: center; font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 2px; }
.rl-h { color: #4aa3ff; } .rl-a { color: #e08a2e; }

/* stat comparison rows (pills) */
.sr { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high); }
.sr:last-child { border-bottom: 0; }
.sr-label { text-align: center; font-size: 11px; color: var(--md-sys-color-on-surface-variant); }
.sr-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 24px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); }
.sr-pill:first-of-type { justify-self: start; } .sr-pill:last-of-type { justify-self: end; }
.sr-pill.hot { background: #e08a2e; color: #2a1600; }

/* vertical formation pitch with photos */
.pitch-v { height: 460px; }
.pitch-v .pitch-mid { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px; }
.pitch-card { padding-left: 6px; padding-right: 6px; }
.form-badge { position: absolute; left: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.4);
  padding: 2px 8px; border-radius: 999px; z-index: 2; }
.form-badge.tl { top: 8px; } .form-badge.bl { bottom: 8px; }
.pp { position: absolute; transform: translate(-50%,-50%); background: none; border: 0; padding: 0; cursor: pointer; text-align: center; width: 34px; z-index: 1; }
.pp-img { display: block; width: 30px; height: 30px; border-radius: 50%; margin: 0 auto; overflow: hidden; position: relative;
  border: 2px solid #fff; background: var(--md-sys-color-surface-container); }
.pp.h .pp-img { border-color: #6dfca0; } .pp.a .pp-img { border-color: #bfeaf7; }
.pp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-fb { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; font-style: normal;
  font-size: 11px; font-weight: 700; color: var(--md-sys-color-on-surface); }
.pp-no { position: absolute; top: -3px; right: -2px; font-size: 9px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.6); border-radius: 999px; padding: 0 3px; line-height: 13px; }
.pp > em { position: absolute; left: 50%; transform: translateX(-50%); top: 32px; font-style: normal; font-size: 8px;
  line-height: 1.1; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); max-width: 52px; overflow: hidden; text-overflow: ellipsis; }

/* substitutes two-column */
.subs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.subs-col { display: flex; flex-direction: column; gap: 4px; }
.sub-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px; background: none; border: 0; cursor: pointer; text-align: left; border-radius: 8px; }
.sub-row:active { background: var(--md-sys-color-surface-container-high); }
.sub-img { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; position: relative; background: var(--md-sys-color-surface-container-high); }
.sub-img img { width: 100%; height: 100%; object-fit: cover; }
.sub-fb { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--md-sys-color-on-surface-variant); }
.sub-meta { min-width: 0; line-height: 1.2; }
.sub-meta b { font-size: 12px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-meta small { font-size: 10px; color: var(--md-sys-color-on-surface-variant); }

/* odds comparison board */
.odds-card { overflow: hidden; }
/* tab strip: hidden scrollbar, gentle snap, right-edge fade hints "more →" */
.otabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; margin-bottom: 10px; gap: 6px;
  scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
.otabs::-webkit-scrollbar { display: none; height: 0; }
/* odds tabs: tighter than global .chip, no ✓ glyph, never compress/clip a label */
.otab { white-space: nowrap; scroll-snap-align: start; flex: 0 0 auto; min-width: max-content; min-height: 36px; padding: 7px 14px; border-color: var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-full); }
.otab.on::before { content: none; }
.opanel { display: none; } .opanel.show { display: block; }
.otbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; scrollbar-width: none; -ms-overflow-style: none; }
.otbl-wrap::-webkit-scrollbar { display: none; height: 0; }
.odds-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.odds-tbl th { font-weight: 600; color: var(--md-sys-color-on-surface-variant); padding: 4px 6px; text-align: center; white-space: nowrap; }
.odds-tbl td { padding: 5px 6px; text-align: center; border-top: 1px solid var(--md-sys-color-surface-container-high); white-space: nowrap; }
/* sticky selection label — stays pinned while the numeric columns scroll */
.odds-tbl .ob-sel { text-align: left; font-weight: 600; position: sticky; left: 0; z-index: 2; background: var(--md-sys-color-surface-container-low); box-shadow: 1px 0 0 var(--md-sys-color-surface-container-high); }
.odds-tbl th.ob-sel { z-index: 3; }
/* Polymarket anchor column: ONE green accent (header label + left rail), neutral body numbers */
.odds-tbl .oc-poly { background: color-mix(in srgb, var(--md-sys-color-primary) 7%, transparent); color: var(--md-sys-color-on-surface); font-weight: 600; position: relative; box-shadow: inset 2px 0 0 color-mix(in srgb, var(--md-sys-color-primary) 55%, transparent); }
.odds-tbl th.oc-poly { color: var(--md-sys-color-primary); font-weight: 700; }
/* best (highest) book price in a row — teal, so it never reads as the Poly green */
.odds-tbl td.oc-best { color: var(--md-sys-color-tertiary); font-weight: 700; background: color-mix(in srgb, var(--md-sys-color-tertiary) 12%, transparent); }
.ob-edge { font-style: normal; font-size: 9px; font-weight: 700; color: var(--md-sys-color-primary); background: color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent); border-radius: var(--md-sys-shape-corner-xs); padding: 0 3px; margin-left: 4px; vertical-align: 1px; }
.odds-legend { font-size: 10px; line-height: 1.5; margin-top: 8px; }
.live-dot { font-size: 10px; font-weight: 700; color: #fff; background: var(--md-sys-color-error); border-radius: 999px; padding: 1px 6px; vertical-align: middle; }

/* recommendation tier badges + edge */
.tag.tier-strong { background: #1e7d4f; color: #fff; }
.tag.tier-lean { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.tag.tier-pass { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.edge-up { color: #37c97b; font-weight: 700; font-size: 11px; }

/* =========================================================================
   v5.1: 今日 page (parlay + rich bet cards) + match top-recommend block
   ========================================================================= */
/* parlay card */
.parlay-card { background: linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 18%, var(--md-sys-color-surface-container)), var(--md-sys-color-surface-container)); }
.parlay-hd { display: flex; align-items: center; justify-content: space-between; }
.parlay-hd h2 { margin: 0; }
.parlay-odds { font: var(--md-sys-typescale-headline-small); font-weight: 800; color: var(--md-sys-color-primary); }
.leg { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 0.5px solid var(--md-sys-color-outline-variant); }
.leg-m { flex: 1; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.leg-pk { font-size: 13px; }
.leg-o { font: var(--md-sys-typescale-title-small); color: var(--md-sys-color-primary); min-width: 42px; text-align: right; }
.parlay-ft { display: flex; justify-content: space-between; font-size: 12px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--md-sys-color-outline-variant); }

/* rich pick card */
.pick-card { cursor: pointer; }
.pick-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pick-match { font-size: 13px; display: flex; align-items: center; gap: 4px; color: var(--md-sys-color-on-surface-variant); }
.pick-main { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pick-cat { font-size: 11px; color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-high); padding: 2px 8px; border-radius: 999px; }
.pick-out { font: var(--md-sys-typescale-title-medium); flex: 1; }
.pick-odd { font: var(--md-sys-typescale-title-large); color: var(--md-sys-color-primary); font-weight: 800; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.pick-grid > div { background: var(--md-sys-color-surface-container-high); border-radius: var(--md-sys-shape-corner-sm); padding: 7px 4px; text-align: center; }
.pick-grid span { display: block; font-size: 10px; color: var(--md-sys-color-on-surface-variant); }
.pick-grid b { font: var(--md-sys-typescale-title-small); }
.pick-kelly { font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 6px; }
.pick-why { font-size: 12px; line-height: 1.5; color: var(--md-sys-color-on-surface-variant); margin: 0; }

/* match-page top recommend block */
.rec-top { border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent); }
.ml-odds { display: flex; align-items: center; gap: 6px; margin: 8px 0 6px; }
.ml-l { font-size: 11px; color: var(--md-sys-color-on-surface-variant); flex: 0 0 auto; margin-right: 2px; }
.ml-cell { flex: 1; text-align: center; background: var(--md-sys-color-surface-container-high); border-radius: var(--md-sys-shape-corner-sm); padding: 6px 2px; }
.ml-cell i { display: block; font-style: normal; font-size: 10px; color: var(--md-sys-color-on-surface-variant); }
.ml-cell b { font: var(--md-sys-typescale-title-medium); color: var(--md-sys-color-primary); }
.rec-backers { margin-top: 10px; }
.rb-cap { font-size: 12px; display: block; margin-bottom: 6px; }
.rb-list { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.backer { flex: 0 0 auto; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; cursor: pointer; }
.backer .ava { width: 36px; height: 36px; }
.bk-n { font-size: 11px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-s { font-size: 9px; color: var(--md-sys-color-on-surface-variant); }

/* leaderboard sub-nav */
.lb-nav { display: flex; gap: 8px; margin-bottom: 10px; }
.lb-link { flex: 1; text-align: center; padding: 8px 0; border-radius: var(--md-sys-shape-corner-sm); background: var(--md-sys-color-surface-container-high); font-size: 13px; cursor: pointer; }

/* leaderboard v6 — period/metric segmented controls + ranked rows (Polymarket-style) */
.lb-card { padding-bottom: 12px; }
.lb-head { display: flex; align-items: center; justify-content: space-between; }
.lb-head h2 { margin: 0; }
.lb-link.sm { flex: 0 0 auto; padding: 6px 12px; font-size: 12px; }
.seg { display: flex; background: var(--md-sys-color-surface-container-high); border-radius: 999px; padding: 3px; margin-top: 10px; }
.seg-i { flex: 1; text-align: center; padding: 7px 0; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--md-sys-color-on-surface-variant); cursor: pointer; transition: background .15s; }
.seg-i.on { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.lb-note { font-size: 11px; margin: 8px 0 0; }
.lb-styles { margin-top: 10px; margin-bottom: 0; }
.lb-list { padding: 4px 0; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 0.5px solid var(--md-sys-color-outline-variant); }
.lb-row:last-child { border-bottom: 0; }
.lb-rk { flex: 0 0 26px; text-align: center; font: var(--md-sys-typescale-title-small); font-weight: 700; color: var(--md-sys-color-on-surface-variant); }
.lb-rk.rk-1, .lb-rk.rk-2, .lb-rk.rk-3 { font-size: 18px; }
.lb-row .ava { flex: 0 0 auto; width: 36px; height: 36px; }
.lb-mid { flex: 1; min-width: 0; }
.lb-name { display: block; font: var(--md-sys-typescale-title-small); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 11px; color: var(--md-sys-color-on-surface-variant); }
.wr-scope { font-size: 9px; background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); border-radius: 4px; padding: 0 3px; margin-left: 3px; }
.lb-hero { flex: 0 0 auto; font: var(--md-sys-typescale-title-medium); font-weight: 800; text-align: right; }
.lb-hero.pos { color: #37c97b; } .lb-hero.neg { color: #e0506e; }

/* trader analytics: settled-result rows (win/loss/draw pills) + form-dot strip */
.rr-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; }
.rr-rec { font: var(--md-sys-typescale-title-small); }
.rr-rec b { font-weight: 800; margin-right: 1px; }
.form-strip { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.form-strip .fd { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.fd-win { background: #37c97b; } .fd-loss { background: #e0506e; } .fd-push { background: var(--md-sys-color-outline); }
.res-row { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 0; border-top: 1px solid var(--md-sys-color-outline-variant); }
.res-row:first-of-type { border-top: 0; }
.res-pill { flex: 0 0 auto; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.res-win { background: color-mix(in srgb, #37c97b 22%, transparent); color: #37c97b; }
.res-loss { background: color-mix(in srgb, #e0506e 22%, transparent); color: #e0506e; }
.res-push { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.res-open { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); font-size: 11px; }
.res-bet { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.bet-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bet-flags { flex: 0 0 auto; display: inline-flex; gap: 2px; }
.bet-flags .flag { height: 14px; width: 20px; border-radius: 2px; }
.res-bet .bet-main { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--md-sys-color-on-surface); }
.res-bet .bet-sub { font-size: 10.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-odd { font-weight: 700; color: var(--md-sys-color-on-surface-variant); font-variant-numeric: tabular-nums; }
.res-roi { flex: 0 0 auto; font: var(--md-sys-typescale-title-small); font-weight: 600; text-align: right; }
.res-roi small { font-size: 10px; font-weight: 500; opacity: .85; }

/* trader analytics: quality stats + equity curve + style badge */
.stats-q { margin-top: 8px; }
.stats-q b { font: var(--md-sys-typescale-title-medium); }
.equity { margin-top: 10px; }
.eq-cap { font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 2px; }
.spark { display: block; }
.tr-style { margin-left: 5px; font-size: 12px; }

/* ===== AI prediction-review panel (zone ③) ===== */
.pred-card { padding: 12px; }
.pred-consensus { border-radius: 12px; background: color-mix(in srgb, var(--md-sys-color-primary) 7%, var(--md-sys-color-surface)); padding: 10px 12px; }
.pc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.pc-line b { color: var(--md-sys-color-on-surface-variant); font-weight: 600; }
.pc-pick { font-weight: 800; color: var(--md-sys-color-primary); }
.pc-ou { font-weight: 700; color: var(--md-sys-color-tertiary); }
.pc-scores { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pc-meta { font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-top: 6px; }
.pc-actual { margin-top: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--md-sys-color-outline) 45%, transparent); font-size: 14px; }
.pc-actual b { font-size: 16px; font-weight: 800; }
.pc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.psum { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.psum-y { background: color-mix(in srgb, #22c55e 18%, transparent); color: #15803d; }
.psum-p { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, transparent); }
.psum-n { color: #b91c1c; background: color-mix(in srgb, #ef4444 16%, transparent); }
.pred-detail-cap { font-size: 11px; text-align: right; margin: 10px 2px 6px; }
.pred-models { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .pred-models { grid-template-columns: 1fr; } }
.pmodel { border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 30%, transparent); border-radius: 12px; padding: 9px 10px; }
.pm-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pm-name { font-size: 14px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.pm-deepseek { color: #4d6bff; background: color-mix(in srgb, #4d6bff 14%, transparent); }
.pm-llama { color: #c2410c; background: color-mix(in srgb, #f97316 14%, transparent); }
.pm-qwen { color: #7c3aed; background: color-mix(in srgb, #8b5cf6 14%, transparent); }
.pm-mistral { color: #0e7490; background: color-mix(in srgb, #06b6d4 14%, transparent); }
.pm-claude { color: #c2410c; background: color-mix(in srgb, #d97757 16%, transparent); }
.pm-gemini { color: #2563eb; background: color-mix(in srgb, #4285f4 14%, transparent); }
.pm-tag { font-size: 11px; color: #b45309; background: color-mix(in srgb, #f59e0b 15%, transparent); padding: 1px 6px; border-radius: 5px; }
.pm-hits { margin-left: auto; display: flex; gap: 4px; }
.pdim { font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
.pdim-y { color: #15803d; background: color-mix(in srgb, #22c55e 16%, transparent); }
.pdim-n { color: #b91c1c; background: color-mix(in srgb, #ef4444 14%, transparent); }
.pm-pick { display: flex; align-items: center; gap: 8px; margin: 7px 0 6px; }
.pm-res { font-weight: 700; font-size: 13px; }
.pm-ou { font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.pm-scores { display: flex; gap: 5px; flex-wrap: wrap; }
.psc { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--md-sys-color-tertiary) 12%, var(--md-sys-color-surface)); color: var(--md-sys-color-on-surface); }
.psc i { font-style: normal; font-weight: 500; color: var(--md-sys-color-on-surface-variant); margin-left: 3px; font-size: 11px; }
.psc-hit { background: color-mix(in srgb, #22c55e 22%, transparent); color: #15803d; box-shadow: inset 0 0 0 1px color-mix(in srgb, #22c55e 45%, transparent); }

/* projected-formation dots (when official XI isn't published yet) */
.pp-dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 2px rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.85); }
.pp-dot.h { background: var(--md-sys-color-primary); }
.pp-dot.a { background: var(--md-sys-color-tertiary); }
.pitch-note { font-size: 11px; margin: 8px 2px 0; line-height: 1.5; }

/* AI consensus recommendations + per-model reason/tip */
.pc-recs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pc-recs-h { font-size: 11px; font-weight: 700; color: var(--md-sys-color-on-surface-variant); }
.rec-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent); color: var(--md-sys-color-primary); }
.rec-chip.tip { background: color-mix(in srgb, var(--md-sys-color-tertiary) 13%, transparent); color: var(--md-sys-color-tertiary); font-weight: 600; }
.pm-reason { font-size: 11.5px; line-height: 1.45; color: var(--md-sys-color-on-surface-variant); margin-top: 7px; }
.pm-tip { font-size: 11px; font-weight: 600; color: var(--md-sys-color-tertiary); margin-top: 4px; }

/* login-required gate (shown outside MPChat) */
.login-gate { text-align: center; padding: 40px 20px; margin-top: 40px; }
.login-gate .lg-emoji { font-size: 44px; margin-bottom: 12px; }
.login-gate h2 { margin: 0 0 8px; }
.login-gate p { max-width: 320px; margin: 0 auto; line-height: 1.6; }
