/* 活動・作品ページ専用のスタイル（subpage.css の後に読み込む） */

.act-intro {
    max-width: 760px;
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.9;
}

/* --- ページ内リンク --- */

#teams,
#events,
#gallery {
    scroll-margin-top: 100px;
}

/* --- 班活動 --- */

/* ページ上部との間を詰める（共通の .sub-section の上余白は 64〜96px） */
#teams {
    margin-top: 24px; /* .sub-main の上余白 24px と合わせて 48px */
}
.team-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.team-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 28px 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-miku);
    transform: scaleX(0.18);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.team-item:hover::before {
    transform: scaleX(1);
}

.team-head {
    position: relative;
}

.team-num {
    position: absolute;
    top: -6px;
    right: 0;
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    /* 白抜きの数字：縁取りを先に描き、その上を白（カードの地の色）で塗る。
       「4」など字の形が重なる部分の線が中に見えないようにするため。縁取りの内側半分は白に隠れるので太さは倍にする */
    color: #fff;
    -webkit-text-stroke: 3px var(--miku);
    paint-order: stroke fill;
    opacity: 0.8;
}

.team-en {
    font-size: var(--label-size);
    font-weight: 700;
    letter-spacing: var(--label-spacing);
    color: var(--miku);
}

.team-head h3 {
    margin-top: 6px;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: var(--heading-spacing);
}

.team-desc {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.85;
}

.team-for {
    margin-top: auto;
    padding-top: 20px;
}

.team-for > p {
    margin-bottom: 10px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.team-for ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.team-for li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--miku-tint);
    color: var(--miku-deep);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
}

/* --- イベント --- */
.event-timeline {
    list-style: none;
    display: grid;
    gap: 16px;
}

.event-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.event-when {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 28px;
    border-right: 1px solid var(--line);
    background: var(--bg-soft);
}

.event-month {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1;
}

.event-month small {
    margin-left: 2px;
    font-size: 1.1rem;
}

.event-en {
    font-size: var(--label-size);
    font-weight: 700;
    letter-spacing: var(--label-spacing);
    color: var(--miku);
}

.event-body {
    padding: 30px 32px;
}

.event-body h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: var(--heading-spacing);
}

.event-body h3 span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
}

.event-body p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.9;
}

.event-body .event-link {
    margin-top: 18px;
}

/* 初音舞踏祭・初音銀華祭は、サークルの大きなイベントとして色付きの枠で強調する */
.event-row-feature {
    position: relative;
    border: 0;
}

.event-row-feature::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: var(--gradient-miku);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.event-row-feature .event-when {
    background: linear-gradient(160deg, rgba(54, 180, 171, 0.1), rgba(110, 162, 223, 0.12));
}

/* --- ギャラリー --- */
.gallery-group + .gallery-group {
    margin-top: 48px;
}

.gallery-group-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: var(--heading-spacing);
}

.gallery-group-title span {
    color: var(--miku);
    font-size: var(--label-size);
    font-weight: 700;
    letter-spacing: var(--label-spacing);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.video-item {
    margin: 0;
}

/* YouTubeの16:9比率を保ったまま幅に合わせる */
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #111;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-item figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    font-weight: 700;
    line-height: 1.5;
}

.video-item figcaption span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.gallery-more {
    margin-top: 36px;
    text-align: center;
}

/* --- 入会ページへの導線 --- */
.act-cta {
    padding: clamp(40px, 6vw, 64px) 24px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 101, 228, 0.22), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(110, 162, 223, 0.25), transparent 50%),
        var(--ink);
    color: #fff;
    text-align: center;
}

.act-cta h2 {
    margin-top: 8px;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 900;
    letter-spacing: var(--heading-spacing);
}

.act-cta > p:not(.sub-label) {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.75);
}

.act-cta .btn-main {
    margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
    .team-item,
    .team-item::before {
        transition: none;
    }
}

/* --- スマホ・タブレット --- */
@media (max-width: 900px) {
    .team-list,
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-when {
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 14px;
        padding: 20px 24px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .event-month {
        font-size: 2.4rem;
    }

}

@media (max-width: 600px) {
    .team-list,
    .video-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .team-item,
    .event-body {
        padding: 26px 22px;
    }

    .event-body h3 {
        font-size: 1.25rem;
    }
}
