:root {
    --bg: #fff;
    --text: #222;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #f3f4f6;
    --brand: #ff6b00;
    --brand-700: #e55f00;
    --radius: 16px;
    --container: 1300px;
}

* {
    box-sizing: border-box
}

html,body {
    height: 100%
}

html {
    overflow-y: scroll;
}

body {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR",
    "Apple SD Gothic Neo", "Helvetica Neue", Arial, "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px
}

.section {
    padding: 72px 0;
    border-top: 1px solid var(--line);
    flex: 1 0 auto;
}

.section:first-of-type {
    border-top: none
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(8px);
}

header a {
    text-decoration: none;
    color: inherit;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px
}

nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

.cta {
    display: flex;
    align-items: center;
    gap: 12px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: transparent
}

.btn-primary:hover {
    background: var(--brand-700)
}

.head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px
}

.head h2 {
    margin: 0;
    font-size: 32px
}

.head p {
    margin: 4px 0 0;
    color: var(--muted)
}

footer {
    border-top: 1px solid var(--line);
    background: #fafafa
}

.foot {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 32px 0;
}

.foot small {
    color: var(--muted)
}

.links {
    display: flex;
    gap: 20px
}

.links a {
    color: var(--muted);
    text-decoration: none
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: var(--card);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    padding: 8px 0 16px;
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li a {
    display: block;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.mobile-nav-links li a:hover {
    background: var(--card);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--line);
    margin: 8px 0;
}

.mobile-nav-actions {
    padding: 8px 16px 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.mobile-nav-actions .btn {
    flex: 1;
    justify-content: center;
    height: 44px;
    border-radius: 12px;
    font-size: 15px;
    border: 1.5px solid var(--line);
}

.mobile-user-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px 14px;
}

.mobile-user-profile-row .user-profile {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.mobile-user-nickname {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-item {
    display: block;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    line-height: 1.5;
}

.mobile-user-item:hover {
    background: var(--card);
}

.mobile-user-item.logout {
    color: #b91c1c;
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav {
        height: 64px;
    }

    .nav nav,
    .nav .cta,
    .nav .user-menu {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }

    .mobile-nav.is-open {
        display: block;
    }
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.user-trigger:hover {
    background: #f9fafb;
}

.user-profile {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--brand-700);
    border: 1px solid var(--line);
    flex-shrink: 0;
    overflow: hidden;
}

.user-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    max-width: 120px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-caret {
    font-size: 10px;
    color: var(--muted);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 8px 0;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    display: none;
    z-index: 60;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text);
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: #f9fafb;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown-divider {
    height: 1px;
    margin: 6px 0;
    background: var(--line);
}

.logout-btn {
    color: #b91c1c;
    font-weight: 600;
}