@font-face {
    font-family: "Pretendard";
    src: url("../fonts/PretendardVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #171a1f;
    --muted: #667085;
    --line: #e6e9ee;
    --soft: #f5f7fa;
    --surface: #ffffff;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --hero: #353a42;
    --page-width: 1120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    min-width: 320px;
    background: var(--surface);
    color: var(--ink);
    font-family: "Pretendard", sans-serif;
    line-height: 1.65;
    letter-spacing: 0.015em;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.loading-screen {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    background: #f8fafc;
    color: #596273;
    font-size: 15px;
}

.loading-screen[hidden],
.page-shell[hidden] {
    display: none !important;
}

.loading-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dfe5ee;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 82px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
}

.header-inner,
.hero-content,
.footer-inner {
    width: min(var(--page-width), calc(100% - 64px));
    margin: 0 auto;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    max-width: 48%;
    overflow: hidden;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    position: relative;
    color: #424956;
    font-size: 14px;
    font-weight: 600;
}

.nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
    transform: scaleX(1);
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    display: flex;
    align-items: center;
    isolation: isolate;
    background: var(
        --group-hero-background,
        linear-gradient(135deg, #414751 0%, #2c3037 62%, #22262c 100%)
    );
}

.hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(20, 23, 28, 0.48) 0%, rgba(25, 28, 34, 0.08) 58%, rgba(20, 23, 28, 0.16) 100%);
    content: "";
}

.hero[data-theme-tone="light"]::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.2) 58%, rgba(255, 255, 255, 0.08) 100%);
}

body[data-group-kind="department"] .hero::after {
    background: transparent;
}

.hero[data-theme-tone="light"] .hero-content {
    color: #171a1f;
}

.hero[data-theme-tone="light"] .hero-category {
    color: rgba(23, 26, 31, 0.58);
}

.hero[data-theme-tone="light"] .hero-description {
    color: rgba(23, 26, 31, 0.76);
}

.hero[data-theme-tone="light"] .hero-button {
    border-color: #171a1f;
    background: #171a1f;
    color: #fff;
}

.hero[data-theme-tone="light"] .hero-button:hover {
    background: transparent;
    color: #171a1f;
}

.hero-cover {
    position: absolute;
    top: 50%;
    right: max(4vw, calc((100vw - var(--page-width)) / 2));
    z-index: 0;
    width: min(48vw, 600px);
    height: min(48vw, 600px);
    transform: translateY(-50%);
}

.hero-cover-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transform: scale(1.04);
}

.hero-cover-logo.is-image-missing {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 96px 0;
    color: #fff;
}

@media (min-width: 801px) {
    .hero-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(48vw, 600px);
        column-gap: clamp(32px, 4vw, 64px);
    }

    .hero-content > * {
        grid-column: 1;
    }

    .hero-button {
        justify-self: start;
    }
}

.hero-category {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.hero h1 {
    max-width: 740px;
    font-size: clamp(48px, 6vw, 76px);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.hero h1 span {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.hero-description {
    max-width: 620px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34em;
    min-height: 48px;
    margin-top: 36px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #fff;
    color: #22262d;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-button:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.section {
    padding: 108px 0;
}

.section-soft {
    background: var(--soft);
}

.members-section {
    padding-top: 24px;
}

.section-title {
    margin-bottom: 48px;
    text-align: center;
}

.section-title p {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.22em;
}

.section-title h2 {
    font-size: clamp(31px, 4vw, 42px);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.about-container {
    width: min(1000px, calc(100% - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    align-items: stretch;
    gap: 72px;
}

.identity-card {
    min-width: 0;
}

.identity-logo-wrap {
    position: relative;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #f7f8fa;
}

.identity-logo {
    position: relative;
    z-index: 1;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.identity-logo.is-image-missing {
    display: none;
}

.identity-logo-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #c1c7d0;
    font-size: clamp(64px, 10vw, 104px);
    font-weight: 800;
}

.identity-logo-wrap:has(.identity-logo:not(.is-image-missing)) .identity-logo-fallback {
    opacity: 0;
}

.identity-card h3 {
    margin-top: 24px;
    font-size: 30px;
    font-weight: 760;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.identity-card > p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
    white-space: pre-line;
}

.group-info {
    border-top: 2px solid var(--ink);
}

.info-item {
    min-height: 68px;
    padding: 17px 10px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.info-item > span {
    color: #7a8391;
    font-size: 14px;
}

.info-item strong {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.related-link.has-link {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 4px;
}

.activity-list-card {
    width: min(900px, calc(100% - 64px));
    margin: 0 auto;
    padding: 14px 34px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.055);
}

.activity-list {
    list-style: none;
}

.activity-list li {
    min-height: 76px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #edf0f4;
    color: #303744;
    font-size: 16px;
    font-weight: 600;
}

.activity-list li:last-child {
    border-bottom: 0;
}

.activity-index {
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.empty-list-item {
    grid-template-columns: 1fr !important;
    justify-items: center;
    color: var(--muted) !important;
    font-weight: 500 !important;
}

.member-grid {
    width: min(var(--page-width), calc(100% - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.member-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.member-card-header {
    padding: 24px 26px 18px;
    border-bottom: 1px solid #edf0f4;
}

.member-card-grade {
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.member-card h3 {
    margin-top: 4px;
    font-size: 25px;
    letter-spacing: -0.025em;
}

.member-list {
    list-style: none;
    padding: 10px 26px 18px;
}

.member-list li {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f0f2f5;
    color: #3a414d;
    font-size: 14px;
}

.member-list li:last-child {
    border-bottom: 0;
}

.member-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge {
    flex: none;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eaf1ff;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 750;
}

.member-empty {
    padding: 30px 26px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.member-auth-state {
    width: min(720px, calc(100% - 64px));
    margin: 0 auto;
    padding: 44px 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.member-auth-state strong {
    display: block;
    font-size: 19px;
}

.member-auth-state p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.member-auth-state a {
    display: inline-flex;
    min-height: 42px;
    margin-top: 20px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.footer {
    padding: 34px 0;
    background: #171a1f;
    color: #fff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer strong {
    font-size: 16px;
}

.footer a {
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
}

@media (max-width: 800px) {
    html {
        scroll-padding-top: 118px;
    }

    .header {
        height: auto;
    }

    .header-inner {
        width: calc(100% - 36px);
        min-height: 112px;
        padding: 17px 0;
        flex-direction: column;
        justify-content: center;
        gap: 15px;
    }

    .logo {
        max-width: 100%;
        font-size: 22px;
    }

    .nav {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

    .nav a {
        font-size: 12px;
    }

    .hero {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        min-height: 0;
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(20, 23, 28, 0.15) 0%, rgba(20, 23, 28, 0.55) 55%, rgba(20, 23, 28, 0.85) 100%);
    }

    .hero-cover {
        position: relative;
        top: auto;
        right: auto;
        z-index: 0;
        width: 62vw;
        height: 62vw;
        max-width: 300px;
        max-height: 300px;
        margin: 40px auto 0;
        transform: none;
        order: -1;
    }

    .hero-content {
        width: calc(100% - 40px);
        padding: 28px 0 64px;
    }

    .hero h1 {
        font-size: clamp(42px, 12vw, 60px);
    }

    .hero-description {
        font-size: 16px;
    }

    .section {
        padding: 78px 0;
    }

    .members-section {
        padding-top: 10px;
    }

    .section-title {
        margin-bottom: 36px;
    }

    .about-container {
        width: calc(100% - 40px);
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .identity-card h3 {
        font-size: 27px;
    }

    .identity-logo-wrap,
    .identity-logo {
        max-height: 300px;
    }

    .activity-list-card,
    .member-grid,
    .member-auth-state {
        width: calc(100% - 40px);
    }

    .activity-list-card {
        padding: 8px 22px;
    }

    .member-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .nav {
        gap: 13px;
    }

    .nav a {
        font-size: 11px;
    }

    .hero {
        min-height: 510px;
    }

    .hero-category {
        font-size: 10px;
    }

    .info-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
    }

    .activity-list li {
        grid-template-columns: 40px minmax(0, 1fr);
        font-size: 15px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
