/* ---------------------------------------
   Design System (easy to retheme per event)
------------------------------------------*/
:root {
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans JP', sans-serif;

    /* === Pink Theme === */
    --primary: oklch(70% .16 15);
    /* soft coral pink */
    --primary-ink: #fff;
    --bg: #fde8ec;
    /* light pink background */
    --surface: #fff6f8;
    /* pale rose surface */
    --text: oklch(25% .04 15);
    --title: oklch(22% .04 15);
    --muted: oklch(45% .03 15);
    --label: oklch(35% .04 15);
    --line: oklch(90% .03 15);
    --input: #fff;
    --danger: oklch(55% .20 27);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .06);
}


* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
}

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

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav__left {
    display: flex;
    align-items: center;

}

.brand {
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--title);
    font-size: 1.5rem;
    line-height: 1.35;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.btn--primary {
    background: var(--primary);
    color: var(--primary-ink);
    font-size: 1.2rem;
}


.btn--ghost {
    background: transparent;
    color: var(--title);
    border: 1px solid var(--line);
    font-size: 1.2rem;
}

/* Responsive adjustment for Logout button */
@media (max-width: 640px) {
    .nav__right .btn--ghost {
        font-size: 0.8rem;
        padding: 6px 10px;
        border-radius: 8px;
    }

    .brand {
        font-size: 0.9rem;
    }
}

/* Even tighter for very small phones */
@media (max-width: 400px) {
    .nav__right .btn--ghost {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}


.btn:hover {
    filter: brightness(0.98);
}

/* Hero (short height, full width) */
.hero {
    position: relative;
    height: 28vh;
    min-height: 220px;
    max-height: 300px;
    overflow: hidden;
    background: #111;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: saturate(0.9) hue-rotate(-5deg) brightness(1.05);
}


.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;

    /* Pink gradient overlay tint */
    background: linear-gradient(to top,
            color-mix(in oklab, var(--primary) 25%, transparent) 0%,
            color-mix(in oklab, var(--primary) 10%, transparent) 70%,
            transparent 100%);

    color: #000;
}


.hero h1 {
    margin: 0 0 4px 0;
    font-size: clamp(20px, 3.5vw, 34px);
    font-weight: bold;
}

.hero p {
    margin: 0;
    opacity: 1;
    font-size: 1.5rem;
}

/* Sections */
.section {
    padding: 24px 20px;
    max-width: 1300px;
    margin: 0 auto;
}


/* ---------- Basic login card (kept for non-enhanced) ---------- */
body.login {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.login-card {
    width: min(92vw, 440px);
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    padding: 32px;
    border: 1px solid var(--line);
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.2px;
    color: var(--title);
}

.muted {
    color: var(--muted);
    font-size: .95rem;
    margin-top: .25rem;
}

.login-form {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.field label {
    font-size: 1.2rem;
    color: var(--label);
    display: block;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--input);
    color: var(--text);
    outline: none;
    font-size: 1.2rem;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 20%, transparent);
}

.err {
    color: var(--danger);
    font-size: rem;
    margin-top: 8px;
}

.foot {
    margin-top: 18px;
    font-size: .8rem;
    color: var(--muted);
}

/* ===== Enhanced Login Experience (split layout) ===== */
.login--enhanced {
    display: grid;
    place-items: center;
    min-height: 100dvh;
}

/* Override base login flex-centering to prevent layout fights */
.login--enhanced.login {
    display: grid;
}

/* The shell */
.login-shell {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    width: min(1500px, 94vw);
    height: min(720px, 92vh);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

@media (max-width: 920px) {
    .login-shell {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .login-card {
        align-items: stretch !important;
        padding: 32px !important;
    }

    .login-visual {
        display: none;
    }
}

/* Visual side */
.login-visual {
    position: relative;
    background: url('login-visual.jpg') center center / contain no-repeat;
    background-color: #fde8ec;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #4a2e2e;
}

/* Remove dark overlays and greetings */
.gv,
.orb,
.greetings {
    display: none !important;
}


/* Greetings marquee */
.greetings {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 64px;
    display: grid;
    gap: 10px;
    padding: 0 24px;
    pointer-events: none;
}

.greetings__line {
    display: flex;
    gap: 24px;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 28px);
    opacity: .9;
    color: #fff;
    white-space: nowrap;
    transform: translateX(0);
    animation: marquee 22s linear infinite;
}

.greetings__line--alt {
    opacity: .7;
    animation-duration: 28s;
}

.greetings__line span {
    opacity: .98;
}

@keyframes marquee {
    from {
        transform: translateX(0%);
    }

    to {
        transform: translateX(-50%);
    }
}

.event-mark {
    position: absolute;
    top: 24px;
    left: 24px;
    display: grid;
    gap: 8px;
    color: #000000;
}

.event-mark__tag {
    display: inline-block;
    font-size: 1.25rem;
    letter-spacing: .18em;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, .06);
}

.event-mark__name {
    font-weight: 700;
    font-size: clamp(18px, 2.4vw, 24px);
    text-shadow: 0 6px 26px rgba(0, 0, 0, .35);
}

/* Right card within shell: remove base card’s fixed width & borders */
.login--enhanced .login-card {
    width: auto;
    display: flex !important;
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    /* horizontal center */
    text-align: left;
    background: var(--surface);
    box-shadow: none;
    border: none;
    height: 100%;
    padding: 48px 60px !important;
}

/* Keep inner fields aligned inside centered card */
.login-card__head,
.login-form,
.extbox,
.login-foot {
    width: 100%;
    max-width: 360px;
}

.login-card--fx {
    animation: popIn .4s cubic-bezier(.2, .7, .2, 1) both;
}

.login-card__head {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.login-subtitle {
    color: var(--muted);
    margin-top: 6px;
}

.btn--wide {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ico {
    opacity: .92;
}

/* ===== Viewing Period Notice (bigger & clearer) ===== */
.err--bar {
    margin: 20px 0;
    padding: 16px;
    border-radius: 10px;
    background: #fff3f3;
    border: 1px solid #f3b2b2;
    color: #b80000;
    font-weight: 600;
    text-align: center;

    /* important */
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form--fx input:focus {
    transform: translateY(-1px);
    transition: transform .12s ease;
}

.login-foot {
    margin-top: auto;
    color: var(--muted);
    font-size: 1.15rem;
}

/* Entrance */
@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.995);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* === Tech Light Mesh + Grid (animated page background) === */
.theme-login-tech {
    position: relative;
    min-height: 100dvh;
    background: linear-gradient(180deg, #f9fbff 0%, #f6f8fb 100%);
    /* light, clean base */
    overflow: hidden;
}

/* moving micro-grid */
.theme-login-tech::before {
    content: "";
    position: fixed;
    /* cover full viewport even if content scrolls */
    inset: -2px;
    background:
        /* subtle dots layer */
        radial-gradient(circle at 25px 25px, rgba(30, 70, 140, .06) 1px, transparent 2px) 0 0/50px 50px,
        /* x grid */
        repeating-linear-gradient(0deg, rgba(30, 70, 140, .05) 0 1px, transparent 1px 40px),
        /* y grid */
        repeating-linear-gradient(90deg, rgba(30, 70, 140, .05) 0 1px, transparent 1px 40px);
    animation: techGridPan 26s linear infinite;
    pointer-events: none;
    z-index: 0;
    /* soften overall */
    filter: saturate(110%) contrast(102%) brightness(102%);
}

/* drifting light blobs (gives the “mesh” feel) */
.theme-login-tech::after {
    content: "";
    position: fixed;
    inset: -30%;
    background:
        radial-gradient(40% 35% at 20% 30%, rgba(110, 160, 255, .28), transparent 65%),
        radial-gradient(45% 40% at 80% 65%, rgba(0, 200, 210, .22), transparent 65%),
        radial-gradient(35% 30% at 40% 80%, rgba(255, 170, 200, .18), transparent 70%);
    filter: blur(6px);
    animation: techMeshDrift 24s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

/* keep your login shell above the animated background */
.login-shell {
    grid-template-columns: 1.4fr 1fr !important;
    /* left ≈ 58%, right ≈ 42% */
    align-items: stretch;
    border-radius: 28px;
    overflow: hidden;
    height: 640px !important;
}

/* smooth pan and drift */
@keyframes techGridPan {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }

    100% {
        background-position: 50px 50px, 0 40px, 40px 0;
    }
}

@keyframes techMeshDrift {
    0% {
        transform: translate3d(-3%, -2%, 0) scale(1);
    }

    100% {
        transform: translate3d(3%, 2%, 0) scale(1.06);
    }
}



/* ===== Footer ===== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 24px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 6px;
    justify-items: center;
}

.footer__brand {
    font-weight: 600;
    color: var(--title);
}

.footer__copy {
    font-size: .85rem;
    color: var(--muted);
}

.footer__link {
    margin-top: 6px;
    font-size: .9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer__link:hover {
    text-decoration: underline;
}



/* Badge style for申請方法 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
}

.badge--primary {
    background: var(--primary);
    color: var(--primary-ink);
}