/* Shared mobile application layer. It is intentionally additive: desktop keeps
   its richer layouts while smaller viewports receive native-sized controls. */
:root { --pooler-nav-height: 0px; --pooler-visible-height: 100dvh; }
html { background: #05070a; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: contain; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:active, a:active { transform: translateY(1px); }
.pooler-install-notice { display: none; }
/* The mobile bar is injected on every member-facing page. Keep it out of the
   document flow unless the mobile breakpoint below explicitly enables it;
   otherwise its inline SVGs can fall back to their intrinsic viewport size and
   create a huge, empty scroll area on desktop/tablet widths. */
.pooler-mobile-nav { display: none; }

@media (max-width: 760px) {
  :root { --pooler-nav-height: calc(70px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: calc(64px + env(safe-area-inset-top)); scroll-padding-bottom: calc(var(--pooler-nav-height) + 14px); }
  body:not(.admin-page) { min-height: var(--pooler-visible-height); padding-bottom: calc(var(--pooler-nav-height) + 10px); overflow-x: hidden; }
  body.pooler-keyboard-open .pooler-mobile-nav,
  body.pooler-keyboard-open .mobile-bottom-nav { transform: translateY(110%); pointer-events: none; }
  body.pooler-keyboard-open { padding-bottom: 0; }
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-header .nav-shell { width: 100%; height: 60px; min-height: 60px; padding: 0 12px; flex-wrap: nowrap; gap: 8px; }
  .site-header .nav-shell { position: relative; }
  html.home-search-page { scroll-padding-top: calc(121px + env(safe-area-inset-top)); }
  .site-header .nav-shell-search { height: auto; flex-wrap: wrap; padding: 8px 12px 10px; row-gap: 8px; }
  .site-header .nav-shell-search .header-search { display: grid; flex: 0 0 100%; width: 100%; min-width: 0; max-width: none; height: auto; grid-template-columns: 24px minmax(0, 1fr) auto; }
  .site-header .nav-shell-search .header-search input { min-width: 0; }
  .site-header .nav-shell-search .header-account,
  .site-header .nav-shell-search .edition-picker { top: 9px; }
  .site-header .main-nav { display: none; }
  .site-header .brand { width: 142px; min-width: 0; max-width: 142px; height: 44px; }
  .site-header .brand.brand-logo-only { width: 142px; min-width: 142px; height: 44px; }
  .site-header .site-logo { width: 142px; max-width: 142px; height: auto; }
  .site-header .mobile-menu { display: none !important; }
  .site-header .header-account { position: absolute; right: 12px; margin-left: 0; }
  .site-header .edition-picker { position: absolute; right: 60px; margin-left: 0; }
  .pools-page .site-header .account-button { position: absolute; right: 12px; width: 76px; min-height: 42px; max-width: 76px; margin: 0; padding: 0 7px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
  .pools-page .site-header .edition-picker { right: 96px; }
  .site-header .edition-picker.compact-language-picker { padding: 3px; gap: 1px; }
  .site-header .compact-language-picker .edition-toggle { min-width: 29px; padding: 0 6px; }
  .site-header .header-account,
  .site-header .account-button { min-height: 42px; min-width: 42px; padding: 8px 10px; }
  .site-header .header-account span { font-size: 0; }
  .site-header .header-account svg { width: 20px; height: 20px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  .pools-page .pool-dialog .dialog-close { display: grid; place-items: center; width: 44px; height: 44px; right: 8px; top: 8px; }
  .pools-page .auth-tabs button, .pools-page .pool-roster-table .remove-player { min-height: 44px; }
  .pooler-mobile-nav,
  .mobile-bottom-nav {
    position: fixed !important;
    z-index: 65 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    height: var(--pooler-nav-height) !important;
    min-height: var(--pooler-nav-height) !important;
    padding: 7px 5px env(safe-area-inset-bottom) !important;
    border-top: 1px solid rgba(79, 91, 101, .78) !important;
    background: rgba(7, 10, 13, .96) !important;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, .24) !important;
    backdrop-filter: blur(20px) saturate(150%);
    transition: transform .22s ease;
  }
  .pooler-mobile-nav a,
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    position: relative;
    display: grid !important;
    min-width: 0;
    min-height: 48px;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 2px;
    border: 0 !important;
    border-radius: 12px;
    background: transparent !important;
    color: #8f9aa2 !important;
    font: 800 9px/1 ui-sans-serif, system-ui, sans-serif !important;
    letter-spacing: -.01em;
    text-decoration: none;
  }
  .pooler-mobile-nav span,
  .mobile-bottom-nav span { display: grid; place-items: center; width: 25px; height: 25px; color: currentColor; }
  .pooler-mobile-nav svg,
  .mobile-bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .pooler-mobile-nav b,
  .mobile-bottom-nav b { max-width: 100%; overflow: hidden; color: inherit; font: inherit; text-overflow: ellipsis; white-space: nowrap; }
  .pooler-mobile-nav .active,
  .mobile-bottom-nav .active { color: #f6f8f9 !important; }
  .pooler-mobile-nav .active span,
  .mobile-bottom-nav .active span { border-radius: 9px; background: #e9eff1; color: #091015; }
  .pooler-mobile-nav { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .mobile-bottom-nav b[hidden] { display: none !important; }
  .pooler-install-notice { position: fixed; z-index: 5100; right: 12px; bottom: calc(var(--pooler-nav-height) + 12px); left: 12px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid #3a444d; border-radius: 14px; background: rgba(16, 22, 27, .98); box-shadow: 0 16px 48px #0009; color: #edf2f4; }
  .pooler-install-notice[hidden] { display: none; }
  .pooler-install-notice img { width: 42px; height: 42px; border-radius: 11px; }
  .pooler-install-notice div { min-width: 0; display: grid; gap: 3px; }
  .pooler-install-notice b { font-size: 11px; }
  .pooler-install-notice span { color: #9ba6ae; font-size: 9px; line-height: 1.35; }
  .pooler-install-notice button { min-height: 38px; border: 1px solid #e7edef; border-radius: 8px; background: #eef2f3; color: #081014; padding: 0 10px; font-size: 10px; font-weight: 900; }
  .pooler-install-notice .dismiss { width: 30px; padding: 0; border-color: transparent; background: transparent; color: #a5b0b7; font-size: 20px; }
  dialog { max-width: 100vw; }
  dialog[open] { max-height: min(86dvh, var(--pooler-visible-height)); }
  .pools-page .pool-dialog,
  .club-dialog,
  .pick-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100% !important;
    max-width: 100%;
    max-height: min(86dvh, var(--pooler-visible-height));
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }
  .pools-page .pool-dialog { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .club-dialog .dialog-form { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  /* Desktop tables become readable information cards instead of a sideways
     scrolling wall of columns on a phone. */
  .pools-page .pool-table-wrap { overflow: visible; }
  .pools-page .pool-table,
  .pools-page .pool-table tbody { display: block; width: 100%; }
  .pools-page .pool-table thead { display: none; }
  .pools-page .pool-table tr { display: grid; gap: 0; margin: 10px; border: 1px solid #2e3840; border-radius: 11px; overflow: hidden; background: #10161a; }
  .pools-page .pool-table td { display: flex; min-width: 0; min-height: 53px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 4px; padding: 10px 12px; border: 0; border-top: 1px solid #252e35; font-size: 12px; white-space: normal; }
  .pools-page .pool-table td::before { color: #7e8b95; font-size: 8px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
  .pools-page .pool-table .points { font-size: 17px; text-align: left; }
  .pools-page .pool-ranking-table { min-width: 0; }
  .pools-page .pool-ranking-table tr { grid-template-columns: 1fr 1fr; }
  .pools-page .pool-ranking-table td:nth-child(1) { border-top: 0; }
  .pools-page .pool-ranking-table td:nth-child(1)::before { content: 'Rang'; }
  .pools-page .pool-ranking-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1 / span 2; padding-left: 72px; border-top: 0; }
  .pools-page .pool-ranking-table td:nth-child(2)::before { content: 'Formation'; }
  .pools-page .pool-ranking-table td:nth-child(3)::before { content: 'Joueurs'; }
  .pools-page .pool-ranking-table td:nth-child(4)::before { content: 'Points'; }
  .pools-page .pool-roster-table tr { grid-template-columns: 1fr 1fr; }
  .pools-page .pool-roster-table td:nth-child(1) { grid-column: 1 / -1; border-top: 0; }
  .pools-page .pool-roster-table td:nth-child(1)::before { content: 'Joueur'; }
  .pools-page .pool-roster-table td:nth-child(2)::before { content: 'Position'; }
  .pools-page .pool-roster-table td:nth-child(3)::before { content: 'Points'; }
  .pools-page .pool-roster-table td:nth-child(4) { grid-column: 1 / -1; align-items: stretch; }
  .pools-page .pool-roster-table .remove-player { min-height: 38px; }
  .standings-card .table-scroll { overflow: visible; }
  .standings-card .standings-table,
  .standings-card .standings-table tbody { display: block; min-width: 0; width: 100%; }
  .standings-card .standings-table thead { display: none; }
  .standings-card .standings-table tr { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; align-items: center; gap: 0 10px; margin: 9px; padding: 11px 10px; border: 1px solid #2a343b; border-radius: 12px; background: #10161a; }
  .standings-card .standings-table td { min-width: 0; padding: 0; border: 0; }
  .standings-card .standings-table td:nth-child(1) { grid-row: 1 / span 2; }
  .standings-card .standings-table td:nth-child(2) { grid-column: 2; }
  .standings-card .standings-table td:nth-child(3),
  .standings-card .standings-table td:nth-child(5),
  .standings-card .standings-table td:nth-child(6) { display: none; }
  .standings-card .standings-table td:nth-child(4),
  .standings-card .standings-table td:nth-child(7) { align-self: end; color: #aab4ba; font-size: 10px; }
  .standings-card .standings-table td:nth-child(4)::before { content: 'Auj. '; color: #77838d; font-size: 8px; font-weight: 800; }
  .standings-card .standings-table td:nth-child(7)::before { content: 'Total '; color: #77838d; font-size: 8px; font-weight: 800; }
  .standings-card .standings-table td:nth-child(8) { grid-column: 3; grid-row: 1; }
  .standings-card .standing-person { min-width: 0; }
  .standings-card .standing-person strong { font-size: 12px; }
  .standings-card .roster-open-button { min-height: 34px; padding: 0 8px; }
  .chat-panel { height: var(--pooler-visible-height); max-height: var(--pooler-visible-height); }
  .chat-panel .chat-compose { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .chat-panel .chat-tools { min-height: 38px; }
  .chat-panel .chat-tools button { min-height: 34px; }
  .skeleton, .loading-card i, .panel-loading:before { animation: pooler-shimmer 1.25s ease-in-out infinite; }

  /* Readable text and finger-sized controls across the member-facing pages. */
  :root { --pooler-nav-height: calc(80px + env(safe-area-inset-bottom)); }
  .pooler-mobile-nav a,
  .mobile-bottom-nav a,
  .mobile-bottom-nav button { min-height: 56px; gap: 5px; font: 800 11px/1.15 ui-sans-serif, system-ui, sans-serif !important; }
  .pooler-mobile-nav span,
  .mobile-bottom-nav span { width: 28px; height: 28px; }
  .pooler-mobile-nav svg,
  .mobile-bottom-nav svg { width: 24px; height: 24px; }
  .site-header .compact-language-picker .edition-toggle { min-width: 40px; min-height: 40px; font-size: 12px; }
  .site-header .header-search .search-submit,
  .ency-search button { min-width: 44px; min-height: 44px; font-size: 12px; }
  .pools-page .site-header .account-button { min-height: 44px; font-size: 12px; }
  main .eyebrow, .pool-eyebrow { font-size: 11px; }
  .story-meta, .news-card p,
  .featured-highlight-copy span, .featured-highlight-copy small,
  .featured-highlight-controls { font-size: 11px; line-height: 1.4; }
  .live-card-head span, .live-card-head b,
  .news-media-fallback b, .news-media-fallback span { font-size: 11px; }
  .story-source, .game-time b, .game-time span { font-size: 11px; }
  .pools-page .pool-hero-note { font-size: 12px; }
  .games-panel-tools { flex-wrap: wrap; }
  .games-view-tabs button, .games-calendar-button { min-height: 44px; font-size: 12px; }
  .news-team-toggle { min-height: 44px; }
  .highlight-nav { width: 44px; height: 44px; }
  .ticker-meta, .ticker-meta .preseason-tag { font-size: 11px; }

  .pool-title-block > span, .section-kicker, .live-pill,
  .card-head p, .game-meta, .pool-notification-section > h3 { font-size: 11px; line-height: 1.35; }
  .pool-title-block p, .conversation-head p { font-size: 12px; }
  .pool-nav button { min-height: 44px; font-size: 12px; }
  .header-action, .mobile-pool-menu button, .conversation-actions > button,
  .standings-card .roster-open-button { min-width: 44px; min-height: 44px; font-size: 12px; }
  .game-team b { font-size: 13px; }
  .owned-chip { gap: 6px; padding: 7px 9px; font-size: 11px; line-height: 1.3; }
  .owned-chip small { font-size: 10px; }
  .player-card h3 { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .player-card .player-meta, .player-score small,
  .status-pill, .stat-chips span { font-size: 11px; line-height: 1.35; }
  .status-pill, .stat-chips span { padding: 5px 7px; }

  .event p, .night-event p, .chat-message p { font-size: 12px; line-height: 1.5; }
  .event time, .night-event time, .chat-message-head time,
  .private-notification-section > header small { font-size: 11px; }
  .private-notification-section > header b, .chat-message-head b { font-size: 12px; }
  .live-alert-clock small, .live-alert-type small,
  .live-alert-award small, .live-alert-impact header,
  .live-alert-owner > span { font-size: 11px; line-height: 1.35; }
  .live-alert-owner strong, .live-alert-owner > b { font-size: 12px; }
  .live-alert-owner { min-height: 32px; }
  .live-alert-actions button, .score-video-link,
  .chat-panel .chat-tools button { min-height: 44px; font-size: 12px; }

  .ency-panel-head b, .ency-section-head b,
  .ency-trend-group h3 { font-size: 12px; }
  .ency-panel-head span, .ency-section-head span,
  .ency-result-meta, .ency-trend small,
  .ency-chart-years span { font-size: 11px; }
  .ency-result { min-height: 64px; }
  .ency-result-name { font-size: 14px; }
  .ency-trend { min-height: 52px; font-size: 13px; }
  .ency-trend span { font-size: 13px; }
  .ency-trend span small, .ency-trend > small,
  .ency-status, .ency-trends-empty { font-size: 11px; }
  .ency-page .ency-panel-head span,
  .ency-page .ency-section-head span,
  .ency-page .ency-trend-group h3,
  .ency-page .ency-result-meta,
  .ency-page .ency-trend small,
  .ency-page .ency-chart-years span { font-size: 11px; }
  .ency-page .ency-panel-head b,
  .ency-page .ency-section-head b,
  .ency-page .ency-tab,
  .ency-page .ency-stat-mode button { font-size: 12px; }
  .ency-page .ency-result-name { font-size: 14px; }
  .ency-page .ency-trend span { font-size: 13px; }
  .ency-page .ency-chart-dot { display: grid; place-items: center; width: 24px !important; height: 24px !important; min-width: 24px !important; min-height: 24px !important; max-width: 24px; max-height: 24px; margin: -12px 0 0 -12px; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .ency-page .ency-chart-dot::after { content: ''; width: 13px; height: 13px; border: 3px solid #e5eaec; border-radius: 50%; background: #2d3337; box-shadow: 0 0 0 3px #aeb8bd32; }
  .ency-page .ency-chart-dot:hover::after,
  .ency-page .ency-chart-dot.selected::after { background: #f8fafb; box-shadow: 0 0 0 5px #f4f7f835; }
  .ency-page .ency-chart-dot:focus-visible { outline: 2px solid #e5eaec !important; outline-offset: 2px; }
  .ency-tab, .ency-stat-mode button, .ency-chart-controls button,
  .ency-draft-years button, .ency-draft-rounds button { min-height: 44px; font-size: 12px; }
  .ency-video-close, .ency-draft-close,
  .ency-award-history-close { width: 44px; height: 44px; }
  .pools-page .pool-detail-tabs button { min-height: 44px; }
  .pools-page .pool-table td::before,
  .standings-card .standings-table td:nth-child(4)::before,
  .standings-card .standings-table td:nth-child(7)::before { font-size: 11px; }
}

@media (max-width: 360px) {
  .site-header .brand,
  .site-header .brand.brand-logo-only { width: 128px; min-width: 128px; max-width: 128px; }
  .site-header .site-logo { width: 128px; max-width: 128px; }
  .pools-page .site-header .account-button { width: 64px; max-width: 64px; font-size: 9px; }
  .pools-page .site-header .edition-picker { right: 84px; }
  .pooler-mobile-nav a { font-size: 11px !important; }
}

@keyframes pooler-shimmer { 50% { opacity: .46; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
