/* ========================================
   Pokeca Synergy HUB - Custom CSS
   Tailwind CDN補完（ユーティリティでは不可能なスタイル）
   ======================================== */

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1c1917 0%, #292524 52%, #78350f 100%);
    background-size: cover;
    background-position: center 40%;
}

.hero-bg.is-loaded {
    background-image: url('../images/hero-bg.jpg');
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15,12,8,0.85) 0%, rgba(15,12,8,0.7) 40%, rgba(15,12,8,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding: 80px 48px;
}

.hero-insight-panel {
    position: absolute;
    z-index: 1;
    right: clamp(28px, 5vw, 72px);
    top: 50%;
    width: min(360px, 36vw);
    transform: translateY(-50%);
    display: none;
    gap: 12px;
    flex-direction: column;
}

.hero-insight-card {
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    padding: 14px;
    backdrop-filter: blur(8px);
}

.hero-synergy-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: start;
    gap: 7px;
}

.hero-mini-card {
    height: 86px;
    min-width: 0;
    border-radius: 7px;
    border: 1px solid #E7E5E4;
    background: #FAFAF9;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 960px) {
    .hero-insight-panel {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 420px;
    }
    .hero-content {
        padding: 48px 24px;
        max-width: 100%;
    }
}

/* --- Score Bar Gradients --- */
.score-bar-synergy {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.score-bar-health {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #22C55E, #86EFAC);
}

.score-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #eee, #eee);
}

/* --- Feature Card Hover --- */
.feature-card-hover {
    transition: all 0.2s ease;
}

.feature-card-hover:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

/* --- Major Content Showcase --- */
.top-major-contents {
    position: relative;
    isolation: isolate;
    background: #111827 !important;
}

.top-major-contents > .relative {
    z-index: 1;
}

.top-major-contents::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../images/top-major-bg.png');
    background-position: center;
    background-size: cover;
    filter: none;
    opacity: 1;
    pointer-events: none;
}

.top-major-contents::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.62) 0%, rgba(15, 23, 42, 0.34) 42%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.1) 48%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.top-major-kicker,
.top-major-title,
.top-major-lead {
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(15, 23, 42, 0.55);
}

.top-major-card {
    position: relative;
    overflow: hidden;
}

.top-major-content-grid {
    align-items: start;
}

@media (min-width: 1024px) {
    .top-major-content-grid {
        align-items: stretch;
    }
    .top-major-content-grid > .top-major-card {
        height: 100%;
    }
}

.top-major-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #f59e0b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.top-major-card:hover::before {
    transform: scaleX(1);
}

.top-major-number {
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.22);
}

.top-major-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.top-major-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    padding: 9px 10px;
    color: #ea580c;
}

.top-major-card-footer span {
    min-width: 0;
}

.top-major-card-footer b,
.top-major-card-footer small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-major-card-footer b {
    font-size: 11px;
    line-height: 1.2;
}

.top-major-card-footer small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 800;
    color: #9a3412;
}

.top-major-card-body > .top-synergy-mock,
.top-major-card-body > .top-price-mock,
.top-major-card-body > .top-diagnosis-mock,
.top-major-card-body > .top-build-mock,
.top-major-card-body > .top-editor-mock {
    flex: 1;
}

.top-synergy-mock,
.top-price-mock,
.top-diagnosis-mock,
.top-build-mock,
.top-editor-mock {
    min-height: 260px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
}

.top-synergy-mock {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background:
        linear-gradient(90deg, transparent 49%, rgba(249, 115, 22, 0.22) 49% 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(249, 115, 22, 0.22) 49% 51%, transparent 51%),
        #f8fafc;
}

.top-major-image-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.top-major-image-row-fan {
    min-height: 72px;
}

.top-major-image-row-overlap,
.top-major-image-row-compact {
    justify-content: flex-start;
}

.top-major-image-row-overlap .top-major-preview-card + .top-major-preview-card {
    margin-left: -10px;
}

.top-major-preview-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 63 / 88;
    width: 36px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background:
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 34%),
        linear-gradient(145deg, #ffedd5, #fdba74 52%, #fb923c);
    color: #ea580c;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.top-major-preview-card:nth-child(2n) {
    background:
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 34%),
        linear-gradient(145deg, #dbeafe, #93c5fd 52%, #6366f1);
    color: #2563eb;
}

.top-major-preview-card:nth-child(3n) {
    background:
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 34%),
        linear-gradient(145deg, #f3e8ff, #c084fc 52%, #7c3aed);
    color: #7c3aed;
}

.top-major-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.top-synergy-map {
    --top-synergy-diamond-size: 96px;
    position: relative;
    flex: 1;
    min-height: 88px;
    margin-top: 4px;
    border-radius: 10px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpolygon points='60 8 112 60 60 112 8 60' fill='none' stroke='%23fb923c' stroke-opacity='.36' stroke-width='1.5' stroke-dasharray='5 5'/%3E%3C/svg%3E") center / var(--top-synergy-diamond-size) var(--top-synergy-diamond-size) no-repeat,
        linear-gradient(90deg, transparent 49%, rgba(249, 115, 22, 0.24) 49% 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(249, 115, 22, 0.18) 49% 51%, transparent 51%),
        radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.12) 0 28%, transparent 29%);
}

.top-synergy-map::before {
    content: none;
}

.top-synergy-node {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    border-radius: 8px;
    border: 1px solid #fed7aa;
    background: rgba(255, 255, 255, 0.92);
    padding: 5px 7px;
    font-size: 10px;
    font-weight: 800;
    color: #c2410c;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.top-synergy-node-main {
    left: 50%;
    top: 50%;
    min-width: 48px;
    background: #fff7ed;
    color: #ea580c;
    transform: translate(-50%, -50%);
}

.top-synergy-node-top {
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
}

.top-synergy-node-right {
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.top-synergy-node-bottom {
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.top-synergy-node-left {
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.top-synergy-score,
.top-price-summary,
.top-editor-meta,
.top-editor-reaction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    padding: 7px 8px;
    font-size: 10px;
    font-weight: 800;
    color: #9a3412;
}

.top-synergy-score strong,
.top-price-summary strong,
.top-editor-meta strong {
    color: #ea580c;
}

.top-mini-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 66px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.top-mini-card-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62px;
    height: 86px;
    transform: translate(-50%, -50%);
}

.top-price-mock,
.top-diagnosis-mock,
.top-build-mock {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.top-price-chart {
    display: flex;
    align-items: end;
    gap: 6px;
    flex: 0 0 96px;
    height: 96px;
    min-height: 96px;
    border-bottom: 1px solid #e5e7eb;
}

.top-price-chart span {
    flex: 1;
    min-width: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #fb923c, #f97316);
}

.top-radar-svg {
    display: block;
    width: 100%;
    min-height: 116px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.12) 0 20%, transparent 21%),
        #f8fafc;
}

.top-radar-grid {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 1.2;
}

.top-radar-grid-outer {
    stroke: #cbd5e1;
}

.top-radar-axis {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.top-radar-value {
    fill: rgba(249, 115, 22, 0.34);
    stroke: #f97316;
    stroke-width: 2;
}

.top-radar-dot {
    fill: #f97316;
    stroke: #ffffff;
    stroke-width: 1;
}

.top-radar-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.top-radar-metrics span {
    display: flex;
    flex: 1 1 calc(50% - 4px);
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 58px;
    border-radius: 6px;
    background: #fff7ed;
    padding: 4px 6px;
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
}

.top-radar-metrics span:last-child {
    flex-basis: 100%;
}

.top-radar-metrics strong {
    color: #ea580c;
}

.top-build-mock {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.top-build-checklist {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.top-build-checklist span {
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 4px 6px;
    font-size: 9px;
    font-weight: 800;
    color: #475569;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.top-build-checklist svg {
    color: #f97316;
}

.top-build-chip {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-build-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: auto;
    padding-top: 8px;
}

.top-build-breakdown span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 8px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    padding: 6px 4px;
    text-align: center;
    color: #ea580c;
}

.top-build-breakdown strong {
    font-size: 9px;
}

.top-build-breakdown strong {
    color: #ea580c;
}

.top-editor-mock {
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.top-editor-mock > .p-2 {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.top-editor-cover {
    min-height: 76px;
    background-size: cover;
    background-position: center;
}

.top-editor-reaction {
    padding: 6px 7px;
}

.top-editor-reaction span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.top-editor-actions {
    margin-top: 8px;
}

.top-editor-mock .bg-gradient-to-r {
    box-shadow: inset 0 -18px 40px rgba(15, 23, 42, 0.18);
}

.content-detail-panel,
.content-detail-preview,
.content-detail-preview > .grid {
    min-width: 0;
}

.content-detail-preview {
    overflow: hidden;
}

.content-detail-price-table {
    table-layout: fixed;
}

.content-detail-build-card {
    min-width: 0;
}

.content-detail-build-card-image {
    width: min(4rem, 100%);
}

@media (min-width: 768px) and (max-width: 1023px) {
    .top-major-content-grid {
        align-items: stretch;
    }

    .top-major-content-grid > .top-major-card {
        height: 100%;
    }

    .top-major-card-body > .top-synergy-mock,
    .top-major-card-body > .top-price-mock,
    .top-major-card-body > .top-diagnosis-mock,
    .top-major-card-body > .top-build-mock,
    .top-major-card-body > .top-editor-mock {
        flex: 0 0 auto;
    }

    .top-synergy-mock,
    .top-price-mock,
    .top-diagnosis-mock,
    .top-build-mock,
    .top-editor-mock {
        min-height: 0;
    }

    .top-synergy-map {
        --top-synergy-diamond-size: 128px;
        flex: 0 0 auto;
        width: min(100%, 270px);
        min-height: 0;
        height: 128px;
        margin: 8px auto 0;
    }

    .top-price-chart {
        flex: 0 0 124px;
        height: 124px;
        min-height: 124px;
        padding-top: 8px;
    }

    .top-diagnosis-mock .top-radar-svg {
        width: min(100%, 230px);
        height: 158px;
        min-height: 0;
        margin: 0 auto;
    }

    .content-detail-price-grid,
    .content-detail-diagnosis-grid,
    .content-detail-build-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .content-detail-build-cards {
        max-width: 420px;
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    .top-major-card-body > .top-synergy-mock,
    .top-major-card-body > .top-price-mock,
    .top-major-card-body > .top-diagnosis-mock {
        flex: 0 0 auto;
    }

    .top-synergy-mock,
    .top-price-mock,
    .top-diagnosis-mock {
        min-height: 0;
    }

    .top-major-image-row-overlap {
        gap: 8px;
    }

    .top-major-image-row-overlap .top-major-preview-card + .top-major-preview-card {
        margin-left: 0;
    }

    .top-synergy-map {
        --top-synergy-diamond-size: 128px;
        flex: 0 0 auto;
        width: min(100%, 270px);
        min-height: 0;
        height: 128px;
        margin: 8px auto 0;
    }

    .top-price-chart {
        flex: 0 0 124px;
        height: 124px;
        min-height: 124px;
        padding-top: 8px;
    }

    .top-diagnosis-mock .top-radar-svg {
        width: min(100%, 230px);
        height: 158px;
        min-height: 0;
        margin: 0 auto;
    }
}

/* --- Step Number Badge --- */
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}

/* --- Banner Gradient --- */
.banner-gradient {
    background: linear-gradient(90deg, #F59E0B, #D97706);
}

/* --- CTA Button Shadow --- */
.btn-amber-shadow {
    box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.btn-amber-shadow:hover {
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

/* --- Ghost Button --- */
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    border-color: rgba(255,255,255,0.5);
}

/* --- Showcase Score Colors --- */
.showcase-score-amber {
    color: #D97706;
}

.showcase-score-up {
    color: #EF4444;
}

.showcase-score-down {
    color: #2563EB;
}

/* --- How It Works Visual Placeholder --- */
.how-visual-placeholder {
    background: linear-gradient(135deg, #FEF3C7, #FFFBEB);
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* --- Card Image Aspect Ratio --- */
.aspect-card {
    aspect-ratio: 3 / 4;
}

/* --- Chart Container --- */
#price-chart {
    max-height: 256px;
}

/* --- Pagination Active --- */
.pagination-active {
    background-color: #F59E0B;
    color: white;
}

/* --- Modal --- */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

/* --- Focus Ring --- */
textarea:focus,
input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
