/* ui11-tabs.css: the header, Props, Games and Bets on a phone (agent ui-tabs11, 2026-11-10; research/ui11/ui-tabs11.md).
   Layout only; pairs with web/ui11-tabs.js and reuses web/ui11.css's folded-row look (.ui11-row, .ui11-pill, .ui11-chev). */

/* ---------- 2. the first draw settles once: the open panel stays invisible (its space and layout are kept) until the data has
   arrived and the page has drawn it, at most 1.2 s (ui11-tabs.js lifts the class) ---------- */
html.ui11t-gate .sb > .sb-page[role="tabpanel"], html.ui11t-gate .app-foot { visibility: hidden; }

/* ---------- 3. keyboard focus never lands under the sticky tab bar; a visible ring everywhere ---------- */
html { scroll-padding-top: 76px; }
.sb > .sb-page[role="tabpanel"] { scroll-margin-top: 76px; }
@media (display-mode: standalone) and (max-width: 700px) {
  html { scroll-padding-top: 12px; scroll-padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .sb > .sb-page[role="tabpanel"] { scroll-margin-top: 12px; }
}
:where(.sb) :is(button, a[href], summary, select, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--sb-gold, #e2b23f); outline-offset: 2px; }
:where(.sb) .sb-seg button:focus-visible { outline-offset: -2px; }

/* ---------- 4. a league toggle that scrolls sideways shows it: the cut edge fades (classes set by ui11-tabs.js) ---------- */
.sb-seg.ui11t-fr { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.sb-seg.ui11t-fl { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
.sb-seg.ui11t-fl.ui11t-fr { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.sb-seg { scroll-behavior: auto; overscroll-behavior-x: contain; }

/* ---------- 7. tables that still scroll sideways: the first column stays put, the verdict / status column stays in view,
   and the cut edge fades (classes set by ui11-tabs.js only on a table wider than its box) ---------- */
.sb-scroll.ui11t-x .sb-table th:first-child, .sb-scroll.ui11t-x .sb-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-panel); box-shadow: 6px 0 6px -6px rgba(0, 0, 0, .45); }
.sb-scroll.ui11t-x .sb-table th:first-child { z-index: 2; }
.sb-scroll.ui11t-x .sb-table .ui11t-stick-r { position: sticky; right: 0; z-index: 1; background: var(--color-panel); box-shadow: -6px 0 6px -6px rgba(0, 0, 0, .45); padding-left: 8px; }
.sb-scroll.ui11t-x .sb-table th.ui11t-stick-r { z-index: 2; }
.sb-scroll.ui11t-x:not(.ui11t-x-end) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), rgba(0, 0, 0, .35)); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), rgba(0, 0, 0, .35)); }
.sb-scroll.ui11t-x.ui11t-has-r:not(.ui11t-x-end) { -webkit-mask-image: none; mask-image: none; }

/* ---------- 8 / 9. folded reference cards (Games) and tools (Bets): the ui11 row, a card of its own ---------- */
.sb-card.ui11t-fold > .ui11-row + h3, .sb-card.ui11t-fold > .ui11-row + .sb-card-head > h3 { display: none; }
.sb-card.ui11t-fold:not(.ui11-closed) > .ui11-row + .sb-card-head:not(:has(> :not(h3))) { display: none; }
/* the sentence every row of the Polymarket watch repeats, said once above the table */
.ui11t-once { margin: 0 0 6px; }
.ui11t-said td small.ui11t-dup { display: none; }

/* ---------- 9. prose that runs on: the first lines, then "Show all" ---------- */
.ui11t-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 4px 0 0; padding: 0; background: none; border: 0; color: var(--sb-gold-2, var(--color-fg)); font: inherit; font-size: var(--cds-font-size-caption); cursor: pointer; }
.ui11t-more::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.ui11t-more[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.ui11t-more[hidden] { display: none; }
#yn-habits.ui11t-clip > .sb-habit:nth-child(n+4) { display: none; }
#sb-why.ui11t-clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* ---------- 5. Props: a league with no players today says so in one box ---------- */
#sb-props-empty:not([hidden]) { padding: 12px 14px 0; border: 1px dashed var(--color-border-line); border-bottom: 0; border-radius: var(--sb-r) var(--sb-r) 0 0; color: var(--color-fg); }
#ui11t-props-when { padding: 4px 14px 12px; border: 1px dashed var(--color-border-line); border-top: 0; border-radius: 0 0 var(--sb-r) var(--sb-r); margin-top: calc(-1 * var(--cds-gap-md)); }
#ui11t-props-when[hidden] { display: none; }

/* ---------- the phone: compact header, 12 px floor, 44 px taps, tables that fit ---------- */
@media (max-width: 640px) {
  /* 1. the header: one line of greeting beside a small monogram, the takeaway in two short lines, the four glance tiles as one row */
  .sb { gap: 12px; }
  .sb-head { gap: 0 10px; align-items: center; }
  .sb-mono { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; margin-top: 0; }
  .sb-mono svg { width: 27px; height: 27px; }
  .sb-eyebrow { font-size: 12px; line-height: 1.3; letter-spacing: .06em; }
  .sb-head h1 { font-size: 1rem; line-height: 1.2; }
  .sb-name-row { margin-top: 6px; }
  .sb-takeaway { margin-top: 6px; font-size: var(--cds-font-size-caption); line-height: 1.35; min-height: 2.7em; }
  .sb-glance { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
  .sb-glance div { padding: 4px 6px 4px 7px; border-radius: 10px; border-left-width: 2px; }
  .sb-glance small { font-size: 12px; text-transform: none; letter-spacing: 0; }
  .sb-glance b { font-size: 15px; margin-top: 0; line-height: 1.25; }
  .sb-tabs { padding: 3px; }
  .sb-section-head h2 { font-size: 1.125rem; }
  .sb-section-head { row-gap: 4px; }
  /* summary tiles: three to a row (Games' five and Bets' six tiles were a two-column stack with an orphan) */
  #games .sb-tiles, #bets .sb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #games .sb-tile, #bets .sb-tile { padding: 8px 8px 8px 9px; }
  #games .sb-tile-value, #bets .sb-tile-value { font-size: 1.125rem; }
  #games .sb-tile-label, #bets .sb-tile-label, #games .sb-tile-sub, #bets .sb-tile-sub { font-size: 12px; }
  #bets .sb-tile-edit .sb-tile-form { grid-template-columns: minmax(0, 1fr); }
  #bets .sb-tile-edit:has(.sb-tile-form:not([hidden])) { grid-column: 1 / -1; }
  /* 4. one naming on a phone (the full name stays the button's text and its accessible name) */
  #sb-sport button[data-v="soc"], #sb-sport button[data-v="ucl"] { font-size: 0 !important; }
  #sb-sport button[data-v="soc"]::after { content: "EPL"; font-size: var(--cds-font-size-caption); }
  #sb-sport button[data-v="ucl"]::after { content: "UCL"; font-size: var(--cds-font-size-caption); }
  /* 10. body text at 12 px or more (the charts' axis labels stay at 11 px: they are drawn to fit) */
  .sb { --sb-fs-2xs: 12px; }
  .sb-table th { font-size: 12px; letter-spacing: .02em; }
  .sb-kv-label, .sb-tn-cols, .sb-tn-cc, .sb-settle button, .sb-hit-label, .sb-ladder-sub, .sb-ladder-line, .sb summary small { font-size: 12px; }
  .sb .sb-seg button { padding-left: 11px; padding-right: 11px; }
  /* the Props hero's long chips ("Teammate out ... usage up") wrap instead of pushing the page sideways at 320 px */
  .sb-hero-chips .sb-chip { white-space: normal; max-width: 100%; height: auto; min-height: 24px; line-height: 1.3; padding-top: 3px; padding-bottom: 3px; }
  .sb-chart text { font-size: 11px; }
  /* 7. tables: tighter cell padding before anything scrolls sideways */
  .sb-table th, .sb-table td { padding-left: 5px; padding-right: 5px; }
  .sb-table th:first-child, .sb-table td:first-child { padding-left: 0; }
  .sb-table th:last-child, .sb-table td:last-child { padding-right: 0; }
}

/* 6. tap targets: 44 px where a thumb lands (padding and height, not a bigger look) */
@media (max-width: 640px), (pointer: coarse) {
  .sb .sb-seg { padding: 2px; }
  .sb .sb-seg button { min-height: 44px; min-width: 44px; }
  .sb .sb-btn, .sb .sb-btn-sm, .sb label.sb-btn { min-height: 44px; }
  .sb .sb-help > summary, .sb .sb-more > summary, .sb details > summary { min-height: 44px; }
  .sb .sb-settle { gap: 8px; }
  .sb .sb-settle button { width: 44px; height: 44px; }
  .sb .sb-name-btn { min-height: 44px; }
  .sb .sb-table td small a, .sb .sb-table td > a:not(.sb-btn) { display: inline-block; padding: 14px 4px; margin: -14px -4px; }
  .sb .sb-x { min-width: 44px; min-height: 44px; }
  .app-foot .app-logout button { min-height: 44px; padding: 0 10px; }
}

/* The opponent-defense list on Props (2026-11-16): the last row's value ("22.8 pts . 15 reb . 4.6 ast . 1.3 3PM", the dots being middle dots) is one unbreakable
   run of about 232 px beside its label; at 320 px it pushed the whole page 6 px sideways. On a narrow phone the value may drop under its label and wrap. */
@media (max-width: 400px) {
  .sb .sb-deflist li { flex-wrap: wrap; }
  .sb .sb-deflist li b { white-space: normal; min-width: 0; margin-left: auto; text-align: right; }
}
