@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #f6f3ee;
    --bg-strong: #efe9e2;
    --surface: #ffffff;
    --surface-soft: #f8f4f0;
    --text: #1f1d1a;
    --muted: #6f6a62;
    --accent: #2f6f6a;
    --accent-strong: #255b57;
    --accent-soft: #cfe4e2;
    --border: #e5dfd7;
    --shadow: 0 10px 24px rgba(33, 30, 26, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "IBM Plex Sans KR", "IBM Plex Sans", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #ffffff 0%, #f7f3ef 45%, #f1ebe4 100%);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(47, 111, 106, 0.08) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

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

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

.main {
    min-height: 100vh;
}

.content-section {
    padding: 2rem 0 2.75rem;
}

.content-wide {
    max-width: 960px;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(246, 243, 238, 0.9);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 700;
}

.brand-text {
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    color: var(--muted);
    font-weight: 500;
}

.nav-links .nav-link {
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
}

.nav-links .nav-link:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.nav-auth {
    margin: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-auth li {
    list-style: none;
}

.nav-auth .nav-link {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-auth .nav-link:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.layout-grid {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 1.5rem;
    align-items: start;
}

.side-panel {
    position: sticky;
    top: 5.5rem;
    display: grid;
    gap: 1rem;
}

.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.side-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.side-hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.side-nav {
    display: grid;
    gap: 0.6rem;
}

.side-link {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 500;
}

.side-link:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.side-link.is-active {
    background: var(--accent);
    color: #fff;
}

.side-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.2rem 0;
}

.page {
    animation: fadeUp 0.6s ease both;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--muted);
    margin: 0.4rem 0 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: flex-end;
    margin-bottom: 1.6rem;
}

.list-toolbar__search {
    display: flex;
    gap: 0.6rem;
    flex: 1 1 280px;
}

.list-toolbar__search .form-control {
    flex: 1 1 auto;
}

.list-toolbar__search .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
}

.list-toolbar__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: flex-end;
}

.list-control {
    display: grid;
    gap: 0.35rem;
}

.list-control__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.side-filter {
    display: grid;
    gap: 0.9rem;
}

.side-filter__field {
    display: grid;
    gap: 0.4rem;
}

.side-filter__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.side-filter__actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.breadcrumb span {
    opacity: 0.7;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: center;
    background: var(--surface);
    border-radius: 28px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-content {
    display: grid;
    gap: 0.6rem;
}

.hero--plain,
.hero--center {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
}

.hero--plain {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 2rem;
}

.hero-content--center {
    justify-items: center;
}

.hero--plain .hero-actions,
.hero--center .hero-actions {
    justify-content: center;
}

.hero-media--center {
    justify-items: center;
    width: min(760px, 100%);
}

.hero-image-crop {
    max-height: 30vh;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.hero-kicker {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-strong);
    font-weight: 600;
}

.hero-title {
    font-size: 2.3rem;
    margin: 0.6rem 0 1rem;
    letter-spacing: -0.03em;
}

.hero-lead {
    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}

.hero-media {
    display: grid;
    gap: 1rem;
}

.hero-image-frame {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-card {
    background: var(--surface-soft);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
}

.hero-card-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.article-grid {
    display: grid;
    gap: 1.5rem;
}

.article-list {
    display: grid;
}

.article-row {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

.article-row:first-child {
    border-top: 1px solid var(--border);
}

.article-row__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.article-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.article-row__title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.4rem 0 0.6rem;
}

.article-row__content {
    color: var(--muted);
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.scroll-fade {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
}

.scroll-fade::-webkit-scrollbar {
    width: 6px;
}

.scroll-fade::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.scroll-fade::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-fade:hover::-webkit-scrollbar-thumb,
.scroll-fade.is-scrolling::-webkit-scrollbar-thumb {
    background: rgba(47, 111, 106, 0.35);
}

.scroll-fade.is-scrolling,
.scroll-fade:hover {
    scrollbar-color: rgba(47, 111, 106, 0.45) transparent;
}

.article-row__link {
    font-weight: 600;
    color: var(--accent-strong);
}

.empty-state {
    padding: 2rem 0;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.empty-state strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.article-card {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.8rem;
}

.article-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-card__title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-card__excerpt {
    color: var(--muted);
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.article-card__footer {
    display: flex;
    justify-content: flex-end;
}

.article-card__link {
    font-weight: 600;
    color: var(--accent-strong);
}

.article-detail {
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
    box-shadow: none;
}

.article-detail__header {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.article-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.article-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 1.5rem;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.article-meta .dot {
    opacity: 0.5;
}

.article-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.article-body {
    font-size: 1rem;
}

.editor-shell {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 1.5rem;
}

.editor-header {
    display: grid;
    gap: 0.4rem;
}

.editor-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.editor-subtitle {
    color: var(--muted);
    margin-top: 0.4rem;
}

.editor-field {
    display: grid;
    gap: 0.6rem;
}

.editor-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.auth-shell {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1.8rem;
    box-shadow: var(--shadow);
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-error {
    background: #fceceb;
    color: #9c2f2f;
    border: 1px solid #f3c3c1;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.4rem 0 0.6rem;
    color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.auth-hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #1f1f1f;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.google-login-btn:hover {
    background: #f8f9fa;
    border-color: #c7c9cc;
    color: #1f1f1f;
}

.google-login-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-field {
    display: grid;
    gap: 0.4rem;
}

.form-label {
    font-weight: 500;
}

.form-control {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.65rem 0.9rem;
    background: var(--surface-soft);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(47, 111, 106, 0.18);
}

.btn {
    border-radius: 999px;
    font-weight: 600;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-strong);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn-outline {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.text-link {
    color: var(--accent-strong);
    font-weight: 600;
    border: none;
    background: transparent;
    padding: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.85rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
}

.tag-input-wrapper {
    position: relative;
}

.tag-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.tag-input__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-input__control {
    border: none;
    outline: none;
    background: transparent;
    flex: 1 1 160px;
    min-width: 140px;
    font-size: 0.95rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.8rem;
}

.tag-chip button {
    border: none;
    background: transparent;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tag-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
}

.tag-suggestions.is-open {
    display: flex;
}

.tag-suggestion {
    border: none;
    background: transparent;
    text-align: left;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    color: var(--text);
}

.tag-suggestion__title {
    flex: 1 1 60%;
    min-width: 0;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.tag-suggestion:hover {
    background: var(--surface-soft);
}

.tag-suggestion__meta {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
    flex: 0 1 auto;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-nav {
    margin-top: 1.6rem;
}

.pagination-slim {
    gap: 0.4rem;
    flex-wrap: wrap;
}

.page-link {
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.35rem 0.75rem;
    min-width: 2.4rem;
    text-align: center;
}

.page-link.active,
.page-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.page-link.disabled {
    color: var(--muted);
    pointer-events: none;
    opacity: 0.5;
}

.page-ellipsis .page-link {
    background: transparent;
    border-style: dashed;
    color: var(--muted);
    pointer-events: none;
}

.page-status {
    font-weight: 600;
    color: var(--text);
    background: var(--surface-soft);
}

.page-item--mobile {
    display: none;
}

.page-item--desktop {
    display: inline-flex;
}

@media (max-width: 640px) {
    .pagination-slim {
        gap: 0.3rem;
    }

    .page-item--desktop {
        display: none;
    }

    .page-item--mobile {
        display: inline-flex;
    }

    .list-toolbar {
        align-items: stretch;
    }

    .list-toolbar__search,
    .list-toolbar__controls {
        width: 100%;
    }

    .list-toolbar__search {
        flex-direction: column;
    }

    .tag-suggestion__meta {
        display: none;
    }
}

.site-footer {
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-link {
    color: var(--muted);
}

.footer-link:hover {
    color: var(--accent-strong);
}

.footer-copy {
    margin: 0;
}

.stagger > * {
    animation: fadeUp 0.6s ease both;
}

.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-nav {
        padding: 0 0.5rem;
    }

    .nav-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: auto;
        gap: 0.6rem;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links .nav-link {
        white-space: nowrap;
    }

    .brand {
        order: 1;
    }

    .brand-text {
        font-size: 1rem;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .nav-auth {
        order: 2;
        margin-left: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .brand-text {
        display: none;
    }
}

/**
================================================================
스크롤바 없애기
================================================================
 */
/* ( 크롬, 사파리, 오페라, 엣지 ) 동작 */
.scroll::-webkit-scrollbar {
    display: none;
}

.scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/**
================================================================
리스트 그룹
================================================================
 */

.list-group {
}

.form-check-input:checked + .form-checked-content {
    opacity: .5;
}

.form-check-input-placeholder {
    border-style: dashed;
}
[contenteditable]:focus {
    outline: 0;
}

.list-group-checkable .list-group-item {
    cursor: pointer;
}
.list-group-item-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
}
.list-group-item-check:hover + .list-group-item {
    background-color: var(--bs-secondary-bg);
}
.list-group-item-check:checked + .list-group-item {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.list-group-item-check[disabled] + .list-group-item,
.list-group-item-check:disabled + .list-group-item {
    pointer-events: none;
    filter: none;
    opacity: .5;
}

.list-group-radio .list-group-item {
    cursor: pointer;
    border-radius: .5rem;
}
.list-group-radio .form-check-input {
    z-index: 2;
    margin-top: -.5em;
}
.list-group-radio .list-group-item:hover,
.list-group-radio .list-group-item:focus {
    background-color: var(--bs-secondary-bg);
}

.list-group-radio .form-check-input:checked + .list-group-item {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px var(--bs-primary);
}
.list-group-radio .form-check-input[disabled] + .list-group-item,
.list-group-radio .form-check-input:disabled + .list-group-item {
    pointer-events: none;
    filter: none;
    opacity: .5;
}

/**
================================================================
에디터 높이 설정
================================================================
 */
.ck.ck-editor {
    max-width: 100%;
}
.ck-editor__editable {
    min-height: 300px;
}

.ck-content {
    font-size: 1rem;
    line-height: 1.75;
}

.ck-content p {
    margin-bottom: 1rem;
}

.ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
