:root {
    --fresh-bg: #fffdfd;
    --fresh-surface: rgba(255, 255, 255, 0.82);
    --fresh-surface-strong: rgba(255, 255, 255, 0.94);
    --fresh-border: rgba(255, 181, 206, 0.34);
    --fresh-border-strong: rgba(140, 216, 204, 0.32);
    --fresh-text: #342634;
    --fresh-text-muted: #786b7b;
    --fresh-primary: #ff7ca8;
    --fresh-primary-deep: #ff5e91;
    --fresh-primary-soft: #ffe5ef;
    --fresh-secondary: #8edccd;
    --fresh-secondary-deep: #5cc9b5;
    --fresh-accent: #9c8cff;
    --fresh-warning: #ffca7a;
    --fresh-shadow: 0 18px 44px rgba(255, 124, 168, 0.14);
    --fresh-shadow-soft: 0 10px 24px rgba(120, 107, 123, 0.08);
    --fresh-radius-lg: 24px;
    --fresh-radius-md: 18px;
    --fresh-radius-sm: 14px;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overscroll-behavior-x: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    color: var(--fresh-text) !important;
    background:
        radial-gradient(circle at top left, rgba(255, 195, 222, 0.52), transparent 28%),
        radial-gradient(circle at top right, rgba(166, 237, 222, 0.38), transparent 26%),
        linear-gradient(180deg, #fffefe 0%, #fff6fb 45%, #f7fffcb5 100%) !important;
    position: relative;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

th,
td {
    word-break: break-word;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.78;
    pointer-events: none;
}

body::before {
    width: 220px;
    height: 220px;
    left: -60px;
    top: 40px;
    background: rgba(255, 182, 203, 0.28);
    clip-path: inset(0 0 0 60px);
}

body::after {
    width: 240px;
    height: 240px;
    right: -70px;
    bottom: 80px;
    background: rgba(142, 220, 205, 0.22);
    clip-path: inset(0 70px 0 0);
}

@keyframes freshFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

@keyframes freshLoadingPulse {
    0% { opacity: .72; box-shadow: var(--fresh-shadow-soft); }
    50% { opacity: 1; box-shadow: var(--fresh-shadow); }
    100% { opacity: .72; box-shadow: var(--fresh-shadow-soft); }
}

.wrap {
    width: min(100%, 1080px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero,
.card,
.block,
.status,
.brandTop,
.noticeTickerWrap,
.taskGroup,
.mineStat,
.cropCard,
.topbar,
.top,
.cert,
.inner,
.linkBox,
.envelope,
.footer,
.notice,
.mutedBox,
.metaItem {
    backdrop-filter: blur(10px);
}

.card,
.block,
.status,
.noticeTickerWrap,
.taskGroup,
.mineStat,
.cropCard,
.linkBox,
.envelope,
.cert,
.inner,
.metaItem,
table {
    background: var(--fresh-surface) !important;
    border-color: var(--fresh-border) !important;
    box-shadow: var(--fresh-shadow-soft);
}

.card,
.block,
.cropCard,
.envelope,
.cert,
.inner,
.status,
.linkBox,
.noticeTickerWrap,
.taskGroup,
.mineStat,
.metaItem,
table,
input,
textarea,
select,
.btn,
.task-btn,
.taskActionBtn,
.certBtn,
.ghostBtn,
button {
    border-radius: var(--fresh-radius-md) !important;
}

.top,
.topbar {
    background: rgba(255, 255, 255, 0.72) !important;
    border-bottom-color: rgba(255, 181, 206, 0.25) !important;
    backdrop-filter: blur(14px);
}

.brandTop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 181, 206, 0.24);
    background: rgba(255,255,255,0.72) !important;
}

.brandTop > a:first-child {
    flex: 0 0 auto;
    white-space: nowrap;
}

.brandTop a {
    color: var(--fresh-text) !important;
    text-decoration: none;
    font-weight: 800;
}

.brandTopMeta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.brandTopNote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(255, 181, 206, 0.28);
    color: var(--fresh-text-muted) !important;
    font-size: 12px;
    font-weight: 700;
}

.top a,
.topbar a,
.top b,
.title,
.h,
h1,
h2,
h3,
.mineName,
.blessTitle,
.taskCardTitle,
.taskTitle {
    color: var(--fresh-text) !important;
}

.sub,
.muted,
.k,
label,
.footer,
.footer .muted,
.mineMeta,
.taskState,
.noticeLine,
.p,
.status {
    color: var(--fresh-text-muted) !important;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 124, 168, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(142, 220, 205, 0.2), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(255, 244, 249, 0.92) 100%) !important;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.88), rgba(255,255,255,0));
    pointer-events: none;
}

.title,
.h {
    letter-spacing: 0.4px;
}

.price,
.v,
.days,
.loveid {
    background: linear-gradient(135deg, var(--fresh-primary-deep), #ff8e77 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.btn,
.taskCardBtn,
button.btn,
button.primary,
.seal,
.cropBtns .ok,
.certBtn.ready,
.bottom-nav button.active,
.dangerBtn:hover {
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-primary-deep)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(255, 94, 145, 0.22);
}

.btn.secondary,
.hero .btn[style],
.top button,
.task-btn,
.taskActionBtn,
.ghostBtn,
.btn.ghost,
.cropBtns button,
.certBtn,
.dangerBtn,
.bottom-nav button {
    background: rgba(255,255,255,0.88) !important;
    color: var(--fresh-text) !important;
    border: 1px solid rgba(255, 181, 206, 0.3) !important;
    box-shadow: none;
}

.btn.secondary,
.hero a.btn[href*="login"],
.top button,
.task-btn {
    border-color: rgba(142, 220, 205, 0.45) !important;
}

.btn:hover,
.task-btn:hover,
.taskActionBtn:hover,
.certBtn:hover,
.ghostBtn:hover,
button:hover {
    transform: translateY(-1px);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

input,
textarea,
select {
    background: rgba(255,255,255,0.92) !important;
    border: 1px solid rgba(255, 181, 206, 0.34) !important;
    color: var(--fresh-text) !important;
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 124, 168, 0.62) !important;
    box-shadow: 0 0 0 4px rgba(255, 124, 168, 0.12);
}

.footer {
    background: rgba(255,255,255,0.62) !important;
    border-top: 1px solid rgba(255, 181, 206, 0.24) !important;
    border-radius: 22px 22px 0 0;
}

.grid,
.two,
.mineGrid {
    gap: 12px !important;
}

.noticeTickerWrap,
.status,
.linkBox {
    background: rgba(255,255,255,0.9) !important;
}

.status.is-loading {
    border-color: rgba(142, 220, 205, 0.36) !important;
    animation: freshLoadingPulse 1.3s ease-in-out infinite;
}

.status.is-success {
    border-color: rgba(92, 201, 181, 0.4) !important;
    color: #13795b !important;
}

.status.is-error,
.status.error {
    border-color: rgba(240, 108, 108, 0.36) !important;
    color: #c73b4c !important;
}

.loadingNote,
.emptyState,
.inlineHint {
    border-radius: var(--fresh-radius-md) !important;
    border: 1px dashed rgba(255, 181, 206, 0.34);
    background: rgba(255,255,255,0.74);
    color: var(--fresh-text-muted) !important;
}

.loadingNote {
    padding: 12px 14px;
    animation: freshLoadingPulse 1.3s ease-in-out infinite;
}

.emptyState {
    padding: 14px 14px;
    text-align: center;
    line-height: 1.8;
}

.emptyState strong {
    display: block;
    margin-bottom: 6px;
    color: var(--fresh-text) !important;
    font-size: 15px;
}

.inlineHint {
    padding: 10px 12px;
    line-height: 1.8;
    font-size: 13px;
}

.envelope {
    background: linear-gradient(180deg, rgba(255, 242, 247, 0.95) 0%, rgba(255,255,255,0.9) 72%) !important;
}

.seal {
    box-shadow: 0 16px 34px rgba(255, 94, 145, 0.28) !important;
}

.coinHalf.on,
.progressInner {
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-primary-deep)) !important;
}

.bottom-nav {
    background: rgba(255,255,255,0.82) !important;
    border-top-color: rgba(255, 181, 206, 0.24) !important;
    backdrop-filter: blur(14px);
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bottom-nav button {
    border-radius: 0 !important;
}

.bottom-nav button.active {
    background: transparent !important;
    color: var(--fresh-primary) !important;
    box-shadow: none;
    position: relative;
}

.bottom-nav button.active::after {
    content: "";
    display: block;
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-secondary));
    margin: 6px auto 0;
}

.taskGroupHead,
.notice,
.mineStat,
.taskItem,
.blessItem,
.card {
    transition: transform .18s ease, box-shadow .18s ease;
}

.hero,
.panel,
.item,
.flowItem,
.tip,
.tipList > *,
.note,
.noteList > *,
.heroMetaItem,
.stat,
.metaItem,
.sectionCard {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.taskGroup.open,
.card:hover,
.mineStat:hover,
.noticeTickerWrap:hover {
    box-shadow: var(--fresh-shadow);
}

.hero:hover,
.panel:hover,
.item:hover,
.flowItem:hover,
.tip:hover,
.note:hover,
.heroMetaItem:hover,
.stat:hover,
.metaItem:hover,
.sectionCard:hover {
    transform: translateY(-2px);
    box-shadow: var(--fresh-shadow);
}

.badge,
.brandTopNote,
.heroBadge {
    animation: freshFloat 3.4s ease-in-out infinite;
}

.btn,
.task-btn,
.taskActionBtn,
.taskCardBtn,
.certBtn,
.ghostBtn,
.dangerBtn,
.cropBtns button,
button {
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(120, 107, 123, 0.72) !important;
}

::selection {
    background: rgba(255, 124, 168, 0.22);
    color: var(--fresh-text);
}

.cert {
    background: linear-gradient(180deg, rgba(255, 250, 252, 0.96), rgba(247, 255, 252, 0.9)) !important;
}

.inner {
    background: rgba(255,255,255,0.78) !important;
}

.dangerCard {
    background: linear-gradient(180deg, rgba(255, 249, 249, 0.95), rgba(255,255,255,0.85)) !important;
}

body.dialog-open {
    overflow: hidden;
}

#appDialogRoot {
    position: relative;
    z-index: 400;
}

.appDialogMask {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
    background: rgba(52, 38, 52, 0.42);
    backdrop-filter: blur(12px);
}

.appDialogMask[hidden] {
    display: none !important;
}

.appDialogMask.show {
    display: flex;
}

.appDialogPanel {
    width: min(100%, 420px);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,247,251,0.96));
    border: 1px solid rgba(255, 181, 206, 0.34);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(255, 94, 145, 0.18);
    padding: 16px;
    transform: translateY(0);
}

.appDialogBadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255, 181, 206, 0.32);
    color: var(--fresh-primary-deep);
    font-size: 12px;
    font-weight: 800;
}

.appDialogTitle {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--fresh-text);
}

.appDialogMessage {
    margin-top: 8px;
    color: var(--fresh-text-muted);
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
}

.appDialogActions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.appDialogBtn {
    min-height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(255, 181, 206, 0.3);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.appDialogBtn.primary {
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-primary-deep));
    color: #fff;
    border-color: transparent;
}

.appDialogBtn.secondary {
    background: rgba(255,255,255,0.9);
    color: var(--fresh-text);
}

.appToastStack {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.appToast {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease;
    background: rgba(52, 38, 52, 0.88);
    color: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 16px 36px rgba(52, 38, 52, 0.18);
}

.appToast.show {
    opacity: 1;
    transform: translateY(0);
}

.appToastText {
    font-size: 13px;
    line-height: 1.7;
}

@media (max-width: 840px) {
    body {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    .wrap {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .hero {
        padding-top: 28px !important;
    }

    .hero .btn,
    .btn,
    .task-btn,
    .taskCardBtn,
    .certBtn,
    .ghostBtn,
    .dangerBtn,
    .cropBtns button,
    .taskActionBtn {
        min-height: 44px !important;
        font-size: 15px !important;
    }

    .title,
    .h,
    h1 {
        font-size: clamp(24px, 7vw, 32px) !important;
    }

    .card,
    .block,
    .status {
        padding: 14px !important;
    }

    .top,
    .topbar {
        padding-top: max(14px, env(safe-area-inset-top)) !important;
    }

    .brandTop {
        padding-top: max(14px, env(safe-area-inset-top)) !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .grid,
    .two,
    .heroInner,
    .featureGrid,
    .heroStats,
    .heroCards,
    .heroMeta,
    .activityGrid,
    .mineGrid {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }

    .progressWrap,
    .row2 > *,
    .taskCardActions > * {
        width: 100% !important;
        min-width: 0 !important;
    }

    .appToastStack {
        bottom: calc(82px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 640px) {
    body::before {
        width: 150px;
        height: 150px;
        left: -45px;
        top: 18px;
        opacity: .62;
        clip-path: inset(0 0 0 45px);
    }

    body::after {
        width: 160px;
        height: 160px;
        right: -48px;
        bottom: 56px;
        opacity: .58;
        clip-path: inset(0 48px 0 0);
    }

    .wrap {
        width: 100%;
        max-width: 100%;
    }

    .brandTop {
        padding: max(10px, env(safe-area-inset-top)) 12px 10px !important;
        margin-bottom: 10px;
        gap: 8px;
    }

    .brandTopMeta {
        width: auto;
        flex: 0 1 auto;
        justify-content: space-between;
        gap: 6px;
    }

    .brandTopNote {
        font-size: 10px;
        padding: 6px 8px;
        max-width: 58vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brandTop a {
        font-size: 14px;
    }

    .hero,
    .card,
    .block,
    .status,
    .linkBox,
    .noticeTickerWrap,
    .cropCard,
    .mineStat,
    .metaItem,
    .taskGroup,
    .emptyState,
    .loadingNote,
    .inlineHint {
        border-radius: 16px !important;
    }

    .footer {
        font-size: 11px !important;
        line-height: 1.7 !important;
        padding: 14px 12px !important;
    }

    .muted,
    .sub,
    .p,
    .lead,
    .heroBuySub {
        font-size: 12px !important;
        line-height: 1.65 !important;
    }

    .btn,
    .task-btn,
    .taskCardBtn,
    .certBtn,
    .ghostBtn,
    .dangerBtn,
    .cropBtns button,
    .taskActionBtn {
        min-height: 46px !important;
        font-size: 15px !important;
    }

    .top,
    .topbar,
    .bottom-nav {
        width: 100%;
        max-width: 100%;
    }

    .top,
    .topbar {
        left: 0;
        right: 0;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .bottom-nav button {
        min-width: 0;
        padding-left: 4px;
        padding-right: 4px;
        font-size: 12px;
    }

    .appDialogMask {
        align-items: flex-end;
        padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
    }

    .appDialogPanel {
        width: 100%;
        border-radius: 22px;
        padding: 14px;
    }

    .appDialogTitle {
        font-size: 18px;
    }

    .appDialogActions {
        grid-template-columns: 1fr;
    }

    .appToastStack {
        left: 10px;
        right: 10px;
        bottom: calc(78px + env(safe-area-inset-bottom));
    }
}
