:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #20242a;
    --muted: #6b7280;
    --line: #d9dde3;
    --primary: #1f6feb;
    --primary-dark: #1a57b7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
    line-height: 1.6;
}

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 24px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 15px;
}

.site-nav a:hover {
    color: var(--primary);
}

.site-main {
    min-height: calc(100vh - 129px);
}

.home-section,
.login-section,
.status-section {
    padding: 72px 0;
}

.intro-panel {
    max-width: 760px;
    padding: 48px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.2;
}

.lead {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
}

.login-box,
.status-box {
    width: min(100%, 420px);
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.login-box h1,
.status-box h1 {
    font-size: 28px;
}

.login-box p {
    margin: 0 0 24px;
    color: var(--muted);
}

.status-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
}

.status-message {
    margin: 0 0 24px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.status-message.success {
    color: #146c43;
    background: #d8f3dc;
}

.status-message.error {
    color: #b42318;
    background: #fee4e2;
}

.status-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.status-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.status-list dt {
    color: var(--muted);
    font-weight: 700;
}

.status-list dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    font-weight: 700;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--surface);
}

.login-form button {
    min-height: 44px;
    margin-top: 12px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--primary-dark);
}

.flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.flash-message {
    margin: 0;
    padding: 11px 13px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.flash-message.error {
    color: #b42318;
    background: #fee4e2;
}

.flash-message.success {
    color: #146c43;
    background: #d8f3dc;
}

.flash-message.warning {
    color: #92400e;
    background: #fef3c7;
}

.flash-message.info {
    color: #305174;
    background: #e6eef8;
}

.public-body {
    --public-bg: #f7f8fb;
    --public-soft: #f1f5f9;
    --public-text: #111827;
    --public-muted: #64748b;
    --public-line: #e2e8f0;
    --public-primary: #1264d8;
    --public-accent: #0f766e;
    background: var(--public-bg);
    color: var(--public-text);
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--public-line);
    backdrop-filter: blur(12px);
}

.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}

.public-brand {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: 23px;
    font-weight: 900;
}

.public-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    min-width: 0;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-weight: 800;
}

.public-nav a {
    padding: 8px 10px;
    border-radius: 6px;
}

.public-nav a:hover {
    color: var(--public-primary);
    background: #eff6ff;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(280px, 28vw);
    min-width: 190px;
    border: 1px solid var(--public-line);
    border-radius: 999px;
    background: #ffffff;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    outline: 0;
    font: inherit;
}

.header-search button {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    color: #ffffff;
    background: var(--public-primary);
    font-weight: 800;
    cursor: pointer;
}

.mobile-nav-toggle {
    display: none;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--public-line);
    border-radius: 6px;
    color: #0f172a;
    background: #ffffff;
    font-weight: 900;
}

.public-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    color: #ffffff;
    background: var(--public-primary);
    font-weight: 800;
}

.public-button:hover {
    background: var(--primary-dark);
}

.public-main {
    min-height: calc(100vh - 129px);
}

.public-hero {
    padding: 56px 0 42px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid var(--public-line);
}

.hero-copy {
    max-width: 820px;
}

.public-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.08;
}

.public-hero p {
    margin: 0;
    color: var(--public-muted);
    font-size: 18px;
}

.trend-badge,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 900;
}

.hero-search {
    display: flex;
    width: min(620px, 100%);
    margin-top: 24px;
    padding: 6px;
    border: 1px solid var(--public-line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 0;
    outline: 0;
    font: inherit;
}

.hero-search button {
    min-width: 88px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: var(--public-primary);
    font-weight: 900;
    cursor: pointer;
}

.public-section {
    padding: 40px 0 56px;
}

.soft-section {
    background: #ffffff;
    border-top: 1px solid var(--public-line);
}

.public-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 34px);
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--public-muted);
}

.section-heading a {
    color: var(--public-primary);
    font-weight: 800;
}

.post-card-list {
    display: grid;
    gap: 16px;
}

.post-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.post-card-grid .post-card {
    grid-template-columns: 1fr;
}

.post-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--public-line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.post-card.no-thumb {
    grid-template-columns: 210px minmax(0, 1fr);
}

.post-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    overflow: hidden;
    border-radius: 8px;
    color: #0f766e;
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
    font-weight: 900;
    text-align: center;
}

.post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card h2 {
    margin: 7px 0;
    font-size: 22px;
    line-height: 1.32;
}

.post-card h2 a:hover {
    color: var(--public-primary);
}

.post-card p {
    margin: 0;
    color: var(--public-muted);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--public-muted);
    font-size: 14px;
    font-weight: 800;
}

.post-meta a {
    color: var(--public-primary);
}

.public-sidebar {
    display: grid;
    gap: 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--public-line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.public-sidebar h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.sidebar-block {
    padding-top: 20px;
    border-top: 1px solid var(--public-line);
}

.category-list {
    display: grid;
    gap: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--public-line);
}

.category-list a:last-child {
    border-bottom: 0;
}

.category-list strong {
    color: var(--public-muted);
}

.public-empty {
    padding: 28px;
    color: var(--public-muted);
    background: var(--surface);
    border: 1px dashed var(--public-line);
    border-radius: 8px;
    text-align: center;
}

.public-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
}

.public-pagination a,
.public-pagination span,
.public-search-form button {
    min-width: 84px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: center;
    font-weight: 800;
}

.public-pagination a,
.public-search-form button {
    border: 0;
    background: var(--public-primary);
    color: #ffffff;
}

.public-pagination span {
    color: var(--public-muted);
    background: #e8edf3;
}

.public-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    padding: 8px;
    border: 1px solid var(--public-line);
    border-radius: 10px;
    background: #ffffff;
}

.public-search-form input {
    flex: 1;
    min-height: 46px;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    outline: 0;
}

.post-container {
    max-width: 900px;
    padding-top: 42px;
    padding-bottom: 56px;
}

.post-header {
    margin-bottom: 24px;
}

.post-header h1 {
    margin: 12px 0;
    font-size: clamp(34px, 6vw, 52px);
    line-height: 1.12;
}

.post-header p {
    margin: 0;
    color: var(--public-muted);
    font-size: 19px;
}

.post-hero-image {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    margin-bottom: 28px;
    border: 1px solid var(--public-line);
    border-radius: 8px;
}

.post-content {
    overflow-wrap: anywhere;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--public-line);
    border-radius: 8px;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.86;
}

.post-content h2 {
    margin: 34px 0 14px;
    padding-top: 12px;
    border-top: 1px solid var(--public-line);
    font-size: 28px;
    line-height: 1.28;
}

.post-content h3 {
    margin: 26px 0 12px;
    font-size: 23px;
}

.post-content p {
    margin: 0 0 18px;
}

.post-content ul,
.post-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

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

.content-cta {
    display: grid;
    gap: 10px;
    margin: 28px 0;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.content-cta-label {
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
}

.content-cta a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #111827;
}

.content-cta strong {
    line-height: 1.45;
}

.content-cta span:last-child {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.related-posts {
    margin-top: 28px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--public-line);
    border-radius: 8px;
}

.related-posts h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.related-list {
    display: grid;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.related-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--public-line);
}

.related-list a:last-child {
    border-bottom: 0;
}

.related-list time {
    color: var(--public-muted);
    white-space: nowrap;
}

.related-list small {
    color: var(--public-muted);
    white-space: nowrap;
}

.related-grid a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
}

.related-grid a:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.related-grid small {
    color: var(--public-muted);
    font-size: 13px;
}

.related-card-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.related-card-copy strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.45;
}

.related-thumb {
    display: grid;
    place-items: center;
    width: 96px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--public-line);
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-post-list {
    display: grid;
    gap: 10px;
}

.compact-post-list a {
    display: grid;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--public-line);
}

.compact-post-list a:last-child {
    border-bottom: 0;
}

.compact-post-list span {
    font-weight: 800;
    line-height: 1.4;
}

.compact-post-list small {
    color: var(--public-muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--public-muted);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a {
    color: var(--public-primary);
}

.breadcrumb span::before {
    content: "/";
    margin-right: 8px;
    color: #cbd5e1;
}

.search-result-summary {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
}

.search-helper-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.post-adjacent {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.post-adjacent a,
.post-adjacent .disabled {
    display: grid;
    gap: 5px;
    min-height: 88px;
    padding: 15px;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
}

.post-adjacent span {
    color: var(--public-muted);
    font-size: 13px;
    font-weight: 900;
}

.ad-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 22px auto;
    padding: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
}

.post-container > .ad-wrap,
.post-card-list > .ad-wrap,
.public-section .ad-wrap {
    width: 100%;
}

.ad-label {
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.ad-content {
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
}

.ad-content iframe,
.ad-content ins,
.ad-content img {
    max-width: 100%;
}

.public-footer {
    padding: 28px 0;
    color: var(--public-muted);
    background: #ffffff;
    border-top: 1px solid var(--public-line);
}

.public-footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.public-footer strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.public-footer p {
    margin: 0 0 4px;
}

.public-footer nav {
    display: flex;
    gap: 12px;
    font-weight: 800;
}

.admin-body {
    background: #eef1f5;
}

.admin-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    padding: 24px 18px;
    color: #ffffff;
    background: #18202b;
}

.admin-brand {
    display: block;
    margin-bottom: 28px;
    font-size: 22px;
    font-weight: 800;
}

.admin-menu {
    display: grid;
    gap: 6px;
}

.admin-menu a {
    display: block;
    padding: 11px 12px;
    border-radius: 6px;
    color: #d7dde6;
    font-weight: 700;
}

.admin-menu a:hover,
.admin-menu a.active {
    color: #ffffff;
    background: #263241;
}

.admin-content {
    min-width: 0;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 22px;
}

.admin-user {
    color: var(--muted);
    font-weight: 700;
}

.admin-main {
    padding: 28px;
}

.admin-panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-panel h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.admin-panel p {
    margin: 0;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    min-height: 116px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat-card span {
    display: block;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.dashboard-lists {
    display: grid;
    gap: 20px;
}

.stats-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.mini-stat-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-stat-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.mini-stat-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.mini-stat-list strong {
    font-size: 22px;
}

.compact-table {
    min-width: 560px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
}

.panel-heading p {
    margin-top: 6px;
}

.panel-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 14px;
}

.category-table {
    min-width: 1040px;
}

.post-table {
    min-width: 1320px;
}

.view-count-button {
    padding: 0;
    border: 0;
    color: var(--primary);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.view-count-button:hover {
    text-decoration: underline;
}

.date-label {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.ad-table {
    min-width: 980px;
}

.trend-table {
    min-width: 1420px;
}

.seo-table {
    min-width: 1180px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    background: #f8fafc;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-subtext {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.admin-help-box {
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a5f;
    background: #eff6ff;
    font-size: 14px;
    line-height: 1.6;
}

.field-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.category-recommend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.category-recommend-row .small-button {
    flex: 0 0 auto;
}

.thumbnail-preview {
    width: min(260px, 100%);
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.thumbnail-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.pixabay-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.pixabay-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pixabay-search-row input {
    width: 100%;
}

.pixabay-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pixabay-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.pixabay-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #eef2f7;
}

.pixabay-card-body {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.pixabay-card-body span,
.pixabay-card-body a {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.media-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.media-thumb {
    aspect-ratio: 16 / 10;
    background: #eef2f7;
}

.media-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.media-card-body strong {
    overflow-wrap: anywhere;
}

.media-card-body dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px 10px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.media-card-body dt {
    font-weight: 800;
    color: var(--text);
}

.media-card-body dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.system-status-list {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.system-status-list dt {
    color: var(--muted);
    font-weight: 800;
}

.system-status-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.log-viewer {
    max-height: 560px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #dbeafe;
    background: #111827;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.inline-form {
    display: inline-flex;
    margin-left: 6px;
}

.inline-seo-form {
    display: grid;
    grid-template-columns: 130px minmax(160px, 1fr) auto;
    gap: 6px;
}

.inline-seo-form select,
.inline-seo-form input {
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}

.issue-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-pill.critical {
    color: #991b1b;
    background: #fee2e2;
}

.status-pill.warning {
    color: #92400e;
    background: #fef3c7;
}

.status-pill.good {
    color: #146c43;
    background: #d8f3dc;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #305174;
    background: #e6eef8;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.success {
    color: #146c43;
    background: #d8f3dc;
}

.status-pill.muted {
    color: #5f6b7a;
    background: #edf0f3;
}

.status-pill.draft {
    color: #5f6b7a;
    background: #edf0f3;
}

.status-pill.published {
    color: #146c43;
    background: #d8f3dc;
}

.status-pill.scheduled {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-pill.private {
    color: #92400e;
    background: #fef3c7;
}

.status-pill.new {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-pill.ignored {
    color: #5f6b7a;
    background: #edf0f3;
}

.status-pill.drafted {
    color: #7c3aed;
    background: #ede9fe;
}

.status-pill.risk-low {
    color: #146c43;
    background: #d8f3dc;
}

.status-pill.risk-normal {
    color: #305174;
    background: #e6eef8;
}

.status-pill.risk-high {
    color: #92400e;
    background: #fef3c7;
}

.status-pill.risk-blocked {
    color: #991b1b;
    background: #fee2e2;
}

.risk-row {
    background: #fff7ed;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #146c43;
    background: #d8f3dc;
    font-size: 12px;
    font-weight: 800;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #3f4854;
    background: #edf0f3;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.source-google_trends {
    color: #1d4ed8;
    background: #dbeafe;
}

.source-naver_trends,
.source-naver_suggest,
.source-naver_datalab {
    color: #146c43;
    background: #d8f3dc;
}

.muted-text {
    color: var(--muted);
}

.memo-cell {
    max-width: 260px;
    color: #3f4854;
    overflow-wrap: anywhere;
}

.muted-cell {
    color: var(--muted);
    max-width: 280px;
}

.code-preview {
    max-width: 360px;
    max-height: 90px;
    margin: 0;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #3f4854;
    font-size: 12px;
    line-height: 1.45;
}

.title-cell {
    min-width: 260px;
    max-width: 420px;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.table-actions form {
    margin: 0;
}

.panel-actions,
.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.panel-actions form {
    margin: 0;
}

.random-ai-form {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.random-ai-form label {
    display: grid;
    gap: 4px;
}

.random-ai-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.random-ai-form input {
    width: 132px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}

.random-ai-form input[name="random_ai_count"],
.random-ai-form input[name="random_ai_interval_hours"] {
    width: 76px;
}

.bulk-actions {
    justify-content: flex-end;
    margin-bottom: 12px;
}

.bulk-actions select {
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.admin-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.admin-button {
    min-height: 42px;
    padding: 10px 16px;
}

.admin-button.small {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 13px;
}

.small-button {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 13px;
}

.admin-button:hover,
.small-button:hover {
    background: var(--primary-dark);
}

.admin-button.secondary,
.small-button.secondary {
    color: var(--text);
    background: #e8edf3;
}

.admin-button.secondary:hover,
.small-button.secondary:hover {
    background: #d9e1ea;
}

.small-button.danger {
    background: #c2410c;
}

.small-button.danger:hover {
    background: #9a3412;
}

.modal-open {
    overflow: hidden;
}

.admin-modal[hidden] {
    display: none;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.admin-modal-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(760px, 90vh);
    overflow: auto;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.25);
}

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.admin-modal-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.modal-close-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: #f8fafc;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.view-log-content {
    padding: 20px 22px 24px;
}

.view-log-grid {
    display: grid;
    gap: 20px;
}

.view-log-grid h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.compact-table {
    min-width: 0;
    font-size: 13px;
}

.compact-table th,
.compact-table td {
    padding: 9px 10px;
}

.admin-form {
    display: grid;
    gap: 18px;
    max-width: 760px;
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-row label,
.check-row {
    font-weight: 800;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.form-row textarea {
    resize: vertical;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.checkbox-row {
    align-content: end;
}

.checkbox-row label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    font-weight: 800;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.post-form {
    display: grid;
    gap: 20px;
}

.form-section {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row.wide {
    grid-column: 1 / -1;
}

.check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.key-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.key-suggestions code {
    padding: 6px 8px;
    border-radius: 6px;
    color: #305174;
    background: #e6eef8;
    font-size: 13px;
    font-weight: 800;
}

.masked-key,
.field-help {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sticky-form-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 14px 0;
    background: #eef1f5;
}

.preview-panel {
    max-width: 980px;
}

.preview-thumbnail {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    margin-bottom: 22px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.preview-summary {
    margin-bottom: 24px;
    padding: 16px;
    color: var(--text);
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    font-size: 17px;
}

.preview-content {
    overflow-wrap: anywhere;
}

.preview-content img {
    max-width: 100%;
    height: auto;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 22px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.filter-row {
    display: grid;
    gap: 7px;
}

.filter-row label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.page-info {
    color: var(--muted);
    font-weight: 800;
}

.admin-button.disabled,
.small-button.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.detail-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.detail-item span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-item strong {
    overflow-wrap: anywhere;
}

.notice-box {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.notice-box.warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.notice-box p {
    margin: 0;
}

.result-list {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #3f4854;
    font-size: 13px;
    line-height: 1.6;
}

.quality-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quality-check-list .check-row {
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.quality-check-list .final-check {
    border-color: #86efac;
    background: #f0fdf4;
}

.empty-text {
    padding: 24px;
    color: var(--muted);
    background: #f8fafc;
    border: 1px dashed var(--line);
    border-radius: 8px;
    text-align: center;
}

.site-footer {
    padding: 24px 0;
    color: var(--muted);
    background: var(--surface);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 640px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
        gap: 10px;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .home-section,
    .login-section,
    .status-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .intro-panel,
    .login-box,
    .status-box {
        padding: 24px;
    }

    .lead {
        font-size: 16px;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        padding: 18px 16px;
    }

    .admin-brand {
        margin-bottom: 14px;
    }

    .admin-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-menu a {
        padding: 10px;
        font-size: 14px;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 16px;
        gap: 6px;
    }

    .admin-main {
        padding: 16px;
    }

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

    .stats-layout,
    .mini-stat-list {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 96px;
    }

    .stat-card strong {
        font-size: 30px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .random-ai-form {
        width: 100%;
    }

    .random-ai-form label,
    .random-ai-form input,
    .random-ai-form .admin-button {
        width: 100%;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

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

    .quality-check-list {
        grid-template-columns: 1fr;
    }

    .pixabay-panel-head {
        display: grid;
    }

    .pixabay-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .system-status-list {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .form-actions,
    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions .admin-button,
    .form-actions .admin-button,
    .pagination .admin-button {
        width: 100%;
    }

    .page-info {
        text-align: center;
    }

    .public-header-inner {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px 0;
        gap: 12px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .public-nav-wrap {
        display: none;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .public-nav-wrap.is-open {
        display: flex;
    }

    .public-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .public-nav a {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
        background: #f8fafc;
    }

    .header-search {
        width: 100%;
        min-width: 0;
    }

    .public-hero {
        padding: 42px 0 30px;
    }

    .hero-search,
    .public-search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 44px;
    }

    .public-layout {
        grid-template-columns: 1fr;
    }

    .post-card-grid,
    .related-grid,
    .search-helper-grid,
    .post-adjacent {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .post-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .post-card.no-thumb {
        grid-template-columns: 1fr;
    }

    .post-thumb {
        min-height: 180px;
    }

    .public-search-form,
    .public-pagination,
    .related-list a {
        align-items: stretch;
        flex-direction: column;
    }

    .post-content {
        padding: 20px;
        font-size: 17px;
    }

    .content-cta a {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .content-cta span:last-child {
        align-self: flex-start;
    }

    .post-content h2 {
        font-size: 24px;
    }

    .post-content h3 {
        font-size: 21px;
    }

    .related-list time,
    .related-list small {
        white-space: normal;
    }

    .public-footer-inner {
        flex-direction: column;
    }
}
