:root {
    --text: #f4f7ff;
    --text-dim: rgba(229, 237, 255, 0.72);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent-pink: #f3a5d5;
    --accent-pink-strong: #ef7fc2;
    --accent-blue: #9cbcff;
    --accent-ice: #dce9ff;
    --accent-gold: #f4d8a4;
    --shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --header-h: 82px;
    --content-w: min(1440px, calc(100vw - 48px));
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.moon-page {
    margin: 0;
    padding-top: var(--header-h);
    color: var(--text);
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    background:
        radial-gradient(circle at 84% 12%, rgba(179, 206, 255, 0.16), transparent 0 18%),
        radial-gradient(circle at 18% 18%, rgba(239, 127, 194, 0.12), transparent 0 20%),
        linear-gradient(180deg, #121726 0%, #0d1221 34%, #080d18 68%, #050812 100%);
    overflow-x: hidden;
}

body.moon-page::before,
body.moon-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.moon-page::before {
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.15), transparent 0 6%),
        radial-gradient(circle at 76% 20%, rgba(255, 255, 255, 0.12), transparent 0 7%),
        radial-gradient(circle at 64% 82%, rgba(255, 255, 255, 0.08), transparent 0 5%);
    opacity: 0.75;
}

body.moon-page::after {
    inset: -12%;
    background:
        radial-gradient(circle at 28% 18%, rgba(156, 188, 255, 0.15), transparent 0 22%),
        radial-gradient(circle at 72% 12%, rgba(243, 165, 213, 0.12), transparent 0 20%),
        radial-gradient(circle at 52% 100%, rgba(228, 238, 255, 0.08), transparent 0 22%);
    filter: blur(42px);
    animation: moon-haze 18s ease-in-out infinite alternate;
}

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

button,
input {
    font: inherit;
}

.snowfall {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.snowfall span {
    position: absolute;
    top: -10%;
    width: var(--size, 8px);
    height: var(--size, 8px);
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98), rgba(230, 239, 255, 0.82) 58%, rgba(230, 239, 255, 0.08) 100%);
    opacity: var(--alpha, 0.8);
    filter: blur(var(--blur, 0px));
    animation: snow-fall var(--dur, 18s) linear infinite;
    animation-delay: var(--delay, 0s);
    left: var(--left, 50%);
}

.snowfall span:nth-child(1) {
    --left: 6%;
    --size: 9px;
    --dur: 22s;
    --delay: -4s;
}

.snowfall span:nth-child(2) {
    --left: 14%;
    --size: 6px;
    --dur: 14s;
    --delay: -11s;
}

.snowfall span:nth-child(3) {
    --left: 24%;
    --size: 7px;
    --dur: 17s;
    --delay: -8s;
}

.snowfall span:nth-child(4) {
    --left: 34%;
    --size: 10px;
    --dur: 24s;
    --delay: -2s;
}

.snowfall span:nth-child(5) {
    --left: 44%;
    --size: 5px;
    --dur: 12s;
    --delay: -6s;
}

.snowfall span:nth-child(6) {
    --left: 56%;
    --size: 8px;
    --dur: 18s;
    --delay: -15s;
}

.snowfall span:nth-child(7) {
    --left: 66%;
    --size: 11px;
    --dur: 26s;
    --delay: -5s;
}

.snowfall span:nth-child(8) {
    --left: 74%;
    --size: 7px;
    --dur: 16s;
    --delay: -12s;
}

.snowfall span:nth-child(9) {
    --left: 84%;
    --size: 6px;
    --dur: 13s;
    --delay: -9s;
}

.snowfall span:nth-child(10) {
    --left: 92%;
    --size: 9px;
    --dur: 21s;
    --delay: -1s;
}

.snowfall span:nth-child(11) {
    --left: 10%;
    --size: 4px;
    --dur: 10s;
    --delay: -3s;
    --alpha: 0.72;
}

.snowfall span:nth-child(12) {
    --left: 20%;
    --size: 5px;
    --dur: 11s;
    --delay: -14s;
    --alpha: 0.68;
}

.snowfall span:nth-child(13) {
    --left: 30%;
    --size: 4px;
    --dur: 9s;
    --delay: -7s;
    --alpha: 0.64;
}

.snowfall span:nth-child(14) {
    --left: 40%;
    --size: 6px;
    --dur: 12s;
    --delay: -16s;
    --alpha: 0.74;
}

.snowfall span:nth-child(15) {
    --left: 50%;
    --size: 4px;
    --dur: 8s;
    --delay: -9s;
    --alpha: 0.62;
}

.snowfall span:nth-child(16) {
    --left: 62%;
    --size: 5px;
    --dur: 10s;
    --delay: -18s;
    --alpha: 0.66;
}

.snowfall span:nth-child(17) {
    --left: 76%;
    --size: 4px;
    --dur: 9s;
    --delay: -11s;
    --alpha: 0.6;
}

.snowfall span:nth-child(18) {
    --left: 88%;
    --size: 5px;
    --dur: 11s;
    --delay: -13s;
    --alpha: 0.7;
}

.moon-sitebar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;
    height: var(--header-h);
    display: grid;
    align-items: center;
    gap: 14px;
    width: var(--content-w);
    margin: 0 auto;
    padding: 18px 0 14px;
}

.moon-sitebar::before {
    content: "";
    position: absolute;
    inset: 10px -18px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(18, 24, 39, 0.92), rgba(10, 15, 26, 0.84));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(130%);
    z-index: -1;
}

.moon-sitebar--center {
    grid-template-columns: 140px 1fr 140px;
}

.moon-sitebar--back {
    grid-template-columns: 132px 1fr 132px;
}

.moon-sitebar__title {
    margin: 0;
    text-align: center;
    cursor: pointer;
}

.moon-sitebar__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--text-dim);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-family: "Space Grotesk", sans-serif;
}

.moon-sitebar__name {
    display: block;
    font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #ffffff, var(--accent-ice) 34%, var(--accent-pink) 74%, #d7c8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.moon-button {
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.moon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(156, 188, 255, 0.32);
    background: rgba(156, 188, 255, 0.12);
    box-shadow: 0 10px 24px rgba(118, 153, 255, 0.12);
}

.moon-button--right {
    justify-self: end;
}

.moon-shell {
    position: relative;
    z-index: 1;
    width: var(--content-w);
    margin: 0 auto;
    padding: 28px 0 48px;
}

.moon-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
}

.moon-panel {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(22, 30, 48, 0.92), rgba(10, 16, 28, 0.82));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(125%);
}

.moon-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.moon-copy h2 {
    margin: 0 0 12px;
    font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
    font-size: clamp(42px, 5vw, 70px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.moon-copy p {
    margin: 0;
    max-width: 620px;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.8;
}

.moon-chip-list,
.moon-detail-grid,
.moon-phase-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.moon-chip-list span,
.moon-detail-grid article,
.moon-phase-flow article {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.moon-chip-list span {
    padding: 10px 14px;
    color: rgba(245, 247, 255, 0.9);
    font-size: 13px;
}

.moon-detail-grid article,
.moon-phase-flow article {
    min-width: 180px;
    padding: 14px 16px;
}

.moon-detail-grid strong,
.moon-phase-flow strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.moon-detail-grid small,
.moon-phase-flow small {
    display: block;
    color: var(--text-dim);
    line-height: 1.6;
}

.moon-flow-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(244, 247, 255, 0.92);
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.moon-flow-mark::before {
    content: "";
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(156, 188, 255, 0.7));
}

.moon-stage {
    background:
        linear-gradient(180deg, rgba(19, 30, 49, 0.96), rgba(11, 19, 34, 0.92));
}

.moon-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.16), transparent 0 12%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%);
}

.moon-stage__halo {
    position: absolute;
    top: 38px;
    right: 48px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98), rgba(230, 236, 255, 0.86) 45%, rgba(182, 201, 255, 0.18) 72%, transparent 73%);
    box-shadow: 0 0 68px rgba(214, 227, 255, 0.16);
    animation: moon-pulse 8s ease-in-out infinite;
}

.moon-stage__rail {
    position: absolute;
    top: 36px;
    left: 28px;
    right: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.moon-stage__rail::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(156, 188, 255, 0.28), rgba(255, 255, 255, 0.06));
    transform: translateY(-50%);
}

.moon-stage__phase {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98), rgba(226, 235, 255, 0.84) 58%, rgba(182, 201, 255, 0.16) 100%);
    box-shadow: 0 0 24px rgba(210, 224, 255, 0.12);
}

.moon-stage__phase::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #08111f;
    border-radius: 999px;
}

.moon-stage__phase--crescent::after {
    transform: translateX(11px) scale(0.9);
}

.moon-stage__phase--half::after {
    inset: 0 0 0 50%;
    border-radius: 0 999px 999px 0;
}

.moon-stage__phase--gibbous::after {
    transform: translateX(6px) scale(0.72);
}

.moon-stage__phase--full::after {
    display: none;
}

.moon-stage__badge {
    position: absolute;
    display: grid;
    gap: 6px;
    min-width: 190px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 18, 30, 0.68);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.moon-stage__badge strong {
    font-size: 20px;
}

.moon-stage__badge p {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
}

.moon-stage__badge-label {
    color: rgba(230, 237, 255, 0.78);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.moon-stage__badge--left {
    top: 104px;
    left: 28px;
}

.moon-stage__badge--left strong {
    color: var(--accent-ice);
}

.moon-stage__badge--right {
    right: 28px;
    bottom: 28px;
    width: 220px;
    padding-left: 88px;
}

.moon-stage__badge--dust::before,
.moon-stage__badge--dust::after {
    content: "";
    position: absolute;
}

.moon-stage__badge--dust::before {
    left: 18px;
    top: 18px;
    width: 56px;
    height: 56px;
    border-radius: 46% 54% 50% 50%;
    background:
        radial-gradient(circle at center, #fff 0 32%, transparent 33%),
        radial-gradient(circle at 12% 40%, #2a2427 0 26%, transparent 27%),
        radial-gradient(circle at 34% 14%, #32292e 0 24%, transparent 25%),
        radial-gradient(circle at 62% 14%, #2b2427 0 24%, transparent 25%),
        radial-gradient(circle at 88% 40%, #221d21 0 26%, transparent 27%),
        radial-gradient(circle at 76% 78%, #1f1a1f 0 26%, transparent 27%),
        radial-gradient(circle at 22% 80%, #282226 0 26%, transparent 27%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.moon-stage__badge--dust::after {
    left: 63px;
    top: 58px;
    width: 24px;
    height: 40px;
    border-left: 4px solid #151216;
    border-bottom: 4px solid #151216;
    border-bottom-left-radius: 22px;
    transform: rotate(-14deg);
    opacity: 0.9;
}

.moon-stage__snowbank {
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -8%;
    height: 48%;
    background:
        radial-gradient(circle at 12% 30%, rgba(239, 247, 255, 0.96) 0 18%, transparent 19%),
        radial-gradient(circle at 28% 34%, rgba(239, 247, 255, 0.96) 0 20%, transparent 21%),
        radial-gradient(circle at 46% 28%, rgba(239, 247, 255, 0.94) 0 18%, transparent 19%),
        radial-gradient(circle at 64% 34%, rgba(239, 247, 255, 0.94) 0 20%, transparent 21%),
        radial-gradient(circle at 80% 30%, rgba(239, 247, 255, 0.96) 0 18%, transparent 19%),
        radial-gradient(circle at 92% 38%, rgba(239, 247, 255, 0.95) 0 16%, transparent 17%);
    opacity: 0.92;
    filter: drop-shadow(0 -18px 22px rgba(225, 235, 255, 0.08));
}

.moon-stage__snowbank::after {
    content: "";
    position: absolute;
    inset: 24% 0 0;
    background: linear-gradient(180deg, rgba(194, 209, 255, 0.08), rgba(7, 13, 23, 0.1) 68%, transparent 100%);
}

.moon-stage__quote {
    position: absolute;
    left: 28px;
    bottom: 34px;
    max-width: 240px;
    color: rgba(243, 247, 255, 0.94);
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

.moon-grid {
    display: grid;
    grid-auto-rows: minmax(220px, auto);
    gap: 20px;
}

.moon-grid--compact {
    margin-top: 8px;
}

.moon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(165deg, rgba(10, 13, 21, 0.28), rgba(10, 13, 21, 0.82)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 42%);
    box-shadow: var(--shadow);
    isolation: isolate;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.moon-card::before,
.moon-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.moon-card::before {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(0deg, rgba(6, 9, 15, 0.08), rgba(6, 9, 15, 0.22)),
        var(--card-image) center / cover no-repeat;
    transform: scale(1.02);
    transition: transform .4s ease, filter .4s ease;
    filter: saturate(1.04) contrast(1.06);
    z-index: -2;
}

.moon-card::after {
    background:
        linear-gradient(180deg, rgba(7, 10, 16, 0.08), rgba(7, 10, 16, 0.72) 78%, rgba(7, 10, 16, 0.92) 100%);
    z-index: -1;
}

.moon-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 54%, rgba(255, 255, 255, 0.14));
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.4);
}

.moon-card:hover::before {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.08);
}

.moon-card__eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.05));
    color: #fffaff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.moon-card h3,
.moon-card h4 {
    margin: 16px 0 10px;
    font-size: clamp(24px, 2vw, 36px);
    line-height: 1.04;
}

.moon-card p {
    margin: 0;
    max-width: 28ch;
    color: rgba(245, 247, 255, 0.76);
    line-height: 1.7;
    font-size: 14px;
}

.moon-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.moon-card__chips span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(7, 10, 16, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(245, 247, 255, 0.88);
    backdrop-filter: blur(6px);
}

.moon-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.moon-card__footer small {
    color: rgba(245, 247, 255, 0.6);
    font-size: 12px;
    line-height: 1.5;
}

.moon-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.06));
    color: #fff8fc;
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.moon-card__cta::after {
    content: "↗";
    font-family: "Space Grotesk", sans-serif;
}

@keyframes moon-haze {
    from {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }

    to {
        transform: translate3d(2%, 1%, 0) scale(1.06);
    }
}

@keyframes moon-pulse {
    0%,
    100% {
        transform: scale(0.98);
        opacity: 0.92;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes snow-fall {
    0% {
        transform: translate3d(0, -10vh, 0);
    }

    100% {
        transform: translate3d(32px, 112vh, 0);
    }
}

@media (max-width: 1180px) {
    :root {
        --content-w: min(1120px, calc(100vw - 36px));
    }

    .moon-hero {
        grid-template-columns: 1fr;
    }

    .moon-stage {
        min-height: 460px;
    }
}

@media (max-width: 760px) {
    :root {
        --header-h: 92px;
        --content-w: calc(100vw - 24px);
    }

    body.moon-page {
        padding-top: var(--header-h);
    }

    .moon-sitebar--center {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "action";
        gap: 10px;
        padding-top: 14px;
    }

    .moon-sitebar--back {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title title"
            "back action";
        gap: 10px;
        padding-top: 14px;
    }

    .moon-sitebar__title {
        grid-area: title;
    }

    .moon-sitebar__action {
        grid-area: action;
    }

    .moon-sitebar__back {
        grid-area: back;
    }

    .moon-panel {
        padding: 24px;
    }

    .moon-stage {
        min-height: 520px;
    }

    .moon-stage__rail {
        right: 24px;
        gap: 8px;
    }

    .moon-stage__phase {
        width: 34px;
        height: 34px;
    }

    .moon-stage__badge--left {
        top: 92px;
        left: 18px;
    }

    .moon-stage__badge--right {
        right: 18px;
        bottom: 18px;
        width: min(220px, calc(100% - 36px));
    }

    .moon-stage__quote {
        left: 18px;
        bottom: 26px;
        max-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
