/* Homepage discovery: compact mobile broadcast layout. Keep markup and actions intact. */
@media (max-width: 768px) {
  html body.home-companion {
    background: #0b1218;
    color: #cbd5e1;
  }

  html body.home-companion main { padding-bottom: max(84px, env(safe-area-inset-bottom)); }

  html body.home-companion .mobile-qr-download,
  html body.home-companion .daily-discovery {
    margin-inline: 0;
    background: #0b1218;
  }

  html body.home-companion .mobile-qr-card {
    padding: 18px 16px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 12px !important;
    background: #121c26 !important;
    box-shadow: none !important;
  }
  html body.home-companion .mobile-qr-copy > span,
  html body.home-companion .daily-search-eyebrow,
  html body.home-companion .daily-block-kicker,
  html body.home-companion .daily-matchday-tools > header span {
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  html body.home-companion .mobile-qr-copy > span { color: #38bdf8 !important; }
  html body.home-companion .mobile-qr-copy h2,
  html body.home-companion .daily-discovery h2,
  html body.home-companion .daily-matchday-tools > header h3 {
    max-width: none;
    color: #fff;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -.01em;
  }
  html body.home-companion .mobile-qr-card .mobile-qr-copy h2 { font-size: 20px !important; }
  html body.home-companion .mobile-qr-copy p,
  html body.home-companion .daily-discovery-head p,
  html body.home-companion .daily-matchday-tools > header p {
    max-width: none;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.45;
  }
  html body.home-companion .mobile-qr-copy p { color: #cbd5e1 !important; }

  html body.home-companion .daily-discovery {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  html body.home-companion .daily-discovery::before { display: none; }
  html body.home-companion .daily-discovery-head,
  html body.home-companion .daily-next-events,
  html body.home-companion .daily-explore,
  html body.home-companion .daily-discovery-foot {
    padding: 24px 16px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.07);
    border-radius: 0;
    background: #0b1218;
    box-shadow: none;
  }
  html body.home-companion .daily-discovery-head { gap: 14px; }
  html body.home-companion .daily-discovery-layout { display: block; background: #0b1218; }
  html body.home-companion .daily-discovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  html body.home-companion .daily-discovery-actions .daily-live-pill,
  html body.home-companion .daily-discovery-actions .daily-primary-link,
  html body.home-companion .daily-discovery-actions .daily-search-trigger,
  html body.home-companion .daily-discovery-actions > a:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 0;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.2;
    box-shadow: none;
  }
  html body.home-companion .daily-discovery-actions .daily-live-pill,
  html body.home-companion .daily-discovery-actions .daily-primary-link {
    border: 1px solid #0d6e5b;
    color: #fff;
    background: #0d6e5b;
  }
  html body.home-companion .daily-discovery-actions .daily-search-trigger,
  html body.home-companion .daily-discovery-actions > a:last-child {
    border: 1px solid rgba(255,255,255,.08);
    color: #e2e8f0;
    background: #182430;
  }

  html body.home-companion .daily-block-heading { margin-bottom: 12px; }
  html body.home-companion .daily-block-heading h3 { color: #fff; font-size: 17px; line-height: 1.2; }
  html body.home-companion .daily-event-list { grid-template-columns: 1fr; gap: 6px; }
  html body.home-companion .daily-event-link,
  html body.home-companion .daily-event-link:nth-child(n) {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr) 16px;
    grid-template-rows: auto;
    column-gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: #121c26;
    box-shadow: none;
  }
  html body.home-companion .daily-event-link:nth-child(n+4) { display: grid; }
  html body.home-companion .daily-event-time {
    grid-area: 1 / 1 / 2 / 2;
    width: 46px;
    padding: 4px 2px;
    align-self: center;
    text-align: center;
    font-size: 11px;
  }
  html body.home-companion .daily-event-teams {
    grid-area: 1 / 2 / 2 / 3;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    grid-template-rows: repeat(2, 28px);
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    min-width: 0;
  }
  html body.home-companion .daily-event-teams i {
    display: grid;
    place-items: center;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    background: #192a35;
    box-shadow: none;
  }
  html body.home-companion .daily-event-teams i:first-child { grid-column: 1; grid-row: 1; }
  html body.home-companion .daily-event-teams i:last-child { grid-column: 1; grid-row: 2; }
  html body.home-companion .daily-event-teams img {
    display: block;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    object-fit: contain !important;
  }
  html body.home-companion .daily-event-teams strong {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    grid-template-rows: repeat(2, 28px);
    row-gap: 2px;
    min-width: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 28px;
    overflow-wrap: normal;
  }
  html body.home-companion .daily-event-teams strong > span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  html body.home-companion .daily-team-line .daily-team-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html body.home-companion .daily-team-line .daily-team-score {
    flex: none;
    width: 24px;
    text-align: right;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  html body.home-companion .daily-team-line .daily-team-score:empty { display: none; }
  html body.home-companion .daily-event-teams em { display: none; }
  html body.home-companion .daily-event-meta {
    grid-area: 2 / 2 / 3 / 3;
    display: none;
  }
  html body.home-companion .daily-event-link > b {
    grid-area: 1 / 3 / 2 / 4;
    justify-self: end;
    color: #64748b;
    font-size: 16px;
  }

  html body.home-companion .daily-matchday-tools { margin-top: 24px; }
  html body.home-companion .daily-matchday-tools > header { display: block; margin-bottom: 12px; }
  html body.home-companion .daily-matchday-tools > header span,
  html body.home-companion .daily-matchday-tools > header p { display: block; }
  html body.home-companion .daily-tool-grid {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: #121c26;
  }
  html body.home-companion .daily-tool-card,
  html body.home-companion .daily-tool-card:is(.is-live,.is-tv,.is-news,.is-app),
  html body.home-companion .daily-tool-card:nth-child(n) {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) 16px;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    margin: 0;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-radius: 0;
    color: #fff;
    background: #121c26;
    box-shadow: none;
  }
  html body.home-companion .daily-tool-card:last-child { border-bottom: 0; }
  html body.home-companion .daily-tool-card > i { width: 30px; height: 30px; }
  html body.home-companion .daily-tool-card small { color: #38bdf8; font-size: 10px; }
  html body.home-companion .daily-tool-card strong { color: #fff; font-size: 12px; }
  html body.home-companion .daily-tool-card em { display: block; color: #cbd5e1; font-size: 10px; }
  html body.home-companion .daily-tool-card::after { display: block; color: #94a3b8; }

  html body.home-companion .daily-explore {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 8px 16px 18px;
    background: #101923;
  }
  html body.home-companion .daily-explore > div,
  html body.home-companion .daily-explore > div + div {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 17px 0 16px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    border-radius: 0;
    background: transparent;
  }
  html body.home-companion .daily-explore > div:first-child { padding-top: 16px; background: transparent; }
  html body.home-companion .daily-explore .daily-block-kicker {
    display: block;
    color: #f1f5f9 !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
  }
  html body.home-companion .daily-explore > div::after {
    content: 'SWIPE  ›';
    position: absolute;
    top: 17px;
    right: 0;
    color: #67e8dc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    pointer-events: none;
  }
  html body.home-companion .daily-sport-chips,
  html body.home-companion .daily-league-chips,
  html body.home-companion .daily-country-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    overflow-x: auto;
    max-width: 100%;
    padding: 11px 22px 2px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
  }
  html body.home-companion .daily-sport-chips::-webkit-scrollbar,
  html body.home-companion .daily-league-chips::-webkit-scrollbar,
  html body.home-companion .daily-country-chips::-webkit-scrollbar { display: none; }
  html body.home-companion .daily-sport-chip,
  html body.home-companion .daily-sport-chip:nth-child(n),
  html body.home-companion .daily-league-chips > span:nth-child(n),
  html body.home-companion .daily-country-chips > span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 39px;
    padding: 0 13px;
    border: 1px solid rgba(163,184,205,.18);
    border-radius: 9px;
    color: #f1f5f9;
    background: #1b2a38;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  html body.home-companion .daily-sport-chip strong {
    color: #a7f3d0;
    background: #284438;
  }
  html body.home-companion .daily-league-chips > span:nth-child(n) {
    border-color: rgba(245,197,66,.25);
    background: #293027;
  }
  html body.home-companion .daily-country-chips > span {
    border-color: rgba(103,232,220,.24);
    background: #19303a;
  }
  html body.home-companion .daily-country-chips i {
    color: #b7f7ed;
    background: #244450;
  }
  html body.home-companion .daily-explore .daily-coverage-card {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 15px 42px 15px 16px;
    border: 1px solid rgba(103,232,220,.34);
    border-left: 3px solid #5eead4;
    border-radius: 11px;
    color: #f8fafc;
    background: #17323a;
    position: relative;
  }
  html body.home-companion .daily-explore .daily-coverage-card::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #6ee7d7;
    font-size: 21px;
  }
  html body.home-companion .daily-coverage-card > span { color: #67e8dc; font-size: 10px; }
  html body.home-companion .daily-coverage-card > strong { color: #fff; font-size: 14px; line-height: 1.3; }
  html body.home-companion .daily-coverage-card > small { color: #cbd5e1; font-size: 11px; }
  html body.home-companion .daily-discovery-foot {
    padding: 17px 16px 24px;
    background: #101923;
  }
  html body.home-companion .daily-discovery-foot p {
    margin: 0;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.5;
  }
  html body.home-companion .daily-discovery-foot p strong { color: #f8fafc; }
  html body.home-companion .daily-discovery-foot > div { gap: 10px 18px; margin-top: 12px; }
  html body.home-companion .daily-discovery-foot > div a {
    color: #67e8dc;
    font-size: 11px;
    font-weight: 800;
  }
  html body.home-companion .daily-discovery-foot > div a:last-child { display: inline; }

  /* Carry the desktop broadcast-yellow sport chapter through to mobile. */
  html body.home-companion #today .sport-divider {
    min-height: 44px !important;
    padding: 7px 12px !important;
    border: 1px solid #d3a82e !important;
    border-radius: 9px !important;
    color: #111318 !important;
    background: #f4ca49 !important;
    background-image: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 5px 12px rgba(0,0,0,.16) !important;
  }
  html body.home-companion #today .sport-divider-label,
  html body.home-companion #today .sport-divider-label strong {
    color: #111318 !important;
    text-shadow: none !important;
  }
  html body.home-companion #today .sport-divider-label i {
    border-color: rgba(17,19,24,.22) !important;
    color: #111318 !important;
    background: rgba(17,19,24,.07) !important;
  }
  html body.home-companion #today .sport-divider-label svg {
    color: #111318 !important;
    stroke: currentColor !important;
  }
}

@media (max-width: 360px) {
  html body.home-companion .daily-event-link,
  html body.home-companion .daily-event-link:nth-child(n) {
    grid-template-columns: 40px minmax(0,1fr);
    column-gap: 8px;
    padding-inline: 10px;
  }
  html body.home-companion .daily-event-time { width: 40px; }
  html body.home-companion .daily-event-teams {
    grid-template-columns: 28px minmax(0,1fr);
    column-gap: 8px;
  }
  html body.home-companion .daily-event-teams i {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
  }
  html body.home-companion .daily-event-link > b { display: none; }
}
