/* /news, /news/<slug>, /admin/news and the news editor (routers/news.py, routers/admin_news.py).
 *
 * The look the owner asked for on 2026-10-26: news "in WoW style, with backgrounds".  Cards over the
 * hub's own zone art with a dark gradient, the title in the site's gold display face, a coloured tag
 * per category (a word first, a colour second), and on a post a full-width hero, the text set like a
 * book, quotes drawn as a parchment scroll, and links into the game coloured the way the game
 * colours them.  The crop of a picture is three custom properties the server writes as numbers:
 * --focus-x, --focus-y (where the picture is centred) and --zoom.
 */

:root {
  --news-ink: #05070c;
  --news-gold: #e6b422;
  --news-gold-hi: #ffd45e;
  --news-parchment: #eadbb4;
  --news-parchment-dark: #cdb47a;
  --news-parchment-ink: #2a1c0c;
}

/* ------------------------------------------------------------------------- categories */

.news-cat-news { --cat: #e6b422; }
.news-cat-patch { --cat: #4ea6ff; }
.news-cat-event { --cat: #ff9a3c; }
.news-cat-guide { --cat: #4ce04c; }
.news-cat-site { --cat: #c88bf5; }

.news-kicker { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; margin: 0 0 0.5rem; }
.news-tag {
  --c: var(--cat, var(--news-gold));
  display: inline-block;
  padding: 0.12rem 0.55rem 0.14rem;
  border: 1px solid color-mix(in srgb, var(--c) 70%, #000);
  border-radius: 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #0b0d14), color-mix(in srgb, var(--c) 14%, #07090e));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 45%, transparent), 0 1px 0 #000;
  color: color-mix(in srgb, var(--c) 55%, #fff);
  font-family: var(--font-heading);
  font-variant: small-caps;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-shadow: 0 1px 0 #000;
}
.news-tag-news { --c: #e6b422; }
.news-tag-patch { --c: #4ea6ff; }
.news-tag-event { --c: #ff9a3c; }
.news-tag-guide { --c: #4ce04c; }
.news-tag-site { --c: #c88bf5; }
.news-game, .news-pin, .news-state {
  font-size: 0.78rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: rgba(8, 12, 20, 0.7);
  color: var(--text-dim);
  line-height: 1.35;
}
.news-pin { color: var(--warn, #ffcc66); border-color: #6b5214; }
.news-state { text-transform: capitalize; }
.news-state-published { color: #7fe39a; border-color: #2d6b41; }
.news-state-scheduled { color: #8fd0ff; border-color: #24547d; }
.news-state-draft, .news-state-new { color: var(--text-dim); }
.news-state-archived { color: var(--text-faint); border-style: dashed; }

.news-meta { color: var(--text-faint); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: center; margin: 0; }
.news-feed-link { font-size: 0.85rem; }
.news-accent {
  width: 1.6em; height: 1.6em;
  vertical-align: -0.35em;
  margin-right: 0.45em;
  border: 1px solid #000;
  border-radius: 5px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cat, var(--news-gold)) 55%, #000), 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* A picture with its crop: centred on the focus, enlarged by the zoom, never past its frame. */
.news-card-art, .news-hero-art, .na-art img, .ne-art-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--focus-x, 50%) var(--focus-y, 50%);
}

/* ------------------------------------------------------------------------- the list */

.news-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem; }
.news-head > div { flex: 1 1 28rem; }
.news-admin-actions { margin: 0 0 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.news-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.news-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 17rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 2px);
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--cat) 18%, transparent), transparent 60%), linear-gradient(180deg, var(--bg-raised), var(--news-ink));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.news-card::before {
  /* The dark wash over the art, heaviest where the words are. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(0deg, rgba(5, 7, 12, 0.97) 0%, rgba(5, 7, 12, 0.86) 34%, rgba(5, 7, 12, 0.35) 70%, rgba(5, 7, 12, 0.12) 100%);
  pointer-events: none;
}
.news-card::after {
  /* The gold edge under a card, in its category's colour. */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cat) 60%, #000), var(--cat), color-mix(in srgb, var(--cat) 60%, #000), transparent);
  opacity: 0.8;
}
.news-card-art { z-index: -1; transition: transform 0.4s ease; }
.news-card:hover, .news-card:focus-within { border-color: color-mix(in srgb, var(--cat) 55%, var(--border-strong)); transform: translateY(-2px); }
.news-card:hover .news-card-art, .news-card:focus-within .news-card-art { transform: scale(calc(var(--zoom, 1) * 1.04)); }
.news-card-text { position: relative; z-index: 1; padding: 1rem 1.1rem 1.15rem; }
.news-card-title { margin: 0 0 0.35rem; font-size: 1.3rem; line-height: 1.2; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.8); }
.news-card-title a, .news-card-title a:visited { color: var(--news-gold); text-decoration: none; }
.news-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.news-card-title a:hover, .news-card-title a:focus-visible { color: var(--news-gold-hi); text-decoration: none; }
.news-card-title a:focus-visible { outline: none; }
.news-card:has(a:focus-visible) { outline: 2px solid var(--news-gold); outline-offset: 2px; }
.news-card-summary { margin: 0 0 0.6rem; color: #c9d2e3; font-size: 0.95rem; line-height: 1.45; text-shadow: 0 1px 0 #000; }
.news-card .news-meta { color: #9aa7bf; }
.news-card-plain { min-height: 12rem; }

.news-card-hero { grid-column: 1 / -1; min-height: clamp(18rem, 32vw, 26rem); }
.news-card-hero .news-card-text { padding: clamp(1.2rem, 0.8rem + 2vw, 2.4rem); max-width: 52rem; }
.news-card-hero .news-card-title { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.7rem); }
.news-card-hero .news-card-summary { font-size: 1.07rem; max-width: 44rem; }
.news-card-hero::before { background: linear-gradient(0deg, rgba(5, 7, 12, 0.96) 0%, rgba(5, 7, 12, 0.7) 40%, rgba(5, 7, 12, 0.1) 100%), linear-gradient(90deg, rgba(5, 7, 12, 0.75), transparent 70%); }

/* ------------------------------------------------------------------------- one post */

.news-crumbs { margin-bottom: 0.6rem; }
.news-article { container-type: inline-size; }
.news-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(15rem, 38vw, 27rem);
  display: flex;
  align-items: flex-end;
  margin: 0 0 1.75rem;
  border: 1px solid #3a3320;
  border-radius: calc(var(--radius) + 4px);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 60%), linear-gradient(180deg, #121a2a, var(--news-ink));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.news-hero-plain { min-height: 12rem; }
.news-hero-art { z-index: -2; }
.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(5, 7, 12, 0.97) 0%, rgba(5, 7, 12, 0.72) 38%, rgba(5, 7, 12, 0.15) 100%), radial-gradient(130% 100% at 0% 100%, rgba(5, 7, 12, 0.6), transparent 60%);
}
.news-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8f7016, var(--news-gold), #8f7016, transparent);
}
.news-hero-text { padding: clamp(1.1rem, 0.6rem + 2.4vw, 2.6rem); max-width: 56rem; }
.news-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 1.2rem + 3cqi, 3.2rem);
  line-height: 1.08;
  color: var(--news-gold);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, 0.85);
}
.news-lede { margin: 0 0 0.8rem; font-size: 1.1rem; line-height: 1.5; color: #d6deec; max-width: 46rem; text-shadow: 0 1px 0 #000; }
.news-hero .news-meta { color: #a9b5ca; }

.news-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 62rem) {
  .news-layout.has-toc { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  .news-layout.has-toc .news-toc { position: sticky; top: 4.5rem; }
}
.news-toc {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
}
.news-toc-title { margin: 0 0 0.4rem; font-family: var(--font-heading); font-variant: small-caps; letter-spacing: 0.06em; color: var(--news-gold); font-weight: 700; }
.news-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.news-toc-l3 { padding-left: 0.85rem; font-size: 0.85rem; }
.news-toc a, .news-toc a:visited { color: var(--text-dim); text-decoration: none; }
.news-toc a:hover, .news-toc a:focus-visible { color: var(--news-gold-hi); text-decoration: underline; }

.news-body { max-width: 72ch; font-size: 1.04rem; line-height: 1.72; color: #d3dae7; overflow-wrap: anywhere; }
.news-body > :first-child { margin-top: 0; }
.news-body p { margin: 0 0 1.05rem; }
.news-body h2, .news-body h3, .news-body h4, .news-body h5 { scroll-margin-top: 4.5rem; line-height: 1.25; }
.news-body h2 {
  margin: 2.1rem 0 0.8rem;
  font-size: 1.55rem;
  padding-bottom: 0.35rem;
  background: linear-gradient(90deg, #8f7016, rgba(143, 112, 22, 0)) bottom left / 100% 1px no-repeat;
}
.news-body h3 { margin: 1.6rem 0 0.55rem; font-size: 1.22rem; color: #f0cf6a; }
.news-body h4, .news-body h5 { margin: 1.3rem 0 0.45rem; font-size: 1.05rem; color: #e9d7a4; }
.news-body ul, .news-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.news-body li { margin: 0.25rem 0; }
.news-body ul > li::marker { color: var(--news-gold); }
.news-body ol > li::marker { color: var(--news-gold); font-weight: 700; }
.news-body strong { color: #f2f5fb; }
.news-body pre { background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; overflow-x: auto; line-height: 1.45; }
.news-body code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-inset); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.3em; }
.news-body pre code { background: none; border: 0; padding: 0; }
.news-body hr { border: 0; height: 14px; margin: 2rem 0; background: radial-gradient(circle, var(--news-gold) 0 3px, transparent 4px) center / 14px 14px no-repeat, linear-gradient(90deg, transparent, #8f7016 30%, #8f7016 70%, transparent) center / 100% 1px no-repeat; }

/* A quote is a parchment scroll: paper the colour of an old quest log, rolled at both ends. */
.news-body blockquote {
  position: relative;
  margin: 1.6rem 0;
  padding: 1rem 1.3rem;
  color: var(--news-parchment-ink);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.6;
  background:
    radial-gradient(120% 90% at 50% 50%, rgba(255, 250, 230, 0.55), transparent 70%),
    linear-gradient(180deg, var(--news-parchment), #e2cf9f 50%, var(--news-parchment));
  border-left: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 26px rgba(120, 82, 30, 0.35), 0 3px 12px rgba(0, 0, 0, 0.45);
}
.news-body blockquote::before, .news-body blockquote::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #a07a3e, #5a3e17 60%, #3b280c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.news-body blockquote::before { top: -6px; }
.news-body blockquote::after { bottom: -6px; }
.news-body blockquote p { margin: 0; }
.news-body blockquote strong { color: #1d1206; }
.news-body blockquote a, .news-body blockquote a:visited { color: #6b3c00; text-decoration-color: rgba(107, 60, 0, 0.5); }
.news-body blockquote .wow-link, .news-body blockquote .wow-link:visited { text-shadow: none; }
.news-body blockquote .wow-quest { color: #7a4f00; }
.news-body blockquote code { background: rgba(255, 255, 255, 0.35); border-color: rgba(90, 62, 23, 0.4); }

.news-figure { margin: 1.5rem 0; }
.news-figure img { display: block; width: 100%; max-height: 28rem; object-fit: cover; border-radius: var(--radius); border: 1px solid #3a3320; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.news-figure figcaption { margin-top: 0.4rem; color: var(--text-faint); font-size: 0.88rem; font-style: italic; text-align: center; }

/* Links into the game: coloured the way the game colours them, with the thing's icon. */
.wow-link, .wow-link:visited {
  display: inline;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 0 #000;
  white-space: normal;
}
.wow-link:hover, .wow-link:focus-visible { text-decoration: underline; }
.wow-link-icon {
  width: 1.15em; height: 1.15em;
  vertical-align: -0.2em;
  margin-right: 0.25em;
  border: 1px solid #000;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.wow-link-mark { display: inline-block; width: 0.95em; height: 0.95em; vertical-align: -0.1em; margin-right: 0.28em; border-radius: 50%; }
.wow-quest, .wow-quest:visited { color: #ffd100; }
.wow-quest .wow-link-mark { background: radial-gradient(circle at 50% 30%, #fff3a0, #ffd100 55%, #a67c00); box-shadow: 0 0 0 1px #000; position: relative; }
.wow-quest .wow-link-mark::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.7em; font-weight: 900; color: #2a1c00; line-height: 1; }
.wow-npc, .wow-npc:visited { color: #6ad1ff; }
.wow-npc .wow-link-mark { background: radial-gradient(circle at 50% 35%, #c6f0ff, #3aa3d6 60%, #0d4c6b); box-shadow: 0 0 0 1px #000; }
.wow-object, .wow-object:visited { color: #c9b98f; }
.wow-object .wow-link-mark { border-radius: 2px; background: linear-gradient(135deg, #e3d3a5, #8a7443); box-shadow: 0 0 0 1px #000; }
.wow-item, .wow-item:visited { color: #f2f3f8; }
.wow-item .wow-link-mark { border-radius: 3px; background: linear-gradient(135deg, #3a3f4f, #12141c); box-shadow: 0 0 0 1px #000; }
.wow-link.q0 { color: #b0b0b0; }
.wow-link.q1 { color: #f2f3f8; }
.wow-link.q2 { color: #4ce04c; }
.wow-link.q3 { color: #4ea6ff; }
.wow-link.q4 { color: #c88bf5; }
.wow-link.q5 { color: #ff9a3c; }
.wow-link.q6 { color: #e6cc80; }
.wow-link.q7 { color: #4fd8ff; }
.wow-unknown { opacity: 0.85; font-weight: 500; }

.news-back { margin-top: 2rem; }

/* ------------------------------------------------------------------------- admin: the list */

.na-order { margin: 0 0 1.25rem; padding: 0.9rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); }
.na-pinned { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.35rem; }
.na-pin { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-inset); cursor: grab; }
.na-pin.is-dragging { opacity: 0.5; border-style: dashed; }
.na-pin.is-over { border-color: var(--news-gold); }
.na-grip { color: var(--text-faint); letter-spacing: -0.2em; user-select: none; }
.na-pin-title { flex: 1; min-width: 0; color: var(--text); }
.na-pin-move { display: flex; gap: 0.25rem; }
.na-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.na-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.4rem 0.9rem;
  align-items: center;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cat);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}
.na-art { position: relative; overflow: hidden; display: block; width: 7.5rem; aspect-ratio: 16 / 9; border-radius: 4px; background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 25%, var(--bg-inset)), var(--bg-inset)); }
.na-main .news-kicker { margin-bottom: 0.25rem; }
.na-title { margin: 0; font-size: 1.08rem; }
.na-facts { margin: 0.2rem 0 0; font-size: 0.82rem; }
.na-unsaved { color: var(--warn, #ffcc66); }
.na-buttons { grid-column: 1 / -1; justify-content: flex-end; margin: 0; }
.na-buttons form { margin: 0; }
@media (min-width: 60rem) {
  .na-row { grid-template-columns: 7.5rem minmax(0, 1fr) auto; }
  .na-buttons { grid-column: auto; }
}

/* ------------------------------------------------------------------------- admin: the editor */

.ne-head-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-bottom: 0.8rem; }
.ne-head-row h1 { margin: 0; }
.ne-saved { color: var(--text-faint); font-size: 0.85rem; margin-left: auto; }
.ne-saved.is-error { color: var(--danger, #ff8a8a); }
.ne-view { font-size: 0.9rem; }
.ne-restore { margin: 0 0 1rem; padding: 0.7rem 0.9rem; border: 1px solid #6b5214; border-radius: var(--radius-sm); background: rgba(230, 180, 34, 0.08); }
.ne-restore p { margin: 0 0 0.4rem; }

.ne-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 72rem) {
  .ne-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ne-preview-pane { position: sticky; top: 4.2rem; max-height: calc(100vh - 5rem); overflow: auto; overscroll-behavior: contain; }
}
.ne-form { display: grid; gap: 0.85rem; min-width: 0; }
.ne-form .cm-field { margin: 0; }
.ne-title input { font-size: 1.25rem; font-family: var(--font-heading); padding: 0.55rem 0.7rem; }
.ne-row { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.ne-art { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0.6rem 0.8rem 0.8rem; margin: 0; min-width: 0; }
.ne-art legend { padding: 0 0.3rem; color: var(--text-dim); }
.ne-art-row { display: grid; gap: 0.8rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .ne-art-row { grid-template-columns: 12rem minmax(0, 1fr); } }
.ne-art-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-inset); display: grid; place-items: center; color: var(--text-faint); font-size: 0.85rem; }
.ne-art-controls .btn-row { margin: 0 0 0.5rem; }
.ne-crop { display: grid; gap: 0.3rem; margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--text-dim); }
.ne-crop label { display: grid; grid-template-columns: 4rem 1fr; align-items: center; gap: 0.5rem; }
.ne-inline { display: flex; gap: 0.5rem; align-items: center; }
.ne-inline input { flex: 1; min-width: 0; }
.ne-accent-preview { width: 30px; height: 30px; flex: none; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-inset); overflow: hidden; }
.ne-accent-preview img { display: block; width: 28px; height: 28px; }
.ne-toolbar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.3rem; border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--bg-raised); }
.ne-toolbar button { min-width: 2.2rem; padding: 0.25rem 0.5rem; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--bg-inset); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.ne-toolbar button:hover, .ne-toolbar button:focus-visible { border-color: var(--gold-dim, #8f7016); color: #fff; }
.ne-toolbar-gap { flex: 1; }
.ne-toolbar:not([hidden]) + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.ne-body textarea { min-height: 24rem; font-family: var(--mono); font-size: 0.92rem; line-height: 1.55; resize: vertical; }
.ne-help { font-size: 0.82rem; margin: 0.35rem 0 0; }
.ne-help code { font-size: 0.8rem; }
.ne-more { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.8rem; }
.ne-more summary { cursor: pointer; color: var(--text-dim); }
.ne-more[open] summary { margin-bottom: 0.6rem; }
.ne-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0;
  background: linear-gradient(0deg, var(--bg) 70%, rgba(10, 14, 22, 0));
}
.ne-keys { margin-left: auto; font-size: 0.8rem; }
.ne-pane-title { font-size: 1rem; margin: 0 0 0.6rem; }
.ne-preview-pane { min-width: 0; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 0.8rem; background: var(--bg); }
.ne-preview .news-hero { margin-bottom: 1.2rem; }
.ne-preview .news-title { font-size: clamp(1.5rem, 1rem + 3cqi, 2.4rem); }
.ne-post-actions { margin-top: 1.5rem; }
.ne-post-actions form { margin: 0; }

.ne-dialog {
  width: min(58rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 2rem));
  padding: 0;
  border: 1px solid #3a3320;
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.ne-dialog::backdrop { background: rgba(3, 5, 9, 0.7); }
.ne-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); margin: 0; }
.ne-dialog-head h2 { margin: 0; font-size: 1.15rem; }
.ne-dialog-search { display: flex; gap: 0.5rem; padding: 0.7rem 1rem 0.4rem; }
.ne-dialog-search input { flex: 1 1 12rem; min-width: 0; width: auto; }
.ne-dialog-search select { flex: 0 0 auto; width: auto; max-width: 45%; }
.ne-dialog-note { margin: 0 1rem 0.4rem; font-size: 0.82rem; }
.ne-art-grid, .ne-icon-grid, .ne-link-list { list-style: none; margin: 0; padding: 0.5rem 1rem 1rem; overflow: auto; max-height: calc(min(42rem, 100vh - 2rem) - 8rem); }
.ne-art-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.ne-art-grid button { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-inset); cursor: pointer; color: #fff; text-align: left; }
.ne-art-grid button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ne-art-grid button span { position: absolute; inset: auto 0 0 0; padding: 1.2rem 0.5rem 0.35rem; font-size: 0.82rem; line-height: 1.2; background: linear-gradient(0deg, rgba(5, 7, 12, 0.95), transparent); text-shadow: 0 1px 0 #000; }
.ne-art-grid button small { display: block; color: var(--text-dim); font-size: 0.72rem; }
.ne-art-grid button:hover, .ne-art-grid button:focus-visible { border-color: var(--news-gold); outline: none; box-shadow: 0 0 0 2px rgba(230, 180, 34, 0.35); }
.ne-icon-grid { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr)); }
.ne-icon-grid button { padding: 0.2rem; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-inset); cursor: pointer; }
.ne-icon-grid button img { display: block; width: 100%; height: auto; border-radius: 3px; }
.ne-icon-grid button:hover, .ne-icon-grid button:focus-visible { border-color: var(--news-gold); outline: none; }
.ne-link-list { display: grid; gap: 0.25rem; }
.ne-link-list button { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.4rem 0.55rem; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-inset); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ne-link-list button:hover, .ne-link-list button:focus-visible { border-color: var(--news-gold); outline: none; }
.ne-link-list img { width: 22px; height: 22px; border-radius: 3px; border: 1px solid #000; }
.ne-link-list small { margin-left: auto; color: var(--text-faint); font-size: 0.78rem; }
.ne-empty { color: var(--text-faint); font-size: 0.9rem; padding: 0.5rem 0; }
