:root {
    --app-sidebar-width: 308px;
    --app-sidebar-peek-width: 34px;
    --app-header-height: 84px;
    --app-content-max-width: 1024px;
}

html,
body {
    min-height: 100%;
}

body.app-shell-body {
    background:
        radial-gradient(circle at top left, rgba(61, 226, 89, 0.12), transparent 32%),
        var(--ui-color-background);
    color: var(--ui-color-text);
}

body.app-shell-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
        radial-gradient(circle at bottom right, rgba(61, 226, 89, 0.06), transparent 28%);
    z-index: -1;
}

.wrap {
    min-height: 100vh;
    padding-left: var(--app-sidebar-width);
    transition: padding-left 0.28s ease;
    background: transparent;
}

.app-header {
    position: fixed;
    top: 0;
    left: var(--app-sidebar-width);
    right: 0;
    width: auto;
    z-index: 55;
    height: var(--app-header-height);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: color-mix(in srgb, var(--ui-color-background) 86%, transparent);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--ui-color-border);
    transition: left 0.28s ease, background var(--ui-transition-base), border-color var(--ui-transition-base);
}

.app-header__left,
.app-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__left {
    min-width: 0;
    flex: 1 1 auto;
    gap: 14px;
}

.app-header__right {
    flex-shrink: 0;
    margin-left: auto;
    min-width: fit-content;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.app-header__headline {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.app-header__right > * {
    flex-shrink: 0;
}

.app-header__service {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-color-primary);
}

.app-header__page {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ui-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__sidebar-toggle,
.app-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 15px;
    border-radius: 16px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 88%, transparent);
    color: var(--ui-color-text);
    cursor: pointer;
    transition: transform var(--ui-transition-base), border-color var(--ui-transition-base), background var(--ui-transition-base), color var(--ui-transition-base);
}

.app-header .sidebar-toggle.app-header__sidebar-toggle {
    position: absolute;
    top: 20px;
    left: -22px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    color: var(--ui-color-text);
    background: color-mix(in srgb, var(--ui-color-background) 45%, var(--ui-color-surface));
    border: 1px solid var(--ui-color-border);
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.app-header__sidebar-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
}

.app-header__sidebar-toggle:hover,
.app-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--ui-color-border-strong);
    background: color-mix(in srgb, var(--ui-color-surface-strong) 86%, transparent);
}

.app-header__sidebar-toggle svg,
.app-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.app-header .sidebar-toggle.app-header__sidebar-toggle svg {
    color: inherit;
}

.app-header .sidebar-toggle.app-header__sidebar-toggle path {
    fill: currentColor !important;
}

[data-theme="light"] .app-header .sidebar-toggle.app-header__sidebar-toggle {
    background: color-mix(in srgb, #ffffff 88%, #eef2f7);
    color: #1f2937;
}

[data-theme="light"] .app-header .sidebar-toggle.app-header__sidebar-toggle svg,
[data-theme="light"] .app-header .sidebar-toggle.app-header__sidebar-toggle path {
    color: #1f2937 !important;
    fill: #1f2937 !important;
}

[data-theme="dark"] .app-header .sidebar-toggle.app-header__sidebar-toggle {
    background: color-mix(in srgb, #0b1220 82%, #111827);
    color: #f8fafc;
}

[data-theme="dark"] .app-header .sidebar-toggle.app-header__sidebar-toggle svg,
[data-theme="dark"] .app-header .sidebar-toggle.app-header__sidebar-toggle path {
    color: #f8fafc !important;
    fill: #f8fafc !important;
}

.app-theme-toggle__icon {
    display: inline-flex;
}

[data-theme="dark"] .app-theme-toggle__icon--sun,
[data-theme="light"] .app-theme-toggle__icon--moon {
    display: none;
}

.app-theme-toggle__label {
    font-size: 0.92rem;
    font-weight: 700;
    color: inherit !important;
}

[data-theme="dark"] .app-theme-toggle {
    color: #f8fafc;
}

[data-theme="dark"] .app-theme-toggle svg,
[data-theme="dark"] .app-theme-toggle path,
[data-theme="dark"] .app-theme-toggle circle {
    color: #f8fafc !important;
    stroke: #f8fafc !important;
    fill: none;
}

.app-header__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform var(--ui-transition-base), background var(--ui-transition-base), color var(--ui-transition-base), border-color var(--ui-transition-base);
}

.app-header__link:hover {
    transform: translateY(-1px);
}

.app-header__link--kakao {
    background: #fee500;
    color: #202020;
}

.app-header__link--kakao:hover {
    background: #fff067;
    color: #202020;
}

.app-header__link--primary {
    background: var(--ui-color-primary);
    color: #08120b;
}

.app-header__link--primary:hover {
    background: var(--ui-color-primary-hover);
    color: #08120b;
}

.app-header__subscription {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ui-color-primary) 12%, var(--ui-color-surface));
    border: 1px solid color-mix(in srgb, var(--ui-color-primary) 22%, var(--ui-color-border));
}

.app-header__subscription-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ui-color-primary);
    color: #08120b;
    font-size: 0.76rem;
    font-weight: 800;
}

.app-header__subscription-name {
    font-weight: 700;
    color: var(--ui-color-text);
}

.app-header__subscription-day {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ui-color-danger);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
}

.app-user-menu {
    position: relative;
}

.app-user-menu__toggle {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 88%, transparent);
    color: var(--ui-color-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.app-user-menu__toggle:hover {
    background: color-mix(in srgb, var(--ui-color-surface-strong) 86%, transparent);
}

.app-user-menu__avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--ui-color-primary) 18%, transparent);
    color: var(--ui-color-primary);
}

.app-user-menu__name {
    font-weight: 700;
    color: inherit !important;
}

.app-user-menu__arrow {
    color: inherit !important;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--ui-transition-base);
}

.app-user-menu.is-open .app-user-menu__arrow {
    transform: rotate(225deg);
}

.app-user-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 94%, transparent);
    box-shadow: var(--ui-shadow-strong);
    backdrop-filter: blur(18px);
    display: none;
}

.app-user-menu.is-open .app-user-menu__dropdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-user-menu__dropdown a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--ui-color-text-soft);
    transition: background var(--ui-transition-base), color var(--ui-transition-base);
}

.app-user-menu__dropdown a:hover {
    background: color-mix(in srgb, var(--ui-color-primary) 10%, var(--ui-color-surface-strong));
    color: var(--ui-color-text);
}

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 3100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: color-mix(in srgb, var(--ui-color-overlay) 78%, transparent);
    backdrop-filter: blur(6px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-loading-overlay.is-visible {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.app-loading-overlay__panel {
    min-width: min(280px, calc(100vw - 48px));
    padding: 24px 26px;
    border-radius: 24px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 94%, transparent);
    box-shadow: var(--ui-shadow-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.app-loading-overlay__spinner {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 4px solid color-mix(in srgb, var(--ui-color-primary) 22%, transparent);
    border-top-color: var(--ui-color-primary);
    animation: app-spin 0.8s linear infinite;
}

.app-loading-overlay__message {
    color: var(--ui-color-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

body.is-global-loading #loading-container,
body.is-global-loading .loading-container-jium,
body.is-global-loading .loading-circle:not(.app-loading-overlay__spinner) {
    visibility: hidden !important;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 45;
    width: var(--app-sidebar-width);
    height: 100vh;
    padding: 10px 18px 14px;
    color: var(--ui-color-text);
    border-right: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-background) 90%, transparent);
    backdrop-filter: blur(22px);
    transition: transform 0.28s ease;
}

.sidebar.app-sidebar {
    transform: translateX(0);
    width: var(--app-sidebar-width);
    background: color-mix(in srgb, var(--ui-color-background) 90%, transparent);
    padding: 10px 18px 14px;
    border-right: 1px solid var(--ui-color-border);
}

.app-sidebar__inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--app-header-height);
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.app-sidebar__brand-link img {
    width: 34px;
    max-width: 100%;
}

.app-sidebar__brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ui-color-text);
}

.app-sidebar__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ui-color-text-muted) 28%, transparent) color-mix(in srgb, var(--ui-color-surface) 68%, transparent);
    padding-right: 6px;
    padding-bottom: 10px;
}

.app-sidebar__scroll::-webkit-scrollbar {
    width: 8px;
}

.app-sidebar__scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--ui-color-surface) 68%, transparent);
}

.app-sidebar__scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--ui-color-text-muted) 28%, transparent);
}

.app-sidebar__scroll::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--ui-color-primary) 34%, transparent);
}

.app-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-sidebar nav.app-sidebar__nav {
    overflow: visible;
    max-height: none;
}

.app-sidebar__single-link,
.app-sidebar__group-toggle {
    position: relative;
    display: block;
    width: 100%;
    padding: 14px 16px 14px 22px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--ui-color-surface) 68%, transparent);
    color: var(--ui-color-text);
    font-weight: 700;
    text-align: left;
    transition: background var(--ui-transition-base), color var(--ui-transition-base), border-color var(--ui-transition-base), transform var(--ui-transition-base);
}

.app-sidebar__link {
    display: block;
    width: 100%;
    padding: 12px 14px 12px 22px;
    border-radius: 0;
    border-top: 1px solid color-mix(in srgb, var(--ui-color-border) 84%, transparent);
    background: transparent;
    color: var(--ui-color-text-muted);
    font-weight: 500;
    text-align: left;
    position: relative;
    transition: background var(--ui-transition-base), color var(--ui-transition-base), transform var(--ui-transition-base);
}

.app-sidebar__single-link::before,
.app-sidebar__link::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 4px;
    height: calc(100% - 18px);
    min-height: 18px;
    border-radius: 999px;
    background: var(--ui-color-primary);
    transform: translateY(-50%) scaleY(0);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.app-sidebar__single-link:hover,
.app-sidebar__single-link.is-active,
.app-sidebar__link:hover,
.app-sidebar__link.is-active {
    color: var(--ui-color-text);
    border-color: var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-primary) 12%, var(--ui-color-surface-strong));
}

.app-sidebar__group-toggle:hover {
    background: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
}

.app-sidebar__single-link:hover::before,
.app-sidebar__single-link.is-active::before,
.app-sidebar__link:hover::before,
.app-sidebar__link.is-active::before {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

.app-sidebar__group {
    border-radius: 22px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 72%, transparent);
    overflow: hidden;
}

.app-sidebar__group.is-open {
    background: color-mix(in srgb, var(--ui-color-surface-strong) 72%, transparent);
}

.app-sidebar__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: var(--ui-color-text) !important;
    font: inherit;
    cursor: pointer;
}

.app-sidebar__group-toggle span {
    color: inherit !important;
}

.app-sidebar__group-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.24s ease;
}

.app-sidebar__group.is-open .app-sidebar__group-arrow {
    transform: rotate(225deg);
}

.app-sidebar__group-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    opacity: 1;
    max-height: none;
}

.app-sidebar__group-panel[hidden] {
    display: none !important;
}

.app-sidebar__footer {
    margin-top: auto;
}

.app-sidebar__footer-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--ui-color-border);
    background: color-mix(in srgb, var(--ui-color-surface) 88%, transparent);
}

.app-sidebar__footer-card strong {
    display: block;
    margin-bottom: 8px;
}

.app-sidebar__footer-card p {
    margin: 0;
    color: var(--ui-color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.content {
    max-width: var(--app-content-max-width);
    margin: 0 auto;
    padding: calc(var(--app-header-height) + 24px) 32px 48px;
    min-height: calc(100vh - 220px);
}

body.app-shell-body #footer.app-footer {
    margin: 0 32px 40px;
    padding: 30px 24px 20px;
    border-top: 1px solid var(--ui-color-border) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--ui-color-background) 90%, transparent) !important;
    box-shadow: none !important;
}

body.app-shell-body #footer.app-footer .footer {
    display: grid;
    grid-template-columns: 140px minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    max-width: none;
    width: 100%;
    margin: 0;
    font-size: 0.92rem;
}

body.app-shell-body #footer.app-footer .footer div,
body.app-shell-body #footer.app-footer .footer a,
body.app-shell-body #footer.app-footer .policy-links,
body.app-shell-body #footer.app-footer .policy-links a {
    color: var(--ui-color-text-muted) !important;
}

body.app-shell-body #footer.app-footer .footer a:hover,
body.app-shell-body #footer.app-footer .policy-links a:hover {
    color: var(--ui-color-text) !important;
}

body.app-shell-body #footer.app-footer .footerLogo,
body.app-shell-body #footer.app-footer .footerBizInfo,
body.app-shell-body #footer.app-footer .footerCustomer {
    width: auto;
    min-width: 0;
    text-align: left;
}

body.app-shell-body #footer.app-footer .footerLogo {
    padding: 4px 0 0;
}

.app-footer__logo {
    width: 100%;
    height: auto;
    max-width: 58px;
    margin-bottom: 0;
}

body.app-shell-body #footer.app-footer .footerBizInfo h3,
body.app-shell-body #footer.app-footer .footerCustomer h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--ui-color-text) !important;
}

body.app-shell-body #footer.app-footer .bizInfo,
body.app-shell-body #footer.app-footer .customerTime,
body.app-shell-body #footer.app-footer .customerPhone,
body.app-shell-body #footer.app-footer .customerTalk {
    line-height: 1.8;
}

body.app-shell-body #footer.app-footer .policy-links {
    margin-top: 52px;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 24px;
    font-size: 0.95rem;
}

.app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 16, 0.56);
    backdrop-filter: blur(4px);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

body.is-sidebar-collapsed .wrap {
    padding-left: var(--app-sidebar-peek-width);
}

body.is-sidebar-collapsed .app-header {
    left: var(--app-sidebar-peek-width);
}

body.is-sidebar-collapsed .app-sidebar {
    transform: translateX(calc(-100% + var(--app-sidebar-peek-width)));
}

@media (max-width: 1180px) {
    .app-header {
        padding: 18px 20px;
    }

    .content {
        padding: calc(var(--app-header-height) + 20px) 20px 40px;
    }

    .app-footer.footer {
        margin: 0 20px 28px;
    }

    .app-footer.footer .footer {
        flex-wrap: wrap;
    }

    .app-footer.footer .footerLogo,
    .app-footer.footer .footerBizInfo,
    .app-footer.footer .footerCustomer {
        width: 100%;
    }
}

@media (max-width: 1023px) {
    .wrap,
    body.is-sidebar-collapsed .wrap {
        padding-left: var(--app-sidebar-peek-width);
    }

    .app-header,
    body.is-sidebar-collapsed .app-header {
        left: var(--app-sidebar-peek-width);
    }

    body.is-sidebar-open .wrap {
        padding-left: var(--app-sidebar-width);
    }

    body.is-sidebar-open .app-header {
        left: var(--app-sidebar-width);
    }

    body.app-shell-body .sidebar.app-sidebar,
    body.is-sidebar-collapsed .sidebar.app-sidebar {
        transform: translateX(calc(-100% + var(--app-sidebar-peek-width)));
    }

    body.is-sidebar-open .sidebar.app-sidebar {
        transform: translateX(0);
    }

    body.is-sidebar-open .app-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-header__page,
    .app-theme-toggle__label {
        display: none;
    }
}

@media (max-width: 720px) {
    .app-header__right {
        gap: 8px;
    }

    .app-header__link,
    .app-theme-toggle,
    .app-user-menu__toggle {
        min-height: 42px;
        padding: 0 12px;
        font-size: 0.88rem;
    }

    .app-header__subscription {
        display: none;
    }

    .app-header__link--kakao {
        display: none;
    }

    .content {
        padding-inline: 16px;
    }

    .app-footer.footer {
        margin-inline: 16px;
        padding: 18px;
    }

    .app-footer.footer .footer {
        gap: 18px;
    }
}
