/*
 * SUNIVA WORLD
 * Seven Colors Flower Garden
 */

.swf-garden {
    position: relative;
    margin: 32px 0;
    padding: 30px 26px;
    overflow: hidden;
    color: #40372f;
    border: 1px solid rgba(194, 156, 86, 0.22);
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 92% 5%,
            rgba(255, 226, 237, 0.72),
            transparent 34%
        ),
        radial-gradient(
            circle at 5% 94%,
            rgba(218, 239, 255, 0.75),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #fffefb 0%,
            #fffaf2 50%,
            #fff 100%
        );
    box-shadow:
        0 24px 60px rgba(75, 55, 33, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.swf-garden::before {
    position: absolute;
    top: -90px;
    right: -70px;
    width: 210px;
    height: 210px;
    content: "";
    pointer-events: none;
    border: 1px solid rgba(207, 168, 96, 0.16);
    border-radius: 50%;
}

.swf-garden[hidden],
.swf-rainbow[hidden],
.swf-planters[hidden] {
    display: none !important;
}

.swf-garden__heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.swf-garden__heading p {
    margin: 0 0 7px;
    color: #b18543;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.2em;
}

.swf-garden__heading h3 {
    margin: 0;
    color: #302923;
    font-family:
        "Hiragino Mincho ProN",
        "Yu Mincho",
        serif;
    font-size: clamp(23px, 4vw, 30px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.06em;
}

.swf-lumen {
    flex: 0 0 auto;
    min-width: 106px;
    padding: 10px 13px;
    color: #8e682f;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    border: 1px solid rgba(197, 153, 77, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 22px rgba(153, 112, 44, 0.08);
    backdrop-filter: blur(10px);
}

.swf-garden__story {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 16px 0 25px;
    color: #74695f;
    font-size: 13px;
    line-height: 1.9;
}

/*
 * Seven planters
 */

.swf-planters {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.swf-planter {
    position: relative;
    min-width: 0;
    min-height: 174px;
    padding: 13px 7px 12px;
    overflow: hidden;
    color: #494039;
    font: inherit;
    text-align: center;
    border: 1px solid rgba(160, 130, 91, 0.16);
    border-radius: 18px 18px 25px 25px;
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 24px rgba(71, 54, 36, 0.07);
    cursor: pointer;
    appearance: none;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.swf-planter::after {
    position: absolute;
    right: 8px;
    bottom: -9px;
    left: 8px;
    height: 31px;
    content: "";
    border-radius: 9px 9px 18px 18px;
    background:
        linear-gradient(
            180deg,
            #b8895e,
            #8f6343
        );
    opacity: 0.2;
}

.swf-planter:hover:not(:disabled),
.swf-planter:focus-visible {
    z-index: 2;
    transform: translateY(-4px);
    border-color: rgba(183, 137, 65, 0.48);
    box-shadow: 0 16px 30px rgba(90, 66, 39, 0.13);
}

.swf-planter.is-selected {
    border-color: rgba(189, 139, 57, 0.68);
    background: rgba(255, 252, 241, 0.96);
    box-shadow:
        0 0 0 3px rgba(221, 178, 103, 0.15),
        0 15px 30px rgba(91, 66, 34, 0.12);
}

.swf-planter.is-empty {
    cursor: default;
    opacity: 0.68;
    border-style: dashed;
    box-shadow: none;
}

.swf-planter__flower {
    display: block;
    min-height: 49px;
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1.35;
    filter: drop-shadow(0 6px 7px rgba(77, 56, 33, 0.12));
}

.swf-planter.is-empty .swf-planter__flower {
    color: #c8baa9;
    filter: none;
}

.swf-planter__color,
.swf-planter__stage,
.swf-planter__name,
.swf-planter__growth {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swf-planter__color {
    font-size: 11px;
    font-weight: 700;
}

.swf-planter__stage {
    margin-top: 5px;
    color: #8b7c6e;
    font-size: 10px;
}

.swf-planter__name {
    margin-top: 6px;
    color: #5f554c;
    font-size: 10px;
}

.swf-planter__growth {
    margin-top: 8px;
    color: #a0876a;
    font-size: 9px;
}

.swf-planter__progress {
    position: relative;
    z-index: 1;
    display: block;
    height: 4px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(107, 86, 62, 0.1);
}

.swf-planter__progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #dab463,
            #f1d590
        );
    transition: width 500ms ease;
}

.swf-planter--gold {
    box-shadow: inset 0 4px 0 #e7c76d;
}

.swf-planter--blue {
    box-shadow: inset 0 4px 0 #87ade8;
}

.swf-planter--aqua {
    box-shadow: inset 0 4px 0 #87d8dd;
}

.swf-planter--orange {
    box-shadow: inset 0 4px 0 #efa96c;
}

.swf-planter--green {
    box-shadow: inset 0 4px 0 #99c995;
}

.swf-planter--red {
    box-shadow: inset 0 4px 0 #e79591;
}

.swf-planter--purple {
    box-shadow: inset 0 4px 0 #bca1d6;
}

/*
 * Rainbow flower
 */

.swf-rainbow {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 145px 1fr;
    align-items: center;
    gap: 26px;
    min-height: 205px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(201, 163, 88, 0.25);
    border-radius: 25px;
    background:
        radial-gradient(
            circle at 15% 45%,
            rgba(255, 255, 255, 0.96),
            transparent 31%
        ),
        linear-gradient(
            120deg,
            rgba(255, 225, 226, 0.68),
            rgba(255, 241, 205, 0.67),
            rgba(220, 244, 226, 0.68),
            rgba(218, 236, 255, 0.72),
            rgba(237, 220, 249, 0.68)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 18px 45px rgba(105, 76, 49, 0.09);
}

.swf-rainbow::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(
            110deg,
            transparent 30%,
            rgba(255, 255, 255, 0.56) 49%,
            transparent 68%
        );
    transform: translateX(-100%);
    animation: swf-light 7s ease-in-out infinite;
}

.swf-rainbow__flower {
    position: relative;
    z-index: 1;
    display: grid;
    width: 135px;
    height: 135px;
    place-items: center;
    font-size: 78px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 20px 45px rgba(104, 74, 54, 0.12),
        inset 0 0 35px rgba(255, 255, 255, 0.85);
    animation: swf-float 4s ease-in-out infinite;
}

.swf-rainbow__body {
    position: relative;
    z-index: 1;
}

.swf-rainbow__body strong {
    display: block;
    color: #42372f;
    font-family:
        "Hiragino Mincho ProN",
        "Yu Mincho",
        serif;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 500;
    line-height: 1.45;
}

.swf-rainbow__body p {
    margin: 10px 0 17px;
    color: #6f6258;
    font-size: 13px;
    line-height: 1.8;
}

.swf-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 3px rgba(80, 61, 44, 0.1);
}

.swf-progress > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #e5a0a0,
            #edbf7a,
            #e5d376,
            #94c99a,
            #8ecbd8,
            #91aee1,
            #b292d1
        );
    transition: width 700ms ease;
}

.swf-rainbow__body small {
    display: block;
    margin-top: 8px;
    color: #806f61;
    font-size: 11px;
}

/*
 * Actions
 */

.swf-actions {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.swf-action-panel {
    padding: 17px;
    border: 1px solid rgba(172, 137, 82, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.swf-action-panel--plant {
    background: rgba(250, 255, 249, 0.82);
}

.swf-action-panel__title {
    display: block;
    margin-bottom: 11px;
    color: #4a4038;
    font-size: 13px;
}

.swf-action-panel__controls {
    display: flex;
    gap: 9px;
}

.swf-select {
    flex: 1 1 auto;
    min-width: 0;
    height: 45px;
    padding: 0 35px 0 13px;
    color: #4d443d;
    font: inherit;
    font-size: 13px;
    border: 1px solid rgba(143, 115, 75, 0.23);
    border-radius: 12px;
    outline: none;
    background-color: #fff;
}

.swf-select:focus {
    border-color: rgba(184, 137, 62, 0.65);
    box-shadow: 0 0 0 3px rgba(215, 173, 99, 0.13);
}

.swf-button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 9px 21px rgba(117, 80, 39, 0.16);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        opacity 160ms ease;
}

.swf-button:hover:not(:disabled),
.swf-button:focus-visible {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 13px 27px rgba(117, 80, 39, 0.22);
}

.swf-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.swf-button--primary {
    background:
        linear-gradient(
            135deg,
            #c4964e,
            #9e7236
        );
}

.swf-button--plant {
    background:
        linear-gradient(
            135deg,
            #78ad7d,
            #4e8660
        );
}

.swf-action-panel__note,
.swf-actions__guide {
    display: block;
    margin: 10px 0 0;
    color: #8a7a6d;
    font-size: 10px;
    line-height: 1.7;
}

.swf-actions__guide {
    margin: 0;
    padding: 14px 16px;
    font-size: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
}

.swf-message {
    position: relative;
    z-index: 1;
    margin: 13px 0 0;
    padding: 0;
    color: #5b5149;
    font-size: 12px;
    line-height: 1.7;
}

.swf-message:empty {
    display: none;
}

.swf-message.is-success,
.swf-message.is-error {
    padding: 12px 14px;
    border-radius: 12px;
}

.swf-message.is-success {
    color: #356a46;
    background: rgba(222, 244, 228, 0.88);
}

.swf-message.is-error {
    color: #9b4444;
    background: rgba(255, 229, 229, 0.9);
}

.swf-loading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 35px 15px;
    color: #897a6d;
    font-size: 12px;
    text-align: center;
}

.swf-loading::after {
    display: inline-block;
    margin-left: 5px;
    content: "•••";
    letter-spacing: 0.12em;
    animation: swf-pulse 1.3s ease-in-out infinite;
}

.swf-loading--error {
    color: #a04747;
}

/*
 * Tablet
 */

@media (max-width: 900px) {
    .swf-planters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .swf-planter {
        min-height: 160px;
    }
}

/*
 * Smartphone
 */

@media (max-width: 600px) {
    .swf-garden {
        margin: 24px -4px;
        padding: 24px 16px;
        border-radius: 23px;
    }

    .swf-garden__heading {
        align-items: center;
    }

    .swf-garden__heading h3 {
        font-size: 22px;
    }

    .swf-lumen {
        min-width: auto;
        padding: 8px 10px;
        font-size: 10px;
    }

    .swf-garden__story {
        margin: 14px 0 21px;
        font-size: 12px;
    }

    .swf-planters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .swf-planter {
        min-height: 154px;
        padding: 12px 8px;
    }

    .swf-planter:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 5px);
        justify-self: center;
    }

    .swf-planter__flower {
        min-height: 43px;
        font-size: 31px;
    }

    .swf-rainbow {
        display: block;
        padding: 24px 18px;
        text-align: center;
    }

    .swf-rainbow__flower {
        width: 112px;
        height: 112px;
        margin: 0 auto 20px;
        font-size: 64px;
    }

    .swf-rainbow__body strong {
        font-size: 21px;
    }

    .swf-rainbow__body p {
        font-size: 12px;
    }

    .swf-action-panel {
        padding: 14px;
    }

    .swf-action-panel__controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .swf-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swf-rainbow::before,
    .swf-rainbow__flower,
    .swf-loading::after {
        animation: none;
    }

    .swf-planter,
    .swf-button,
    .swf-progress > span,
    .swf-planter__progress > span {
        transition: none;
    }
}

@keyframes swf-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes swf-light {
    0%,
    52% {
        transform: translateX(-100%);
    }

    75%,
    100% {
        transform: translateX(100%);
    }
}

@keyframes swf-pulse {
    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}
