/**
 * BESTPICK baseball pages mobile styles
 *
 * 적용 페이지:
 * - /baseball/index.php
 * - /baseball/games.php
 * - /baseball/league.php
 * - /baseball/team.php
 * - /baseball/match.php
 *
 * 반드시 baseball.css 다음에 불러옵니다.
 * 모든 반응형 규칙은 768px 이하에서만 적용됩니다.
 */

@media (max-width: 768px) {
    /* -----------------------------------------------------
     * 공통
     * ----------------------------------------------------- */
    .bp-baseball {
        min-width: 0;
    }

    .bp-baseball{padding:0;}

    .bp-baseball *,
    .bp-baseball *::before,
    .bp-baseball *::after {
        box-sizing: border-box;
    }

    .bp-baseball img {
        max-width: 100%;
    }

    .bp-baseball h1,
    .bp-baseball h2,
    .bp-baseball h3,
    .bp-baseball p {
        overflow-wrap: anywhere;
    }

    .bp-baseball-panel,
    .bp-baseball-catalog-section,
    .bp-baseball-empty {
        min-width: 0;
        border-radius: 17px;
    }

    .bp-baseball-panel,
    .bp-baseball-catalog-section {
        padding: 17px 13px;
    }

    .bp-baseball-panel > h2,
    .bp-baseball-panel > h3,
    .bp-baseball-catalog-section > h2 {
        margin: 0 0 14px;
        font-size: 1rem;
        line-height: 1.35;
    }

    .bp-baseball-section-heading {
        display: block;
        margin-bottom: 14px;
    }

    .bp-baseball-section-heading h2 {
        margin: 0 0 6px;
        font-size: 1rem;
        line-height: 1.35;
    }

    .bp-baseball-section-heading p {
        margin: 0;
        font-size: 0.75rem;
        line-height: 1.55;
        word-break: keep-all;
    }

    .bp-inline-ad-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin: 14px 0;
    }

    .bp-inline-ad-grid .bp-common-ad {
        min-width: 0;
    }

    /* -----------------------------------------------------
     * 공통 히어로
     * ----------------------------------------------------- */
    .bp-baseball-hero,
    .bp-baseball-entity-hero {
        min-width: 0;
        padding: 22px 16px;
        border-radius: 19px;
    }

    .bp-baseball-hero {
        display: block;
    }

    .bp-baseball-eyebrow,
    .bp-baseball-hero > div > span:first-child {
        display: block;
        margin-bottom: 6px;
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .bp-baseball-hero h1,
    .bp-baseball-entity-hero h1 {
        margin: 5px 0 8px;
        font-size: 1.5rem;
        line-height: 1.25;
        letter-spacing: -0.04em;
    }

    .bp-baseball-hero p,
    .bp-baseball-entity-hero p {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.55;
        word-break: keep-all;
    }

    .bp-baseball-entity-hero {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: center;
        gap: 13px;
    }

    .bp-baseball-entity-hero > img {
        width: 64px;
        height: 64px;
        object-fit: contain;
        border-radius: 15px;
    }

    .bp-baseball-entity-hero > div {
        min-width: 0;
    }

    .bp-baseball-entity-hero > div > span {
        display: block;
        min-width: 0;
        overflow: hidden;
        font-size: 0.85rem;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-standing-group > h3{font-size:.85rem;}
    .bp-baseball-standings{font-size:.85rem;}
    .bp-baseball-standings tbody td{font-size:.85rem;}
    .bp-baseball-entity-hero form,
    .bp-baseball-entity-hero select {
        grid-column: 1 / -1;
        width: 100%;
    }

    .bp-baseball-entity-hero select {
        min-height: 42px;
        padding: 0 12px;
        font-size: 0.75rem;
    }

    /* -----------------------------------------------------
     * index.php 리그 카탈로그
     * ----------------------------------------------------- */
    .bp-baseball-catalog-section {
        margin-top: 14px;
    }

    .bp-baseball-league-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .bp-baseball-league-grid > a {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        min-width: 0;
        padding: 12px 10px;
        border-radius: 14px;
    }

    .bp-baseball-league-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        overflow: hidden;
        border-radius: 11px;
    }

    .bp-baseball-league-logo img {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

    .bp-baseball-league-grid > a > span:last-child {
        min-width: 0;
    }

    .bp-baseball-league-grid strong,
    .bp-baseball-league-grid small,
    .bp-baseball-league-grid em {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-league-grid strong {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .bp-baseball-league-grid small {
        margin-top: 3px;
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .bp-baseball-league-grid em {
        margin-top: 4px;
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* -----------------------------------------------------
     * games.php 날짜 및 리그 필터
     * ----------------------------------------------------- */
    .bp-baseball-date-nav {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr) 72px;
        align-items: center;
        gap: 7px;
        margin: 14px 0;
    }

    .bp-baseball-date-nav > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 8px;
        font-size: 0.76rem;
        line-height: 1;
        white-space: nowrap;
    }

    .bp-baseball-date-nav form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 6px;
        min-width: 0;
    }

    .bp-baseball-date-nav input[type="date"],
    .bp-baseball-date-nav button {
        min-width: 0;
        min-height: 42px;
        font-size: 0.75rem;
    }

    .bp-baseball-date-nav input[type="date"] {
        width: 100%;
        padding: 0 7px;
    }

    .bp-baseball-date-nav button {
        padding: 0 7px;
    }

    .bp-baseball-league-tabs {
        display: flex;
        gap: 7px;
        margin: 0 -2px 14px;
        padding: 0 2px 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .bp-baseball-league-tabs::-webkit-scrollbar {
        display: none;
    }

    .bp-baseball-league-tabs a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 13px;
        font-size: 0.76rem;
        line-height: 1;
        white-space: nowrap;
    }

    /* -----------------------------------------------------
     * 경기 목록 공통
     * ----------------------------------------------------- */
    .bp-baseball-game-list,
    .bp-baseball-analysis-games {
        display: grid;
        gap: 8px;
    }

    .bp-baseball-game-list > h2,
    .bp-baseball-game-list > h3 {
        margin: 14px 0 8px;
        font-size: 1rem;
        line-height: 1.35;
    }

    .bp-baseball-game-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "meta status"
            "teams teams";
        gap: 8px;
        min-width: 0;
        padding: 11px 10px;
        border-radius: 13px;
    }

    .bp-baseball-game-row-meta {
        grid-area: meta;
        min-width: 0;
    }

    .bp-baseball-game-row-meta time,
    .bp-baseball-game-row-meta small {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-two-column {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .bp-baseball-game-row-meta time {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .bp-baseball-game-row-meta small {
        margin-top: 3px;
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .bp-baseball-game-row > em {
        grid-area: status;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 23px;
        margin: 0;
        padding: 3px 7px;
        font-size: 0.75rem;
        line-height: 1;
        white-space: nowrap;
    }

    .bp-baseball-game-row-teams {
        grid-area: teams;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
        align-items: center;
        gap: 5px;
        min-width: 0;
    }

    .bp-baseball-game-row-teams > span {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .bp-baseball-game-row-teams > span:last-child {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .bp-baseball-game-row-teams b {
        min-width: 0;
        overflow: hidden;
        font-size: 0.85rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-game-row-teams strong {
        font-size: 0.85rem;
        line-height: 1;
        white-space: nowrap;
    }

    .bp-baseball-game-row-teams i {
        font-size: 0.85rem;
        text-align: center;
    }

    /* -----------------------------------------------------
     * league.php 순위 및 참가팀
     * ----------------------------------------------------- */
    .bp-baseball-standing-wrap,
    .bp-baseball-table-wrap {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .bp-baseball-standing-table,
    .bp-baseball-table {
        min-width: 720px;
    }

    .bp-baseball-standing-table th,
    .bp-baseball-standing-table td,
    .bp-baseball-table th,
    .bp-baseball-table td {
        padding: 9px 8px;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .bp-baseball-standing-table img,
    .bp-baseball-table img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .bp-baseball-team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .bp-baseball-team-card,
    .bp-baseball-team-grid > a {
        min-width: 0;
        padding: 12px 10px;
        border-radius: 14px;
    }

    .bp-baseball-team-card img,
    .bp-baseball-team-grid > a img {
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

    .bp-baseball-team-card strong,
    .bp-baseball-team-grid > a strong {
        min-width: 0;
        overflow: hidden;
        font-size: 0.8rem;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* -----------------------------------------------------
     * team.php 팀 상세
     * ----------------------------------------------------- */
    .bp-baseball-team-hero,
    .bp-baseball-team-profile {
        min-width: 0;
    }

    .bp-baseball-team-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 20px 14px;
        border-radius: 19px;
    }

    .bp-baseball-team-profile {
        display: flex;
        align-items: center;
        gap: 13px;
    }

    .bp-baseball-team-profile img,
    .bp-baseball-team-logo {
        flex: 0 0 70px;
        width: 70px;
        height: 70px;
        object-fit: contain;
        border-radius: 16px;
    }

    .bp-baseball-team-profile > div {
        min-width: 0;
    }

    .bp-baseball-team-profile span,
    .bp-baseball-team-profile h1,
    .bp-baseball-team-profile p {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-team-profile span {
        display: block;
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .bp-baseball-team-profile h1 {
        margin: 5px 0;
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .bp-baseball-team-profile p {
        margin: 0;
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .bp-baseball-summary-grid,
    .bp-baseball-team-summary {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
    }

    .bp-baseball-summary-grid > div,
    .bp-baseball-team-summary > div {
        min-width: 0;
        padding: 11px 5px;
        border-radius: 12px;
        text-align: center;
    }

    .bp-baseball-summary-grid strong,
    .bp-baseball-summary-grid span,
    .bp-baseball-team-summary strong,
    .bp-baseball-team-summary span {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        line-height: 1.15;
    }
    .bp-baseball-analysis-games > a {
        display: grid;
        grid-template-columns: 60px minmax(0, 1fr) 35px minmax(0, 1fr);
        align-items: center;
        gap: 5px;
        min-height: 52px;
        padding: 10px 6px;
        font-size: 0.75rem;
        line-height: 1.25;
        text-align: center;
    }

    .bp-baseball-analysis-games > a > time,
    .bp-baseball-analysis-games > a > span,
    .bp-baseball-analysis-games > a > strong,
    .bp-baseball-analysis-games > a > em,
    .bp-baseball-analysis-games > a > b {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 32px;
        margin: 0;
        line-height: 1.25;
    }

    .bp-baseball-empty{font-size:.75rem;}


    .bp-baseball-analysis-games > a > strong,
    .bp-baseball-analysis-games > a > b {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    .bp-baseball-summary-grid strong,
    .bp-baseball-team-summary strong {
        font-size: 0.85rem;
    }

    .bp-baseball-summary-grid span,
    .bp-baseball-team-summary span {
        margin-top: 5px;
        font-size: 0.62rem;
        white-space: nowrap;
    }

    .bp-baseball-info-list {
        display: grid;
        gap: 10px;
    }

    .bp-baseball-info-list > div {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        min-width: 0;
        padding: 10px;
    }
    .bp-baseball-comparison h3{font-size:.85rem;}
    .bp-baseball-comparison dt{font-size:.85rem;}
    .bp-baseball-comparison dd{font-size:.85rem;}
    .bp-baseball-info-list span {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .bp-baseball-info-list strong {
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 0.85rem;
        line-height: 1.45;
        text-align: right;
    }

    /* -----------------------------------------------------
     * match.php 경기 상세
     * ----------------------------------------------------- */
    .bp-baseball-analysis {
        min-width: 0;
    }

    .bp-baseball-match-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "league status"
            "date date";
        gap: 6px 10px;
        padding: 14px 12px;
        border-radius: 15px;
    }

    .bp-baseball-match-hero > a {
        grid-area: league;
        min-width: 0;
        overflow: hidden;
        font-size: 0.75rem;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-match-hero > time {
        grid-area: date;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .bp-baseball-match-hero > span {
        grid-area: status;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 23px;
        margin: 0;
        padding: 3px 7px;
        font-size: 0.75rem;
        line-height: 1;
        white-space: nowrap;
    }

    .bp-baseball-scoreboard {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        padding: 18px 10px;
        border-radius: 18px;
    }

    .bp-baseball-score-team {
        display: grid;
        justify-items: center;
        min-width: 0;
        text-align: center;
    }

    .bp-baseball-score-team img {
        width: 58px;
        height: 58px;
        object-fit: contain;
        border-radius: 14px;
    }

    .bp-baseball-score-team strong {
        width: 100%;
        margin-top: 8px;
        overflow: hidden;
        font-size: 0.85rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bp-baseball-score-team b {
        margin-top: 6px;
        font-size: 1rem;
        line-height: 1;
    }

    .bp-baseball-score-team small {
        margin-top: 5px;
        font-size: 0.75rem;
        line-height: 1;
    }

    .bp-baseball-versus {
        font-size: 0.85rem;
        text-align: center;
    }

    .bp-baseball-probability-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "label value"
            "bar bar";
        align-items: center;
        column-gap: 10px;
        row-gap: 6px;
        min-width: 0;
        margin-top: 0;
    }

    .bp-baseball-probability-row > span {
        grid-area: label;
        justify-self: start;
    }

    .bp-baseball-probability-row > b {
        grid-area: value;
        justify-self: end;
    }

    .bp-baseball-probability-row > div {
        grid-area: bar;
        width: 100%;
    }

    .bp-baseball-probability-row + .bp-baseball-probability-row {
        margin-top: 11px;
    }

    .bp-baseball-probability-row span,
    .bp-baseball-probability-row b {
        font-size: 0.85rem;
        line-height: 1;
    }

    .bp-baseball-probability-row > div {
        min-width: 0;
        height: 9px;
    }

    .bp-baseball-probability-row > div {
        grid-area: bar;
        width: 100%;
        height: 9px;
        margin: 0;
        overflow: hidden;
        border-radius: 999px;
        background: #29344a;
    }

    .bp-baseball-probability-row > div > i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #38bdf8;
    }

    .bp-baseball-odds-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .bp-baseball-odds-group {
        padding: 12px;
        border-radius: 12px;
    }

    .bp-baseball-odds-label {
        display: block;
        margin-bottom: 9px;
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .bp-baseball-odds-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .bp-baseball-odd-item {
        min-height: 42px;
        padding: 8px 9px;
    }

    .bp-baseball-odd-item span,
    .bp-baseball-odd-item strong {
        display: inline-flex;
        align-items: center;
        height: 1em;
        margin: 0;
        font-size: 0.75rem;
        line-height: 1;
    }

    .bp-baseball-analysis-info-grid,
    .bp-baseball-comparison {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .bp-baseball-analysis-copy {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.7;
        word-break: keep-all;
    }

    .bp-baseball-h2h-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .bp-baseball-h2h-summary > div {
        min-width: 0;
        padding: 11px 5px;
        border-radius: 12px;
        text-align: center;
    }

    .bp-baseball-h2h-summary span,
    .bp-baseball-h2h-summary strong {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        line-height: 1.15;
    }

    .bp-baseball-h2h-summary span {
        min-height: 2.3em;
        font-size: 0.85rem;
    }

    .bp-baseball-h2h-summary strong {
        margin-top: 5px;
        font-size: 1rem;
    }

    .bp-baseball-pick-points {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .bp-baseball-pick-points > div {
        min-width: 0;
        padding: 13px;
        border-radius: 12px;
    }

    .bp-baseball-pick-points strong {
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .bp-baseball-pick-points p {
        margin: 5px 0 0;
        font-size: 0.85rem;
        line-height: 1.55;
        word-break: keep-all;
    }

    .bp-baseball-empty {
        padding: 22px 12px;
        text-align: center;
    }

    .bp-baseball-empty h2 {
        font-size: 1rem;
    }

    .bp-baseball-empty p {
        font-size: 0.76rem;
        line-height: 1.5;
    }

    /* team.php 경기~평균실점 지표 반응형 */
    .bp-baseball-metric-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin: 14px 0;
    }

    .bp-baseball-metric-grid > div {
        min-width: 0;
        min-height: 82px;
        padding: 13px 8px;
        border-radius: 14px;
        text-align: center;
    }

    .bp-baseball-metric-grid span,
    .bp-baseball-metric-grid strong {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        margin: 0;
        line-height: 1.2;
        text-align: center;
    }

    .bp-baseball-team-standing{font-size:.85rem;}
    .bp-standing-rank{font-size:.85rem;}
    .bp-standing-record{font-size:.85rem;}
    .bp-standing-rate{font-size:.85rem;}
    .bp-baseball-team-standing{gap:5px;}

    .bp-baseball-metric-grid span {
        min-height: 2.4em;
        font-size: 0.85rem;
        white-space: normal;
        word-break: keep-all;
    }

    .bp-baseball-metric-grid strong {
        min-height: 1.2em;
        margin-top: 0;
        font-size: 1rem;
        white-space: nowrap;
    }

}
