:root {
    --bg-primary: #F8FAFC;
    --text-primary: #0F172A;
    --bg-surface: #FFFFFF;
    --text-surface: #1E293B;
    --text-secondary: #475569;
    --border-subtle: #E2E8F0;
    --color-accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: #EFF6FF;
    --bg-dark: #0F172A;
    --font-family-base: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --headings-weight: 700;
    --body-weight: 400;
    --subheading-weight: 500;
    --radius-base: 8px;
    --radius-card: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    font-weight: var(--body-weight);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-base);
    font-weight: var(--headings-weight);
    line-height: 1.3;
    color: inherit;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.625rem, 3vw, 2.125rem);
}

h3 {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
}

h4 {
    font-size: clamp(1.15rem, 2vw, 1.375rem);
}

h5 {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a,
a:hover,
a:focus {
    text-decoration: none;
}

a {
    color: var(--color-accent);
    transition: color 0.15s ease-in-out;
}

a:hover,
a:focus {
    color: var(--accent-hover);
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: none;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    a,
    span,
    p,
    code,
    kbd {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* ===== site_header ===== */
#header.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
}

#header .brand-name {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

@media (max-width: 991.98px) {
    #header .brand-name {
        font-size: 0.75rem;
    }
}

#header .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: var(--accent-light);
    color: var(--color-accent);
    font-size: 16px;
}

#header .nav-link {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    position: relative;
}

#header .nav-link:hover,
#header .nav-link:focus {
    color: var(--color-accent);
}

#header .header-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-subtle);
}

#header .custom-cta-btn {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#header .custom-cta-btn:hover,
#header .custom-cta-btn:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
}

#header .hamburger-btn {
    background-color: var(--accent-light);
    border-radius: 6px;
    line-height: 1;
}

#header .hamburger-icon {
    font-size: 1.25rem;
    color: var(--text-primary);
}

#header .mobile-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
}

#header .mobile-dropdown-menu.open {
    max-height: 480px;
}

#header .mobile-nav-link {
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-surface);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#header .mobile-nav-link:hover,
#header .mobile-nav-link:focus {
    background-color: var(--accent-light);
    color: var(--color-accent);
}

#header .mobile-menu-divider {
    height: 1px;
    width: 100%;
    background-color: var(--border-subtle);
}

/* ===== hero_intro ===== */
#intro {
    overflow: hidden;
    width: 100%;
}

.hero-title {
    hyphens: auto;
    word-break: keep-all;
}

.hero-main-img {
    height: auto;
    max-height: 420px;
}

.js-share-btn:hover {
    background-color: var(--accent-hover) !important;
    color: #ffffff !important;
}

.js-share-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

@media (max-width: 767.98px) {
    #intro h1.hero-title {
        font-size: 1.125rem !important;
        line-height: 1.25 !important;
    }

    #intro .hero-lead {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    #intro .hero-desc {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    .hero-badge {
        font-size: 0.75rem !important;
    }
}

/* ===== folder_hierarchy ===== */
#naming-structure {
    overflow: hidden;
}

#naming-structure .card {
    border: 1px solid var(--border-subtle) !important;
}

#naming-structure ul li {
    word-break: break-all;
}

/* ===== photo_organization ===== */
#photo-curation {
    overflow: hidden;
    width: 100%;
}

#photo-curation .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-subtle);
}

#photo-curation .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08) !important;
}

@media (max-width: 767.98px) {
    #photo-curation h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
        hyphens: auto;
    }

    #photo-curation h3 {
        font-size: 0.875rem !important;
        line-height: 1.25 !important;
        hyphens: auto;
    }

    #photo-curation img {
        height: 210px !important;
    }
}

/* ===== downloads_maintenance ===== */
#downloads-cleanup {
    width: 100%;
}

#downloads-cleanup h2,
#downloads-cleanup h3,
#downloads-cleanup h4 {
    hyphens: auto;
}

@media (max-width: 767.98px) {
    #downloads-cleanup h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    #downloads-cleanup h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }

    #downloads-cleanup h4 {
        font-size: 0.8125rem !important;
        line-height: 1.2 !important;
    }

    #downloads-cleanup p,
    #downloads-cleanup li {
        font-size: 0.875rem;
    }

    #downloads-cleanup img {
        height: 240px !important;
    }
}

/* ===== safe_backup_guide ===== */
#backup-principles {
    width: 100%;
    box-sizing: border-box;
}

#backup-principles .backup-img-box {
    height: 240px;
    background-color: var(--border-subtle);
}

#backup-principles .backup-img {
    height: 100%;
    object-fit: cover;
}

#backup-principles .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#backup-principles .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

@media (max-width: 767.98px) {
    #backup-principles h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }

    #backup-principles h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }

    #backup-principles .backup-img-box {
        height: 180px;
    }
}

/* ===== frequently_asked_questions ===== */
#faq {
    width: 100%;
    hyphens: auto;
}

#faq .accordion-button:not(.collapsed) {
    background-color: var(--accent-light) !important;
    color: var(--color-accent) !important;
    box-shadow: none;
}

#faq .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-subtle);
}

#faq .accordion-button::after {
    filter: invert(30%) sepia(20%) saturate(1000%) hue-rotate(185deg);
}

@media (max-width: 767.98px) {
    #faq h2 {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    #faq h3,
    #faq .h5 {
        font-size: 0.875rem !important;
        line-height: 1.25;
    }

    #faq .accordion-button {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    #faq .accordion-body {
        font-size: 0.8125rem;
        padding: 0 1rem 0.75rem 1rem;
    }
}

/* ===== contact_inquiry ===== */
#contact-section {
    overflow: hidden;
}

#contact-section .form-control:focus,
#contact-section .form-check-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
}

#contact-section .form-control::placeholder {
    color: #94A3B8;
}

#contact-section .btn:hover {
    background-color: var(--accent-hover) !important;
    color: #FFFFFF !important;
}

@media (max-width: 767.98px) {
    #contact-section h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }

    #contact-section p {
        font-size: 0.875rem !important;
        hyphens: auto;
    }
}

/* ===== footer ===== */
.footer-section {
    background-color: var(--bg-dark);
    color: #F8FAFC;
    width: 100%;
    hyphens: auto;
}

.footer-section a.footer-nav-link {
    color: #94A3B8;
    font-size: 0.9375rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-section a.footer-nav-link:hover {
    color: #F8FAFC;
    transform: translateX(3px);
}

.footer-section a.footer-nav-link:hover i {
    color: var(--color-accent) !important;
}

.footer-section a.footer-legal-link {
    color: #94A3B8;
    font-size: 0.8125rem;
    transition: color 0.2s ease;
}

.footer-section a.footer-legal-link:hover {
    color: #F8FAFC;
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .footer-brand-title {
        font-size: 0.8rem !important;
        line-height: 1.2;
    }

    .footer-nav-title {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }

    .footer-section p {
        font-size: 0.875rem !important;
    }

    .footer-legal-list {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .footer-legal-list .list-inline-item {
        margin-right: 0 !important;
    }
}

/* ===== legal/policy pages mobile top gap ===== */
@media (max-width: 767.98px) {
    .legal-page-wrapper {
        padding-top: 2.25rem !important;
        padding-bottom: 3rem !important;
    }

    .legal-page-wrapper section,
    .legal-page-wrapper .policy-card,
    .legal-page-wrapper .terms-card {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}