* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #08080d;
}

html[data-theme="night"] {
    color-scheme: dark;
}

/* 背景の空撮写真。昼は morning、夜は night。 */
#bg {
    position: fixed;
    inset: 0;
    background: url("./morning.png") center center / cover no-repeat;
    z-index: 0;
}

html[data-theme="night"] #bg {
    background-image: url("./night.png");
}

/* 周辺減光(ビネット)。視線を中央へ集め、空の奥行きを強める */
#bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        120% 90% at 50% 42%,
        transparent 58%,
        rgba(15, 30, 60, 0.18) 100%
    );
}

html[data-theme="night"] #bg::after {
    background: radial-gradient(
        120% 90% at 50% 42%,
        transparent 52%,
        rgba(0, 0, 10, 0.4) 100%
    );
}

/* もや・雲・ランタン・流れ星を描く Canvas。背景写真の上に重ねる */
#art {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* 画面中央の昼夜トグル。最前面に置く */
.toggle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.toggle:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%) scale(1.05);
}

.toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

.toggle-icon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    pointer-events: none;
}
