/* ============================================================
   Brass & Wood League — design system
   Warm paper + brass, dark walnut mode. Bilingual EN / AR.
   ============================================================ */

:root {
  --bg:          #FAFAFA;
  --surface:     #FFFFFF;
  --surface-2:   #F4F4F5;
  --surface-3:   #E9E9EC;
  --line:        #E6E6E9;
  --line-strong: #C9C9CF;
  --ink:         #0A0A0A;
  --ink-2:       #52525B;
  --ink-3:       #8B8B94;
  --accent:      #0B4FF5;
  --brass:       #0B4FF5;
  --brass-hi:    #3B72FF;
  --brass-soft:  #E9EEFF;
  --wood:        #0A0A0A;
  --win:         #12805A;
  --draw:        #8B8B94;
  --loss:        #D92D20;
  --amber:       #B45309;
  --shadow:      0 1px 2px rgba(0,0,0,.04), 0 8px 24px -14px rgba(0,0,0,.16);
  --shadow-lg:   0 2px 4px rgba(0,0,0,.06), 0 24px 48px -22px rgba(0,0,0,.26);
  --r:           14px;
  --r-sm:        9px;
  --nav-h:       56px;
  --tab-h:       62px;
  --maxw:        1240px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cond: 'Barlow Condensed', 'Inter', 'Segoe UI', sans-serif;
  --ar:   'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

html[data-theme="dark"] {
  --bg:          #08080A;
  --surface:     #101013;
  --surface-2:   #17171B;
  --surface-3:   #202026;
  --line:        #232329;
  --line-strong: #37373F;
  --ink:         #F4F4F5;
  --ink-2:       #A1A1AA;
  --ink-3:       #71717A;
  --accent:      #0B4FF5;
  --brass:       #5B8CFF;
  --brass-hi:    #8FB0FF;
  --brass-soft:  #10193A;
  --wood:        #0A0A0C;
  --win:         #2DD48A;
  --draw:        #71717A;
  --loss:        #FF6B5E;
  --amber:       #FFC53D;
  --shadow:      0 1px 2px rgba(0,0,0,.5), 0 8px 24px -14px rgba(0,0,0,.8);
  --shadow-lg:   0 2px 4px rgba(0,0,0,.55), 0 24px 48px -22px rgba(0,0,0,.9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  padding-block-start: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-block-end: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--ar); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }

/* ---------------- layout ---------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { padding: 18px 0 26px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spacer { flex: 1; }

/* ============================================================
   APP SHELL — top app bar + bottom tab bar + sheets
   ============================================================ */
.appbar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 70;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
}
.ab-btn {
  width: 38px; height: 38px; flex-shrink: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ab-btn:active { background: var(--surface-2); }
.ab-btn:hover { color: var(--ink); }
.ico { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2;
       stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] #backBtn .ico { transform: scaleX(-1); }
.ab-title {
  font-family: var(--cond); font-size: 21px; text-transform: uppercase;
  letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ab-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--cond); font-size: 19px; font-weight: 700; color: #fff;
  
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; border-radius: 9px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt b { font-family: var(--cond); font-size: 19px; letter-spacing: .01em; text-transform: uppercase; }
.brand-txt span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .07em; text-transform: uppercase; }

/* ---------------- bottom tab bar ---------------- */
.tabbar {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 70;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-block-end: env(safe-area-inset-bottom);
  display: flex; align-items: stretch;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
}
.tabbar button, .tabbar a {
  flex: 1; border: 0; background: none; cursor: pointer; padding: 8px 2px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent; transition: color .15s; min-width: 0; position: relative;
}
.tabbar .ico { width: 23px; height: 23px; stroke-width: 1.9; }
.tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar .on { color: var(--brass); }
.tabbar .on .ico { stroke-width: 2.4; }
.tabbar .on::before {
  content: ''; position: absolute; inset-block-start: 0; width: 26px; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--accent);
}
.tabbar button:active { background: var(--surface-2); }

/* ---------------- sheet ---------------- */
.scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px); animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } }
.sheet {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 85;
  background: var(--surface); border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.28);
  padding-block-end: calc(12px + env(safe-area-inset-bottom));
  max-height: 86vh; overflow: auto; animation: slideup .24s cubic-bezier(.22,1,.36,1);
}
@keyframes slideup { from { transform: translateY(100%) } }
.sheet-grip {
  width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong);
  margin: 10px auto 4px;
}
.sheet-body { padding: 8px 16px 16px; }
.sheet h4 {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  margin: 16px 0 8px; font-weight: 700;
}
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 400px) { .sheet-grid { grid-template-columns: repeat(3, 1fr); } }
.sheet-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 4px;
  border-radius: 14px; background: var(--surface-2); font-size: 11.5px; font-weight: 600;
  color: var(--ink-2); text-align: center; transition: .15s;
}
.sheet-grid a:active { transform: scale(.96); }
.sheet-grid a.on { background: var(--brass-soft); color: var(--brass); }
.sheet-grid .ico { width: 22px; height: 22px; }
.sheet-list { display: flex; flex-direction: column; gap: 2px; }
.sheet-list > * {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500; background: none; border: 0; width: 100%;
  cursor: pointer; text-align: start; color: var(--ink);
}
.sheet-list > *:active { background: var(--surface-2); }
.sheet-list .val { margin-inline-start: auto; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.sheet-list select {
  margin-inline-start: auto; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 8px; font-size: 13px; font-weight: 600;
}

/* ---------------- search panel ---------------- */
.search-panel {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; animation: fade .15s ease;
}
.sp-bar {
  display: flex; align-items: center; gap: 6px; padding: env(safe-area-inset-top) 10px 0;
  height: calc(var(--nav-h) + env(safe-area-inset-top)); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.sp-bar input {
  flex: 1; height: 40px; border: 0; background: none; outline: none; font-size: 16px;
  min-width: 0;
}
.sp-results { flex: 1; overflow: auto; padding: 8px; }
.sp-results .grp {
  font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  padding: 12px 10px 4px; font-weight: 700;
}
.sp-results a {
  display: flex; align-items: center; gap: 11px; padding: 11px 10px; border-radius: 12px;
  font-size: 14.5px;
}
.sp-results a:active { background: var(--surface-2); }

/* ---------------- cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
.card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-h h3 {
  font-family: var(--cond); font-size: 17px; text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 9px;
}
.card-h h3::before {
  content: ''; width: 4px; height: 15px; border-radius: 2px;
  background: var(--accent); flex-shrink: 0;
}
.card-h a { font-size: 12px; color: var(--brass); font-weight: 600; }
.card-b { padding: 16px; }
.card-b.flush { padding: 0; }

.section-title {
  font-family: var(--cond); font-size: 26px; text-transform: uppercase;
  letter-spacing: .03em; margin-bottom: 4px;
  display: flex; align-items: center; gap: 11px;
}
.section-title::before {
  content: ''; width: 5px; height: 24px; border-radius: 3px;
  background: var(--accent); flex-shrink: 0;
}
.section-sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 18px; }

/* ---------------- hero ---------------- */
.hero {
  position: relative; border-radius: 18px; overflow: hidden; color: #fff;
  background: #0A0A0D;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 30px 28px; margin-bottom: 20px;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(760px 340px at 90% -25%, rgba(11,79,245,.62), transparent 68%),
    radial-gradient(520px 260px at 2% 118%, rgba(11,79,245,.40), transparent 70%),
    linear-gradient(115deg, rgba(11,79,245,.14), transparent 55%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: var(--cond); font-size: clamp(30px, 5vw, 46px); text-transform: uppercase; letter-spacing: .02em; }
.hero p { margin: 6px 0 0; color: rgba(255,255,255,.68); font-size: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; }
.hero-stats div span { display: block; font-family: var(--cond); font-size: 30px; line-height: 1; color: #6E9BFF; }
.hero-stats div small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.5); }

/* ---------------- stat tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.tile b { display: block; font-family: var(--cond); font-size: 30px; line-height: 1.05; color: var(--brass); }
.tile small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }

/* ---------------- tables ---------------- */
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 0; table-layout: auto; }
table.tbl th {
  text-align: start; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); font-weight: 600; padding: 10px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  white-space: nowrap; background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
table.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl .num { text-align: center; font-variant-numeric: tabular-nums; width: 34px; }
table.tbl .pts { font-weight: 700; font-variant-numeric: tabular-nums; }
table.tbl th.num { text-align: center; }
.pos-badge {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); color: var(--brass);
}
tr.zone-1 .pos-badge { background: var(--accent); color: #fff; }
tr.zone-2 .pos-badge { background: var(--brass-soft); color: var(--brass); }
tr.zone-low .pos-badge { background: color-mix(in srgb, var(--loss) 16%, transparent); color: var(--loss); }

/* ---------------- crest / avatar ---------------- */
.crest {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--cond); font-size: 12px;
  font-weight: 700; color: #fff; letter-spacing: .02em; overflow: hidden;
}
.crest img { width: 100%; height: 100%; object-fit: cover; }
.crest.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.crest.xl { width: 92px; height: 92px; border-radius: 20px; font-size: 34px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-3));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--brass);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 17px; }
.avatar.xl { width: 120px; height: 120px; font-size: 38px; border-radius: 22px; }

.linkrow { display: flex; align-items: center; gap: 9px; min-width: 0; }
.linkrow b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkrow small { color: var(--ink-3); font-size: 11.5px; }

/* ---------------- pills / chips ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2);
  white-space: nowrap;
}
.pill.brass { background: var(--brass-soft); color: var(--brass); }
.pill.win  { background: color-mix(in srgb, var(--win) 15%, transparent);  color: var(--win); }
.pill.loss { background: color-mix(in srgb, var(--loss) 15%, transparent); color: var(--loss); }
.pill.live { background: color-mix(in srgb, var(--loss) 15%, transparent); color: var(--loss); }
.pill.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--loss);
  animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.form-dots { display: inline-flex; gap: 3px; }
.form-dots i {
  width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; font-style: normal; color: #fff;
}
.form-dots i.W { background: var(--win); }
.form-dots i.D { background: var(--draw); }
.form-dots i.L { background: var(--loss); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12.5px; cursor: pointer; color: var(--ink-2); transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* ---------------- match rows ---------------- */
.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); transition: background .12s;
}
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--surface-2); }
.match .side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match .side.away { flex-direction: row-reverse; text-align: end; }
.match .side b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score {
  min-width: 62px; text-align: center; font-family: var(--cond); font-size: 22px; font-weight: 700;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.score small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.mw-head {
  padding: 9px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--brass);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border-bottom: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
}

/* ---------------- profile header ---------------- */
.profile-hero {
  border-radius: 18px; padding: 24px; color: #fff; position: relative; overflow: hidden;
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px;
}
.profile-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(0,0,0,.62), rgba(0,0,0,.18));
}
.profile-hero > * { position: relative; z-index: 1; }
.profile-hero h1 { font-family: var(--cond); font-size: clamp(26px,4.4vw,40px); text-transform: uppercase; }
.profile-hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile-hero .meta .pill { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }
.shirt-no {
  font-family: var(--cond); font-size: 62px; line-height: 1; color: rgba(255,255,255,.32);
  margin-inline-start: auto; font-weight: 700;
}

.kv { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 1px; background: var(--line); }
.kv > div { background: var(--surface); padding: 12px 14px; }
.kv small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 3px; }
.kv b { font-weight: 600; font-size: 14px; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(96px,1fr)); gap: 1px; background: var(--line); }
.statgrid > div { background: var(--surface); padding: 14px; text-align: center; }
.statgrid b { display: block; font-family: var(--cond); font-size: 28px; line-height: 1; color: var(--brass); }
.statgrid small { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }

/* ---------------- cards grid (teams/players/stadiums) ---------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 14px; }
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s, border-color .16s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pcard .top { height: 6px; }
.pcard .body { padding: 14px; }
.pcard .photo {
  aspect-ratio: 1/1; background: var(--surface-2); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.pcard .photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard .photo .ph { font-family: var(--cond); font-size: 46px; color: var(--ink-3); }
.pcard .photo .no {
  position: absolute; inset-block-start: 8px; inset-inline-end: 10px;
  font-family: var(--cond); font-size: 26px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.pcard h4 { font-size: 15px; }
.pcard .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.pcard .foot { display: flex; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pcard .foot div { text-align: center; flex: 1; }
.pcard .foot b { display: block; font-family: var(--cond); font-size: 19px; color: var(--brass); }
.pcard .foot small { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }

/* ---------------- timeline ---------------- */
.timeline { position: relative; padding: 6px 0; }
.tl-row { display: grid; grid-template-columns: 1fr 54px 1fr; gap: 10px; align-items: center; padding: 7px 0; }
.tl-row .min {
  text-align: center; font-family: var(--cond); font-size: 14px; color: var(--ink-3);
  border-inline: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.tl-row .ev { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.tl-row .ev.away { flex-direction: row-reverse; text-align: end; }
.tl-row .ev small { color: var(--ink-3); font-size: 11.5px; }
.evi { width: 18px; text-align: center; flex-shrink: 0; }
.card-y { display: inline-block; width: 9px; height: 13px; border-radius: 2px; background: #E4B92B; }
.card-r { display: inline-block; width: 9px; height: 13px; border-radius: 2px; background: #C6392B; }

/* ---------------- pitch ---------------- */
.pitch {
  background: linear-gradient(180deg, #1E3A2C, #16281F);
  border-radius: var(--r); padding: 14px 10px; position: relative; min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-around;
}
.pitch::before {
  content: ''; position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.22);
  border-radius: 8px; pointer-events: none;
}
.pitch-line { display: flex; justify-content: space-around; gap: 6px; position: relative; z-index: 1; }
.pp { text-align: center; width: 62px; }
.pp .sh {
  width: 30px; height: 30px; margin: 0 auto 4px; border-radius: 50%;
  background: rgba(255,255,255,.94); color: #16351f; display: grid; place-items: center;
  font-family: var(--cond); font-size: 15px; font-weight: 700;
}
.pp span { font-size: 10px; color: rgba(255,255,255,.9); display: block; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- misc ---------------- */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty b { display: block; font-family: var(--cond); font-size: 22px; color: var(--ink-2); margin-bottom: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #2A67FF; border-color: #2A67FF; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 40%, var(--line)); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }

.bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.news-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .date { font-size: 11px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.news-item h4 { font-size: 14px; margin-bottom: 3px; }
.news-item p { margin: 0; font-size: 13px; color: var(--ink-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.on { color: var(--brass); border-bottom-color: var(--brass); }

.loading { padding: 60px; text-align: center; color: var(--ink-3); font-size: 14px; }
.skel { background: var(--surface-2); border-radius: 8px; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .5 } }

.toast {
  position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: rise .22s ease; max-width: 340px;
}
.toast.err { background: var(--loss); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } }

.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--ink-3); font-size: 12.5px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .searchbox input { width: 130px; }
  .searchbox input:focus { width: 170px; }
  .nav {
    position: fixed; inset-block-start: var(--nav-h); inset-inline: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 8px; gap: 2px; display: none;
    max-height: calc(100vh - var(--nav-h)); overflow: auto; box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 14px; font-size: 15px; }
  .burger { display: grid; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .brand-txt span { display: none; }
  .hero { padding: 22px 18px; }
  .hero-stats { gap: 18px; }
  .profile-hero { padding: 18px; gap: 14px; }
  .shirt-no { display: none; }
  .match { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 11px 10px; }
  .match .side b { font-size: 12.5px; }
  .wrap { padding: 0 14px; }
}
@media print {
  .appbar, .tabbar, .sheet, .scrim, .chips, .tabs { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; }
}

/* ---------------- desktop: keep the app shell app-shaped ---------------- */
@media (min-width: 760px) {
  .tabbar { justify-content: center; }
  .tabbar > * { flex: 0 0 116px; }
  .sheet {
    max-width: 520px; margin: 0 auto; inset-inline: 0;
    border-radius: 22px 22px 0 0;
  }
  .search-panel .sp-bar, .search-panel .sp-results {
    max-width: 640px; margin: 0 auto; width: 100%;
  }
}

/* ---------------- tables always fit: drop optional columns instead of scrolling ---------------- */
@media (max-width: 860px) { .c-opt1 { display: none !important; } }
@media (max-width: 620px) { .c-opt2 { display: none !important; } }
@media (max-width: 460px) { .c-opt3 { display: none !important; } }
@media (max-width: 620px) {
  table.tbl { font-size: 12.5px; }
  table.tbl th, table.tbl td { padding: 8px 4px; }
  table.tbl .num { width: 26px; }
  .linkrow { gap: 6px; }
  .crest { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
  .avatar { width: 28px; height: 28px; font-size: 10px; }
}
.linkrow { max-width: 100%; }
.linkrow b { min-width: 0; }

/* ---------------- FC-style player card ---------------- */
.fc-wrap { display: grid; grid-template-columns: minmax(0,260px) minmax(0,1fr); gap: 18px; align-items: start; }
@media (max-width: 640px) { .fc-wrap { grid-template-columns: 1fr; } }
.fc-card {
  width: 100%; border-radius: 16px; overflow: hidden; display: block;
  box-shadow: var(--shadow-lg); background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.fc-card img { width: 100%; display: block; }

.fc-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--line); }
@media (max-width: 420px) { .fc-stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.fc-stats > div { background: var(--surface); padding: 13px 14px; }
.fc-stats small {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-3); font-weight: 700; margin-bottom: 4px;
}
.fc-stats b { font-family: var(--cond); font-size: 26px; line-height: 1; display: block; margin-bottom: 6px; }
.fc-stats .bar { height: 4px; }

.rating-chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; padding: 6px 10px; border-radius: 12px; background: var(--accent); color: #fff;
  line-height: 1;
}
.rating-chip b { font-family: var(--cond); font-size: 26px; }
.rating-chip span { font-size: 10px; font-weight: 700; letter-spacing: .09em; opacity: .85; }

.pcard .rating {
  position: absolute; inset-block-start: 8px; inset-inline-start: 8px; z-index: 2;
  background: var(--accent); color: #fff; border-radius: 9px; padding: 3px 8px;
  font-family: var(--cond); font-size: 17px; line-height: 1.2; font-weight: 700;
}
.pcard .photo { position: relative; }

/* ---------------- news: the player a story is about ---------------- */
.news-face { position: relative; flex-shrink: 0; display: block; }
.news-face .nf-ovr {
  position: absolute; inset-block-end: -3px; inset-inline-end: -4px;
  background: var(--accent); color: #fff; border-radius: 6px; padding: 0 4px;
  font-family: var(--cond); font-size: 11px; font-weight: 700; line-height: 1.4;
  border: 2px solid var(--surface);
}
.news-hero-face {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; width: 88px; text-align: center;
}
.news-hero-face span { font-size: 11.5px; color: var(--ink-2); line-height: 1.25; }
.news-hero-face b {
  font-family: var(--cond); font-size: 13px; background: var(--accent); color: #fff;
  border-radius: 6px; padding: 1px 7px; letter-spacing: .03em;
}

/* ---------------- player wall: the card art is the tile ---------------- */
.fut-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
@media (max-width: 480px) { .fut-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.fut { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.fut-art {
  display: block; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); position: relative;
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s;
}
.fut-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fut:hover .fut-art { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-lg); }

.fut-blank {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--line);
}
.fut-face { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.fut-init { font-family: var(--cond); font-size: 42px; color: var(--ink-3); }
.fut-ovr {
  position: absolute; inset-block-start: 9px; inset-inline-start: 9px;
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  font-family: var(--cond); font-size: 22px; font-weight: 700; color: var(--brass);
}
.fut-ovr small { font-size: 9.5px; letter-spacing: .06em; color: var(--ink-3); margin-top: 2px; }
.fut-no {
  position: absolute; inset-block-end: 9px; inset-inline-end: 11px;
  font-family: var(--cond); font-size: 21px; color: var(--ink-3);
}

.fut-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px; }
.fut-meta b {
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.fut-meta small { font-size: 11.5px; color: var(--ink-3); }
.fut-tally {
  font-size: 11.5px; color: var(--brass); font-weight: 600; margin-top: 2px;
}

/* ---------------- coach card attributes ---------------- */
.coach-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px 10px;
  padding: 2px 2px 0;
}
.coach-stats small {
  display: block; font-size: 9px; letter-spacing: .09em; color: var(--ink-3); font-weight: 700;
}
.coach-stats b { font-family: var(--cond); font-size: 15px; line-height: 1.1; }
.coach-stats .bar { height: 3px; margin-top: 2px; }

/* news that carry a card image show it as a portrait, never a cropped banner */
.news-card-art {
  flex-shrink: 0; width: 132px; border-radius: 12px; overflow: hidden; display: block;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  box-shadow: var(--shadow);
}
.news-card-art img { width: 100%; display: block; }
@media (max-width: 520px) { .news-card-art { width: 104px; } }

.news-hero-face.big { width: 132px; }
@media (max-width: 520px) { .news-hero-face.big { width: 104px; } }
