/* A mobile-only decision deck. The values inside remain the terminal's
   existing rendered card values; this stylesheet never creates market data. */
.hg-mobile-market-feed { display: none; }

@media (max-width: 760px) {
  .hg-mobile-market-feed {
    display: block;
    min-width: 0;
    --hg-feed-edge: max(12px, env(safe-area-inset-left));
    --hg-feed-card-height: max(416px, min(680px, calc(100dvh - 210px)));
  }
  .hg-mobile-market-feed[data-mobile-market-feed-has-items="true"] + .pm-market-grid { display: none; }
  .hg-mobile-market-feed__chrome { min-height: 0; }
  .hg-mobile-market-feed__navigation {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px max(12px, env(safe-area-inset-right)) 8px var(--hg-feed-edge);
  }
  .hg-mobile-market-feed__navigation button,
  .hg-mobile-market-feed__card-action button {
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--outcome-border, var(--hl-border, #20363e)) 82%, transparent);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--outcome-text, var(--hl-text, #f4f7f6));
    background: var(--outcome-surface-strong, var(--hl-bg-raised, #102128));
    font: inherit;
    touch-action: manipulation;
  }
  .hg-mobile-market-feed__navigation button:disabled { opacity: .42; }
  .hg-mobile-market-feed__navigation p {
    margin: 0;
    color: var(--outcome-text-muted, var(--hl-text-muted, #94a9ad));
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }
  .hg-mobile-market-feed__viewport {
    block-size: calc(100dvh - 124px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-block-size: 414px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-type: y mandatory;
    scroll-padding-block: 0;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .hg-mobile-market-feed__viewport::-webkit-scrollbar { display: none; }
  .hg-mobile-market-feed__card {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-block-size: var(--hg-feed-card-height);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    outline: none;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) var(--hg-feed-edge);
  }
  .hg-mobile-market-feed__card + .hg-mobile-market-feed__card { margin-block-start: 14px; }
  .hg-mobile-market-feed__card:focus-visible { outline: 2px solid var(--outcome-accent, var(--hl-accent, #58edcf)); outline-offset: -4px; }
  .hg-mobile-market-feed__card.is-active { content-visibility: auto; }
  .hg-mobile-market-feed__card-meta {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--outcome-border, var(--hl-border, #20363e)) 70%, transparent);
    border-radius: 999px;
    color: var(--outcome-text-muted, var(--hl-text-muted, #94a9ad));
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .hg-mobile-market-feed__card-meta i { inline-size: 3px; block-size: 3px; border-radius: 50%; background: var(--outcome-accent, var(--hl-accent, #58edcf)); }
  .hg-mobile-market-feed__presentation {
    display: flex;
    min-block-size: 0;
    padding-block: clamp(16px, 5vh, 44px) 16px;
    pointer-events: none;
  }
  .hg-mobile-market-feed__presentation .pm-market-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-inline-size: 0;
    min-block-size: 0;
    padding: clamp(18px, 5vw, 28px);
    border-color: color-mix(in srgb, var(--outcome-border, var(--hl-border, #20363e)) 78%, transparent);
    border-radius: 22px;
    background:
      radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--outcome-accent, var(--hl-accent, #58edcf)) 15%, transparent), transparent 34%),
      linear-gradient(150deg, color-mix(in srgb, var(--outcome-surface-strong, var(--hl-bg-raised, #102128)) 95%, transparent), var(--outcome-surface, var(--hl-bg, #0c181e)));
    box-shadow: 0 18px 54px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .06);
  }
  .hg-mobile-market-feed__presentation .pm-card-head {
    order: 3;
    align-items: flex-end;
    margin-block-start: auto;
    padding-block-start: 18px;
  }
  .hg-mobile-market-feed__presentation .pm-card-head__brand {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
  }
  .hg-mobile-market-feed__presentation .pm-card-head h2 {
    grid-column: 2;
    margin: 0;
    color: var(--outcome-text, var(--hl-text, #f4f7f6));
    font-size: clamp(20px, 6vw, 28px);
    line-height: 1.08;
    letter-spacing: -.035em;
  }
  .hg-mobile-market-feed__presentation .pm-card-head__condition { grid-column: 2; margin: 3px 0 0; }
  .hg-mobile-market-feed__presentation .pm-card-head__brand .pm-market-icon,
  .hg-mobile-market-feed__presentation .pm-card-head__brand .pm-crypto-icon--md,
  .hg-mobile-market-feed__presentation .pm-card-head__brand .pm-market-photo--md,
  .hg-mobile-market-feed__presentation .pm-card-head__brand .pm-wc-trophy-icon--md,
  .hg-mobile-market-feed__presentation .pm-card-head__brand .pm-match-split-flag--md {
    grid-row: 1 / span 2;
    inline-size: 52px;
    block-size: 52px;
  }
  .hg-mobile-market-feed__presentation .pm-card-spark { display: none; }
  .hg-mobile-market-feed__presentation .pm-card-binary-sides,
  .hg-mobile-market-feed__presentation .pm-card-outcomes,
  .hg-mobile-market-feed__presentation .pm-match-card-body { order: 1; align-self: center; inline-size: 100%; }
  .hg-mobile-market-feed__presentation .pm-card-binary-sides { gap: 10px; }
  .hg-mobile-market-feed__presentation .pm-card-binary-side {
    min-block-size: clamp(118px, 19vh, 148px);
    padding: 16px;
    border-radius: 16px;
  }
  .hg-mobile-market-feed__presentation .pm-card-binary-side__label { gap: 8px; }
  .hg-mobile-market-feed__presentation .pm-card-binary-side__direction { font-size: 14px; }
  .hg-mobile-market-feed__presentation .pm-card-binary-side__multiplier,
  .hg-mobile-market-feed__presentation .pm-card-binary-side__payout,
  .hg-mobile-market-feed__presentation .pm-card-outcome-row__pct { font-size: clamp(21px, 7vw, 30px); font-variant-numeric: tabular-nums; }
  .hg-mobile-market-feed__presentation .pm-card-outcome-row { min-block-size: 56px; padding: 12px 0; }
  .hg-mobile-market-feed__presentation .pm-match-card-body { display: grid; gap: 22px; }
  .hg-mobile-market-feed__presentation .pm-match-card-teams { min-block-size: 160px; align-items: center; }
  .hg-mobile-market-feed__presentation .pm-match-card-team strong { font-size: clamp(15px, 4.6vw, 19px); }
  .hg-mobile-market-feed__presentation .pm-match-card-time { font-size: clamp(18px, 5vw, 25px); }
  .hg-mobile-market-feed__presentation .pm-match-card-outcome { min-block-size: 62px; }
  .hg-mobile-market-feed__presentation .pm-market-footer { order: 2; margin-block-start: 16px; }
  .hg-mobile-market-feed__card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 4px;
    color: var(--outcome-text-muted, var(--hl-text-muted, #94a9ad));
    font-size: 11px;
  }
  .hg-mobile-market-feed__card-action button {
    flex: 0 0 auto;
    border-color: color-mix(in srgb, var(--outcome-accent, var(--hl-accent, #58edcf)) 58%, var(--outcome-border, var(--hl-border, #20363e)));
    color: var(--outcome-text, var(--hl-text, #f4f7f6));
  }
  .hg-mobile-market-feed__empty { margin: 0; padding: 24px var(--hg-feed-edge) calc(32px + env(safe-area-inset-bottom)); color: var(--outcome-text-muted, var(--hl-text-muted, #94a9ad)); }
}

@media (max-width: 360px) {
  .hg-mobile-market-feed { --hg-feed-card-height: max(396px, calc(100dvh - 190px)); }
  .hg-mobile-market-feed__presentation .pm-market-card { padding: 16px; border-radius: 18px; }
  .hg-mobile-market-feed__presentation .pm-card-binary-side { min-block-size: 104px; padding: 12px; }
  .hg-mobile-market-feed__card-action span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hg-mobile-market-feed__viewport { scroll-behavior: auto; }
  .hg-mobile-market-feed__card,
  .hg-mobile-market-feed__presentation .pm-market-card { transition: none !important; animation: none !important; }
}
