/* Blog views and protected editor; all presentation is scoped to the news page. */
.news-page .news-main { padding-top: 24px; max-width: 1200px; width: 100%; margin-inline: auto; }
.news-page [hidden] { display: none !important; }
.news-page .news-shell { overflow: hidden; padding: 0 24px 24px; border: 1px solid #355574; border-radius: 20px; background: rgba(5,20,37,.84); box-shadow: var(--panel-shadow); }
.news-page .news-hero { padding: 32px 24px 28px; margin: 0 -24px 24px; background: linear-gradient(90deg,#06172c 12%,rgba(6,23,44,.95) 34%,rgba(6,23,44,.2)),linear-gradient(0deg,#08192e,transparent 48%),url('../images/velocity-castle-night.webp') right 40%/cover; border-bottom: 1px solid var(--gold-line); }
.news-page .news-hero .brand { font-size: .8rem; margin-bottom: 6px; }
.news-page .news-hero h1 { margin: 0 0 8px; font-size: clamp(1.75rem,2.6vw,2.6rem); line-height: 1.2; }
.news-page .news-hero p { margin: 0; color: var(--text-secondary); font-size: 1rem; }
.news-page .news-columns { display: grid; grid-template-columns: minmax(0,7fr) minmax(240px,3fr); gap: 24px; align-items: start; }
.news-page .news-list { display: grid; gap: 18px; }
.news-page .news-blog-card { display: grid; grid-template-columns: minmax(160px,32%) minmax(0,1fr); gap: 22px; padding: 14px; border: 1px solid #2d5473; border-radius: 14px; background: linear-gradient(135deg,rgba(18,43,68,.8),rgba(5,24,44,.75)); transition: border-color 150ms,box-shadow 150ms; }
.news-page .news-blog-card:first-child { border-color: var(--accent-gold); box-shadow: 0 0 14px rgba(255,210,31,.1); }
.news-page .news-blog-card:hover { border-color: var(--accent-gold); }
.news-page .news-blog-card.no-image { grid-template-columns: minmax(0,1fr); }
.news-page .news-blog-card img { width: 100%; height: 100%; min-height: 175px; max-height: 250px; object-fit: cover; border-radius: 10px; }
.news-page .news-card-copy { display: flex; flex-direction: column; min-width: 0; padding: 0 0 2px; }
.news-page .news-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-secondary); }
.news-page .news-category { display: inline-flex; padding: 2px 10px; border: 1px solid rgba(255,210,31,.55); border-radius: 999px; background: rgba(255,210,31,.14); color: var(--accent-gold); font-size: .8rem; font-weight: 750; }
/* Each category has its own colour; Update keeps the gold accent. */
.news-page .news-category[data-category="Info"] { background: rgba(169,199,235,.1); color: #d5e2f2; border-color: #7f9fc4; }
.news-page .news-category[data-category="Changelog"] { background: rgba(100,239,173,.12); color: var(--success); border-color: rgba(100,239,173,.5); }
.news-page .news-category[data-category="Ankündigung"] { background: rgba(75,205,235,.12); color: #4bcdeb; border-color: rgba(75,205,235,.5); }
.news-page .news-category[data-category="Wartung"] { background: rgba(255,115,129,.12); color: var(--danger); border-color: rgba(255,115,129,.5); }
.news-page .news-blog-card h2 { margin: 10px 0 6px; line-height: 1.3; font-size: clamp(1.1rem,1.5vw,1.4rem); overflow-wrap: anywhere; }
.news-page .news-card-copy p { margin: 0 0 12px; color: var(--text-secondary); font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.news-page .news-read-more { align-self: end; margin-top: auto; color: var(--accent-gold); font-size: .9rem; font-weight: 750; text-decoration: none; padding: 6px 2px; }
.news-page .news-read-more:hover { text-decoration: underline; }
.news-page .news-sidebar { display: grid; gap: 18px; }
.news-page .news-side-card { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: start; gap: 12px; padding: 20px 16px; border: 1px solid #294d6b; border-radius: 14px; background: linear-gradient(145deg,#102b45,#091c31); }
.news-page .news-side-card > svg { width: 34px; height: 34px; }
.news-page .discord-icon { color: #7275ff; }
.news-page .edit-icon { color: var(--accent-gold); }
.news-page .news-side-card h2 { margin: 0 0 4px; font-size: 1rem; }
.news-page .news-side-card p { margin: 0; color: var(--text-secondary); font-size: .85rem; line-height: 1.55; }
.news-page .news-side-actions { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.news-page .news-side-card > button { grid-column: 1/-1; margin: 4px 20px 0; }
.news-page .discord-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; background: rgba(132,153,175,.12); border-radius: 20px; color: var(--text-secondary); font-size: .75rem; font-weight: 650; }
.news-page .discord-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.news-page .discord-status[data-state="connected"] { color: var(--success); background: rgba(21,104,63,.25); }
.news-page .discord-status[data-state="error"] { color: #ffc46d; }
.news-page .discord-status[data-state="disconnected"] { color: var(--danger); }
.news-page .news-button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; gap: 8px; padding: 8px 14px; font: inherit; font-size: .85rem; font-weight: 700; border: 1px solid #355d80; border-radius: 10px; background: linear-gradient(135deg,#15364f,#0b233b); color: var(--text-primary); text-decoration: none; cursor: pointer; }
.news-page .news-button:hover:not(:disabled) { border-color: var(--accent-gold); }
.news-page .news-button:disabled { opacity: .55; cursor: default; }
.news-page .news-button-gold { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(255,210,31,.12); }
.news-page .news-button-danger { border-color: var(--danger); color: var(--danger); }
.news-page a:focus-visible,.news-page button:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.news-page #moreNews { margin-top: 20px; }
.news-page .news-ornament { display: flex; align-items: center; gap: 12px; color: var(--accent-gold); margin-top: 26px; font-size: 14px; }
.news-page .news-ornament::before,.news-page .news-ornament::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg,transparent,var(--accent-gold)); }
.news-page .news-ornament::after { transform: rotate(180deg); }
.news-page .news-detail { padding: 28px 24px 10px; min-width: 0; }
.news-page .news-back { display: inline-block; margin-bottom: 24px; color: var(--accent-gold); text-decoration: none; font-size: .9rem; }
.news-page .news-detail h1 { font-size: clamp(1.6rem,2.6vw,2.5rem); margin: 12px 0 20px; line-height: 1.25; overflow-wrap: anywhere; }
.news-page .news-detail-cover { width: 100%; max-height: 380px; aspect-ratio: 3.4; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.news-page .news-body { color: #cfdeee; line-height: 1.7; overflow-wrap: anywhere; }
.news-page .news-body p { margin: 12px 0; white-space: pre-line; }
.news-page .news-body h2,.news-page .news-body h3 { color: var(--text-primary); margin: 24px 0 10px; padding-left: 12px; border-left: 3px solid var(--accent-gold); font-size: 1.2rem; }
.news-page .news-body ul,.news-page .news-body ol { padding-left: 24px; margin-block: 12px; }
.news-page .news-body li::marker { color: var(--accent-gold); }
.news-page .news-gallery { display: grid; gap: 16px; margin: 28px 0 8px; }
.news-page .news-gallery-image { display: block; width: 100%; height: auto; max-height: 720px; object-fit: contain; border-radius: 12px; border: 1px solid var(--panel-border); background: var(--input-bg); }
.news-page .news-body a { color: var(--accent-gold); }
.news-page .news-body blockquote { margin: 24px 0; padding: 14px 18px; border: 1px solid var(--gold-line); border-radius: 12px; background: rgba(255,210,31,.035); }
.news-page .news-body code { padding: 2px 5px; border-radius: 4px; background: var(--input-bg); }
.news-page .news-detail-footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--text-secondary); }
.news-page .news-empty { padding: 32px 22px; border: 1px dashed var(--line); border-radius: 12px; color: var(--text-secondary); }
.news-page .news-admin-panel { width: 100%; margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-navy); color: var(--text-primary); scroll-margin-top: 20px; }
.news-page .news-admin-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.news-page .news-admin-heading h2 { margin: 0; font-size: 1.4rem; }
.news-page .news-close { width: 36px; height: 36px; padding: 0; font-size: 1.5rem; color: var(--danger); background: transparent; border: 1px solid var(--danger); border-radius: 8px; cursor: pointer; }
.news-page .news-admin-panel label { margin-top: 14px; }
.news-page .news-admin-panel textarea { display: block; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-primary); background: var(--input-bg); font: inherit; resize: vertical; }
.news-page .news-admin-toolbar,.news-page .news-editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 16px; }
.news-page .news-editor-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.news-page .news-admin-list { display: grid; gap: 8px; max-height: 240px; overflow: auto; }
.news-page .news-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.news-page .news-admin-row small { display: block; color: var(--text-secondary); }
.news-page #newsLoginForm button { margin-top: 0; }
.news-page #newsEditorPreview { border: 1px solid var(--line); border-radius: 12px; margin-top: 20px; }
@media(max-width:1000px) {
 .news-page .news-columns { grid-template-columns: minmax(0,1fr) 250px; gap: 18px; }
 .news-page .news-blog-card { grid-template-columns: minmax(120px,30%) minmax(0,1fr); gap: 16px; }
 .news-page .news-blog-card.no-image { grid-template-columns: 1fr; }
}
@media(max-width:800px) { .news-page .news-columns { grid-template-columns: minmax(0,1fr); } .news-page .news-sidebar { grid-template-columns: 1fr 1fr; } }
@media(max-width:550px) {
 .news-page .news-shell { padding: 0 14px 18px; }
 .news-page .news-hero { margin-inline: -14px; padding: 28px 20px; }
 .news-page .news-hero p { font-size: .9rem; }
 .news-page .news-blog-card { grid-template-columns: minmax(0,1fr); }
 .news-page .news-blog-card img { height: 170px; min-height: 0; }
 .news-page .news-sidebar { grid-template-columns: minmax(0,1fr); }
 .news-page .news-detail { padding: 24px 4px 4px; }
 .news-page .news-detail-cover { aspect-ratio: 1.8; }
 .news-page .news-admin-panel { padding: 18px; }
 .news-page .news-admin-row { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) { .news-page .news-blog-card { transition:none; } }

/* Inline locked editor: private data is cleared on lock; blur is visual only. */
.news-page .news-admin-body { position: relative; min-width: 0; }
.news-page .news-admin-panel.is-locked .news-admin-body { height: 340px; overflow: hidden; }
.news-page .news-admin-content { transition: filter 140ms ease; }
.news-page .news-admin-panel.is-locked .news-admin-content { filter: blur(4px); opacity: .45; user-select: none; }
.news-page .news-login-overlay { position: absolute; inset: 0; z-index: 2; display: flex; justify-content: center; align-items: flex-start; padding: 72px 12px 20px; background: rgba(8,19,38,.12); }
.news-page .news-inline-login { width: min(360px,100%); padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,37,60,.97); box-shadow: 0 10px 24px rgba(3,12,25,.24); }
.news-page .news-inline-login h3 { margin: 0 0 6px; font-size: 1rem; }
.news-page .news-inline-login p { color: var(--text-secondary); font-size: .8rem; margin: 0; }
.news-page .news-inline-login label { font-size: .8rem; margin-top: 12px; }
.news-page .news-login-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.news-page .news-login-row input { min-width: 0; height: 40px; }
.news-page .news-close { display: grid; place-items: center; line-height: 1; flex: none; }
@media(max-width:550px) { .news-page .news-admin-panel { padding: 14px; } .news-page .news-editor-pair { grid-template-columns: minmax(0,1fr); gap: 0; } .news-page .news-login-overlay { padding-inline: 6px; } .news-page .news-inline-login { padding: 14px; } }
@media(prefers-reduced-motion:reduce) { .news-page .news-admin-content { transition: none; } }

.news-page .news-image-editor {margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:12px;min-width:0;}
.news-page .news-image-editor legend {padding:0 8px;font-weight:700;}
.news-page .news-image-editor>p {font-size:.85rem;}
.news-page .news-image-existing {display:block;width:100%;max-height:260px;object-fit:contain;border-radius:10px;margin:14px 0;background:var(--input-bg);}
.news-page #postImageCanvas {display:block;width:100%;height:auto;aspect-ratio:16/9;margin:16px 0;border:1px solid var(--line);border-radius:10px;touch-action:none;cursor:grab;background:var(--input-bg);}
.news-page #postImageCanvas:active {cursor:grabbing;}
.news-page .news-crop-controls {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px;}
.news-page .news-crop-controls label {margin:0;min-width:0;}
.news-page .news-crop-controls input {padding:0;width:100%;height:32px;accent-color:var(--accent-gold);}
.news-page .news-detail-cover {aspect-ratio:16/9;height:auto;max-height:520px;object-fit:contain;background:var(--input-bg);}
@media(max-width:600px){.news-page .news-crop-controls {grid-template-columns:minmax(0,1fr);gap:10px;}.news-page .news-image-editor {padding:12px;}}

/* Administration remains below the editor; close symbol ignores font metrics. */
.news-page .news-existing-posts {margin-top:28px;padding-top:22px;border-top:1px solid var(--line);}
.news-page .news-existing-posts h3 {margin:0 0 16px;font-size:1.05rem;}
.news-page #closeNewsAdmin {position:relative;display:block;line-height:0;padding:0;}
.news-page #closeNewsAdmin svg {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:20px;height:20px;margin:0;pointer-events:none;}
.news-page .news-admin-row>div:first-child {min-width:0;flex:1;overflow-wrap:anywhere;}
.news-page .news-admin-row-actions {display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none;}
.news-page .news-admin-delete {position:relative;width:40px;height:40px;padding:0;border:1px solid var(--danger);border-radius:10px;color:var(--danger);background:var(--input-bg);cursor:pointer;flex:none;}
.news-page .news-admin-delete svg {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:20px;height:20px;margin:0;pointer-events:none;}
.news-page .news-admin-delete:hover {background:rgba(255,115,129,.1);}
@media(max-width:550px){.news-page .news-admin-row-actions {margin-left:auto;}}

/* Keep the crop preview manageable; export resolution stays 1600 by 900. */
.news-page #postImageCanvas {max-width:640px;margin-inline:auto;}
.news-page .news-image-fit-actions {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;}
.news-page #postImageScale {float:right;font-variant-numeric:tabular-nums;color:var(--text-primary);}

/* Sidebar: category filter and an unobtrusive admin entry for the team. */
.news-page .news-filter { display: block; }
.news-page .news-filter h2 { margin: 0 0 12px; }
.news-page .news-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.news-page .news-filter-chip { padding: 5px 12px; border: 1px solid #42678a; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .82rem; cursor: pointer; }
.news-page .news-filter-chip:hover { border-color: #7f9fc4; color: var(--text-primary); }
.news-page .news-filter-chip[aria-pressed="true"] { border-color: var(--accent-gold); background: rgba(255,210,31,.08); color: var(--text-primary); }
.news-page .news-admin-entry { padding: 0 4px; }
.news-page .news-admin-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: #7f93ab; font: inherit; font-size: .8rem; cursor: pointer; }
.news-page .news-admin-link svg { width: 14px; height: 14px; }
.news-page .news-admin-link:hover:not(:disabled) { color: var(--text-primary); }
.news-page .news-admin-link:disabled { opacity: .7; cursor: default; }
.news-page .news-blog-card[data-filtered] { display: none; }
