.site-header, .site-footer {
    padding: 0;
    background: var(--white);
    border: 0;
}
.site-header { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); }
.shell-container {
    width: min(1160px, 90vw);
    margin-inline: auto;
}
.header-layout {
    display: flex;
    align-items: center;
    min-height: 72px;
    gap: clamp(20px, 4vw, 48px);
}
.site-header .brand, .site-footer .brand { flex-shrink: 0; }
.header-navigation {
    flex: 1;
    justify-content: space-between;
    gap: 16px;
}
.header-links, .header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.header-links a {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 8px;
}
.header-links a:hover { background: var(--field-bg); color: var(--ink); }
.header-actions .cta, .header-actions button {
    min-height: 40px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.4;
}
.menu-toggle {
    margin-left: auto;
    gap: 7px;
    min-height: 40px;
    border-radius: 9px;
    font-size: 14px;
}
.menu-icon {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 12px;
    border-block: 2px solid currentColor;
}
.menu-icon::after {
    position: absolute;
    inset: 3px 0 auto;
    border-top: 2px solid currentColor;
    content: "";
}
.footer-layout {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) 1fr 1.15fr 1.3fr;
    gap: 24px;
    padding-block: 32px;
}
.footer-brand p {
    margin: 13px 0 0;
    max-width: 24ch;
}
.footer-links {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.footer-links h2 { margin: 0 0 3px; font-size: 14px; color: var(--ink); }
.footer-links a { color: var(--muted); font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--blue); text-decoration: underline; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 20px;
    border-top: 1px solid var(--line);
    padding-block: 16px 22px;
    font-size: 12px;
}
.footer-bottom p { margin: 0; }
.footer-bottom span { margin-left: 8px; }
@media (max-width: 900px) {
    .footer-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand p { max-width: none; }
}
@media (max-width: 980px) {
    .header-layout { flex-wrap: wrap; gap: 0 10px; min-height: 64px; padding-block: 11px; }
    .header-navigation { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
    .header-links a { padding-left: 0; }
    .header-actions { margin-left: auto; }
}
@media (max-width: 420px) {
    .footer-brand { grid-column: 1 / -1; }
    .footer-layout { gap: 20px 12px; }
    .footer-bottom span { display: block; margin-left: 0; }
}
@media print {
    .site-header, .site-footer { display: none !important; }
}

/* 헤더·푸터 공통 글자 스타일 */
.site-header,
.site-footer {
    font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
    color: #3b3b3b;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 4;
}

#content,
#guide,
#board,
#trees,
#requests {
    scroll-margin-top: 88px;
}

/* 그린가드 로고 */
.site-header .brand,
.site-footer .brand {
    gap: 8px;
    color: #0f172b;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.brand .brand-mark {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 28px;
    flex: 0 0 26px;
    border: 0;
    border-radius: 6px 6px 12px 12px;
    background: #2e60df;
}

.brand .brand-mark::after {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 10px;
    height: 6px;
    box-sizing: border-box;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
    content: "";
}

/* 업무 순서 메뉴 */
.workflow-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-nav li {
    display: flex;
    align-items: center;
    gap: 4px;
}

.workflow-nav li + li::before {
    width: 5px;
    height: 5px;
    border-top: 1px solid #78859a;
    border-right: 1px solid #78859a;
    transform: rotate(45deg);
    content: "";
}

.header-links a,
.header-actions .account-nav-link {
    color: #3b3b3b;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}

.header-actions .cta,
.header-actions button,
.site-header .menu-toggle {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

/* 푸터 */
.site-footer {
    color: #575957;
    font-size: 13px;
}

.footer-links h2 {
    color: #0f172b;
    font-size: 14px;
    font-weight: 700;
}

.footer-links a {
    color: #575957;
    font-size: 13px;
    font-weight: 500;
}

.footer-bottom {
    font-size: 12px;
    line-height: 18px;
}

@media (max-width: 980px) {
    .site-header .header-links a {
        padding-inline: 8px;
    }

    .header-navigation {
        max-height: 55vh;
        overflow: auto;
    }
}

/* 상단 업무 메뉴와 계정 메뉴 */
.site-header .workflow-nav a,
.site-header .account-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #23364e;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .account-nav-link {
    border-color: var(--line);
    background: #f5f8fc;
}

.site-header .workflow-nav a:hover,
.site-header .account-nav-link:hover {
    border-color: #cedcf0;
    background: #eaf2fc;
    color: #205690;
}

/* 공통 아이콘 */
.site-header .nav-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #4269a4;
}

.site-header .nav-icon::before,
.site-header .nav-icon::after {
    position: absolute;
    box-sizing: border-box;
    content: "";
}

/* 현장 위치 */
.nav-icon--site::before {
    inset: 2px 3px 4px;
    border: 1.5px solid currentColor;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.nav-icon--site::after {
    inset: 5px auto auto 7px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

/* 수목 */
.nav-icon--tree::before {
    inset: 1px 3px 5px;
    border: 1.5px solid currentColor;
    border-radius: 50% 50% 45% 45%;
}

.nav-icon--tree::after {
    inset: 10px auto 1px 7px;
    border-left: 1.5px solid currentColor;
}

/* 기록 작성 */
.nav-icon--edit::before {
    inset: 2px auto auto 7px;
    width: 5px;
    height: 12px;
    border: 1.5px solid currentColor;
    border-radius: 1px 1px 2px 2px;
    transform: rotate(42deg);
}

/* 보고서 */
.nav-icon--report::before {
    inset: 1px 3px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

.nav-icon--report::after {
    inset: 5px 6px auto;
    height: 4px;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

/* 내 정보 */
.nav-icon--user::before {
    inset: 1px auto auto 5px;
    width: 6px;
    height: 6px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.nav-icon--user::after {
    inset: 9px 2px 1px;
    border: 1.5px solid currentColor;
    border-radius: 5px 5px 2px 2px;
}

/* 운영 관리 */
.nav-icon--admin::before {
    inset: 3px 1px auto;
    height: 10px;
    border-block: 1.5px solid currentColor;
}

.nav-icon--admin::after {
    inset: 1px auto auto 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 4px 8px 0 currentColor;
}

@media (max-width: 980px) {
    .site-header .workflow-nav {
        gap: 4px 8px;
    }

    .site-header .workflow-nav li + li::before {
        display: none;
    }
}

/* 마이페이지 */
.me-page {
    max-width: 1160px;
    margin-inline: auto;
}

.me-page .account-heading {
    padding-bottom: 8px;
}

.me-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.me-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.me-page .me-card {
    min-width: 0;
    margin: 0;
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    overflow-wrap: anywhere;
}

.me-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
}

.me-page summary {
    cursor: pointer;
    color: #3b3b3b;
    font-weight: 600;
}

@media (max-width: 980px) {
    .me-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

@media (max-width: 520px) {
    .me-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}
