/* TOP のイベント LP カード（spec: docs/features/top-event-lp-cards/spec.md §3.2〜§3.5） */

/* 並べ方: スマホは縦 1 列 */
.top-event-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: 600px;
    margin: 6px auto 0;
    padding: 0 12px 5px;
}

/* 帯があるときは帯のフォント読み込みと同時に出す */
html:not(.tcb-fonts-ready) .top-event-cards[data-with-banner] {
    visibility: hidden;
}

/* 帯の下では、帯のボタン（と指アイコン）に詰まらないよう上を空ける */
.top-event-cards[data-with-banner] {
    margin-top: 16px;
}

/* カード（修飾なしは chaos の配色） */
.top-event-card {
    --tec-bg: linear-gradient(180deg, #2a1180 0%, #0d0433 100%);
    --tec-border: #7fc8f2;
    --tec-title: #ffe45f;
    --tec-title-stroke: transparent;
    --tec-title-stroke-width: 0;
    --tec-badge-bg: linear-gradient(90deg, #46c0f2, #cf7bff);
    --tec-badge-text: #0d0433;
    --tec-number: #ffffff;
    --tec-arrow: #7fc8f2;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-width: 0;
    padding: 10px 12px 10px 10px;
    border: 3px solid var(--tec-border);
    border-radius: 18px;
    background: var(--tec-bg);
    box-shadow: 0 5px 0 #000000;
    text-decoration: none;
    color: inherit;
}

.top-event-card:hover,
.top-event-card:focus {
    text-decoration: none;
    color: inherit;
}

/* テーマ: ピンクと淡い黄色 */
.top-event-card--pink {
    --tec-bg: linear-gradient(180deg, #f7d6e8 0%, #eab3d2 100%);
    --tec-border: #ffffff;
    --tec-title: #fff38a;
    --tec-title-stroke: #c9548f;
    --tec-title-stroke-width: 3px;
    --tec-badge-bg: #b23a7a;
    --tec-badge-text: #ffffff;
    --tec-number: #111111;
    --tec-arrow: #b23a7a;
}

/* テーマ: 太陽神 */
.top-event-card--sun_god {
    --tec-bg: linear-gradient(180deg, #3a0a0a 0%, #120303 100%);
    --tec-border: #e3b552;
    --tec-title: #ffe08a;
    --tec-badge-bg: linear-gradient(90deg, #ff8c00, #ffd700);
    --tec-badge-text: #1a0800;
    --tec-number: #ffffff;
    --tec-arrow: #e3b552;
}

/* テーマ: 1周年アニバーサリー */
.top-event-card--anniversary {
    --tec-bg: linear-gradient(180deg, #E8203A 0%, #B80D20 100%);
    --tec-border: #FFD700;
    --tec-title: #ffffff;
    --tec-title-stroke: #5a0610;
    --tec-title-stroke-width: 3px;
    --tec-badge-bg: linear-gradient(90deg, #FF8C00, #FFD700, #FF8C00);
    --tec-badge-text: #1a0800;
    --tec-number: #ffffff;
    --tec-arrow: #FFD700;
}

/* サムネイル: KV の透過画像をそのまま載せる（縁・影・角丸・背景は付けない） */
.top-event-card__thumb {
    flex: none;
    display: block;
    width: 88px;
    height: 88px;
    object-fit: cover;
    object-position: center top;
}

.top-event-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-event-card__title {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tec-title);
    -webkit-text-stroke: var(--tec-title-stroke-width) var(--tec-title-stroke);
    paint-order: stroke fill;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.top-event-card__countdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 2px;
}

.top-event-card__badge {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--tec-badge-text);
    background: var(--tec-badge-bg);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.top-event-card__time {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--tec-number);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.top-event-card__note {
    align-self: flex-start;
    max-width: 100%;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--tec-badge-text);
    background: var(--tec-badge-bg);
    border-radius: 8px;
    padding: 3px 8px;
    white-space: nowrap;
}

.top-event-card__day {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.top-event-card__live {
    font-family: "Dela Gothic One", sans-serif;
    font-size: 32px;
    line-height: 1.1;
    color: #ff2a2a;
    -webkit-text-stroke: 5px #ffffff;
    paint-order: stroke fill;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* hidden 属性の要素は display の指定より優先して隠す */
.top-event-card [hidden] {
    display: none !important;
}

.top-event-card__arrow {
    flex: none;
    width: 18px;
    height: 18px;
    stroke: var(--tec-arrow);
}

/* PC: 2 列・中身の最大幅 880px（本日のガチャ一覧と同じ。左右 12px の余白を足す） */
@media (min-width: 768px) {
    .top-event-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        max-width: 904px;
        margin-top: 8px;
    }

    /* 1 枚だけのときは 1 列分の幅で中央に置く */
    .top-event-cards[data-count="1"] {
        grid-template-columns: minmax(0, 430px);
        justify-content: center;
    }

    .top-event-card {
        gap: 14px;
        padding: 12px 14px 12px 12px;
        border-radius: 20px;
    }

    .top-event-card__thumb {
        width: 112px;
        height: 112px;
    }

    .top-event-card__body {
        gap: 8px;
    }

    .top-event-card__title {
        font-size: 18px;
    }

    .top-event-card__countdown {
        column-gap: 8px;
    }

    .top-event-card__badge {
        font-size: 11px;
        padding: 2px 10px;
    }

    .top-event-card__time {
        font-size: 22px;
    }

    .top-event-card__day {
        font-size: 13px;
    }

    .top-event-card__arrow {
        width: 20px;
        height: 20px;
    }
}
