html,
body {
    max-width: 100%;
}

/* Shared modern typography layer. This file loads last on every public,
   member, and administrator page, including the legacy Tailwind pages. */
body {
    font-family: Inter, Aptos, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    letter-spacing: -.005em;
}

.brand,
body > nav .font-black {
    font-weight: 760 !important;
    letter-spacing: -.025em;
}

.nav-link,
body > nav a {
    font-weight: 600;
}

.hero h1,
.score-hero h1,
.pick-hero h1,
.member-hero h1,
.admin-hero h1,
.section-title,
body > .bg-dark h1,
main h1,
main h2 {
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.02;
}

main .font-black,
main .font-extrabold {
    font-weight: 700 !important;
}

main h3,
.hero-game-matchup,
.pick-matchup,
.pick-selection strong,
.package-price,
.admin-published-pick strong {
    font-weight: 650;
    letter-spacing: -.018em;
}

.button,
button,
.text-link,
.pick-editor summary {
    font-weight: 650;
}

.eyebrow,
.section-kicker,
.pick-league,
.hero-board-title,
.verified-badge,
.access-pill,
.pick-visibility,
.published-tags span {
    font-weight: 700;
}

body {
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
    min-width: 0;
}

button,
a,
label,
input,
select,
textarea {
    touch-action: manipulation;
}

.mobile-menu-toggle,
.mobile-quick-links,
.sport-label-short {
    display: none;
}

@media (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .site-header {
        position: static;
    }

    .site-nav {
        min-height: 0;
        padding: 12px 0 8px;
    }

    .nav-links,
    .sport-row,
    .view-tabs,
    .calendar-strip {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar,
    .sport-row::-webkit-scrollbar,
    .view-tabs::-webkit-scrollbar,
    .calendar-strip::-webkit-scrollbar {
        display: none;
    }

    .nav-link,
    .filter-chip,
    .view-tab {
        min-height: 44px;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .button {
        width: 100%;
    }

    .section-head > .button {
        width: 100%;
    }

    .toolbar > *,
    .date-form,
    .date-form label,
    .admin-toolbar > form,
    .admin-toolbar .button {
        width: 100%;
    }

    .date-controls {
        display: grid;
        width: 100%;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .date-controls .input {
        width: 100%;
    }

    .game-card-foot span,
    .team-name strong {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .footer-links {
        row-gap: 10px;
    }

    .pick-hero h1,
    .member-hero h1,
    .admin-hero h1 {
        overflow-wrap: anywhere;
    }

    .record-top {
        padding: 17px 18px;
    }

    .record-grid div {
        padding: 17px 8px;
    }

    .record-board > p {
        padding: 15px 18px;
    }

    .featured-pick,
    .panel,
    .member-pick,
    .package-card {
        padding: 20px;
    }

    .pick-selection strong,
    .pick-matchup,
    .game-title-card strong,
    .admin-published-pick strong {
        overflow-wrap: anywhere;
    }

    .locked-panel {
        padding: 20px;
    }

    .locked-panel .button {
        width: 100%;
    }

    .vip-game-board li strong,
    .vip-game-board li time {
        overflow-wrap: anywhere;
    }

    .history-table {
        min-width: 680px;
    }

    .history-table-wrap {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    .admin-hero-grid .button,
    .admin-user-form .button,
    .pick-form .button {
        width: 100%;
    }

    .market-options strong {
        overflow: visible;
        text-overflow: initial;
        white-space: normal;
    }

    .market-options label span {
        min-height: 0;
        padding: 13px;
    }

    .access-list strong,
    .access-list span,
    .customer-list strong,
    .customer-list span {
        overflow-wrap: anywhere;
    }

    /* The legacy informational pages use a Tailwind navigation bar. */
    body > nav > div > div {
        height: auto !important;
        min-height: 64px;
        align-items: flex-start !important;
        flex-direction: column;
        gap: 10px;
        padding-block: 12px;
    }

    body > nav .hidden {
        display: block !important;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body > nav .hidden::-webkit-scrollbar {
        display: none;
    }

    body > nav .ml-10 {
        min-width: max-content;
        margin-left: 0 !important;
        gap: 3px;
    }

    body > nav .space-x-6 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
    }

    body > nav a {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        white-space: nowrap;
    }

    .mobile-nav-inner {
        position: relative;
        display: grid !important;
        width: min(100% - 20px, 1200px);
        min-height: 0 !important;
        align-items: center !important;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr) 44px;
        margin-inline: auto;
        padding: 12px 0 10px !important;
    }

    .site-nav.mobile-nav-inner {
        flex-direction: initial;
    }

    body > nav > div {
        max-width: none !important;
        padding-inline: 0 !important;
    }

    .mobile-nav-brand {
        min-width: 0;
        grid-column: 1;
        grid-row: 1;
    }

    .mobile-menu-toggle {
        display: inline-grid;
        width: 44px;
        height: 44px;
        place-content: center;
        gap: 5px;
        grid-column: 2;
        grid-row: 1;
        border: 1px solid rgba(148, 163, 184, .32);
        border-radius: 11px;
        background: rgba(255, 255, 255, .07);
        color: #fff;
        cursor: pointer;
        padding: 0;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 160ms ease, opacity 160ms ease;
    }

    .mobile-nav-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-quick-links {
        display: grid;
        width: 100%;
        gap: 6px;
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mobile-quick-links a {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(148, 163, 184, .18);
        border-radius: 9px;
        background: rgba(255, 255, 255, .045);
        color: #cbd5e1;
        font-size: .75rem;
        font-weight: 850;
        padding: 4px 6px;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-quick-links a:hover,
    .mobile-quick-links a:focus-visible,
    .mobile-quick-links a.is-current {
        border-color: rgba(96, 165, 250, .55);
        background: rgba(37, 99, 235, .2);
        color: #fff;
    }

    .mobile-quick-links .mobile-quick-alerts {
        border-color: #fbbf24;
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        box-shadow: 0 6px 16px rgba(245, 158, 11, .3);
        color: #111827;
        font-weight: 950;
    }

    .mobile-quick-links .mobile-quick-alerts:hover,
    .mobile-quick-links .mobile-quick-alerts:focus-visible,
    .mobile-quick-links .mobile-quick-alerts.is-current {
        border-color: #fde68a;
        background: linear-gradient(135deg, #fde047, #f59e0b);
        color: #111827;
    }

    .mobile-nav-ready .mobile-menu-panel {
        display: none !important;
        width: 100%;
        min-width: 0;
        overflow: visible;
        grid-column: 1 / -1;
        grid-row: 3;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        border: 1px solid rgba(148, 163, 184, .2);
        border-radius: 12px;
        background: #0b172a;
        box-shadow: 0 18px 35px rgba(0, 0, 0, .25);
        padding: 8px;
    }

    .mobile-nav-open .mobile-menu-panel {
        display: grid !important;
    }

    .mobile-menu-panel > div {
        display: grid !important;
        min-width: 0 !important;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px !important;
    }

    .mobile-menu-panel a {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        margin: 0 !important;
        border-radius: 9px;
        padding: 10px 12px !important;
        white-space: normal;
    }

    .mobile-nav-ready .mobile-menu-panel .mobile-quick-duplicate {
        display: none !important;
    }

    .sport-row {
        display: grid;
        width: 100%;
        gap: 7px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: visible;
        padding: 0;
    }

    .sport-row .filter-chip {
        width: 100%;
        min-width: 0;
        justify-content: center;
        gap: 0;
        font-size: .72rem;
        padding: 5px 4px;
        text-align: center;
    }

    .sport-filter-icon,
    .sport-label-full {
        display: none;
    }

    .sport-label-short {
        display: inline;
    }

    body > .bg-dark.py-16 {
        padding-block: 40px !important;
    }

    main.py-16 {
        padding-block: 40px !important;
    }

    main .p-8,
    main .md\:p-12 {
        padding: 20px !important;
    }

    main .text-xl {
        font-size: 1.05rem !important;
        line-height: 1.55 !important;
    }

    main .text-lg {
        font-size: 1rem !important;
    }

    a[href^="mailto:"] {
        font-size: 1rem !important;
        overflow-wrap: anywhere;
    }

    footer .space-x-4 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 16px;
    }

    footer .space-x-4 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .shell {
        width: calc(100% - 20px);
    }

    .brand {
        gap: 8px;
        font-size: .92rem;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: .88rem;
    }

    .hero-inner {
        padding: 44px 0 58px;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 12vw, 3rem);
        line-height: .98;
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-board-head,
    .hero-game {
        padding-inline: 14px;
    }

    .hero-game {
        gap: 9px;
    }

    .hero-game-matchup {
        font-size: .84rem;
    }

    .hero-game-score {
        font-size: 1.05rem;
    }

    .stat {
        padding: 14px 12px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: .7rem;
    }

    .section {
        padding: 44px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .score-hero {
        padding: 42px 0 36px;
    }

    .score-hero h1 {
        font-size: 2.35rem;
    }

    .calendar-strip {
        grid-template-columns: repeat(7, 72px);
    }

    .pick-hero-grid {
        gap: 28px;
        padding: 44px 0;
    }

    .pick-hero h1,
    .member-hero h1,
    .admin-hero h1 {
        font-size: 2.25rem;
        line-height: 1;
    }

    .pick-hero p,
    .member-hero p,
    .admin-hero p {
        font-size: 1rem;
    }

    .record-grid strong {
        font-size: 1.4rem;
    }

    .record-grid span {
        font-size: .64rem;
    }

    .featured-pick,
    .panel,
    .member-pick,
    .package-card,
    .admin-block {
        padding: 17px;
        border-radius: 16px;
    }

    .game-title-card {
        padding: 16px;
    }

    .pick-selection strong {
        font-size: 1.55rem;
    }

    .pick-label-row {
        align-items: flex-start;
    }

    .vip-game-board-head {
        padding: 17px;
    }

    .vip-game-board li {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 15px 17px;
    }

    .vip-game-board li time {
        grid-column: auto;
    }

    .game-number {
        justify-self: start;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-stats div {
        padding: 15px;
    }

    .admin-game {
        padding: 14px;
    }

    .empty-state,
    .error-state {
        padding: 32px 16px;
    }

    body > nav .flex-shrink-0 {
        max-width: 100%;
        font-size: 1.2rem !important;
        overflow-wrap: anywhere;
    }

    body > .bg-dark.py-16 h1 {
        font-size: 2rem !important;
        line-height: 1.05 !important;
    }

    main .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}
