body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.news-shell {
    flex: 1;
    width: 100%;
    max-width: 1128px;
    min-height: calc(100vh - 220px);
    margin: 0 auto;
    padding: 64px 24px 80px;
}

.site-footer .footer__base {
    border-top: 0;
    padding-top: 0;
}

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

.news-shell h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 24px;
}

.news-heading h1 {
    margin: 0;
}

.news-list {
    display: grid;
    gap: 24px;
}

.news-card,
.news-article,
.news-panel,
.news-dialog {
    min-width: 0;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow-wrap: anywhere;
}

.news-card + .news-card {
    margin-top: 24px;
}

.news-card h2 {
    margin-bottom: 12px;
    font-size: 1.7rem;
}

.news-card time,
.news-article time {
    display: block;
    margin: 12px 0;
    color: var(--muted);
}

.news-article > * + * {
    margin-top: 20px;
}

.news-article h2,
.news-article h3 {
    margin-top: 32px;
}

.news-article ul,
.news-article ol {
    padding-left: 28px;
}

.news-article pre {
    padding: 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    overflow: auto;
}

.news-article img {
    max-width: 100%;
    height: auto;
}

.news-article blockquote {
    margin-left: 0;
    padding-left: 20px;
    border-left: 3px solid var(--border);
    color: var(--muted);
}

.news-article table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.news-article td,
.news-article th {
    padding: 10px;
    border: 1px solid var(--border);
}

.manager-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
    gap: 24px;
    align-items: start;
}

.manager-status {
    min-height: 28px;
    margin-bottom: 24px;
}

.manager-status[role="alert"] {
    color: var(--text);
    font-weight: 700;
}

.post-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.post-list button {
    width: 100%;
    padding: 12px;
    text-align: left;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.post-list button[aria-current="true"] {
    background: var(--accent-soft);
    border-color: var(--focus);
}

.editor-panel label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.editor-panel input[type="text"],
.editor-panel textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--glass);
    color: var(--text);
    font: inherit;
}

.editor-panel textarea {
    resize: vertical;
    min-height: 360px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: Consolas, monospace;
    line-height: 1.6;
}

.editor-panel .publish-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.editor-tabs,
.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.editor-actions:last-child {
    margin-bottom: 0;
}

.editor-tabs [aria-selected="true"] {
    border-color: var(--focus);
    background: var(--accent-soft);
}

#preview-panel {
    min-height: 360px;
    box-shadow: none;
}

.news-dialog {
    width: min(480px, calc(100% - 32px));
    color: var(--text);
    background: var(--surface);
}

.news-dialog p {
    margin-top: 20px;
}

.news-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
}

.news-shell button:disabled {
    opacity: 0.55;
    cursor: wait;
}

[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .news-shell {
        padding: 40px 16px 56px;
    }

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

    .news-card,
    .news-article,
    .news-panel {
        padding: 24px;
    }

    .post-list {
        max-height: 260px;
        overflow-y: auto;
    }
}
