/* ── Profile dropdown (click the header avatar while signed in) ─────────── */
.profile-menu {
  position: absolute;
  top: 62px;
  right: 8px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 9999;
  min-width: 190px;
  padding: 6px 0;
  animation: rl-pop 0.15s ease-out;
}
.profile-menu.hidden { display: none; }

.profile-menu-email {
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  border-bottom: 1px solid var(--border, #eee);
  word-break: break-all;
}

.profile-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  text-align: start;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary, #111);
  transition: background 0.12s;
}
.profile-menu-item:hover { background: var(--bg-surface, #f5f5f5); }
.profile-menu-signout { color: #c0392b; }

/* ── Sign-in window (redesign) ────────────────────────────────────────────────
   Desktop: a two-pane dialog, the arena and the Professor's three promises on one side, the form on the
   other. Phone: a bottom sheet with a short arena strip on top. Square corners, ink is the one action
   colour; the orange appears once, on the focus ring. Tokens only, so light and dark both follow. */
#auth-modal { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; }
#auth-modal .pm-overlay { position: absolute; inset: 0; background: rgba(5, 8, 15, .62); }
.au-dialog {
  position: relative; display: flex; overflow: hidden; box-sizing: border-box;
  width: min(880px, calc(100% - 40px)); max-height: calc(100dvh - 40px);
  background: var(--ds-card); color: var(--ds-ink); font-family: var(--ds-font);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: au-in var(--ds-t-layer) ease-out;
}
@keyframes au-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.au-aside { position: relative; flex: 0 0 340px; display: flex; flex-direction: column; overflow: hidden; background: #0F2247; color: #F4F6FA; }
/* No sport's picture behind the Professor (owner, 26.11.2026: "in the sign-in there's no picture, right? now it's not
   only basketball"; it was a basketball arena): the brand's navy, a little deeper toward the foot. */
.au-aside-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 19, 0) 0%, rgba(8, 11, 19, .45) 100%);
}
.au-aside-body { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 28px 26px 30px; }
.au-logo { inline-size: 76px; block-size: 76px; object-fit: contain; }
.au-aside-title { font: 900 28px/1.15 var(--ds-font); letter-spacing: -.02em; text-wrap: balance; }
.au-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.au-perks li { display: flex; align-items: center; gap: 10px; font: 600 var(--ds-fs-14)/1.4 var(--ds-font); color: #DCE3F2; }
.au-tick { flex: none; inline-size: 20px; block-size: 20px; display: grid; place-items: center; background: #F4F6FA; color: #0C111C; }
.au-form-col { position: relative; flex: 1; min-width: 0; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; padding: 30px 32px 26px; }
.au-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.au-title { margin: 0; font: 900 var(--ds-fs-24)/1.2 var(--ds-font); letter-spacing: -.01em; }
.au-sub { margin: 4px 0 0; font: 500 var(--ds-fs-14)/1.5 var(--ds-font); color: var(--ds-ink2); }
.au-close {
  flex: none; inline-size: var(--ds-h-btn); block-size: var(--ds-h-btn); display: grid; place-items: center;
  border: 1.5px solid var(--ds-line); background: transparent; color: var(--ds-ink); cursor: pointer;
  position: static; padding: 0; font-size: 1rem;
}
.au-close:hover { background: var(--ds-soft); }
.au-close--sheet { display: none; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ds-ink); }
.au-tab { min-block-size: var(--ds-h-btn); border: 0; background: transparent; color: var(--ds-ink); font: 800 var(--ds-fs-14) var(--ds-font); cursor: pointer; }
.au-tab[aria-selected="true"] { background: var(--ds-ink); color: var(--ds-card); }
.au-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font: 600 var(--ds-fs-14)/1.5 var(--ds-font); border: 1.5px solid; }
.au-banner svg { flex: none; margin-top: 1px; }
.au-banner.is-err { color: var(--ds-live); border-color: var(--ds-live); background: color-mix(in srgb, var(--ds-live) 9%, transparent); }
.au-banner.is-ok { color: var(--ds-ok); border-color: var(--ds-ok); background: color-mix(in srgb, var(--ds-ok) 10%, transparent); }
.au-google {
  inline-size: 100%; min-block-size: var(--ds-h-btn-l); box-sizing: border-box; border: 1.5px solid var(--ds-ink);
  background: transparent; color: var(--ds-ink); font: 800 15px var(--ds-font); cursor: pointer;
}
.au-google:hover { background: var(--ds-soft); }
.au-legal { margin: 0; font: 500 13.5px/1.55 var(--ds-font); color: var(--ds-ink2); }
.au-legal a, .au-consent a { color: var(--ds-ink); font-weight: 700; }
.au-or { display: flex; align-items: center; gap: 12px; font: 600 var(--ds-fs-13) var(--ds-font); color: var(--ds-ink2); }
.au-or span { flex: 1; block-size: 1px; background: var(--ds-line); }
.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-field { display: flex; flex-direction: column; gap: 6px; font: 700 var(--ds-fs-14) var(--ds-font); }
.au-field .am-input {
  inline-size: 100%; min-block-size: var(--ds-h-btn-l); box-sizing: border-box; padding: 0 14px;
  border: 1.5px solid var(--ds-line); border-radius: 0; background: var(--ds-bg); color: var(--ds-ink); font: 500 15px var(--ds-font);
}
.au-field .am-input:focus { outline: 2px solid var(--ds-ink); outline-offset: 2px; border-color: var(--ds-ink); }
.au-pass { position: relative; display: block; }
.au-pass .am-input { padding-inline-end: 52px; }
.au-eye { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: var(--ds-h-btn); border: 0; background: transparent; color: var(--ds-ink2); cursor: pointer; display: grid; place-items: center; }
.au-eye[aria-pressed="true"] { color: var(--ds-ink); }
.au-forgot { display: flex; justify-content: flex-end; margin-block: -6px 0; }
.au-link { border: 0; background: transparent; color: var(--ds-ink); font: 700 var(--ds-fs-14) var(--ds-font); text-decoration: underline; cursor: pointer; min-block-size: var(--ds-h-btn); padding: 0 6px; }
.au-consent { display: flex; align-items: flex-start; gap: 10px; font: 500 13.5px/1.55 var(--ds-font); color: var(--ds-ink2); cursor: pointer; }
.au-consent input { flex: none; inline-size: 20px; block-size: 20px; margin: 2px 0 0; accent-color: var(--ds-ink); }
.au-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; inline-size: 100%; min-block-size: var(--ds-h-btn-l);
  border: 0; border-radius: 0; background: var(--ds-ink); color: var(--ds-card); font: 800 15px var(--ds-font); cursor: pointer;
}
.au-primary:hover { opacity: 1; }
.au-primary:disabled { opacity: .45; cursor: default; }
.au-primary[aria-busy="true"] { opacity: .75; }
.au-primary[aria-busy="true"]::before { content: ""; inline-size: 18px; block-size: 18px; box-sizing: border-box; border: 2.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
.au-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; font: 500 var(--ds-fs-14) var(--ds-font); color: var(--ds-ink2); }
.au-dialog :focus-visible { outline: 2px solid var(--ds-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .au-dialog { animation: none; } .au-primary[aria-busy="true"]::before { animation-duration: 2.4s; } }

@media (max-width: 719px) {
  #auth-modal { align-items: flex-end; }
  .au-dialog { flex-direction: column; inline-size: 100%; max-height: 94dvh; border-radius: var(--ds-r-sheet) var(--ds-r-sheet) 0 0; box-shadow: 0 -14px 40px rgba(0, 0, 0, .35); }
  .au-aside { flex: none; block-size: 120px; }
  .au-aside-bg { background: linear-gradient(180deg, rgba(8, 11, 19, 0), rgba(8, 11, 19, .35)); }
  .au-aside-body { margin: 0; padding: 0; position: absolute; inset-inline-start: 18px; inset-block-end: -18px; }
  .au-aside-title, .au-perks { display: none; }
  .au-logo { inline-size: 60px; block-size: 60px; }
  .au-close--desk { display: none; }
  .au-close--sheet { display: grid; position: absolute; inset-block-start: 10px; inset-inline-end: 10px; background: rgba(8, 11, 19, .55); border-color: rgba(255, 255, 255, .5); color: #F4F6FA; }
  .au-form-col { padding: 30px 18px 26px; }
}

/* ── Favorite teams (redesign) ───────────────────────────────────────────────
   A square dialog (a bottom sheet on a phone): one block per league, each team a 60px tile with its crest;
   a ticked team gets the orange frame and its star sets the league colour. */
#auth-favorites-modal { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; }
.pm-overlay { position: absolute; inset: 0; background: rgba(5, 8, 15, .62); }
.pm-modal {
  position: relative; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box;
  width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 26px 28px 24px;
  background: var(--ds-card); color: var(--ds-ink); font-family: var(--ds-font);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4); animation: au-in var(--ds-t-layer) ease-out;
}
.pm-title { margin: 0; font: 900 var(--ds-fs-24)/1.2 var(--ds-font); letter-spacing: -.01em; color: var(--ds-ink); text-align: start; }
.pm-sub { margin: -8px 0 0; font: 500 var(--ds-fs-14)/1.5 var(--ds-font); color: var(--ds-ink2); text-align: start; }
.pm-sections { display: flex; flex-direction: column; gap: 10px; }
.pm-league-section { margin: 0; }
.pm-league-title { margin-bottom: 4px; font: 800 var(--ds-fs-17) var(--ds-font); color: var(--ds-ink); }
/* Every league folds (21.11.2026: nineteen leagues); the chevron is drawn with physical borders, so it points down in RTL too */
.pm-league-section > summary { display: flex; align-items: center; gap: 10px; min-block-size: 44px; cursor: pointer; list-style: none; }
.pm-league-section > summary::-webkit-details-marker { display: none; }
.pm-league-section > summary::after {
  content: ""; flex: none; margin-inline-start: auto; inline-size: 8px; block-size: 8px; margin-block-start: -4px;
  border-right: 2px solid var(--ds-ink2); border-bottom: 2px solid var(--ds-ink2); transform: rotate(45deg);
  transition: transform var(--ds-t-ctrl) ease;
}
.pm-league-section[open] > summary::after { transform: rotate(-135deg); margin-block-start: 4px; }
.pm-league-n { font: 600 var(--ds-fs-13) var(--ds-font); color: var(--ds-ink2); }
.pm-league-n[hidden] { display: none; }
.pm-league-wait { margin: 0; font: 500 var(--ds-fs-14)/1.5 var(--ds-font); color: var(--ds-ink2); }
.pm-filter {
  box-sizing: border-box; inline-size: 100%; min-block-size: 44px; margin: 0 0 10px; padding: 0 12px;
  border: 1.5px solid var(--ds-line); border-radius: 0; background: var(--ds-card); color: var(--ds-ink); font: 500 var(--ds-fs-14) var(--ds-font);
}
.pm-team-row[hidden] { display: none; }
.pm-league-hint { margin: 0 0 10px; font: 500 var(--ds-fs-13)/1.5 var(--ds-font); color: var(--ds-ink2); }
.pm-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; border: 0; }
.pm-team-row {
  display: flex; align-items: center; gap: 10px; min-block-size: 60px; padding: 8px 10px; box-sizing: border-box;
  border: 1.5px solid var(--ds-line); border-radius: 0; background: transparent; cursor: pointer;
  transition: border-color var(--ds-t-ctrl) ease, background-color var(--ds-t-ctrl) ease;
}
.pm-team-row:hover { background: var(--ds-soft); }
.pm-team-row.checked { border: 2px solid var(--ds-lg-el); background: color-mix(in srgb, var(--ds-lg-el) 10%, transparent); padding: 7.5px 9.5px; }
.pm-team-checkbox { inline-size: 20px; block-size: 20px; flex: none; margin: 0; cursor: pointer; accent-color: var(--ds-ink); }
.pm-crest { flex: none; }
.pm-team-name { flex: 1; min-width: 0; font: 600 var(--ds-fs-14)/1.25 var(--ds-font); color: var(--ds-ink); overflow-wrap: break-word; }
.pm-primary-star {
  flex: none; inline-size: 36px; block-size: 36px; display: grid; place-items: center; border: 0; background: transparent;
  font-size: 1.15rem; color: var(--ds-line); cursor: pointer; visibility: hidden; transition: color var(--ds-t-ctrl) ease;
}
.pm-team-row.checked .pm-primary-star { visibility: visible; }
.pm-primary-star.active { color: var(--ds-warn); }
.pm-done {
  position: sticky; inset-block-end: 0; display: block; inline-size: 100%; min-block-size: var(--ds-h-btn-l);
  border: 0; border-radius: 0; background: var(--ds-ink); color: var(--ds-card); font: 800 15px var(--ds-font); cursor: pointer;
}
.pm-done:hover { opacity: .9; }
#auth-favorites-modal :focus-visible { outline: 2px solid var(--ds-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pm-modal { animation: none; } }
@media (max-width: 719px) {
  #auth-favorites-modal { align-items: flex-end; }
  .pm-modal { inline-size: 100%; max-height: 88dvh; padding: 22px 18px 20px; border-radius: var(--ds-r-sheet) var(--ds-r-sheet) 0 0; box-shadow: 0 -14px 40px rgba(0, 0, 0, .35); }
  .pm-team-grid { grid-template-columns: 1fr; }
}

/* ── Auth Avatar (top nav) ─────────────────────────────────────────────── */
#auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg-surface, #eee);
  color: var(--text-muted, #888);
  border: 1.5px solid var(--border, #ddd);
  transition: border-color 0.15s;
  flex-shrink: 0;
}

#auth-avatar.signed-in {
  background: var(--team-accent, #1d428a);
  color: var(--accent-fg, #fff);
  border-color: var(--team-accent, #1d428a);
}

/* ── App content-column width ──────────────────────────────────────────
   The whole app is laid out as a centered column (header, nav, every
   screen's outer wrap) capped at a phone-sized 480px — on a wide desktop
   browser that reads as a cramped strip with dead space on both sides.
   Widen the column on larger viewports via one shared variable instead of
   the ~15 places that used to hardcode "480px" independently, so desktop
   and mobile only ever need to agree in one place. */
:root {
  --app-max-width: 480px;
}

@media (min-width: 700px) {
  :root {
    --app-max-width: 900px;
  }
}

/* ── Team accent colors (applied via JS) ───────────────────────────────── */
:root {
  --team-accent: #1d428a;
  --team-accent-bg: #1d428a22;
}

/* ── Basketball term tooltips ──────────────────────────────────────────── */
.term-link {
  color: var(--accent-ink, #1d428a);
  text-decoration: underline dotted;
  cursor: pointer;
  position: relative;
  display: inline;
}

.term-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  max-width: 280px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-primary, #111);
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  z-index: 9999;
  text-align: start;
  white-space: normal;
  pointer-events: none;
}
html[dir="rtl"] .term-popup { direction: rtl; }

/* ── Rate limit modal — Google button ─────────────────────────────────── */
.rl-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: #fff;
  border: 1.5px solid #dadce0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.rl-google-btn:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.rl-google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.rl-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--text-muted, #aaa);
  font-size: 0.8rem;
}

.rl-divider::before,
.rl-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border, #eee);
}

/* ── Global search (magnifying glass in the header) ──────────────────────── */
#global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-modal {
  text-align: center;
}

.search-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted, #888);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.search-close:hover { color: var(--text-primary, #111); }

.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #ddd);
  background: var(--bg-input, #f5f5f5);
  color: var(--text-primary, #111);
  font-size: 1rem;
  margin-bottom: 14px;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent1, #2563eb);
}

.search-results {
  text-align: start;
  max-height: 50vh;
  overflow-y: auto;
}

.search-hint {
  color: var(--text-muted, #888);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
}

.search-group-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-ink, #1d428a);
  margin: 10px 0 6px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.search-row:hover { background: var(--bg-card-hover, rgba(0,0,0,0.04)); }

.search-row-icon { font-size: 1.1rem; flex-shrink: 0; }
.search-row-name {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary, #111);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-row-league {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  flex-shrink: 0;
}

/* Consent: a line under the Google button, and a required checkbox on sign-up. */
.am-legal { font-size: .74rem; line-height: 1.5; color: var(--text-muted, #666); text-align: center; margin: 8px 0 2px; }
.am-legal a, .am-consent a { color: var(--accent-ink, #1a3a6b); text-decoration: underline; }
.am-consent { display: flex; align-items: flex-start; gap: 8px; font-size: .78rem; line-height: 1.5; color: var(--text-primary, #111); margin: 2px 0 4px; cursor: pointer; }
.am-consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent-ink, #1a3a6b); }

/* ── "הקבוצות שלי": the owner's design (Claude Design canvas "The Professor — רב־ענפי", board TeamPicker, 26.11.2026).
   A full screen on a phone (the navy head with "back", the sport and the search, the leagues as chips, the tiles, the
   tray), one window over the page on a computer (the leagues in a column beside the tiles, the search in its head). ── */
html.tp-open, html.tp-open body { overflow: hidden; }
.tp { position: fixed; inset: 0; z-index: 2000; font-family: var(--ds-font); }
.tp-scrim { position: absolute; inset: 0; background: rgba(15, 34, 71, .55); }
html[data-theme="dark"] .tp-scrim { background: rgba(2, 6, 16, .72); }
.tp-card { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ds-bg); color: var(--ds-ink); outline: none; }
.tp .num { font-family: var(--ds-font-num); font-variant-numeric: tabular-nums; }
.tp button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.tp-head { flex: none; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px; box-sizing: border-box;
  background: #0F2247; color: #F6F4F0; border-bottom: 1px solid #0F2247; }
html[data-theme="dark"] .tp-head { border-bottom-color: #2A3B66; }
.tp .tp-back { width: 44px; height: 44px; display: grid; place-items: center; }
.tp-card[dir="ltr"] .tp-back svg { transform: scaleX(-1); }
.tp-title { margin: 0; font: 900 20px/1 var(--ds-font); }
.tp-total, .tp .tp-find--desk, .tp .tp-x { display: none; }
.tp-findrow { display: none; flex: none; align-items: center; gap: 4px; padding: 12px 0 0; padding-inline: 12px 4px; }
.tp-card.is-finding .tp-findrow { display: flex; }
.tp-card.is-finding .tp-side, .tp-card.is-finding .tp-primary, .tp-card.is-finding .tp-grid { display: none; }
.tp-find { flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; gap: 8px; padding-inline: 10px 2px; box-sizing: border-box;
  border: 1.5px solid var(--ds-ink); background: var(--ds-card); color: var(--ds-ink); }
.tp-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 16px var(--ds-font); color: var(--ds-ink); }
.tp-find input::placeholder { color: var(--ds-ink2); opacity: 1; }
.tp-find input::-webkit-search-cancel-button { display: none; }
.tp .tp-clear { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ds-ink2); flex: none; }
.tp .tp-cancel { height: 44px; padding: 0 8px; font: 700 15px var(--ds-font); flex: none; }

.tp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tp-side { flex: none; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.tp-sportrow { display: flex; gap: 8px; }
.tp-sports { flex: 1; min-width: 0; display: flex; height: 44px; border: 1.5px solid var(--ds-ink); box-sizing: border-box; }
.tp .tp-sports button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 15px var(--ds-font); }
.tp .tp-sports button + button { border-inline-start: 1.5px solid var(--ds-ink); }
.tp .tp-sports button[aria-selected="true"] { background: var(--ds-ink); color: var(--ds-card); font-weight: 800; }
.tp-sports .num { font-size: 17px; font-weight: 700; }
.tp .tp-openfind { width: 44px; height: 44px; box-sizing: border-box; border: 1.5px solid var(--ds-ink); display: grid; place-items: center; flex: none; }
.tp-leagues { display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px; padding: 0 12px; scrollbar-width: none; }
.tp-leagues::-webkit-scrollbar { display: none; }
.tp .tp-chip { flex: none; height: 44px; padding-inline: 10px 12px; display: flex; align-items: center; gap: 7px; box-sizing: border-box;
  border: 1.5px solid var(--ds-line); font: 700 14px var(--ds-font); white-space: nowrap; }
.tp .tp-chip[aria-selected="true"] { background: var(--ds-ink); color: var(--ds-card); border-color: var(--ds-ink); font-weight: 800; }
.tp-mk { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.tp-chip[aria-selected="true"] .tp-mk { box-shadow: 0 0 0 1.5px var(--ds-card); }
.tp-chip .num { font-size: 16px; font-weight: 700; }

.tp-main { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.tp-primary { display: flex; flex-direction: column; gap: 4px; }
.tp-primary[hidden], .tp-grid[hidden], .tp-results[hidden] { display: none; }
.tp-pri-row { display: flex; align-items: center; gap: 10px; }
.tp-pri-l { font: 900 13px var(--ds-font); white-space: nowrap; }
.tp-pri-seg { flex: 1; min-width: 0; display: flex; height: 44px; border: 1.5px solid var(--ds-ink); box-sizing: border-box; }
.tp .tp-pri-seg button { flex: 1; min-width: 0; padding: 0 6px; font: 600 14px var(--ds-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp .tp-pri-seg button + button { border-inline-start: 1.5px solid var(--ds-ink); }
.tp .tp-pri-seg button[aria-checked="true"] { background: var(--ds-ink); color: var(--ds-card); font-weight: 800; }
.tp-pri-note { margin: 0; font: 500 12px/18px var(--ds-font); color: var(--ds-ink2); }

.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tp .tp-tile { position: relative; min-height: 104px; padding: 10px 4px 8px; box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; gap: 6px; background: var(--ds-card); color: var(--ds-ink); box-shadow: inset 0 0 0 1px var(--ds-line); }
.tp .tp-tile.is-on { box-shadow: inset 0 0 0 1.5px var(--ds-ink); }
.tp .tp-tile.is-pri { background: var(--tp-c); color: var(--tp-ci); box-shadow: none; }
.tp-nm { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.tp-n1 { font: 700 13px/1.2 var(--ds-font); overflow-wrap: anywhere; }
.tp-tile.is-on .tp-n1 { font-weight: 800; }
.tp-n2 { font: 500 11.5px/1.2 var(--ds-font); color: var(--ds-ink2); }
.tp-tile.is-pri .tp-n2 { color: var(--tp-ci); }
.tp-badge { position: absolute; top: 0; inset-inline-start: 0; width: 22px; height: 22px; display: grid; place-items: center; background: var(--ds-ink); color: var(--ds-card); }
.tp-tile.is-pri .tp-badge { background: var(--tp-ci); color: var(--tp-c); }
.tp-badge--tag { width: auto; padding: 0 7px; font: 800 11px var(--ds-font); }
.tp-crest.is-ring { box-shadow: 0 0 0 2px var(--tp-ci); border-radius: 50%; }
.tp-wait { margin: 0; padding: 16px 4px; font: 500 14px/1.5 var(--ds-font); color: var(--ds-ink2); }

/* the search's results: one row a team, the sport on its second line, basketball first for one name */
.tp-res-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 5px; border-bottom: 3px solid var(--ds-ink); }
.tp-res-h h3 { margin: 0; font: 900 20px var(--ds-font); }
.tp-res-h .num { font-size: 18px; font-weight: 700; color: var(--ds-ink2); }
.tp-res-list { margin-top: 8px; background: var(--ds-card); border: 1px solid var(--ds-line); }
.tp-res { display: flex; align-items: center; gap: 10px; min-height: 62px; padding-inline: 12px 8px; }
.tp-res + .tp-res { border-top: 1px solid var(--ds-line); }
.tp-res-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-res-n { font: 800 15px var(--ds-font); overflow-wrap: anywhere; }
.tp-res-n mark { background: #F5D77A; color: inherit; }
html[data-theme="dark"] .tp-res-n mark { background: rgba(245, 215, 122, .32); }
.tp-res-s { display: flex; align-items: center; gap: 5px; font: 500 12px var(--ds-font); color: var(--ds-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-res-s b { font-weight: 700; }
.tp-res-g { width: 14px; height: 14px; display: grid; place-items: center; flex: none; background: var(--ds-ink2); color: var(--ds-card); }
.tp .tp-follow { margin-inline-start: auto; height: 44px; min-width: 84px; padding: 0 10px; box-sizing: border-box; border: 1.5px solid var(--ds-ink);
  display: flex; align-items: center; justify-content: center; gap: 5px; font: 800 14px var(--ds-font); flex: none; }
.tp .tp-follow.is-on { background: var(--ds-ink); color: var(--ds-card); }

/* the tray: every team he follows, how many, and "סיימתי" */
.tp-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; padding: 10px 12px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--ds-card); border-top: 1px solid var(--ds-line); }
.tp-tray { flex: 1; min-width: 0; min-height: 32px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tp-tray::-webkit-scrollbar { display: none; }
.tp-pill { flex: none; display: flex; align-items: center; }
.tp-pill-n { display: none; }
.tp-count { display: flex; align-items: baseline; gap: 4px; font: 700 13px var(--ds-font); color: var(--ds-ink2); white-space: nowrap; }
.tp-count .num { font-size: 18px; color: var(--ds-ink); }
.tp .tp-done { flex: 1 1 100%; height: 50px; background: var(--ds-ink); color: var(--ds-card); font: 800 16px var(--ds-font); }
.tp button:focus-visible, .tp-find:focus-within { outline: 2px solid var(--ds-ink); outline-offset: 2px; }
.tp-head button:focus-visible { outline-color: #F6F4F0; }
@media (min-width: 480px) and (max-width: 899px) { .tp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 899px) { .tp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (min-width: 900px) {
  .tp-card { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(1000px, calc(100vw - 64px)); height: min(768px, calc(100vh - 64px));
    background: var(--ds-card); border: 1.5px solid var(--ds-ink); box-shadow: 0 24px 64px rgba(15, 34, 71, .36); }
  .tp-head { height: auto; padding: 16px 0 14px; padding-inline: 28px 16px; gap: 14px; background: none; color: var(--ds-ink); border: 0; }
  .tp .tp-back { display: none; }
  .tp-title { font-size: 30px; }
  .tp-total { display: inline; font-size: 22px; font-weight: 700; color: var(--ds-ink2); }
  .tp .tp-find--desk { display: flex; flex: none; margin-inline-start: auto; width: 320px; height: 44px; padding-inline: 12px; }
  .tp-find--desk input { font-size: 15px; font-weight: 500; }
  .tp .tp-x { display: grid; place-items: center; width: 44px; height: 44px; }
  .tp-head button:focus-visible { outline-color: var(--ds-ink); }
  .tp-findrow, .tp-card.is-finding .tp-findrow { display: none; }
  .tp-body { flex-direction: row; margin: 0 28px; border-top: 3px solid var(--ds-ink); }
  .tp-side { width: 252px; box-sizing: border-box; padding: 16px 0 0; padding-inline: 0 16px; gap: 12px; border-inline-end: 1px solid var(--ds-line); overflow-y: auto; }
  .tp .tp-openfind { display: none; }
  .tp-leagues { flex-direction: column; gap: 0; margin: 0; padding: 0; overflow: visible; }
  .tp .tp-chip { height: auto; min-height: 46px; padding: 0 10px; gap: 10px; border: 0; border-top: 1px solid var(--ds-line); font-size: 15px; white-space: normal; text-align: start; }
  .tp .tp-chip:first-child, .tp .tp-chip[aria-selected="true"], .tp .tp-chip[aria-selected="true"] + .tp-chip { border-top-color: transparent; }
  .tp-chip .num { margin-inline-start: auto; font-size: 17px; }
  .tp-mk { width: 20px; height: 20px; }
  .tp-main { padding: 16px 0; padding-inline: 20px 0; gap: 14px; }
  .tp-primary { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
  .tp-pri-row { gap: 12px; }
  .tp-pri-seg { flex: none; }
  .tp .tp-pri-seg button { flex: none; padding: 0 18px; }
  .tp-pri-note { font-size: 13px; }
  .tp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .tp .tp-tile { min-height: 112px; padding: 12px 4px 8px; gap: 7px; }
  .tp-n1 { font-size: 14px; }
  .tp-n2 { font-size: 12px; }
  .tp-badge { width: 24px; height: 24px; }
  .tp-badge--tag { width: auto; padding: 0 8px; font-size: 12px; }
  .tp-foot { flex-wrap: nowrap; padding: 12px 28px; background: color-mix(in srgb, var(--ds-ink) 4%, var(--ds-card)); }
  .tp-pill { height: 40px; padding-inline: 6px 10px; box-sizing: border-box; gap: 7px; border: 1px solid var(--ds-line); background: var(--ds-card);
    font: 700 13px var(--ds-font); white-space: nowrap; }
  .tp-pill-n { display: inline; }
  .tp-count { display: none; }
  .tp .tp-done { flex: none; margin-inline-start: auto; height: 48px; min-width: 170px; padding: 0 24px; }
}
@media (prefers-reduced-motion: reduce) { .tp * { transition: none !important; } }
