/*
 * トップページ（[ef_home_hero] / [ef_home_week] / [ef_home_tools]）。
 * 目立たせるのはピッチのポジションナビだけ。ほかは SWELL の見出しと既存部品にまかせる。
 * コンテナクエリのしきい値は px（SWELL は画面幅で html の font-size を変えるので rem だと狙った幅で切り替わらない）。
 */

.efpd-home-num {
    font-family: "eFontStencil", "eFootballStencil", sans-serif;
    font-size: 1.2em;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* ---------- ファーストビュー ---------- */

.efpd-home-hero {
    container-type: inline-size;
    margin: 0 0 3rem;
}

.efpd-home-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    align-items: center;
}

.post_content .efpd-home-hero p {
    margin: 0;
}

.efpd-home-hero__visual {
    grid-column: 1 / -1;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 16 / 7;
    background: #0b1c14;
}

.efpd-home-hero__visual img.efpd-home-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.post_content .efpd-home-hero p.efpd-home-hero__title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--efpd-text);
}

/* 句の途中で折り返さない（スマホで「監督 / を、」と切れるのを防ぐ） */
.efpd-home-hero__title > span {
    display: inline-block;
}

.post_content .efpd-home-hero p.efpd-home-hero__note {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--efpd-muted);
}

.efpd-home-hero__note .efpd-home-num {
    color: var(--efpd-text);
}

.efpd-home-search {
    margin-top: 1.5rem;
}

.efpd-home-search__label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--efpd-text);
}

.efpd-home-search__row {
    display: flex;
    max-width: 30rem;
}

.efpd-home-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 3rem;
    padding: 0 0.9rem;
    border: 1px solid #c3cad4;
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    background: #fff;
    font-size: 16px; /* iOS がフォーカス時に拡大しない大きさ */
    color: var(--efpd-text);
    box-sizing: border-box;
}

.efpd-home-search__button {
    flex: 0 0 auto;
    height: 3rem;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    background: var(--color_main, #04384c);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.efpd-home-search__input:focus-visible,
.efpd-home-search__button:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 1px;
    position: relative;
    z-index: 1;
}

/* ピッチ */
.post_content .efpd-home-pitch p.efpd-home-pitch__title {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--efpd-text);
}

.efpd-home-pitch__field.efpd-position-panel__inner {
    max-width: none;
    margin: 0;
}

/* 詳細ページのままだとグリッドの最小幅が本文より広くなることがある */
.efpd-home-pitch .efpd-pos-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1fr);
    min-height: 0;
}

/* 押せる大きさにする（詳細ページの中央列は 1.55rem で指では押しにくい） */
.efpd-home-pitch .efpd-pos-grid__col--center .efpd-pos-cell {
    min-height: 2.7rem;
}

.efpd-home-pitch .efpd-pos-grid__col--side .efpd-pos-cell {
    min-height: 3.6rem;
}

/* トップのマスはリンク。適性の濃淡は無いので、ふだんは線だけの面、押せる場所だと分かるよう触れたら本職と同じ緑で塗る */
a.efpd-home-pitch__cell,
.post_content a.efpd-home-pitch__cell {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

a.efpd-home-pitch__cell:hover,
.post_content a.efpd-home-pitch__cell:hover {
    background: #4ade80;
    border-color: #4ade80;
    color: #052e16;
}

a.efpd-home-pitch__cell:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    z-index: 6;
}

.efpd-home-pitch__pos {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

@container (min-width: 700px) {
    .efpd-home-hero__inner {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 2.5rem;
    }

    .post_content .efpd-home-hero p.efpd-home-hero__title {
        font-size: 2.1rem;
    }

    .efpd-home-pitch__field.efpd-position-panel__inner {
        max-width: 22rem;
        margin-left: auto;
    }

    .post_content .efpd-home-pitch p.efpd-home-pitch__title {
        max-width: 22rem;
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .efpd-home-pitch .efpd-pos-cell {
        transition: none;
    }
}

/* ---------- 今週のイーフト ---------- */

.efpd-home-week {
    container-type: inline-size;
}

.post_content .efpd-home-week h3.efpd-home-week__heading {
    margin-top: 2rem;
}

.post_content ul.efpd-home-gacha {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post_content .efpd-home-gacha__item {
    margin: 0;
    padding: 0;
}

.post_content .efpd-home-gacha__item::before {
    content: none;
}

.efpd-home-gacha__link,
.post_content a.efpd-home-gacha__link {
    display: block;
    color: var(--efpd-text);
    text-decoration: none;
}

.efpd-home-gacha__thumb {
    display: block;
    overflow: hidden;
    border-radius: 0.4rem;
    aspect-ratio: 1200 / 630;
    background: var(--efpd-surface-soft);
}

.efpd-home-gacha__thumb img.efpd-home-gacha__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.efpd-home-gacha__title {
    display: -webkit-box;
    margin-top: 0.4rem;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.efpd-home-gacha__link:hover .efpd-home-gacha__title {
    text-decoration: underline;
}

@container (min-width: 700px) {
    .post_content ul.efpd-home-gacha {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.post_content .efpd-home-week p.efpd-home-week__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ---------- データベースとツール ---------- */

.efpd-home-tools-wrap {
    container-type: inline-size;
}

.post_content ul.efpd-home-tools {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--efpd-border);
}

.post_content .efpd-home-tools__item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--efpd-border);
}

.post_content .efpd-home-tools__item::before {
    content: none;
}

.efpd-home-tools__link,
.post_content a.efpd-home-tools__link {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    column-gap: 0.9rem;
    align-items: center;
    padding: 0.7rem 0.35rem;
    color: var(--efpd-text);
    text-decoration: none;
}

.efpd-home-tools__thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: block;
    overflow: hidden;
    border-radius: 0.35rem;
    aspect-ratio: 16 / 9;
    background: var(--efpd-surface-soft);
}

.efpd-home-tools__thumb img.efpd-home-tools__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.efpd-home-tools__link:hover {
    background: var(--efpd-surface-muted);
}

.efpd-home-tools__link:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: -3px;
}

.efpd-home-tools__name {
    grid-column: 2;
    align-self: end;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color_main, #04384c);
}

.efpd-home-tools__desc {
    grid-column: 2;
    align-self: start;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--efpd-muted);
}

.efpd-home-tools__count {
    grid-column: 3;
    grid-row: 1 / span 2;
    font-size: 0.8rem;
    color: var(--efpd-muted);
    white-space: nowrap;
}

.efpd-home-tools__count .efpd-home-num {
    margin-right: 0.15em;
    font-size: 1.35rem;
    color: var(--efpd-text);
}

@container (min-width: 520px) {
    .efpd-home-tools__link,
    .post_content a.efpd-home-tools__link {
        grid-template-columns: 8rem minmax(0, 1fr) auto;
        column-gap: 1.1rem;
    }
}
