.efpd-player-detail {
    --efpd-card-w: clamp(7.25rem, 24vw, 10.5rem);
    --efpd-card-h: calc(var(--efpd-card-w) * 1.4);
    margin: 1.5rem 0;
    overflow-x: clip;
}

.efpd-layout {
    position: relative;
    display: grid;
    gap: 1.25rem;
}

/* Hero */
.efpd-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0.5rem;
    margin-bottom: 1.75rem;
}

.efpd-hero__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.efpd-hero__card-col,
.efpd-hero__identity-col {
    min-width: 0;
}

.efpd-hero__card-col {
    position: relative;
    z-index: 1;
}

.efpd-hero__identity-col {
    isolation: isolate;
    order: -1;
}

.efpd-hero__bg {
    position: absolute;
    inset: -1.75rem 0;
    z-index: 0;
    pointer-events: none;
}

.efpd-hero__bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 15%;
    opacity: 0.32;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 82%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 82%, transparent 100%);
}

.efpd-hero__bg::before,
.efpd-hero__bg::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2.25rem;
    z-index: 1;
    pointer-events: none;
}

.efpd-hero__bg::before {
    top: 0;
    background: linear-gradient(to bottom, var(--efpd-surface) 0%, transparent 100%);
}

.efpd-hero__bg::after {
    bottom: 0;
    background: linear-gradient(to top, var(--efpd-surface) 0%, transparent 100%);
}

.efpd-hero__identity-col > .efpd-identity {
    position: relative;
    z-index: 1;
}

.efpd-hero__card-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.efpd-hero__card-grid {
    display: grid;
    grid-template-columns: minmax(2.75rem, max-content) minmax(7.25rem, var(--efpd-card-w)) minmax(2.75rem, max-content);
    align-items: start;
    justify-content: center;
    gap: 0.4rem;
    width: max-content;
    max-width: 100%;
}

.efpd-hero__emblems,
.efpd-hero__facts,
.efpd-hero__card {
    min-width: 0;
    align-self: start;
}

.efpd-hero__card {
    display: flex;
    justify-content: center;
}

.efpd-hero__identity-col {
    width: 100%;
    max-width: 28rem;
    padding: 0.5rem 1.1rem;
    text-align: center;
}

.efpd-hero__compare {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--color_main, #04384c);
    background: var(--color_main, #04384c);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(4, 56, 76, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.efpd-hero__compare::before {
    content: "\21C4";
    font-size: 0.9rem;
    line-height: 1;
}

.efpd-hero__compare:hover {
    color: #fff;
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(4, 56, 76, 0.35);
}

.efpd-hero__compare:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(4, 56, 76, 0.25);
}

/* デフォルト（タブレット/PC）は識別情報エリア内にインラインで表示、モバイル専用のボタンは非表示 */
.efpd-hero__compare--mobile {
    display: none;
}

@media (min-width: 768px) {
    .efpd-hero__compare--inline {
        align-self: flex-start;
        width: fit-content;
    }
}

@media (max-width: 767.98px) {
    .efpd-hero__compare--inline {
        display: none;
    }

    .efpd-hero__compare--mobile {
        display: flex;
        width: fit-content;
        margin: 1rem auto 0;
    }
}

/* Emblems */
.efpd-emblems {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
}

.efpd-emblems--stacked {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}

.efpd-emblems__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.65rem;
    background: var(--efpd-surface-muted);
}

.efpd-emblems__item img {
    width: 2.1rem;
    height: 2.1rem;
    object-fit: contain;
}

/* Profile facts */
.efpd-profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    align-content: start;
    width: clamp(7rem, 30vw, 9.4rem);
}

.efpd-profile-facts__item {
    padding: 0.3rem 0.35rem;
    border: 1px solid var(--efpd-border);
    border-radius: 0.5rem;
    background: var(--efpd-surface-muted);
    text-align: center;
}

.efpd-profile-facts__label {
    margin: 0;
    font-size: clamp(0.52rem, 2vw, 0.58rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--efpd-muted);
}

.efpd-profile-facts__value {
    margin: 0.15rem 0 0;
    font-size: clamp(0.7rem, 2.6vw, 0.78rem);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* Identity */
.efpd-identity__eyebrow {
    margin: 0;
    font-size: clamp(0.64rem, 2.2vw, 0.72rem);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #0a8f9e;
}

.efpd-identity__name {
    margin: 0.3rem 0 0;
    font-size: clamp(1.3rem, 3.4vw, 1.85rem);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.efpd-identity__name-en {
    margin: 0.3rem 0 0;
    font-size: clamp(0.74rem, 2.4vw, 0.82rem);
    color: var(--efpd-muted);
}

.efpd-identity .efpd-chips {
    margin-top: 0.85rem;
    justify-content: center;
}

/* Player card */
.efpd-player-card {
    position: relative;
    width: 5.5rem;
    height: 7.75rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background: var(--efpd-surface-muted);
    box-shadow: 0 4px 14px rgba(23, 43, 77, 0.15);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effect */
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card:hover,
    .efpd-player-list__item:hover .efpd-player-card {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.15);
    }
}

.efpd-player-card--hero {
    width: var(--efpd-card-w);
    height: var(--efpd-card-h);
    flex-shrink: 0;
    border-radius: 0.6rem;
    box-shadow:
        0 0 24px rgba(0, 180, 220, 0.16),
        0 8px 24px rgba(23, 43, 77, 0.15);
}

/* Card type-specific backgrounds & glows */
.efpd-player-card--type-epic,
.efpd-player-card--type-big-time,
.efpd-player-card--type-show-time {
    background: linear-gradient(135deg, #150f02 0%, #302005 35%, #6a4c14 70%, #b89328 100%);
    border-color: rgba(212, 175, 55, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card--type-epic:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-epic,
    .efpd-player-card--type-big-time:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-big-time,
    .efpd-player-card--type-show-time:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-show-time {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.4) !important;
    }
}

.efpd-player-card--type-potw,
.efpd-player-card--type-trend {
    background: linear-gradient(135deg, #02140e 0%, #082d22 35%, #155543 70%, #00d9b2 100%);
    border-color: rgba(0, 255, 210, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card--type-potw:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-potw,
    .efpd-player-card--type-trend:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-trend {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 210, 0.4) !important;
    }
}

.efpd-player-card--type-highlight,
.efpd-player-card--type-club-selection {
    background: linear-gradient(135deg, #050a14 0%, #0e172e 35%, #233b6b 70%, #0099bb 100%);
    border-color: rgba(0, 180, 220, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card--type-highlight:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-highlight,
    .efpd-player-card--type-club-selection:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-club-selection {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 180, 220, 0.4) !important;
    }
}

/* Legendary */
.efpd-player-card--type-legendary {
    background: linear-gradient(135deg, #1c1505 0%, #3d2f0d 40%, #755a1d 75%, #a6802c 100%);
    border-color: rgba(166, 128, 44, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card--type-legendary:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-legendary {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(166, 128, 44, 0.4) !important;
    }
}

/* Featured */
.efpd-player-card--type-featured {
    background: linear-gradient(135deg, #090314 0%, #1c0b36 45%, #421b7a 75%, #8f53d3 100%);
    border-color: rgba(143, 83, 211, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .efpd-player-card--type-featured:hover,
    .efpd-player-list__item:hover .efpd-player-card--type-featured {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(143, 83, 211, 0.4) !important;
    }
}

.efpd-player-card--type-standard {
    background: linear-gradient(135deg, #10121a 0%, #1e222d 60%, #3a4153 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Shimmer (glow sheen) effect */
.efpd-player-card__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.12) 40%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.12) 60%,
        rgba(255, 255, 255, 0) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 300% 100%;
    background-position: 150% 0;
    transition: background-position 0.8s ease;
    z-index: 4;
    pointer-events: none;
}
.efpd-player-card:hover .efpd-player-card__shimmer,
.efpd-player-list__item:hover .efpd-player-card__shimmer {
    background-position: -50% 0;
}

/* Background sci-fi pattern */
.efpd-player-card__bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 8px 8px, 16px 16px, 16px 16px;
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
}

.efpd-player-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    transition: transform 0.3s ease;
}
.efpd-player-card:hover .efpd-player-card__image,
.efpd-player-list__item:hover .efpd-player-card__image {
    transform: scale(1.05);
}

.efpd-player-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--efpd-muted);
    z-index: 2;
}

.efpd-player-card__ovr {
    position: absolute;
    top: 3.5%;
    left: 5.5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
    z-index: 3;
    pointer-events: none;
}

.efpd-player-card__ovr-value {
    font-family: "eFontStencil", "eFootballStencil", sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 255, 255, 0.2);
}

.efpd-player-card--hero .efpd-player-card__ovr-value {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
}

.efpd-player-card__ovr-pos {
    font-family: "eFootballSans", sans-serif;
    font-size: 0.44rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.08rem 0.2rem;
    border-radius: 0.15rem;
    color: #fff;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.efpd-player-card--hero .efpd-player-card__ovr-pos {
    font-size: clamp(0.6rem, 1.6vw, 0.8rem);
    padding: 0.12rem 0.35rem;
    border-radius: 0.25rem;
}

/* Position badges colors */
.efpd-pos--fw {
    background: #e63946 !important;
}
.efpd-pos--mf {
    background: #2a9d8f !important;
}
.efpd-pos--df {
    background: #1d3557 !important;
}
.efpd-pos--gk {
    background: #e9c46a !important;
    color: #000 !important;
    text-shadow: none !important;
}

/* Card bottom info overlay */
.efpd-player-card__meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.3) 85%, transparent 100%);
    padding: 0.55rem 0.3rem 0.35rem;
    text-align: center;
    z-index: 3;
    pointer-events: none;
}

.efpd-player-card__name {
    font-family: "eFootballSans", sans-serif;
    font-size: clamp(0.5rem, 1.8vw, 0.58rem);
    font-weight: 900;
    color: #fff;
    margin: 0;
    padding: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.15;
}

.efpd-player-card--hero .efpd-player-card__name {
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    padding: 0 0.2rem;
}

.efpd-player-card__type-tag {
    display: inline-block;
    font-size: 0.42rem;
    font-weight: 800;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.05rem;
    opacity: 0.9;
}

.efpd-player-card--hero .efpd-player-card__type-tag {
    font-size: clamp(0.55rem, 1.5vw, 0.75rem);
    margin-top: 0.15rem;
}


/* Hide external list texts for cleaner grid card look */
.efpd-player-list__item-name,
.efpd-player-list__item-position {
    display: none !important;
}

.efpd-player-list__item {
    padding: 0.2rem !important;
    gap: 0 !important;
}

.efpd-player-list__grid {
    gap: 1rem 0.5rem !important;
}

/* Position panel */
.efpd-position-panel {
    border: none;
    background: transparent;
    padding: 0;
}

.efpd-position-panel__title {
    margin-bottom: 0.85rem;
    text-align: center;
}

.efpd-position-panel__inner {
    overflow: hidden;
    border-radius: 0.75rem;
    background: 
        /* センターサークル */
        radial-gradient(circle at 50% 50%, transparent 18%, rgba(255, 255, 255, 0.04) 19%, rgba(255, 255, 255, 0.04) 20%, transparent 21%),
        /* ペナルティエリア上（アーク） */
        radial-gradient(circle at 50% 12%, transparent 12%, rgba(255, 255, 255, 0.03) 13%, rgba(255, 255, 255, 0.03) 14%, transparent 15%),
        /* ペナルティエリア下（アーク） */
        radial-gradient(circle at 50% 88%, transparent 12%, rgba(255, 255, 255, 0.03) 13%, rgba(255, 255, 255, 0.03) 14%, transparent 15%),
        /* 芝の縞模様 */
        linear-gradient(to bottom, 
            rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.015) 8.3%,
            transparent 8.3%, transparent 16.6%,
            rgba(255, 255, 255, 0.015) 16.6%, rgba(255, 255, 255, 0.015) 25%,
            transparent 25%, transparent 33.3%,
            rgba(255, 255, 255, 0.015) 33.3%, rgba(255, 255, 255, 0.015) 41.6%,
            transparent 41.6%, transparent 50%,
            rgba(255, 255, 255, 0.015) 50%, rgba(255, 255, 255, 0.015) 58.3%,
            transparent 58.3%, transparent 66.6%,
            rgba(255, 255, 255, 0.015) 66.6%, rgba(255, 255, 255, 0.015) 75%,
            transparent 75%, transparent 83.3%,
            rgba(255, 255, 255, 0.015) 83.3%, rgba(255, 255, 255, 0.015) 91.6%,
            transparent 91.6%, transparent 100%
        ),
        radial-gradient(circle at center, #1b3d2c 0%, #0b1c14 100%);
    padding: 0.95rem;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.75), 
        0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    max-width: 18rem;
    margin: 0 auto;
    width: 100%;
}

/* 外周白線 */
.efpd-position-panel__inner::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    border-radius: 0.25rem;
    z-index: 1;
}

/* センターライン */
.efpd-position-panel__inner::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 1;
}

.efpd-position-map {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.efpd-pos-grid {
    display: grid;
    grid-template-columns: minmax(4.5rem, 1fr) minmax(3.4rem, 0.82fr) minmax(4.5rem, 1fr);
    gap: 0.4rem;
    width: 100%;
    min-height: 13.5rem;
}

.efpd-pos-grid__col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.efpd-pos-grid__col--side {
    justify-content: stretch;
}

.efpd-pos-grid__col--side .efpd-pos-cell {
    flex: 1 1 0;
    min-height: 3.5rem;
}

.efpd-pos-grid__col--center .efpd-pos-cell {
    min-height: 1.55rem;
}

.efpd-pos-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    border-radius: 0.5rem;
    padding: 0.28rem 0.2rem;
    text-align: center;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.efpd-pos-cell:hover {
    transform: translateY(-2px) scale(1.04);
    z-index: 5;
}

.efpd-pos-cell__label {
    font-size: clamp(0.5rem, 2vw, 0.58rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.efpd-pos-cell__rating {
    font-size: clamp(0.88rem, 3.6vw, 1.05rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.efpd-pos-grid__col--side .efpd-pos-cell__rating {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
}

.efpd-pos-cell--none {
    background: rgba(42, 45, 53, 0.55);
    color: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.efpd-pos-cell--none:hover {
    background: rgba(42, 45, 53, 0.8);
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.efpd-pos-cell--high {
    background: linear-gradient(135deg, #107c41 0%, #0b562e 100%);
    color: #fff;
    box-shadow: 
        0 2px 8px rgba(11, 86, 46, 0.3), 
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(16, 124, 65, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.efpd-pos-cell--high:hover {
    background: linear-gradient(135deg, #13944e 0%, #0d6838 100%);
    box-shadow: 
        0 4px 12px rgba(11, 86, 46, 0.5), 
        0 0 8px rgba(16, 124, 65, 0.3), 
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(16, 124, 65, 0.7);
}

.efpd-pos-cell--primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #05220c;
    box-shadow: 
        0 4px 12px rgba(34, 197, 94, 0.4), 
        0 0 16px rgba(74, 222, 128, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(74, 222, 128, 0.5);
    font-weight: 800;
}

.efpd-pos-cell--primary:hover {
    background: linear-gradient(135deg, #66eb97 0%, #22c55e 100%);
    box-shadow: 
        0 6px 16px rgba(34, 197, 94, 0.6), 
        0 0 20px rgba(74, 222, 128, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(74, 222, 128, 0.8);
    transform: translateY(-3px) scale(1.06);
}

.efpd-pos-cell--primary .efpd-pos-cell__label,
.efpd-pos-cell--primary .efpd-pos-cell__rating {
    opacity: 1;
}

.efpd-pos-cell--wide {
    min-height: 1.85rem;
}

/* Shared section title */
.efpd-section-title {
    margin: 0;
    font-size: clamp(0.76rem, 2.8vw, 0.82rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #31364b;
}

/* Sidebar */
.efpd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.efpd-side-block {
    border: 1px solid var(--efpd-border);
    border-radius: 0.75rem;
    background: var(--efpd-surface);
    padding: 0.9rem 0.95rem 1.05rem;
}

.efpd-side-block__title {
    margin-bottom: 0.65rem;
}

.efpd-side-block__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.efpd-side-block__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    background: var(--efpd-surface-muted);
}

.efpd-side-block__label {
    font-size: clamp(0.68rem, 2.6vw, 0.74rem);
    font-weight: 700;
    color: var(--efpd-muted);
}

.efpd-side-block__value {
    font-size: clamp(0.86rem, 3.2vw, 0.95rem);
    font-weight: 800;
    line-height: 1.3;
    text-align: right;
}

.efpd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.efpd-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--efpd-surface-muted);
    font-size: clamp(0.74rem, 2.8vw, 0.8rem);
    font-weight: 700;
    line-height: 1.3;
}

.efpd-badges--muted .efpd-badge {
    color: var(--efpd-muted);
}

/* Body rows */
.efpd-body-top {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.efpd-body-top__sidebar,
.efpd-body-top__position {
    min-width: 0;
}

.efpd-body-top__position {
    order: -1;
}

.efpd-body-bottom {
    min-width: 0;
}

/* Stats board */
.efpd-stats-board {
    border: 1px solid var(--efpd-border);
    border-radius: 0.75rem;
    background: var(--efpd-surface);
    padding: 0.65rem 0.5rem;
}

.efpd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 1rem 0.75rem;
}

.efpd-stats-col {
    min-width: 0;
}

.efpd-stats-col__title {
    margin-bottom: 0.45rem;
}

.efpd-stats-col__list {
    display: flex;
    flex-direction: column;
}

.efpd-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.65rem;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
}

.efpd-stat-row:nth-child(odd) {
    background: var(--efpd-surface-muted);
}

.efpd-stat-row.is-dimmed {
    opacity: 0.35;
}

.efpd-stat-row__label {
    min-width: 0;
    font-size: clamp(0.76rem, 2.8vw, 0.82rem);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.efpd-stat-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.65rem;
    height: 1.5rem;
    padding: 0 0.3rem;
    border-radius: 0.25rem;
    font-size: clamp(0.86rem, 3.2vw, 0.94rem);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.efpd-stat-rank--90,
.efpd-stat-row__label.efpd-stat-rank--90 {
    color: #006b58;
}

.efpd-stat-value.efpd-stat-rank--90 {
    background: var(--efpd-rank-90);
    color: #000;
}

.efpd-stat-rank--80,
.efpd-stat-row__label.efpd-stat-rank--80 {
    color: #3a7a00;
}

.efpd-stat-value.efpd-stat-rank--80 {
    background: var(--efpd-rank-80);
    color: #000;
}

.efpd-stat-rank--70,
.efpd-stat-row__label.efpd-stat-rank--70 {
    color: #8a6d00;
}

.efpd-stat-value.efpd-stat-rank--70 {
    background: var(--efpd-rank-70);
    color: #000;
}

.efpd-stat-rank--69,
.efpd-stat-row__label.efpd-stat-rank--69 {
    color: #c62828;
}

.efpd-stat-value.efpd-stat-rank--69 {
    background: var(--efpd-rank-69);
    color: #fff;
}

/* ── Small mobile: tighter card hub ── */
@media (max-width: 374px) {
    .efpd-hero__card-grid {
        grid-template-columns: minmax(2.35rem, max-content) minmax(5.75rem, var(--efpd-card-w)) minmax(2.35rem, max-content);
        gap: 0.3rem;
    }

    .efpd-emblems__item {
        width: 2.15rem;
        height: 2.15rem;
    }

    .efpd-emblems__item img {
        width: 1.6rem;
        height: 1.6rem;
    }

    .efpd-profile-facts__item {
        padding: 0.3rem 0.35rem;
    }
}

/* ── Tablet and up: bigger card hub gap, stats in 2 columns ── */
@media (min-width: 600px) {
    .efpd-hero__card-grid {
        gap: 0.65rem;
    }

    .efpd-profile-facts {
        grid-template-columns: minmax(0, 1fr);
        width: 4.6rem;
    }

    .efpd-profile-facts__item {
        padding: 0.4rem 0.5rem;
    }
}

/* ── Tablet wide: identity beside card, position panel below ── */
@media (min-width: 768px) {
    .efpd-hero__top {
        flex-direction: row;
        align-items: stretch;
        gap: 1.75rem;
    }

    .efpd-hero__card-col {
        flex: 0 0 auto;
    }

    .efpd-hero__identity-col {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        max-width: none;
        padding: 0.5rem 1.5rem;
        text-align: left;
        order: 0;
    }

    .efpd-hero__identity-col .efpd-identity .efpd-chips {
        justify-content: flex-start;
    }

    .efpd-position-panel__inner {
        max-width: 20rem;
    }

    .efpd-pos-grid {
        min-height: 14.5rem;
    }
}

/* ── Desktop: larger card hub, wider position panel ── */
@media (min-width: 1024px) {
    .efpd-player-detail {
        --efpd-card-w: 12.2rem;
        --efpd-card-h: 17.1rem;
    }

    .efpd-hero__card-grid {
        max-width: none;
        width: max-content;
        justify-content: flex-start;
        grid-template-columns: minmax(2.95rem, max-content) var(--efpd-card-w) minmax(4.6rem, max-content);
        gap: 0.5rem;
    }

    .efpd-position-panel__inner {
        max-width: 22rem;
    }

    .efpd-pos-grid {
        min-height: 15.5rem;
    }

    .efpd-body-top {
        flex-direction: row;
        align-items: stretch;
        gap: 1.5rem;
    }

    .efpd-body-top__sidebar {
        flex: 0 0 17.5rem;
        width: 17.5rem;
    }

    .efpd-body-top__position {
        flex: 1;
        min-width: 0;
        display: flex;
        order: 0;
    }

    .efpd-position-panel {
        width: 100%;
    }

    .efpd-body-bottom {
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .efpd-body-bottom__progression {
        flex: 0 0 17.5rem;
        width: 17.5rem;
    }

    .efpd-body-bottom__stats {
        flex: 1;
        min-width: 0;
    }
}


/* ── Large desktop: more breathing room ── */
@media (min-width: 1280px) {
    .efpd-body-top__sidebar {
        flex-basis: 18.125rem;
        width: 18.125rem;
    }

    .efpd-hero__top {
        gap: 2.25rem;
    }

    .efpd-body-bottom__progression {
        flex-basis: 18.125rem;
        width: 18.125rem;
    }
}


/* ── Player condition status badge and facts coloring ── */

/* Card condition badge */
.efpd-player-card__cond {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 1.15rem;
    height: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
    font-size: 0.65rem;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 10;
    border: 1.5px solid #fff;
    text-align: center;
    line-height: 1;
}

.efpd-player-card--hero .efpd-player-card__cond {
    top: 5%;
    right: 5%;
    width: clamp(1.4rem, 4vw, 2.0rem);
    height: clamp(1.4rem, 4vw, 2.0rem);
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    border-width: 2px;
}

/* Condition colors (eFHUB style) */
.efpd-cond-badge--a { background-color: #10b981; }
.efpd-cond-badge--b { background-color: #84cc16; }
.efpd-cond-badge--c { background-color: #eab308; color: #111 !important; }
.efpd-cond-badge--d { background-color: #f97316; }
.efpd-cond-badge--e { background-color: #ef4444; }

/* Facts list condition text coloring */
.efpd-profile-facts__value--cond-a { color: #10b981; }
.efpd-profile-facts__value--cond-b { color: #84cc16; }
.efpd-profile-facts__value--cond-c { color: #eab308; }
.efpd-profile-facts__value--cond-d { color: #f97316; }
.efpd-profile-facts__value--cond-e { color: #ef4444; }

/* ── Progression Simulator Panel ── */
.efpd-progression-panel {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    color: #f8fafc;
    margin-bottom: 1.5rem;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.efpd-prog-row:not(.efpd-prog-row--select) {
    flex-direction: column;
    align-items: stretch;
}

.efpd-prog-row:not(.efpd-prog-row--select) .efpd-prog-ctrls {
    justify-content: space-between;
    width: 100%;
}

@media (min-width: 480px) {
    .efpd-prog-row--level {
        flex-direction: row;
        align-items: center;
    }

    .efpd-prog-row--level .efpd-prog-ctrls {
        width: auto;
    }
}

.efpd-progression-panel .efpd-section-title {
    color: #ffffff !important;
}


.efpd-prog-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #334155;
}

.efpd-prog-row--disabled {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.efpd-prog-label-disabled {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-style: normal;
    font-weight: 500;
}

.efpd-prog-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    flex-shrink: 0;
}


.efpd-prog-ctrls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.efpd-prog-val {
    font-size: 1rem;
    font-weight: 800;
    color: #38bdf8;
    min-width: 1.5rem;
    text-align: center;
}

.efpd-prog-slash {
    color: #cbd5e1;
    font-size: 0.85rem;
}


.efpd-prog-max {
    font-size: 0.9rem;
    color: #e2e8f0;
}

.efpd-prog-points {
    font-size: 1.1rem;
    font-weight: 800;
    color: #10b981;
}

.efpd-prog-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 4px;
    border: 1px solid #475569;
    background: #334155;
    color: #f8fafc;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.efpd-prog-btn:hover:not(:disabled) {
    background: #475569;
    border-color: #64748b;
}

.efpd-prog-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.efpd-prog-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 6.5rem;
    flex: 1 1 5rem;
    min-width: 3.5rem;
    max-width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #64748b;
    outline: none;
    cursor: pointer;
}

.efpd-prog-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.efpd-prog-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.efpd-prog-row--select {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.efpd-prog-select-wrapper {
    position: relative;
    width: 100%;
}

.efpd-prog-select {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background-color: #0f172a;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.efpd-prog-select:hover {
    border-color: #38bdf8;
    background-color: #1e293b;
}

.efpd-prog-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}


/* Actions */
.efpd-prog-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.efpd-prog-action-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #475569;
    background: #334155;
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.efpd-prog-action-btn:hover {
    background: #475569;
    color: #f8fafc;
}

.efpd-prog-action-btn--primary {
    background: #0284c7;
    border-color: #0369a1;
    color: #fff;
}

.efpd-prog-action-btn--primary:hover {
    background: #0369a1;
}

/* Category items */
.efpd-prog-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.efpd-prog-cat-item {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 0.75rem;
}

.efpd-prog-cat-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.efpd-prog-cat-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
}

.efpd-prog-cat-pts {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.efpd-cat-pts-val {
    font-weight: 700;
    color: #f8fafc;
}

.efpd-prog-cat-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    min-width: 0;
}

.efpd-prog-cat-controls .efpd-prog-slider {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.efpd-prog-cat-inc-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #eab308;
    min-width: 1.75rem;
    text-align: right;
}

.efpd-prog-cat-desc {
    font-size: 0.7rem;
    color: #cbd5e1;
    line-height: 1.3;
}

/* Mobile/Default styles for bottom section */
.efpd-body-bottom__progression {
    margin-bottom: 1.5rem;
}
@media (min-width: 1024px) {
    .efpd-body-bottom__progression {
        margin-bottom: 0;
    }
}

/* ── Progression controls: compact in-page block ── */
.efpd-prog-fixedbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.85rem;
}

.efpd-prog-fixedbar .efpd-prog-row {
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
    flex: 1 1 auto;
    min-width: 0;
}

.efpd-prog-fixedbar .efpd-prog-row--compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

.efpd-prog-label--compact {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.efpd-prog-fixedbar .efpd-prog-row--level {
    flex: 1.3 1 auto;
}

.efpd-prog-fixedbar .efpd-prog-row--level .efpd-prog-ctrls {
    gap: 0.3rem;
}

.efpd-prog-fixedbar .efpd-prog-row--level .efpd-prog-slider {
    flex: 1 1 2.5rem;
    min-width: 2rem;
}

.efpd-prog-fixedbar .efpd-prog-btn {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.8rem;
}

.efpd-prog-fixedbar .efpd-prog-val,
.efpd-prog-fixedbar .efpd-prog-max {
    font-size: 0.8rem;
}

.efpd-prog-fixedbar .efpd-prog-row--points {
    flex: 1 1 auto;
    justify-content: flex-end;
}

.efpd-prog-fixedbar .efpd-prog-points {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.efpd-prog-fixedbar .efpd-prog-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
    margin-bottom: 0;
}

.efpd-prog-fixedbar .efpd-prog-actions .efpd-prog-action-btn {
    flex: 0 0 auto;
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* ── Category allocation grid: compact cards, in normal page flow ── */
.efpd-prog-float-panel .efpd-prog-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin-top: 0;
}

/* スマホ幅は1列でコンパクトに */
@media (max-width: 767.98px) {
    .efpd-prog-float-panel .efpd-prog-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }

    .efpd-prog-float-panel .efpd-prog-cat-item {
        padding: 0.4rem 0.45rem;
    }

    .efpd-prog-float-panel .efpd-prog-cat-title {
        font-size: 0.68rem;
    }

    .efpd-prog-float-panel .efpd-prog-btn {
        width: 1.15rem;
        height: 1.15rem;
        font-size: 0.7rem;
    }

    .efpd-prog-float-panel .efpd-prog-cat-inc-label {
        font-size: 0.7rem;
        min-width: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .efpd-prog-float-panel .efpd-prog-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

.efpd-prog-float-panel .efpd-prog-cat-item {
    min-width: 0;
    padding: 0.45rem 0.5rem;
}

.efpd-prog-float-panel .efpd-prog-cat-header {
    margin-bottom: 0.15rem;
    gap: 0.15rem;
    flex-wrap: nowrap;
}

.efpd-prog-float-panel .efpd-prog-cat-title {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.efpd-prog-float-panel .efpd-prog-cat-pts {
    display: none;
}

.efpd-prog-float-panel .efpd-prog-cat-controls {
    gap: 0.25rem;
}

.efpd-prog-float-panel .efpd-prog-cat-controls .efpd-prog-slider {
    display: none;
}

.efpd-prog-float-panel .efpd-prog-btn {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.efpd-prog-float-panel .efpd-prog-cat-inc-label {
    font-size: 0.75rem;
    min-width: 1.1rem;
    flex: 1;
    text-align: center;
}

.efpd-prog-float-panel .efpd-prog-cat-desc {
    display: none;
}


