/* Fresh page system -------------------------------------------------------
   A shared visual layer for every screen. Existing page markup and behavior
   stay intact; page-specific body classes are generated in includes/header.php.
------------------------------------------------------------------------- */

body.site-refresh {
    --fresh-green: #1b9a57;
    --fresh-green-dark: #117a42;
    --fresh-green-soft: #eaf8f0;
    --fresh-blue: #3977d5;
    --fresh-blue-soft: #edf5ff;
    --fresh-mint: #58d6aa;
    --fresh-ink: #17231d;
    --fresh-muted: #67746d;
    --fresh-line: #dfe9e3;
    --fresh-surface: rgba(255, 255, 255, 0.94);
    --fresh-shadow: 0 18px 50px rgba(36, 75, 54, 0.09);
    --fresh-shadow-soft: 0 8px 26px rgba(36, 75, 54, 0.07);
    color: var(--fresh-ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(88, 214, 170, 0.11), transparent 24rem),
        radial-gradient(circle at 92% 20%, rgba(104, 167, 255, 0.10), transparent 28rem),
        #f5f9f7;
}

body.site-refresh main {
    min-height: calc(100vh - 170px);
}

body.site-refresh:not(.home-main-view) main {
    padding-top: 18px;
}

body.site-refresh:not(.home-main-view) .section {
    padding-top: 32px;
    padding-bottom: 72px;
}

body.site-refresh:not(.home-main-view) .container,
body.site-refresh:not(.home-main-view) .wide-container {
    position: relative;
}

/* Page heading */
body.site-refresh:not(.home-main-view) .section-title {
    position: relative;
    align-items: center;
    min-height: 112px;
    margin-bottom: 22px;
    padding: 25px 30px;
    overflow: hidden;
    border: 1px solid rgba(27, 154, 87, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(115deg, rgba(235, 250, 242, 0.98), rgba(244, 250, 255, 0.96)),
        #fff;
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh:not(.home-main-view) .section-title::before {
    content: "";
    position: absolute;
    top: -46px;
    right: 5%;
    width: 156px;
    height: 156px;
    border: 30px solid rgba(66, 174, 116, 0.08);
    border-radius: 50%;
}

body.site-refresh:not(.home-main-view) .section-title::after {
    content: "";
    position: absolute;
    right: 25%;
    bottom: -26px;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: rgba(93, 155, 232, 0.08);
    transform: rotate(24deg);
}

body.site-refresh:not(.home-main-view) .section-title > * {
    position: relative;
    z-index: 1;
}

body.site-refresh:not(.home-main-view) .section-title h1,
body.site-refresh:not(.home-main-view) .section-title h2 {
    color: var(--fresh-ink);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.045em;
}

body.site-refresh:not(.home-main-view) .section-title p {
    max-width: 670px;
    margin-top: 9px;
    color: var(--fresh-muted);
    line-height: 1.7;
}

body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head) {
    position: relative;
    min-height: 112px;
    margin-bottom: 22px;
    padding: 25px 30px;
    overflow: hidden;
    border: 1px solid rgba(27, 154, 87, 0.14);
    border-radius: 24px;
    background: linear-gradient(115deg, rgba(235, 250, 242, 0.98), rgba(244, 250, 255, 0.96));
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head)::after {
    content: "";
    position: absolute;
    right: 8%;
    bottom: -62px;
    width: 150px;
    height: 150px;
    border: 28px solid rgba(57, 119, 213, 0.07);
    border-radius: 50%;
}

body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head) > * {
    position: relative;
    z-index: 1;
}

body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head) h1 {
    margin: 0;
    color: var(--fresh-ink);
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.045em;
}

body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head) p {
    margin: 9px 0 0;
    color: var(--fresh-muted);
    line-height: 1.7;
}

/* Surfaces and cards */
body.site-refresh :is(
    .form-card, .detail-card, .search-card, .admin-card, .empty-card,
    .community-view, .comment-section, .phone-box, .favorite-property-card,
    .point-summary-card, .point-summary-box, .point-item-card,
    .point-shop-guide-card, .point-history-item, .popular-community-card,
    .mission-card, .badge-card, .title-card, .collection-card,
    .fortune-card, .fortune-result-card
) {
    border: 1px solid var(--fresh-line);
    border-radius: 22px;
    background: var(--fresh-surface);
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh :is(.form-card, .detail-card, .admin-card, .community-view) {
    padding: clamp(22px, 3vw, 34px);
}

body.site-refresh :is(.form-card, .detail-card, .community-view) > h1:first-child,
body.site-refresh :is(.form-card, .detail-card, .community-view) > h2:first-child {
    margin-top: 0;
    color: var(--fresh-ink);
    letter-spacing: -0.035em;
}

body.site-refresh .empty-card {
    padding: 54px 24px;
    color: var(--fresh-muted);
    text-align: center;
}

body.site-refresh .favorite-property-card,
body.site-refresh .point-item-card,
body.site-refresh .mission-card,
body.site-refresh .badge-card,
body.site-refresh .title-card,
body.site-refresh .collection-card {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.site-refresh :is(
    .favorite-property-card, .point-item-card, .mission-card,
    .badge-card, .title-card, .collection-card
):hover {
    transform: translateY(-4px);
    border-color: rgba(27, 154, 87, 0.30);
    box-shadow: var(--fresh-shadow);
}

/* Forms */
body.site-refresh label {
    margin-bottom: 8px;
    color: #34463c;
    font-size: 14px;
    font-weight: 800;
}

body.site-refresh :is(input, select, textarea) {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9e5de;
    border-radius: 13px;
    color: var(--fresh-ink);
    background: #fbfdfc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.site-refresh textarea {
    min-height: 132px;
}

body.site-refresh :is(input, select, textarea):hover {
    border-color: #bcd2c5;
    background: #fff;
}

body.site-refresh :is(input, select, textarea):focus {
    border-color: var(--fresh-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 154, 87, 0.11);
}

body.site-refresh :is(input[type="checkbox"], input[type="radio"]) {
    width: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--fresh-green);
}

body.site-refresh :is(.option-checks, .checkbox-group, .radio-group) label {
    border-color: var(--fresh-line);
    border-radius: 13px;
    background: #f7fbf8;
}

body.site-refresh .form-grid {
    gap: 20px 18px;
}

body.site-refresh .form-actions {
    gap: 10px;
    margin-top: 24px;
}

/* Buttons and compact links */
body.site-refresh .btn {
    min-height: 45px;
    padding: 11px 18px;
    border-radius: 13px;
    background: linear-gradient(135deg, #25a760, #168a4b);
    color: #fff;
    box-shadow: 0 8px 18px rgba(27, 154, 87, 0.17);
}

body.site-refresh .btn:hover {
    background: linear-gradient(135deg, #1d9855, #107740);
    box-shadow: 0 12px 24px rgba(27, 154, 87, 0.23);
}

body.site-refresh :is(.btn-secondary, .btn.secondary) {
    border: 1px solid #d6e3f7;
    background: var(--fresh-blue-soft);
    color: #2d67bb;
    box-shadow: none;
}

body.site-refresh :is(.btn-secondary, .btn.secondary):hover {
    border-color: #bed3f3;
    background: #e3efff;
    color: #24599f;
    box-shadow: none;
}

body.site-refresh .btn-dark {
    background: #25352d;
}

body.site-refresh .btn-danger {
    background: #e75c67;
    box-shadow: 0 8px 18px rgba(231, 92, 103, 0.15);
}

body.site-refresh :is(.point-link, .more-link, .view-all-link) {
    color: var(--fresh-green-dark);
    font-weight: 800;
}

/* Alerts, badges and tabs */
body.site-refresh :is(.alert, .notice, .guide-box, .info-box) {
    border: 1px solid #dbe9e1;
    border-radius: 16px;
    background: #f0faf5;
}

body.site-refresh :is(.point-tabs, .community-tabs, .admin-tabs) {
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--fresh-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

body.site-refresh :is(.point-tabs, .community-tabs, .admin-tabs) a {
    border-radius: 11px;
}

body.site-refresh :is(.point-tabs, .community-tabs, .admin-tabs) a.active {
    background: var(--fresh-green-soft);
    color: var(--fresh-green-dark);
    box-shadow: inset 0 0 0 1px rgba(27, 154, 87, 0.15);
}

body.site-refresh :is(.badge, .status-badge, .point-badge, .category-badge) {
    border-radius: 999px;
}

/* Lists and tables */
body.site-refresh :is(
    .property-excel-list, .community-list-table, .admin-users-table-wrap,
    .admin-table-wrap, .point-history-list
) {
    overflow: hidden;
    border: 1px solid var(--fresh-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh :is(.property-excel-row, .community-row, .point-history-item) {
    border-color: #e8efeb;
    transition: background .16s ease;
}

body.site-refresh :is(.property-excel-row, .community-row, .point-history-item):hover {
    background: #f2faf6;
}

body.site-refresh :is(.admin-users-table, .admin-table) th {
    color: #506159;
    background: #eef7f2;
    font-size: 13px;
}

body.site-refresh :is(.admin-users-table, .admin-table) td {
    border-color: #e7eee9;
}

body.site-refresh .pagination {
    gap: 6px;
    margin-top: 26px;
}

body.site-refresh .pagination a,
body.site-refresh .pagination span {
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--fresh-line);
    border-radius: 11px;
    background: #fff;
}

body.site-refresh .pagination .active,
body.site-refresh .pagination a.active {
    border-color: var(--fresh-green);
    background: var(--fresh-green);
    color: #fff;
}

/* Authentication and write screens */
body.site-refresh.page-login main .container,
body.site-refresh.page-find-account main .container,
body.site-refresh.page-reset-password main .container {
    max-width: 600px;
}

body.site-refresh:is(.page-login, .page-register, .page-find-account, .page-reset-password) .form-card {
    position: relative;
    overflow: hidden;
}

body.site-refresh:is(.page-login, .page-register, .page-find-account, .page-reset-password) .form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--fresh-green), var(--fresh-mint), #70a6ed);
}

body.site-refresh:is(.page-register, .page-submit, .page-community-write) main .container {
    max-width: 1040px;
}

/* Property screens */
body.site-refresh .detail-layout {
    gap: 24px;
}

body.site-refresh .phone-box {
    border-color: rgba(27, 154, 87, 0.20);
    background: linear-gradient(145deg, #effaf4, #f7fbff);
}

body.site-refresh .property-gallery,
body.site-refresh .detail-main-image {
    overflow: hidden;
    border-radius: 18px;
    background: #edf3ef;
}

body.site-refresh .favorite-property-card {
    overflow: hidden;
}

/* Community */
body.site-refresh .community-view {
    overflow: hidden;
}

body.site-refresh .community-category-filter {
    margin-bottom: 12px;
}

body.site-refresh .community-tabs {
    border: 1px solid var(--fresh-line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh .community-tabs a.active {
    background: var(--fresh-green-soft);
    color: var(--fresh-green-dark);
}

body.site-refresh .community-view-header {
    padding-bottom: 22px;
    border-bottom-color: var(--fresh-line);
}

body.site-refresh .community-view-content {
    color: #2d3c34;
    line-height: 1.85;
}

body.site-refresh :is(.community-filter, .community-search-form) {
    padding: 14px;
    border: 1px solid var(--fresh-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--fresh-shadow-soft);
}

/* Point, collection and play pages */
body.site-refresh:is(
    .page-point-shop, .page-point-history, .page-point-roulette,
    .page-fortune, .page-missions, .page-badges, .page-titles, .page-collection
) {
    background:
        radial-gradient(circle at 85% 10%, rgba(112, 166, 237, 0.14), transparent 25rem),
        radial-gradient(circle at 10% 28%, rgba(88, 214, 170, 0.14), transparent 24rem),
        #f6faf8;
}

body.site-refresh .point-summary-box {
    border-color: rgba(57, 119, 213, 0.16);
    background: linear-gradient(135deg, #eff8f4, #eef5ff);
}

body.site-refresh .point-item-card {
    overflow: hidden;
}

body.site-refresh .point-category-badge {
    background: var(--fresh-green-soft);
    color: var(--fresh-green-dark);
}

body.site-refresh .fortune-card,
body.site-refresh .fortune-result-card {
    background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(241,249,255,.94));
}

/* My page and admin */
body.site-refresh :is(.mypage-menu, .my-page-menu, .admin-sidebar) {
    border: 1px solid var(--fresh-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh .my-page-section-tabs {
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--fresh-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--fresh-shadow-soft);
}

body.site-refresh .my-page-section-tabs a {
    border-radius: 11px;
}

body.site-refresh .my-page-section-tabs a.is-active {
    background: var(--fresh-green-soft);
    color: var(--fresh-green-dark);
}

body.site-refresh :is(.mypage-menu, .my-page-menu, .admin-sidebar) a {
    border-radius: 11px;
}

body.site-refresh :is(.mypage-menu, .my-page-menu, .admin-sidebar) a:hover,
body.site-refresh :is(.mypage-menu, .my-page-menu, .admin-sidebar) a.active {
    background: var(--fresh-green-soft);
    color: var(--fresh-green-dark);
}

body.site-refresh[class*="page-admin-"] {
    background: #f3f7f5;
}

body.site-refresh[class*="page-admin-"] .section-title {
    border-color: rgba(57, 119, 213, 0.16);
    background: linear-gradient(115deg, #edf7f2, #edf4ff);
}

body.site-refresh .admin-toolbar,
body.site-refresh .admin-user-filter {
    padding: 14px;
    border: 1px solid var(--fresh-line);
    border-radius: 16px;
    background: rgba(255,255,255,.88);
}

/* Footer */
body.site-refresh .site-footer {
    margin-top: 30px;
    border-top: 1px solid #dce8e1;
    color: #617168;
    background: rgba(239, 247, 243, 0.88);
}

body.site-refresh .site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
    padding-bottom: 28px;
}

body.site-refresh .site-footer p {
    margin: 0;
}

@media (max-width: 760px) {
    body.site-refresh:not(.home-main-view) main {
        padding-top: 4px;
    }

    body.site-refresh:not(.home-main-view) .section {
        padding-top: 20px;
        padding-bottom: 48px;
    }

    body.site-refresh:not(.home-main-view) .section-title {
        min-height: 0;
        padding: 20px;
        border-radius: 19px;
        align-items: flex-start;
    }

    body.site-refresh:not(.home-main-view) :is(.community-head, .point-shop-head) {
        min-height: 0;
        padding: 20px;
        border-radius: 19px;
    }

    body.site-refresh .community-head {
        align-items: stretch;
    }

    body.site-refresh .community-head-actions {
        width: 100%;
    }

    body.site-refresh .community-head-actions .btn {
        flex: 1;
    }

    body.site-refresh:not(.home-main-view) .section-title h1,
    body.site-refresh:not(.home-main-view) .section-title h2 {
        font-size: 25px;
    }

    body.site-refresh :is(.form-card, .detail-card, .admin-card, .community-view) {
        padding: 20px;
        border-radius: 18px;
    }

    body.site-refresh .form-grid {
        gap: 15px;
    }

    body.site-refresh .form-actions,
    body.site-refresh .section-title {
        flex-direction: column;
    }

    body.site-refresh .form-actions .btn,
    body.site-refresh .section-title > .btn {
        width: 100%;
    }

    body.site-refresh :is(.community-filter, .community-search-form, .admin-toolbar) {
        padding: 11px;
        border-radius: 15px;
    }

    body.site-refresh .site-footer .container {
        display: grid;
        gap: 7px;
        padding-top: 23px;
        padding-bottom: 23px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.site-refresh *,
    body.site-refresh *::before,
    body.site-refresh *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
