:root {
    --bg: #f7f8f6;
    --surface: #ffffff;
    --surface-soft: #eef5f2;
    --ink: #17201e;
    --muted: #66726e;
    --line: #dce4e0;
    --primary: #2b7a78;
    --primary-dark: #185c59;
    --accent: #d96c4f;
    --danger: #b83d3d;
    --warning: #8d6a16;
    --shadow: 0 18px 50px rgba(23, 32, 30, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(238, 245, 242, 0.8), rgba(247, 248, 246, 0) 320px),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.narrow {
    width: min(820px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(247, 248, 246, 0.9);
    border-bottom: 1px solid rgba(220, 228, 224, 0.82);
    backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.admin-head,
.admin-actions,
.row-actions,
.search-row {
    display: flex;
    align-items: center;
}

.header-inner {
    justify-content: space-between;
    min-height: 76px;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
    line-height: 1.2;
}

.brand small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, var(--primary), var(--primary-dark)),
        var(--primary);
    box-shadow: inset -8px -8px 0 rgba(255, 255, 255, 0.14);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a,
.tabs a,
.pagination a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
}

.nav a:hover,
.tabs a:hover,
.pagination a:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.button,
button.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 10px 24px rgba(43, 122, 120, 0.22);
}

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

.button-small {
    min-height: 38px;
    padding: 8px 12px;
}

.button-secondary {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.hero {
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 15%, rgba(217, 108, 79, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(43, 122, 120, 0.13), rgba(255, 255, 255, 0.35));
}

.hero-inner {
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 44px;
    align-items: center;
    padding: 56px 0;
}

.hero-single {
    grid-template-columns: minmax(0, 760px);
    min-height: 250px;
}

.hero h1,
.post-view h1,
.admin-head h1,
.panel h1,
.empty-state h1 {
    margin: 0;
    line-height: 1.12;
}

.hero h1 {
    max-width: 720px;
    font-size: 48px;
}

.hero-copy p:last-child {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.search-box,
.panel,
.preview-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-box {
    padding: 22px;
}

.search-page .search-box {
    margin-bottom: 24px;
}

.search-box label,
.form label,
.editor-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.search-row {
    gap: 10px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

input[type="file"] {
    padding: 9px 12px;
}

.file-upload span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.attachment-manager {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.attachment-manager label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.attachment-manager input {
    width: auto;
    min-height: 0;
}

.youtube-embed {
    aspect-ratio: 16 / 9;
    margin-top: 26px;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 122, 120, 0.14);
}

.section {
    padding: 48px 0;
}

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

.post-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(23, 32, 30, 0.06);
}

.post-cover {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--surface-soft);
    overflow: hidden;
}

.post-cover.is-portrait {
    aspect-ratio: 4 / 5;
}

.post-cover.is-square {
    aspect-ratio: 1 / 1;
}

.post-cover img,
.post-hero-image,
.preview-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-cover.is-portrait img,
.post-cover.is-square img,
.post-hero-image.is-portrait,
.post-hero-image.is-square {
    object-fit: contain;
    background: var(--surface-soft);
}

.post-card-body {
    padding: 20px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

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

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

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

.taxonomy-filter {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.taxonomy-filter div,
.taxonomy-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.taxonomy-filter strong {
    margin-right: 4px;
}

.taxonomy-filter a,
.taxonomy-line a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 8px;
    color: var(--primary-dark);
    background: rgba(43, 122, 120, 0.1);
    font-size: 13px;
    font-weight: 800;
}

.taxonomy-filter a.active {
    color: #fff;
    background: var(--primary);
}

.taxonomy-filter p {
    margin: 0;
    color: var(--muted);
}

.post-taxonomy {
    margin-top: 0;
    margin-bottom: 18px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    min-width: 42px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.pagination a.active,
.tabs a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.empty-state {
    padding: 44px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.empty-state.compact {
    padding: 28px;
    margin-top: 22px;
}

.empty-state h1,
.empty-state h2 {
    margin: 0 0 10px;
}

.empty-state p {
    margin: 0 auto 22px;
    max-width: 560px;
    color: var(--muted);
}

.post-view-section {
    padding-top: 34px;
}

.post-view {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.post-hero-image {
    aspect-ratio: 16 / 7;
    background: var(--surface-soft);
}

.post-hero-image.is-portrait {
    aspect-ratio: 4 / 5;
    max-height: 76vh;
}

.post-hero-image.is-square {
    aspect-ratio: 1 / 1;
    max-height: 76vh;
}

.post-view > :not(.post-hero-image) {
    margin-left: 40px;
    margin-right: 40px;
}

.post-view .post-meta {
    margin-top: 34px;
}

.post-view h1 {
    font-size: 42px;
    margin-bottom: 18px;
}

.lead {
    color: var(--muted);
    font-size: 19px;
}

.content {
    padding-bottom: 44px;
}

.content p {
    margin: 0 0 20px;
}

.attachments {
    padding: 0 0 44px;
}

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

.attachments ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.attachments li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

.attachments a {
    color: var(--primary-dark);
    font-weight: 800;
    word-break: break-all;
}

.attachments span {
    flex: 0 0 auto;
    color: var(--muted);
}

.news-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(43, 122, 120, 0.08), rgba(217, 108, 79, 0.08));
}

.news-source span,
.news-source p {
    color: var(--muted);
    font-size: 13px;
}

.news-source p {
    margin: 0;
    text-align: right;
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

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

.news-section-main {
    border-top: 4px solid var(--primary);
}

.news-section-visual {
    border-top: 4px solid var(--accent);
    background: #fffaf8;
}

.news-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(238, 245, 242, 0.62);
}

.news-section-head strong {
    font-size: 15px;
}

.news-section-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.news-featured {
    display: grid;
    gap: 0;
}

.news-feature-card {
    border-bottom: 1px solid rgba(220, 228, 224, 0.76);
}

.news-feature-card:last-child {
    border-bottom: 0;
}

.news-feature-card a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
        "image meta"
        "image title";
    gap: 4px 12px;
    align-items: center;
    padding: 12px;
}

.news-feature-card img {
    grid-area: image;
    width: 100%;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-soft);
}

.news-feature-card span,
.news-feature-card strong {
    min-width: 0;
}

.news-feature-card span {
    grid-area: meta;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-feature-card strong {
    grid-area: title;
    font-size: 14px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-list {
    display: grid;
    gap: 0;
}

.news-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 42px;
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(220, 228, 224, 0.82);
    background: var(--surface);
}

.news-row:nth-child(2n) {
    background: #fbfcfb;
}

.news-row:nth-child(-n + 3) {
    background: rgba(43, 122, 120, 0.05);
}

.news-row:last-child {
    border-bottom: 0;
}

.news-row:hover {
    background: rgba(217, 108, 79, 0.08);
}

.news-row.no-image {
    grid-template-columns: 82px minmax(0, 1fr) 42px;
}

.news-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--primary-dark);
    background: rgba(43, 122, 120, 0.1);
    font-size: 12px;
    font-weight: 800;
}

.news-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-soft);
}

.news-thumb img {
    width: 82px;
    height: 56px;
    object-fit: cover;
}

.news-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 56px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 900;
    background: rgba(43, 122, 120, 0.1);
}

.news-row-body {
    min-width: 0;
}

.news-row-body p {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-row-body p span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-row-body h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.32;
}

.news-row-body h2 a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-row-body a:hover {
    color: var(--primary);
}

.export-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(43, 122, 120, 0.09), rgba(217, 108, 79, 0.08)),
        var(--surface);
}

.export-hero span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.export-hero h2 {
    margin: 6px 0 10px;
    font-size: 30px;
    line-height: 1.2;
}

.export-hero p {
    margin: 0;
    color: var(--muted);
}

.export-hero dl {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.export-hero dl div {
    display: grid;
    gap: 2px;
}

.export-hero dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.export-hero dd {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.export-layout,
.export-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.export-admin-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
}

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

.export-rank-list {
    display: grid;
}

.export-rank-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 160px;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.export-rank-row:nth-child(1) {
    background: rgba(43, 122, 120, 0.07);
}

.export-rank-row:last-child {
    border-bottom: 0;
}

.export-rank-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 900;
}

.export-rank-row h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.export-rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.export-rate {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.export-rate strong {
    color: var(--accent);
    font-size: 24px;
    line-height: 1.1;
}

.export-rate span {
    color: var(--muted);
    font-size: 12px;
}

.export-report-list {
    display: grid;
}

.export-report-list a {
    display: grid;
    gap: 3px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}

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

.export-report-list a.active,
.export-report-list a:hover {
    background: var(--surface-soft);
}

.export-report-list span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.visitor-list {
    display: grid;
    gap: 14px;
}

.stats-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.stats-filter label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stats-cards div,
.stats-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.stats-cards div {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.stats-cards span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stats-cards strong {
    font-size: 30px;
    line-height: 1.1;
}

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

.stats-panel-wide {
    margin-bottom: 22px;
}

.stats-panel {
    overflow: hidden;
}

.stats-panel h2 {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 19px;
}

.stats-panel .muted {
    padding: 16px;
    margin: 0;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

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

.stats-table th {
    color: var(--muted);
    background: #fbfcfb;
    font-size: 13px;
}

.stats-table td:first-child {
    max-width: 360px;
    overflow-wrap: anywhere;
}

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

.column-chart {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(22px, 1fr);
    align-items: end;
    gap: 8px;
    min-height: 230px;
    padding: 18px;
    overflow-x: auto;
}

.column-chart-item {
    display: grid;
    grid-template-rows: minmax(120px, 1fr) auto;
    gap: 8px;
    align-items: end;
    min-width: 24px;
}

.column-chart-item span {
    display: block;
    min-height: 8px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.column-chart-item small {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    writing-mode: vertical-rl;
}

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

.bar-list {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.bar-row {
    display: grid;
    gap: 6px;
}

.bar-row div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.bar-row strong {
    overflow-wrap: anywhere;
}

.bar-row span {
    color: var(--muted);
    font-size: 13px;
}

.bar-track {
    display: block;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}

.bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.recent-visit-list {
    display: grid;
}

.recent-visit-row {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(260px, 1.2fr);
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.recent-visit-row:last-child {
    border-bottom: 0;
}

.recent-visit-row div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.recent-visit-row span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.visitor-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.8fr) minmax(180px, 1fr) minmax(200px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.visitor-row.is-blocked {
    border-color: rgba(184, 61, 61, 0.35);
    background: rgba(184, 61, 61, 0.06);
}

.visitor-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.visitor-main span,
.visitor-main small,
.visitor-meta {
    color: var(--muted);
    font-size: 13px;
}

.visitor-main span,
.visitor-main small {
    overflow-wrap: anywhere;
}

.visitor-row label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.visitor-meta {
    display: grid;
    gap: 4px;
}

.check-row {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: var(--ink) !important;
}

.check-row input {
    width: auto;
    min-height: 0;
}

.panel {
    padding: 30px;
}

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

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

.muted,
.helper {
    color: var(--muted);
}

.helper {
    margin-bottom: 0;
}

.helper a {
    color: var(--primary);
    font-weight: 700;
}

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

.check-list span {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
}

.alert {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

.alert-success {
    border-color: rgba(43, 122, 120, 0.35);
    background: rgba(43, 122, 120, 0.1);
}

.alert-warning {
    border-color: rgba(141, 106, 22, 0.35);
    background: rgba(141, 106, 22, 0.1);
}

.alert-danger {
    border-color: rgba(184, 61, 61, 0.35);
    background: rgba(184, 61, 61, 0.1);
}

.admin-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-head h1 {
    font-size: 34px;
}

.admin-head .muted {
    margin: 8px 0 0;
}

.admin-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tabs a {
    border: 1px solid var(--line);
    background: var(--surface);
}

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

.admin-menu-group {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.admin-menu-group h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.admin-menu-group a {
    display: grid;
    gap: 3px;
    padding: 12px;
    border-radius: 8px;
    background: #fbfcfb;
}

.admin-menu-group a:hover {
    background: var(--surface-soft);
}

.admin-menu-group span {
    color: var(--muted);
    font-size: 13px;
}

.taxonomy-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.taxonomy-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.taxonomy-panel h2 {
    margin: 0;
    font-size: 22px;
}

.taxonomy-create,
.taxonomy-row {
    display: grid;
    gap: 12px;
}

.taxonomy-create {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.taxonomy-create label,
.taxonomy-row label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

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

.taxonomy-row,
.taxonomy-delete {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

.taxonomy-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
    align-items: end;
}

.taxonomy-row-small {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.taxonomy-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    align-self: center;
}

.taxonomy-delete {
    margin-top: -6px;
    border-top: 0;
    background: var(--surface);
}

.taxonomy-delete button {
    border: 0;
    color: var(--danger);
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.maintenance-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    gap: 22px;
    align-items: start;
}

.maintenance-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.maintenance-panel h2 {
    margin: 0;
    font-size: 22px;
}

.maintenance-panel .muted {
    margin: 0;
}

.upload-list {
    display: grid;
    gap: 12px;
}

.upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

.upload-row div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.upload-row strong,
.upload-row span,
.upload-row small {
    overflow-wrap: anywhere;
}

.upload-row span,
.upload-row small {
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

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

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

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

.slug {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    word-break: break-all;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.badge-published {
    color: var(--primary-dark);
    background: rgba(43, 122, 120, 0.12);
}

.badge-draft {
    color: var(--warning);
    background: rgba(141, 106, 22, 0.12);
}

.actions-col {
    width: 210px;
}

.row-actions {
    flex-wrap: wrap;
    gap: 10px;
}

.row-actions a,
.row-actions button {
    min-height: 34px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    color: var(--primary-dark);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.row-actions a:hover,
.row-actions button:hover {
    background: var(--surface-soft);
}

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

.editor-form {
    min-width: 0;
}

.compact-head {
    margin-bottom: 4px;
}

.preview-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.preview-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.25;
}

.preview-panel img {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    background: var(--surface-soft);
}

.preview-panel p {
    color: var(--muted);
}

.preview-panel dl {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
}

.preview-panel dl div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
}

.preview-panel dt {
    color: var(--muted);
    font-weight: 700;
}

.preview-panel dd {
    margin: 0;
    word-break: break-all;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-inner {
    min-height: 82px;
    justify-content: space-between;
    gap: 16px;
}

.footer-inner a {
    color: var(--primary-dark);
    font-weight: 700;
}

.footer-side {
    display: grid;
    gap: 2px;
    justify-items: end;
}

.footer-side small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .hero-inner,
    .admin-menu-grid,
    .insight-grid,
    .news-layout,
    .export-hero,
    .export-layout,
    .export-admin-layout,
    .maintenance-layout,
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        min-height: auto;
        padding: 42px 0;
    }

    .hero h1 {
        font-size: 38px;
    }

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

    .recent-visit-row {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .container,
    .narrow {
        width: min(100% - 24px, 1120px);
    }

    .header-inner,
    .admin-head,
    .footer-inner,
    .search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .brand {
        width: 100%;
    }

    .nav,
    .admin-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .footer-side {
        justify-items: start;
    }

    .nav a,
    .button {
        flex: 1 1 auto;
    }

    .hero h1 {
        font-size: 32px;
    }

    .post-grid,
    .form-grid,
    .taxonomy-layout,
    .taxonomy-row,
    .taxonomy-row-small {
        grid-template-columns: 1fr;
    }

    .stats-cards,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .visitor-row,
    .export-rank-row,
    .upload-row {
        grid-template-columns: 1fr;
    }

    .export-rate {
        justify-items: start;
    }

    .news-source {
        align-items: flex-start;
        flex-direction: column;
    }

    .news-source p {
        text-align: left;
    }

    .news-row,
    .news-row.no-image {
        grid-template-columns: 68px minmax(0, 1fr) 34px;
        gap: 10px;
        min-height: 66px;
        padding: 9px 10px;
    }

    .news-thumb img,
    .news-thumb-empty {
        width: 68px;
        height: 48px;
    }

    .news-rank {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .news-row-body h2 {
        font-size: 14px;
    }

    .news-row-body p {
        font-size: 11px;
    }

    .news-feature-card a {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .news-feature-card img {
        height: 66px;
    }

    .post-view > :not(.post-hero-image) {
        margin-left: 22px;
        margin-right: 22px;
    }

    .post-view h1,
    .admin-head h1 {
        font-size: 30px;
    }

    .panel,
    .empty-state {
        padding: 22px;
    }
}
