/* =========================================
   SUNIVA SCOPE UNIFIED
   Camera × Spatial World × Bottom Sheet
========================================= */

:root {
    --suniva-navy: #102d40;
    --suniva-gold: #d4a43c;
    --suniva-gold-light: #f2d486;
    --suniva-pearl: #fffdf8;
    --suniva-sheet: rgba(255, 253, 248, .96);
    --suniva-safe-top: env(safe-area-inset-top, 0px);
    --suniva-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* SUNIVA WORLD community: photo, like and edit actions */
.swu-gallery figure {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(23, 55, 68, .10);
}

.swu-gallery figure img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.swu-gallery figure figcaption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 14px 16px 16px;
}

.swu-gallery figure figcaption > span,
.swu-gallery figure figcaption > small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swu-gallery figure figcaption > small {
    color: #8a8175;
}

.swu-photo-like {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 78px;
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid rgba(178, 132, 42, .26);
    border-radius: 999px;
    color: #81611e;
    background: #fffaf0;
    font: inherit;
    cursor: pointer;
}

.swu-photo-like b {
    color: #c79a3b;
    font-size: 24px;
    line-height: 1;
}

.swu-photo-like.is-liked {
    color: #fff;
    border-color: #c99937;
    background: linear-gradient(135deg, #d9ad4b, #a97718);
}

.swu-photo-like.is-liked b {
    color: #fff;
}

.swu-edit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-top: 22px;
    padding: 12px 18px;
    border: 1px solid rgba(178, 132, 42, .32);
    border-radius: 999px;
    color: #72551d;
    background: rgba(255, 252, 245, .94);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.swu-sun-reward {
    margin: 14px 0;
    color: #756d62;
    text-align: center;
}

.swu-sun-reward strong {
    color: #ad7918;
}

@media (max-width: 767px) {
    .suniva-map-create-portal {
        position: fixed !important;
        left: 18px !important;
        right: auto !important;
        bottom: calc(106px + env(safe-area-inset-bottom)) !important;
        z-index: 12050 !important;
        display: flex !important;
        width: 64px !important;
        height: 64px !important;
        min-width: 64px !important;
        min-height: 64px !important;
        padding: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        border: 2px solid rgba(255, 229, 159, .92) !important;
        border-radius: 50% !important;
        color: #fff !important;
        background: linear-gradient(145deg, #d7a52f, #9f6e13) !important;
        box-shadow: 0 12px 28px rgba(85, 58, 12, .28) !important;
        text-decoration: none !important;
    }

    .suniva-map-create-portal > span {
        display: block !important;
        font-size: 25px !important;
        font-weight: 400 !important;
        line-height: .9 !important;
    }

    .suniva-map-create-portal > strong {
        display: block !important;
        max-width: 54px !important;
        overflow: hidden !important;
        font-size: 9px !important;
        font-weight: 800 !important;
        line-height: 1.15 !important;
        letter-spacing: .04em !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .suniva-map-create-portal > strong::after {
        content: '登録';
        display: block;
    }

    .suniva-map-create-portal > strong {
        font-size: 0 !important;
    }

    .suniva-map-create-portal > strong::after {
        font-size: 9px !important;
    }

    .swu-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .swu-gallery figure {
        border-radius: 16px;
    }

    .swu-gallery figure figcaption {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 8px;
        padding: 10px;
    }

    .swu-gallery figure figcaption > span,
    .swu-gallery figure figcaption > small {
        width: 100%;
    }

    .swu-photo-like {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        margin-top: 4px;
    }
}

/* =========================================
   全画面スコープ
========================================= */

.suniva-scope-panel--unified {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9000 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #081820 !important;
    box-shadow: none !important;
    transform: translateY(-105%) !important;
    transition:
        transform .55s
        cubic-bezier(.22, 1, .36, 1) !important;
}

html.is-suniva-scope-open
.suniva-scope-panel--unified {
    transform: translateY(0) !important;
}

.suniva-scope-visual--unified {
    position: absolute !important;
    inset: 0 !important;
    isolation: isolate;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        linear-gradient(
            180deg,
            #9fc2dc 0%,
            #e8d9ba 55%,
            #203c33 100%
        ) !important;
}

/* =========================================
   カメラ・背景
========================================= */

.suniva-scope-visual--unified
.suniva-scope-camera,

.suniva-scope-visual--unified
.suniva-scope-camera-fallback {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
}

.suniva-scope-visual--unified
.suniva-scope-camera-fallback {
    background-position: center !important;
    background-size: cover !important;
}

.suniva-scope-visual--unified
.suniva-scope-visual__shade {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(5, 20, 30, .28) 0%,
            transparent 22%,
            transparent 58%,
            rgba(4, 15, 19, .40) 100%
        ) !important;
}

.suniva-scope-visual--unified
.suniva-scope-visual__light {
    position: absolute !important;
    top: -18%;
    left: -30%;
    z-index: 3 !important;
    width: 92vw;
    height: 92vw;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(
            circle,
            rgba(255, 238, 184, .36),
            transparent 68%
        ) !important;
}

/* センサー用DOMは残して非表示 */
.suniva-scope-ar-target--sensor {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =========================================
   上部ポータル表示
========================================= */

.suniva-scope-portal-header {
    position: absolute !important;
    top: calc(var(--suniva-safe-top) + 18px) !important;
    left: 18px !important;
    z-index: 70 !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    width: auto !important;
    max-width: calc(100% - 92px) !important;
    padding: 10px 15px 10px 11px !important;
    border: 1px solid rgba(232, 195, 105, .80) !important;
    border-radius: 22px !important;
    color: #fffaf0 !important;
    background: rgba(10, 35, 51, .78) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .20) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.suniva-scope-emblem {
    display: grid !important;
    flex: 0 0 44px;
    place-items: center;
    width: 44px !important;
    height: 44px !important;
    border: 1px solid rgba(239, 207, 124, .86);
    border-radius: 50%;
    color: #ffe190;
    font-size: 22px;
    background: rgba(15, 45, 61, .88);
}

.suniva-scope-portal-header__copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.suniva-scope-portal-header__copy small {
    color: #e9c875;
    font-family: Georgia, serif;
    font-size: 9px;
    letter-spacing: .17em;
}

.suniva-scope-portal-header__copy strong {
    overflow: hidden;
    color: #fffdf7;
    font-family:
        "Hiragino Mincho ProN",
        "Yu Mincho",
        serif;
    font-size: clamp(15px, 4vw, 21px);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suniva-scope-portal-header__copy > span {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
}

.suniva-scope-collapse {
    position: absolute !important;
    top: calc(var(--suniva-safe-top) + 19px) !important;
    right: 17px !important;
    z-index: 80 !important;
    display: grid !important;
    place-items: center;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    padding: 0 !important;
    border: 1px solid rgba(231, 195, 104, .82) !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 35px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    background: rgba(10, 35, 51, .82) !important;
    box-shadow: 0 9px 25px rgba(0, 0, 0, .22) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* =========================================
   空間AR
========================================= */

.suniva-spatial-ar {
    position: absolute;
    inset: 0;
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
}

.suniva-spatial-ar[hidden] {
    display: none !important;
}

.suniva-spatial-ar__world {
    position: absolute;
    inset: 0;
    overflow: hidden;
    perspective: 1000px;
    pointer-events: none;
}

.suniva-spatial-object {
    --suniva-spatial-x: 0px;
    --suniva-spatial-y: 0px;
    --suniva-spatial-scale: 1;
    --suniva-spatial-opacity: 0;

    position: absolute;
    top: 51%;
    left: 50%;
    opacity: var(--suniva-spatial-opacity);
    transform:
        translate(-50%, -50%)
        translate(
            var(--suniva-spatial-x),
            var(--suniva-spatial-y)
        )
        scale(var(--suniva-spatial-scale));
    transform-origin: center bottom;
    transition: none;
    pointer-events: none;
    will-change: transform;
}

.suniva-spatial-object.is-visible {
    pointer-events: auto;
}

.suniva-spatial-object > button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

/* 武家屋敷 */
.suniva-spatial-building {
    width: min(72vw, 420px);
    height: min(48dvh, 480px);
    filter:
        drop-shadow(0 18px 30px rgba(0, 0, 0, .28));
}

.suniva-spatial-building > button {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background:
        var(
            --suniva-portal-building-image,
            url(
                "/html/img/suniva-world/portals/portal-modern-building-standard.png"
            )
        )
        center bottom / contain no-repeat;
    box-shadow: none;
}

.suniva-spatial-building::before {
    content: "";
    position: absolute;
    right: 7%;
    bottom: 2%;
    left: 7%;
    z-index: -1;
    height: 15%;
    border-radius: 50%;
    background:
        rgba(255, 255, 255, .34);
    filter: blur(13px);
}

html.is-suniva-owner-portal
.suniva-spatial-building {
    filter:
        drop-shadow(
            0 20px 30px
            rgba(0, 0, 0, .28)
        )
        drop-shadow(
            0 0 22px
            rgba(255, 211, 104, .74)
        );
}

html.is-suniva-owner-portal
.suniva-spatial-building::before {
    background:
        rgba(255, 218, 119, .76);
}

.suniva-spatial-building__roof,
.suniva-spatial-building__body,
.suniva-spatial-building__door {
    display: none !important;
}

.suniva-spatial-noren {
    position: absolute;
    right: 20%;
    bottom: 2%;
    left: 20%;
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 7px 8px 11px;
    border: 1px solid rgba(190, 143, 47, .82);
    border-radius: 4px 4px 10px 10px;
    color: #523a1e;
    font-family:
        "Hiragino Mincho ProN",
        "Yu Mincho",
        serif;
    font-size: clamp(10px, 2.9vw, 14px);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    background:
        linear-gradient(
            105deg,
            rgba(234, 218, 182, .96),
            rgba(255, 250, 240, .98) 48%,
            rgba(223, 198, 147, .96)
        );
    box-shadow: 0 7px 17px rgba(18, 12, 5, .26);
    transform-origin: center top;
    animation:
        sunivaNorenBreeze
        3.6s ease-in-out infinite alternate;
}

.suniva-spatial-noren::after {
    content: "";
    position: absolute;
    top: 42%;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(123, 85, 35, .42);
}

@keyframes sunivaNorenBreeze {
    from {
        transform:
            perspective(180px)
            rotateX(0deg)
            skewX(-.7deg);
    }

    to {
        transform:
            perspective(180px)
            rotateX(4deg)
            skewX(1deg);
    }
}

/* 中央花 */
.suniva-spatial-main-flower {
    width: min(64vw, 340px);
    height: min(64vw, 340px);
}

.suniva-spatial-main-flower__bloom {
    position: absolute;
    top: 1%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    color: #fff4bd;
    font-size: clamp(70px, 23vw, 128px);
    line-height: 1;
    text-shadow:
        0 0 9px #fff,
        0 0 25px rgba(255, 205, 94, .94),
        0 0 52px rgba(255, 161, 198, .72);
    background:
        radial-gradient(
            circle,
            rgba(255, 243, 183, .74),
            rgba(255, 171, 202, .30) 48%,
            transparent 72%
        );
    transform: translateX(-50%);
    animation:
        sunivaFlowerBreathe
        3.1s ease-in-out infinite alternate;
}

.suniva-spatial-main-flower__stem {
    position: absolute;
    top: 43%;
    bottom: 18%;
    left: 50%;
    width: 9px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            #315f3b,
            #80b66b,
            #2d5636
        );
    transform: translateX(-50%);
}

.suniva-spatial-main-flower__bed {
    position: absolute;
    right: 6%;
    bottom: 5%;
    left: 6%;
    height: 24%;
    border: 2px solid rgba(240, 205, 114, .88);
    border-radius: 50%;
    background:
        radial-gradient(
            ellipse,
            rgba(69, 82, 52, .96),
            rgba(33, 51, 35, .96) 59%,
            rgba(217, 183, 99, .86) 62%,
            transparent 73%
        );
    box-shadow: 0 0 29px rgba(255, 215, 118, .46);
}

@keyframes sunivaFlowerBreathe {
    from {
        transform:
            translateX(-50%)
            scale(.95)
            rotate(-1deg);
    }

    to {
        transform:
            translateX(-50%)
            scale(1.05)
            rotate(1deg);
    }
}

/* 左右花壇 */
.suniva-spatial-side-garden {
    width: min(62vw, 330px);
    height: min(38vw, 205px);
}

.suniva-spatial-side-garden__flowers {
    position: absolute;
    right: 4%;
    bottom: 34%;
    left: 4%;
    color: #fff1be;
    font-size: clamp(26px, 8vw, 50px);
    text-align: center;
    text-shadow:
        0 0 9px #fff,
        0 0 22px rgba(255, 175, 207, .84);
}

.suniva-spatial-side-garden__bed {
    position: absolute;
    right: 2%;
    bottom: 5%;
    left: 2%;
    height: 43%;
    border: 2px solid rgba(237, 201, 109, .84);
    border-radius: 50%;
    background:
        radial-gradient(
            ellipse,
            rgba(72, 84, 52, .95),
            rgba(34, 52, 36, .96) 60%,
            rgba(214, 179, 94, .78) 63%,
            transparent 74%
        );
}

/* 空間案内 */
.suniva-spatial-ar__hint {
    position: absolute;
    right: 18px;
    bottom: calc(
        108px + var(--suniva-safe-bottom)
    );
    left: 18px;
    z-index: 24;
    width: fit-content;
    max-width: calc(100% - 36px);
    margin: auto;
    padding: 7px 13px;
    border: 1px solid rgba(232, 196, 106, .62);
    border-radius: 999px;
    color: #fff9e9;
    font-size: 11px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .72);
    background: rgba(12, 35, 47, .62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation:
        sunivaHintRest
        5s ease forwards;
}

@keyframes sunivaHintRest {
    0%,
    70% {
        opacity: 1;
    }

    100% {
        opacity: .38;
    }
}

/* =========================================
   下部スライドパネル
========================================= */

.suniva-scope-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: block;
    height: min(72dvh, 680px);
    padding-bottom: var(--suniva-safe-bottom);
    overflow: hidden;
    border: 1px solid rgba(221, 194, 128, .62);
    border-bottom: 0;
    border-radius: 30px 30px 0 0;
    background: var(--suniva-sheet);
    box-shadow: 0 -16px 42px rgba(8, 27, 37, .25);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transform:
        translateY(
            calc(100% - 94px - var(--suniva-safe-bottom))
        );
    transition:
        transform .48s
        cubic-bezier(.22, 1, .36, 1);
}

.suniva-scope-sheet.is-open {
    transform: translateY(0);
}

.suniva-scope-sheet__handle {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    min-height: 94px;
    padding:
        23px 22px
        13px;
    border: 0;
    color: var(--suniva-navy);
    text-align: left;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.suniva-scope-sheet__grabber {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(31, 52, 62, .22);
    transform: translateX(-50%);
}

.suniva-scope-sheet__summary {
    display: grid;
    gap: 2px;
}

.suniva-scope-sheet__summary small {
    color: #a77a28;
    font-size: 10px;
    letter-spacing: .12em;
}

.suniva-scope-sheet__summary strong {
    color: #183a4c;
    font-family:
        "Hiragino Mincho ProN",
        "Yu Mincho",
        serif;
    font-size: clamp(15px, 4vw, 19px);
    font-weight: 600;
}

.suniva-scope-sheet__chevron {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(204, 164, 76, .42);
    border-radius: 50%;
    color: #ac7c25;
    font-size: 20px;
    background: rgba(255, 255, 255, .70);
    transition: transform .35s ease;
}

.suniva-scope-sheet.is-open
.suniva-scope-sheet__chevron {
    transform: rotate(180deg);
}

.suniva-scope-sheet__body {
    height: calc(100% - 94px);
    padding:
        5px 20px
        calc(26px + var(--suniva-safe-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* 7色プランター */
.suniva-scope-sheet
.suniva-scope-flowers {
    position: static !important;
    display: grid !important;
    grid-template-columns:
        repeat(7, minmax(38px, 1fr));
    gap: 7px !important;
    width: 100% !important;
    margin: 5px 0 20px !important;
    padding: 0 !important;
    transform: none !important;
}

.suniva-scope-sheet
.suniva-scope-flowers button {
    position: relative;
    display: grid;
    grid-template-rows: 42px auto;
    gap: 5px;
    place-items: center;
    min-width: 0;
    padding: 7px 2px 9px;
    border: 1px solid rgba(210, 189, 145, .46);
    border-radius: 17px;
    color: #736d64;
    background: rgba(255, 255, 255, .72);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .42);
}

.suniva-scope-sheet
.suniva-scope-flowers button i {
    display: block;
    width: 30px;
    height: 39px;
    border-radius: 50% 50% 42% 42%;
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(255, 255, 255, .96) 0 4px,
            transparent 5px
        ),
        linear-gradient(
            180deg,
            #e9e1d3,
            #cfc3b0
        );
    box-shadow:
        inset 0 -7px 10px rgba(101, 77, 47, .14);
}

.suniva-scope-sheet
.suniva-scope-flowers button small {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="gold"] i {
    background: linear-gradient(#ffe996, #c9992f);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="blue"] i {
    background: linear-gradient(#9fc9ff, #426fc4);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="aqua"] i {
    background: linear-gradient(#bff7ff, #4bbbd3);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="orange"] i {
    background: linear-gradient(#ffd39c, #e57d28);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="green"] i {
    background: linear-gradient(#c6edaf, #55a34f);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="red"] i {
    background: linear-gradient(#ffb3b3, #d9434b);
}

.suniva-scope-sheet
.suniva-scope-flowers
[data-scope-flower="purple"] i {
    background: linear-gradient(#debfff, #8f55c3);
}

.suniva-scope-sheet__message {
    margin: 0 0 12px !important;
    padding: 16px 18px !important;
    border: 1px solid rgba(204, 224, 230, .78);
    border-radius: 20px;
    color: #325064 !important;
    font-size: 14px !important;
    line-height: 1.7;
    background:
        linear-gradient(
            135deg,
            rgba(235, 247, 255, .92),
            rgba(255, 255, 255, .84)
        );
}

.suniva-scope-sheet__instruction {
    margin: 0;
    color: #727b80;
    font-size: 12px;
    line-height: 1.7;
}

/* 処理用IDは残して画面から外す */
.suniva-scope-sheet
.suniva-scope-actions {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 地図側の旧ハンドルはスコープ中に隠す */
html.is-suniva-scope-open
.suniva-scope-handle {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* カメラ許可画面 */
.suniva-scope-camera-notice {
    z-index: 100 !important;
}

/* =========================================
   PC表示
========================================= */

@media (min-width: 768px) {
    .suniva-scope-panel--unified {
        left: 50% !important;
        width: min(100%, 720px) !important;
        transform:
            translate(-50%, -105%) !important;
        box-shadow:
            0 0 80px rgba(0, 0, 0, .36) !important;
    }

    html.is-suniva-scope-open
    .suniva-scope-panel--unified {
        transform:
            translate(-50%, 0) !important;
    }

    .suniva-spatial-building {
        width: min(76%, 540px);
        height: min(66vh, 620px);
    }

    .suniva-scope-sheet {
        right: 22px;
        bottom: 18px;
        left: 22px;
        border: 1px solid rgba(221, 194, 128, .62);
        border-radius: 30px;
    }
}

/* =========================================
   小型スマートフォン
========================================= */

@media (max-width: 390px) {
    .suniva-scope-portal-header {
        left: 12px !important;
        max-width: calc(100% - 76px) !important;
        padding: 8px 11px 8px 8px !important;
    }

    .suniva-scope-emblem {
        flex-basis: 38px;
        width: 38px !important;
        height: 38px !important;
    }

    .suniva-scope-collapse {
        right: 11px !important;
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
    }

    .suniva-spatial-building {
        width: 74vw;
        height: 46dvh;
    }

    .suniva-spatial-noren {
        right: 24%;
        left: 24%;
        min-height: 40px;
        font-size: 10px;
    }

    .suniva-scope-sheet
    .suniva-scope-flowers {
        gap: 4px !important;
    }

    .suniva-scope-sheet
    .suniva-scope-flowers button {
        grid-template-rows: 34px auto;
        border-radius: 13px;
    }

    .suniva-scope-sheet
    .suniva-scope-flowers button i {
        width: 25px;
        height: 32px;
    }
}

/* =========================================
   動きを減らす設定
========================================= */

@media (prefers-reduced-motion: reduce) {
    .suniva-scope-panel--unified,
    .suniva-scope-sheet,
    .suniva-spatial-object,
    .suniva-spatial-noren,
    .suniva-spatial-main-flower__bloom {
        transition: none !important;
        animation: none !important;
    }
}

/* SUNIVA RAINBOW COMPLETE FLOWER */

html.is-suniva-rainbow-flower
.suniva-spatial-main-flower {
    width: min(82vw, 440px);
    height: min(58dvh, 540px);
    filter:
        drop-shadow(
            0 18px 34px
            rgba(0, 0, 0, .28)
        )
        drop-shadow(
            0 0 30px
            rgba(255, 213, 105, .48)
        );
}

html.is-suniva-rainbow-flower
.suniva-spatial-main-flower > button {
    overflow: visible;
    background:
        url(
            "/html/img/suniva-world/flowers/flower-rainbow-complete.png"
        )
        center center / contain no-repeat;
}

html.is-suniva-rainbow-flower
.suniva-spatial-main-flower__bloom,
html.is-suniva-rainbow-flower
.suniva-spatial-main-flower__stem,
html.is-suniva-rainbow-flower
.suniva-spatial-main-flower__bed {
    display: none !important;
}

html.is-suniva-rainbow-flower
.suniva-spatial-main-flower::before {
    content: "";
    position: absolute;
    top: 5%;
    left: 50%;
    z-index: -1;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(
            circle,
            rgba(255, 248, 205, .48),
            rgba(255, 213, 113, .16) 48%,
            transparent 72%
        );
    transform: translateX(-50%);
    animation:
        sunivaRainbowAura
        3.4s ease-in-out infinite alternate;
}

@keyframes sunivaRainbowAura {
    from {
        opacity: .65;
        transform:
            translateX(-50%)
            scale(.94);
    }

    to {
        opacity: 1;
        transform:
            translateX(-50%)
            scale(1.06);
    }
}

@media (max-width: 390px) {
    html.is-suniva-rainbow-flower
    .suniva-spatial-main-flower {
        width: 84vw;
        height: 52dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.is-suniva-rainbow-flower
    .suniva-spatial-main-flower::before {
        animation: none !important;
    }
}

/* SUNIVA ANDROID SCOPE GHOST GUARD START */
html:not(.is-suniva-scope-open)
.suniva-scope-panel--unified {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
}

html.is-suniva-scope-open
.suniva-scope-panel--unified {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

html:not(.is-suniva-scope-open)
.suniva-scope-spatial,
html:not(.is-suniva-scope-open)
.suniva-spatial-object {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
/* SUNIVA ANDROID SCOPE GHOST GUARD END */
