@charset "UTF-8";

/* ==========================================================================
   0. デザイン変数（CSSカスタムプロパティ）
   ========================================================================== */
:root {
    /* 背景・ベース */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-bg-light: #f9f9f9;
    --color-bg-card: #fdfdfd;

    /* テキストカラー */
    --color-text-main: #333333;
    --color-text-muted: #666666;
    --color-text-gray: #555555;
    --color-text-label: #888888;

    /* アクセント・ブランドカラー */
    --color-primary-blue: #0044cc;
    --color-accent-purple: #8989ff;
    --color-accent-orange: #e67e22;
    --color-accent-red: #c0392b;
    --color-accent-yellow: #ffff00;

    /* ボーダー・シャドウ */
    --color-border-light: #eeeeee;
    --color-border-medium: #dddddd;
    --color-shadow-light: rgba(0, 0, 0, 0.05);
    --color-shadow-medium: rgba(0, 0, 0, 0.1);

    /* 特殊演出（アニメーション用） */
    --color-shine-effect: rgba(255, 255, 255, 0.6);
    --color-moon-glow-low: rgba(255, 255, 230, 0.2);
    --color-moon-glow-mid: rgba(255, 255, 200, 0.7);
    --color-moon-glow-high: rgba(255, 255, 200, 0.9);
}

/* ==========================================================================
   1. 基本設定（Body / Layout）
   ========================================================================== */

body {
    font-family: "Public Sans", "Zen Kaku Gothic New", sans-serif;
    font-size: 20px;
    line-height: 1;
    color: var(--color-black);
    background-color: var(--color-white);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

header {
    position: fixed;
    top: 0;
    z-index: 9999;
    transform: translateZ(0);
}

.hoshitui-title-wrapper {
    width: 100%;
    overflow: hidden;
}

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

h1 {
    font-family: "Public Sans", "Zen Kaku Gothic New", sans-serif;
    font-size: 32px;
    line-height: 1;
    color: var(--color-black);
    background-color: var(--color-white);
    text-align: center;
    margin: 0 0 60px 0;
    padding: 0;
}

h2 {
    display: table;
    margin: 80px auto;
    padding-bottom: 10px;
    font-size: 27px;
    text-align: center;
    border-bottom: 2px solid var(--color-text-main);
}

.main img {
    grid-column: 2 / 3;
    grid-row: 1 / 20;
    width: 100%;
    height: auto;
    border-radius: 2px;
}

/* ==========================================================================
   2. Hoshitui セクション
   ========================================================================== */

.hoshitui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 150px;
}

.hoshitui-text {
    width: 50%;
    position: relative;
}

.hoshitui-image {
    width: 50%;
}

.hoshitui-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.hoshitui-title {
    font-size: 70px;
    text-align: left;
    margin-bottom: 30px;
    color: var(--color-accent-purple);
}

.hoshitui-text h2 {
    display: block;
    text-align: left;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 2rem;
}

.hoshitui-text p {
    line-height: 2.5rem;
    font-size: 23px;
    position: relative;
}

/* --- 装飾画像とロケットアニメーション --- */

.hoshitui-left-bottom-image {
    position: absolute;
    top: 63%;
    left: 5%;
    width: 15%;
    animation: rocketLaunch 5s ease-in infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hoshitui-right-bottom-image {
    position: absolute;
    top: -20%;
    right: 3%;
    width: 15%;
    animation: rocketLaunch 5s ease-in infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hoshitui-left-moon-image {
    position: absolute;
    top: 105%;
    left: -3%;
    width: 15%;
    animation: rocketLaunch 5s ease-in infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hoshitui-right-ginga-image {
    position: absolute;
    top: -13%;
    right: -5%;
    width: 15%;
    animation: rocketLaunch 5s ease-in infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes rocketLaunch {
    0% {
        transform: translateY(0) translateX(0);
    }

    2% {
        transform: translateY(0) translateX(-2px);
    }

    4% {
        transform: translateY(0) translateX(2px);
    }

    6% {
        transform: translateY(0) translateX(-2px);
    }

    8% {
        transform: translateY(0) translateX(2px);
    }

    10% {
        transform: translateY(0) translateX(-1px);
    }

    12% {
        transform: translateY(0) translateX(1px);
    }

    14% {
        transform: translateY(0) translateX(-1px);
    }

    16% {
        transform: translateY(0) translateX(1px);
    }

    18% {
        transform: translateY(0) translateX(0);
    }
}

/* ==========================================================================
   3. スライドショー / ISS
   ========================================================================== */

.center-title {
    display: table;
    margin: 80px auto 40px;
    padding-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid var(--color-text-main);
    font-size: 42px;
}

.slideshow-container {
    margin: 0 auto 100px;
    max-width: 800px;
}

.slideshow-images {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}

.slideshow-images .slide-image {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 100%;
    height: auto;
    opacity: 0;
    z-index: 0;
    border-radius: 8px;
    transition: opacity 1.5s ease-in-out;
}

.slide-image.is-active {
    opacity: 1;
    z-index: 1;
}

.slideshow-captions {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 40px;
    min-height: 1.5em;
}

.slide-caption {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    opacity: 0;
    font-size: 30px;
    font-weight: bold;
    margin: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide-caption.is-active {
    opacity: 1;
}

.kokusai {
    position: relative;
}

.yohou {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 80px;
}

.yohou-text {
    font-size: 18px;
    width: 50%;
    padding: 20px;
}

.yohou-text .san {
    font-size: 28px;
    font-weight: bold;
    text-align: left;
    margin-bottom: 30px;
}

.yohou-text p {
    line-height: 2rem;
    text-align: left;
}

.yohou img {
    width: 50%;
    border-radius: 8px;
}

/* ==========================================================================
   4. 今月のお月さま
   ========================================================================== */

.tomonthmoon {
    margin: 150px auto;
}

.ni {
    display: table;
    margin: 80px auto 40px;
    padding-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid var(--color-text-main);
    font-size: 42px;
}

.moon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.moon-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 80px;
    text-align: left;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.moon-grid .moon-item img {
    grid-column: auto;
    grid-row: auto;
    width: 120px;
    height: auto;
    flex-shrink: 0;
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite alternate;
    will-change: filter, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.moon-info {
    flex: 0 1 auto;
}

.moon-name {
    font-weight: bold;
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

.moon-date {
    display: block;
    margin: 4px 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.moon-item:nth-child(1) img {
    animation-delay: 0s;
}

.moon-item:nth-child(2) img {
    animation-delay: 1.5s;
}

.moon-item:nth-child(3) img {
    animation-delay: 3.0s;
}

.moon-item:nth-child(4) img {
    animation-delay: 0.5s;
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 2px var(--color-moon-glow-low)) brightness(1);
        transform: scale(1) translateZ(0);
    }

    100% {
        filter: drop-shadow(0 0 18px var(--color-moon-glow-mid)) brightness(1.08);
        transform: scale(1.02) translateZ(0);
    }
}

.moon-item:hover {
    transform: translateY(-5px);
}

.moon-item:hover img {
    animation-play-state: paused;
    filter: drop-shadow(0 0 20px var(--color-moon-glow-high)) brightness(1.1);
    transition: filter 0.3s ease;
}

/* ==========================================================================
   5. 参考サイト / ギャラリー
   ========================================================================== */

.sankou {
    margin-top: 40px;
    padding: 40px 20px;
    background-color: var(--color-bg-light);
    border-radius: 12px;
}

.yon {
    padding-left: 15px;
    font-size: 22px;
    font-weight: bold;
    text-align: left;
    border-left: 5px solid var(--color-text-main);
    margin-bottom: 20px;
}

.sankou-intro {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.sankou-flex {
    display: flex;
    gap: 20px;
}

.sankou-item {
    flex: 1;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sankou-item a {
    display: block;
    height: 100%;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.sankou-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--color-shadow-medium);
}

.sankou-name {
    font-weight: bold;
    font-size: 18px;
    color: var(--color-primary-blue);
    text-decoration: underline;
    margin-bottom: 10px;
}

.sankou-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-gray);
    margin-bottom: 15px;
}

.link-label {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-label);
}

.link-label::after {
    content: "→";
    margin-left: 5px;
}

.gallery {
    text-align: center;
    margin-bottom: 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    margin-top: 50px;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--color-shadow-medium);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

.gallery-item figcaption {
    margin-top: 15px;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-text-main);
}

/* ==========================================================================
   6. 光る見出しアニメーション
   ========================================================================== */

.hoshitui-title,
.ni,
.center-title,
.kokusai h2 {
    position: relative;
    display: table;
}

.kokusai h2 {
    font-size: 42px;
    margin: 30px auto;
}

.hoshitui-title::after,
.ni::after,
.center-title::after,
.kokusai h2::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--color-shine-effect), transparent);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* ==========================================================================
   7. 観測成果 / カレンダー
   ========================================================================== */

.kansoku {
    margin: 100px 0 50px 0;
}

.sub-section-title {
    padding-left: 15px;
    font-size: 24px;
    font-weight: bold;
    text-align: left;
    border-left: 5px solid var(--color-text-main);
    margin: 20px 0;
}

.section-intro {
    font-size: 18px;
    margin-bottom: 30px;
}

.asteroid-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.asteroid-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--color-shadow-light);
}

.asteroid-img {
    flex: 0 0 120px;
}

.asteroid-img img {
    width: 100%;
    border-radius: 6px;
}

.asteroid-info h4 {
    font-size: 20px;
    color: var(--color-primary-blue);
    margin: 0 0 5px 0;
}

.asteroid-info .date {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.asteroid-info .yurai {
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.observation-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-top: 80px;
}

.observation-flex.reverse {
    flex-direction: row-reverse;
}

.flex-text {
    width: 50%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
}

.flex-text p {
    line-height: 2.5rem;
}

.flex-img {
    width: 50%;
}

.flex-img img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.light-pollution-list {
    margin: 30px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.light-pollution-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

.inline-link {
    font-weight: bold;
    color: var(--color-primary-blue);
    text-decoration: underline;
    display: inline-block;
    padding: 30px 0;
}

.astronomy-calendar {
    margin: 150px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.month-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    overflow: hidden;
}

.month-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 20px;
    background: var(--color-text-main);
    color: var(--color-white);
    font-size: 24px;
    font-weight: bold;
}

.month-header .en {
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.7;
}

.event-body {
    flex-grow: 1;
    padding: 15px 20px;
    background: var(--color-bg-card);
}

.event-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--color-border-medium);
}

.event-item:last-child {
    border-bottom: none;
}

.date {
    flex: 0 0 45px;
    padding-top: 2px;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-accent-orange);
}

.content h4 {
    display: block;
    font-size: 16px;
    color: var(--color-text-main);
    text-align: left;
    border: none;
    margin: 0 0 5px 0;
}

.content h4.highlight {
    font-weight: bold;
    color: var(--color-accent-red);
}

.content p {
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin: 0;
}

.month-card.focus {
    border: 2px solid var(--color-accent-orange);
}

.month-card.focus .month-header {
    background: var(--color-accent-orange);
}

/* ==========================================================================
   8. ユーティリティ / その他
   ========================================================================== */

.k1::after {
    content: "\A";
    white-space: pre;
}

.tuki_color,
.hoshi_color {
    color: var(--color-accent-yellow);
    text-shadow:
        2px 2px 0 var(--color-text-main),
        -1px -1px 0 var(--color-text-main),
        1px -1px 0 var(--color-text-main),
        -1px 1px 0 var(--color-text-main);
}

#monthly-sky,
#monthly-moon,
#iss,
#gallery,
#observation {
    scroll-margin-top: 120px;
}

#monthly-moon {
    position: relative;
}

/* ==========================================================================
   9. レスポンシブ設定 (画面幅768px以下)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .main {
        padding: 40px 15px;
    }

    .hoshitui {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .hoshitui-text {
        width: 100%;
        order: 1;
    }

    .hoshitui-title {
        overflow: visible;
        padding-bottom: 0.1em;
        font-size: 14vw;
        line-height: 1.2;
        white-space: nowrap;
        text-align: left;
        margin-bottom: 10px;
    }

    .hoshitui-text h2 {
        font-size: 20px;
        line-height: 2rem;
        text-align: left;
        border-bottom: none;
        margin: 0 0 10px 0;
    }

    .hoshitui-text p {
        font-size: 15px;
        line-height: 1.5;
    }

    .hoshitui-image {
        width: 100%;
        order: 2;
        text-align: center;
        margin-top: 10px;
    }

    .hoshitui-image img {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
    }

    .center-title, .ni, .gallery .center-title {
        font-size: 24px;
        margin: 40px auto 20px;
        padding-bottom: 5px;
    }

    .slideshow-container {
        max-width: 100%;
        margin-bottom: 60px;
    }

    .slide-caption {
        font-size: 16px;
        line-height: 1.4;
        padding: 0 10px;
    }

    .hoshitui-left-bottom-image {
        top: 93%;
        left: 10%;
        width: 15%;
        animation: rocketLaunch 5s ease-in infinite;
        will-change: transform, opacity;
        transform: translateZ(0);
    }

    .hoshitui-right-bottom-image {
        top: -12%;
        right: -18%;
        width: 25%;
    }

    .hoshitui-left-moon-image {
        top: 95%;
        left: -18%;
        width: 25%;
    }

    .hoshitui-right-ginga-image {
        top: -7%;
        right: -3%;
        width: 22%;
        animation: rocketLaunch 5s ease-in infinite;
        will-change: transform, opacity;
    }

    .moon-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 30px 15px;
    }

    .moon-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .moon-item img {
        width: 100%;
        max-width: 110px;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        margin: 0 auto;
    }

    .moon-info {
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .moon-name {
        font-size: 1.1rem;
        line-height: 1.2;
        min-height: 1.2em;
        margin-bottom: 5px;
    }

    .moon-date {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;
    }

    #monthly-moon {
        margin: 50px;
    }

    .astronomy-calendar {
        margin: 50px 0;
    }

    .kokusai h2 {
        font-size: 32px;
        margin: 20px auto;
    }

    .yohou {
        flex-direction: column-reverse;
        text-align: center;
        gap: 15px;
        margin-bottom: 25px;
    }

    .yohou-text {
        width: 100%;
        padding: 10px;
    }

    .yohou-text .san {
        font-size: 24px;
        text-align: center;
        margin: 20px 0;
    }

    .yohou-text p {
        text-align: left;
        font-size: 13px;
        line-height: 2rem;
    }

    .yohou img {
        width: 100%;
        margin: 0 auto;
    }

    .sankou {
        margin-top: 30px;
        padding: 20px 15px;
    }

    .yon {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .sankou-intro {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .sankou-flex {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .sankou-item {
        width: 100%;
        box-sizing: border-box;
    }

    .sankou-item a {
        padding: 15px;
    }

    .sankou-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .sankou-desc {
        font-size: 12.5px;
        line-height: 1.5;
        margin-bottom: 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 15px;
        margin-top: 30px;
    }

    .gallery-item figcaption {
        font-size: 14px;
        margin-top: 10px;
    }

    .sub-section-title {
        font-size: 20px;
        margin: 20px 0;
    }

    .section-intro {
        font-size: 15px;
    }

    .asteroid-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 50px;
    }

    .asteroid-card {
        flex-direction: column;
        height: 100%;
        padding: 10px;
        background: var(--color-bg-light);
        text-align: center;
    }

    .asteroid-img {
        flex: 0 0 auto;
        width: 100%;
        max-width: 80px;
        margin: 0 auto 10px;
    }

    .asteroid-info h4 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .asteroid-info .date {
        font-size: 10px;
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .asteroid-info .yurai {
        font-size: 11px;
        line-height: 1.4;
        text-align: left;
    }

    .observation-flex, .observation-flex.reverse {
        display: flex;
        flex-direction: column-reverse;
        text-align: left;
        gap: 15px;
        margin-bottom: 40px;
    }

    .flex-img {
        width: 100%;
    }

    .flex-img img {
        width: 100%;
    }

    .flex-text {
        width: 100%;
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .flex-text p {
        font-size: 14px;
        line-height: 1.6;
    }

    .light-pollution-list li {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .k2::after, .k3::after, .k4::after {
        content: "\A";
        white-space: pre;
    }
}