/* ============================================================
   Tomomon — in-browser content editor UI (light theme)
   Only takes effect when <body> has the .editing class (?edit).
   ============================================================ */

/* Image covers (used by published content too, not just edit mode) */
.has-img > .creature-orb,
.has-img > .slide__jp,
.has-img > .series__jp,
.title-slot.has-img::after { display: none !important; }

/* Show every card immediately while editing (so tools are reachable below the fold) */
body.editing .reveal { opacity: 1 !important; transform: none !important; }

/* ── editable text affordance ─────────────────────── */
body.editing [data-edit] { outline: 1px dashed rgba(0, 180, 210, 0.5); outline-offset: 3px; border-radius: 3px; cursor: text; transition: outline-color 0.2s; }
body.editing [data-edit]:hover { outline-color: var(--neon-cyan); }
body.editing [data-edit]:focus { outline: 2px solid var(--neon-cyan); background: rgba(0, 180, 210, 0.06); }

/* ── editable card affordance ─────────────────────── */
body.editing .ed-card { position: relative; outline: 1px dashed rgba(var(--purple-rgb), 0.45); outline-offset: 2px; }
body.editing .ed-card:hover { outline-color: var(--neon-purple); }
.ed-tools {
  position: absolute; top: 6px; right: 6px; z-index: 6;
  display: flex; gap: 4px; opacity: 0; transition: opacity 0.18s; pointer-events: none;
}
.ed-card:hover > .ed-tools { opacity: 1; pointer-events: auto; }
.ed-tool {
  width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  font-size: 0.85rem; color: var(--text); background: var(--tag-bg);
  border: 1px solid var(--line); border-radius: 5px;
  box-shadow: 0 4px 12px -6px rgba(28, 41, 64, 0.25);
}
.ed-tool:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.ed-tool:disabled { opacity: 0.3; cursor: default; }
.ed-tool--del:hover { border-color: var(--neon-purple); color: var(--neon-purple); }

/* ── image host affordance ────────────────────────── */
body.editing .ed-img-host { cursor: pointer; position: relative; }
body.editing .ed-img-host::after {
  content: '🖼 set image'; position: absolute; z-index: 7; top: 6px; right: 6px;
  font-family: var(--font-pixel); font-size: 0.62rem; color: var(--text);
  background: var(--tag-bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 7px; opacity: 0; transition: opacity 0.18s;
}
body.editing .ed-img-host:hover { outline: 1px dashed var(--neon-cyan); outline-offset: 2px; }
body.editing .ed-img-host:hover::after { opacity: 1; }
body.editing .title-slot.ed-img-host::after { content: '🖼'; top: 2px; right: 2px; padding: 2px 4px; }

/* ── text box-style affordance ────────────────────── */
body.editing .ed-boxhost { position: relative; }
.ed-boxbtn {
  position: absolute; top: -13px; right: -13px; z-index: 8;
  opacity: 0; transition: opacity 0.18s;
}
body.editing .ed-boxhost:hover > .ed-boxbtn { opacity: 1; }

/* ── floating text-style button ───────────────────── */
.ed-stylebtn { position: fixed; z-index: 9500; }

/* ── video host affordance ────────────────────────── */
body.editing .ed-video-host { cursor: pointer; position: relative; }
body.editing .ed-video-host::after {
  content: '🎬 set video'; position: absolute; z-index: 7; top: 6px; right: 6px;
  font-family: var(--font-pixel); font-size: 0.62rem; color: var(--text);
  background: var(--tag-bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 7px; opacity: 0; transition: opacity 0.18s;
}
body.editing .ed-video-host:hover { outline: 1px dashed var(--neon-purple); outline-offset: 2px; }
body.editing .ed-video-host:hover::after { opacity: 1; }

/* ── section manager rows ─────────────────────────── */
.ed-secrow {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.ed-secrow__name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.ed-secrow.is-hidden .ed-secrow__name { opacity: 0.45; text-decoration: line-through; }
.ed-secrow .ed-tool { position: static; opacity: 1; pointer-events: auto; }

/* ── floating picture affordance ──────────────────── */
body.editing .pic-float { cursor: move; }
body.editing .pic-float:hover { outline: 1px dashed var(--neon-cyan); outline-offset: 2px; }
body.editing .pic-float img { pointer-events: none; }

/* ── resize handle (pictures) ─────────────────────── */
.ed-resize {
  position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; z-index: 6;
  cursor: nwse-resize; opacity: 0; transition: opacity 0.18s;
  border-right: 3px solid var(--neon-cyan); border-bottom: 3px solid var(--neon-cyan);
  border-bottom-right-radius: 4px;
}
.pic-float:hover > .ed-resize, .pic-strip__item:hover > .ed-resize { opacity: 1; }

/* ── add-item bar ─────────────────────────────────── */
.ed-listbar { display: flex; justify-content: center; gap: 10px; margin: 18px auto 0; }
.hero > .ed-listbar { grid-column: 1 / -1; }

/* ── list / toolbar buttons ───────────────────────── */
.ed-btn {
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 600; cursor: pointer;
  color: var(--text); background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 16px; transition: 0.18s var(--ease);
}
.ed-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.ed-btn--sm { padding: 7px 12px; font-size: 0.8rem; }
.ed-btn--primary { color: #ffffff; background: linear-gradient(100deg, var(--neon-cyan), var(--accent-2)); border-color: transparent; }
.ed-btn--primary:hover { color: #ffffff; filter: brightness(1.08); }

/* ── toolbar ──────────────────────────────────────── */
.ed-toolbar {
  position: fixed; left: 16px; bottom: 16px; z-index: 9999;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--frost); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 50px -20px rgba(28, 41, 64, 0.35);
}
.ed-toolbar__title { font-family: var(--font-pixel); font-size: 0.78rem; color: var(--neon-cyan); margin-right: 4px; }
.ed-toolbar__pub { font-family: var(--font-pixel); font-size: 0.7rem; color: var(--text-dim); margin-right: 4px; white-space: nowrap; }

/* ── modal ────────────────────────────────────────── */
.ed-overlay {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  background: rgba(28, 41, 64, 0.4); backdrop-filter: blur(3px); padding: 20px;
}
.ed-modal {
  width: min(520px, 100%); max-height: 86vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 90px -30px rgba(28, 41, 64, 0.45);
}
.ed-modal__head { padding: 18px 22px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
.ed-modal__foot { padding: 16px 22px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }

/* ── form ─────────────────────────────────────────── */
.ed-form { padding: 20px 22px; display: grid; gap: 16px; }
.ed-row { display: grid; gap: 7px; }
.ed-row--inline { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
.ed-label { font-family: var(--font-pixel); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; }
.ed-form input[type="text"], .ed-form input[type="password"], .ed-form input[type="number"], .ed-form textarea, .ed-form select {
  width: 100%; padding: 11px 14px; font-family: inherit; font-size: 0.95rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.ed-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.ed-form input:focus, .ed-form textarea:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 12px -3px rgba(0, 180, 210, 0.3); }
.ed-form input[type="color"] { width: 56px; height: 38px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.ed-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--neon-cyan); cursor: pointer; }

/* image field */
.ed-img { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.ed-img input[type="text"] { grid-column: 1 / -1; }
.ed-img__prev {
  grid-column: 1 / -1; width: 100%; max-height: 160px; object-fit: contain;
  background: repeating-conic-gradient(var(--sprite-field-1) 0% 25%, var(--sprite-field-2) 0% 50%) 0 0 / 18px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); image-rendering: pixelated;
}
.ed-img__prev:not([src]) { display: none; }

/* ── toast ────────────────────────────────────────── */
.ed-toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 12px); z-index: 10001;
  padding: 11px 18px; font-size: 0.9rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--neon-cyan); border-radius: 8px;
  box-shadow: 0 8px 30px -12px rgba(0, 180, 210, 0.45); opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.ed-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .ed-toolbar { left: 8px; right: 8px; bottom: 8px; justify-content: center; }
}

/* ============================================================
   Dedicated editor page (/editor) — .edp-* professional layout
   ============================================================ */
.edp-body { margin: 0; height: 100vh; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
.edp-app { display: grid; grid-template-rows: auto 1fr; height: 100vh; }

/* top bar */
.edp-topbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px;
  background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.edp-topbar .ed-btn { white-space: nowrap; }
/* cross-session draft resume banner */
.edp-draftbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 18px;
  background: rgba(255,210,60,0.14); border-bottom: 1px solid rgba(255,210,60,0.4); color: var(--text); font-size: 0.92rem; }
.edp-draftbar__btns { display: flex; gap: 8px; margin-left: auto; }

/* text field: input fills, 🎨 style button stays put */
.edp-tf { display: flex; gap: 8px; align-items: flex-start; }
.edp-tf > input, .edp-tf > textarea { flex: 1 1 auto; min-width: 0; width: auto; }
.edp-tf > button { flex: 0 0 auto; }
.edp-brand { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: .02em; font-size: 1.02rem; }
.edp-brand__mark { color: var(--accent); }
.edp-brand small { font-family: var(--font-pixel); font-size: .62rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .1em; }
.edp-topbar__spacer { flex: 1; }
.edp-pub { font-family: var(--font-pixel); font-size: .72rem; color: var(--text-dim); white-space: nowrap; cursor: pointer;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 100px; background: var(--bg-2); }
.edp-pub:hover { border-color: var(--accent); }

/* main 3-pane */
.edp-main { display: grid; grid-template-columns: 210px minmax(340px, 400px) 1fr; overflow: hidden; }

/* sidebar */
.edp-sidebar { overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); padding: 12px 10px; }
.edp-navgroup { font-family: var(--font-pixel); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); margin: 14px 8px 6px; }
.edp-navgroup:first-child { margin-top: 4px; }
.edp-navitem { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-dim); font-weight: 600; font-size: .92rem; transition: .14s var(--ease);
  border: 1px solid transparent; user-select: none; }
.edp-navitem:hover { color: var(--text); background: var(--bg-2); }
.edp-navitem.on { color: #fff; background: linear-gradient(100deg, var(--accent), var(--accent-2)); border-color: transparent; }
.edp-navitem__ic { width: 18px; text-align: center; opacity: .9; }

/* center panel */
.edp-panel { overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); }
.edp-panel__head { position: sticky; top: 0; z-index: 2; padding: 16px 20px 12px; background: var(--bg);
  border-bottom: 1px solid var(--line); }
.edp-panel__head h2 { margin: 0; font-size: 1.15rem; font-weight: 900; letter-spacing: -.01em; }
.edp-panel__head p { margin: 4px 0 0; font-size: .82rem; color: var(--text-mute); }
.edp-panel__body { padding: 18px 20px 60px; display: grid; gap: 18px; }
.edp-fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.edp-fieldset > h3 { margin: 0; padding: 11px 15px; font-size: .82rem; font-weight: 800; letter-spacing: .02em;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel)); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; }
.edp-fieldset > .ed-form { padding: 15px; gap: 13px; }

/* list editor rows */
.edp-list { display: grid; gap: 8px; }
.edp-listrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel); }
.edp-listrow__sw { width: 26px; height: 26px; border-radius: 6px; flex: 0 0 auto; border: 1px solid var(--line);
  background-size: cover; background-position: center; }
.edp-listrow__t { flex: 1; min-width: 0; }
.edp-listrow__t b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edp-listrow__t span { font-size: .74rem; color: var(--text-mute); }
.edp-listrow__tools { display: flex; gap: 4px; flex: 0 0 auto; }

/* ── Monster picker (dex → showcase slots) ─────────── */
.ed-modal.edp-mp { width: min(880px, 100%); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.edp-mp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.edp-mp__bar input[type="text"] { flex: 1 1 220px; min-width: 150px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; }
.edp-mp__bar input[type="text"]:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 12px -3px rgba(0, 180, 210, 0.3); }
.edp-mp__seg { display: flex; gap: 6px; }
.edp-mp__seg .ed-btn.is-on { color: #fff; background: linear-gradient(100deg, var(--neon-cyan), var(--accent-2)); border-color: transparent; }
.edp-mp__count { font-family: var(--font-pixel); font-size: .7rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; margin-left: auto; }
.edp-mp__grid { flex: 1; overflow: auto; padding: 16px 22px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; align-content: start; }
.edp-mp__card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 9px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
  cursor: pointer; text-align: center; transition: border-color .12s, transform .12s, box-shadow .12s; }
.edp-mp__card:hover { border-color: var(--neon-cyan); transform: translateY(-2px); box-shadow: 0 8px 22px -14px rgba(0, 180, 210, .5); }
.edp-mp__card.is-cur { border-color: var(--neon-cyan); box-shadow: 0 0 0 1px var(--neon-cyan) inset; }
.edp-mp__icon { width: 100%; height: 60px; object-fit: contain; }
.edp-mp__no { font-family: var(--font-pixel); font-size: .6rem; color: var(--text-mute); letter-spacing: .03em; }
.edp-mp__nm { font-size: .82rem; font-weight: 700; line-height: 1.15; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edp-mp__els { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.edp-mp__el { font-size: .58rem; font-weight: 700; padding: 1px 6px; border-radius: 100px; color: var(--c); border: 1px solid var(--c); }
.edp-mp__empty { grid-column: 1 / -1; text-align: center; padding: 40px 12px; color: var(--text-mute); }

/* live image control (page editor, always-on) */
.edp-imgctl { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.edp-imgctl input[type="text"] { grid-column: 1 / -1; }
.edp-imgctl__prev { grid-column: 1 / -1; width: 100%; max-height: 150px; object-fit: contain;
  background: repeating-conic-gradient(var(--sprite-field-1) 0% 25%, var(--sprite-field-2) 0% 50%) 0 0 / 18px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); }
.edp-imgctl__prev:not([src]) { display: none; }
.edp-inline-style { align-self: end; }
.edp-hint { font-size: .82rem; color: var(--text-dim); line-height: 1.45;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; }

/* Wishlist Signups — dedicated full page (table + filter + pager) */
.edp-emails__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.edp-emails__total { font-size: .95rem; color: var(--text-dim); }
.edp-emails__filter { flex: 1; min-width: 200px; max-width: 360px; padding: 9px 12px; font-family: inherit; font-size: .9rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.edp-emails__filter:focus { outline: none; border-color: var(--neon-cyan); }
.edp-emails__status { font-size: .82rem; color: var(--text-dim); }
.edp-emails__list { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.edp-emails__row { display: grid; grid-template-columns: 56px minmax(0,1fr) 118px 130px; gap: 12px; align-items: baseline;
  padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.edp-emails__row:last-child { border-bottom: 0; }
.edp-emails__row:nth-child(even) { background: color-mix(in srgb, var(--line) 20%, transparent); }
.edp-emails__row--head { position: sticky; top: 0; z-index: 1; background: var(--bg-2); font-family: var(--font-pixel);
  font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.edp-emails__no { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.edp-emails__email { font-family: ui-monospace, 'JetBrains Mono', monospace; overflow-wrap: anywhere; }
.edp-emails__date, .edp-emails__ip { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.edp-emails__ip { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; }
.edp-emails__pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.edp-emails__pglbl { font-size: .82rem; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 640px) {
  .edp-emails__row { grid-template-columns: 40px minmax(0,1fr) 96px; }
  .edp-emails__ip, .edp-emails__row--head > span:last-child { display: none; }
}

/* preview pane */
.edp-preview { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-2); }
.edp-preview__bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--panel); }
.edp-preview__bar .edp-seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 100px; padding: 3px; }
.edp-seg button { border: 0; background: transparent; color: var(--text-dim); font: inherit; font-size: .8rem; font-weight: 700;
  padding: 5px 12px; border-radius: 100px; cursor: pointer; }
.edp-seg button.on { color: #fff; background: linear-gradient(100deg, var(--accent), var(--accent-2)); }
.edp-preview__label { font-family: var(--font-pixel); font-size: .68rem; color: var(--text-mute); }
.edp-preview__stage { flex: 1; display: flex; justify-content: center; align-items: stretch; padding: 16px; overflow: hidden; }
.edp-preview__stage iframe { flex: 1 1 auto; height: 100%; border: 1px solid var(--line); border-radius: 8px;
  background: #0d1729; box-shadow: 0 20px 60px -30px rgba(0,0,0,.6); }
.edp-preview__stage.is-mobile iframe { flex: 0 0 402px; }

/* login screen */
.edp-login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1000px 600px at 70% -10%, rgba(53,101,230,.18), transparent 60%), var(--bg); }
.edp-login__card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 40px 100px -40px rgba(0,0,0,.6); overflow: hidden; }
.edp-login__head { padding: 22px 24px 6px; }
.edp-login__head h1 { margin: 0; font-size: 1.35rem; font-weight: 900; }
.edp-login__head p { margin: 6px 0 0; font-size: .85rem; color: var(--text-mute); }
.edp-login__err { color: #ff5e7a; font-size: .86rem; min-height: 1.2em; margin: 0 0 4px; }

/* ── Full-page panels (News) — hide the preview, panel takes the workspace ── */
.edp-app.is-fullpage .edp-main { grid-template-columns: 210px 1fr; }
.edp-app.is-fullpage .edp-preview { display: none; }

/* ── Screenshots gallery manager ───────────────────── */
.edp-shots { display: grid; gap: 12px; }
.edp-shot { display: grid; grid-template-columns: 176px 1fr auto; gap: 14px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.edp-shot__thumb { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); cursor: pointer; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(150deg, var(--tint, #3565e6), color-mix(in srgb, var(--tint, #3565e6) 40%, #0b1220));
  background-size: cover; background-position: center; display: grid; place-items: center;
  transition: border-color .18s, box-shadow .18s; }
.edp-shot__thumb:hover { border-color: var(--neon-cyan); box-shadow: 0 0 0 2px rgba(0,180,210,.25); }
.edp-shot__thumb.has-img { background-blend-mode: normal; }
.edp-shot__thumb.is-up { opacity: .55; }
.edp-shot__ph { font-family: var(--font-pixel); font-size: .72rem; color: #fff; opacity: .85; text-align: center; padding: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.edp-shot__body { display: grid; gap: 10px; min-width: 0; }
.edp-shot__row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.edp-shot__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.edp-shot__tools { display: flex; flex-direction: column; gap: 4px; }
.edp-shots__add { margin-top: 12px; }
@media (max-width: 720px) {
  .edp-shot { grid-template-columns: 1fr; }
  .edp-shot__tools { flex-direction: row; }
}

/* ── Dedicated News page (list + inline editor) ─────── */
.edp-news { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; }
.edp-news__list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.edp-news__listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.edp-news__listhead span { font-family: var(--font-pixel); font-size: .72rem; letter-spacing: .04em; color: var(--text-dim); text-transform: uppercase; }
/* filter box + live count above the list */
.edp-nwfilter { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0; }
.edp-nwfilter__in { flex: 1; min-width: 0; padding: 8px 11px; font-family: inherit; font-size: .9rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.edp-nwfilter__in:focus { outline: none; border-color: var(--neon-cyan); }
.edp-nwfilter__count { font-family: var(--font-pixel); font-size: .7rem; color: var(--text-dim); white-space: nowrap; }
/* minmax(0,1fr) keeps rows from forcing a horizontal scrollbar; titles ellipsis instead */
/* full list, no inner scroller — the page scrolls; minmax(0,1fr) keeps long titles from overflowing sideways */
.edp-nwlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 8px; }
/* pagination footer */
.edp-nwpager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 8px; border-top: 1px solid var(--line); }
.edp-nwpager__lbl { font-size: .8rem; color: var(--text-dim); white-space: nowrap; }
.edp-nwrow { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.edp-nwrow:hover { background: var(--bg); }
.edp-nwrow.is-sel { border-color: var(--neon-cyan); background: rgba(0, 180, 210, 0.08); }
.edp-nwrow__t { flex: 1; min-width: 0; }
.edp-nwrow__t b { display: block; font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edp-nwrow__t span { font-size: .7rem; color: var(--text-mute); }
.edp-nwrow__tools { display: flex; gap: 3px; flex: 0 0 auto; }
.edp-news__editor { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.edp-news__editor .ed-form { padding: 18px 20px; }
.edp-nwform__head { display: flex; justify-content: flex-end; margin-bottom: 2px; }
.edp-nwform__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edp-nwbody { min-height: 280px !important; }

/* ── Rich-text editor (news body) ───────────────────── */
.ed-rte { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.ed-rte__bar { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 6px;
  border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 2; }
.ed-rte__btn { min-width: 30px; height: 30px; padding: 0 8px; font-size: .9rem; font-weight: 700; line-height: 1;
  cursor: pointer; color: var(--text); background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; }
.ed-rte__btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
/* higher specificity than the generic `.ed-form select { width:100% }` so the toolbar dropdowns stay compact */
.ed-rte .ed-rte__sel { width: auto; min-width: 96px; height: 30px; font-size: .8rem; padding: 0 8px;
  color: var(--text); background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; }
.ed-rte__color { width: 32px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-3); cursor: pointer; }
.ed-rte__sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }
.ed-rte__area { min-height: 320px; max-height: 58vh; overflow-y: auto; padding: 16px 18px;
  font-size: .96rem; line-height: 1.65; color: var(--text); outline: none; }
.ed-rte__area:empty::before { content: attr(data-ph); color: var(--text-mute); }
.ed-rte__area img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.ed-rte__area h2 { font-size: 1.45rem; font-weight: 800; margin: .7em 0 .3em; }
.ed-rte__area h3 { font-size: 1.15rem; font-weight: 700; margin: .7em 0 .3em; }
.ed-rte__area p { margin: 0 0 .7em; }
.ed-rte__area ul, .ed-rte__area ol { margin: 0 0 .7em; padding-left: 1.4em; }
.ed-rte__area blockquote { border-left: 3px solid var(--neon-cyan); margin: .7em 0; padding: .2em 0 .2em 14px; color: var(--text-dim); }
.ed-rte__area a { color: var(--neon-cyan); text-decoration: underline; }

/* the mobile "Preview" toggle only matters on narrow screens */
.edp-preview-toggle { display: none; }

/* responsive: stack preview under on narrow screens */
@media (max-width: 1100px) {
  .edp-main { grid-template-columns: 190px 1fr; }
  .edp-preview { display: none; }
  .edp-preview-toggle { display: inline-block; }
  .edp-app.show-preview .edp-main { grid-template-columns: 1fr; }
  .edp-app.show-preview .edp-sidebar, .edp-app.show-preview .edp-panel { display: none; }
  .edp-app.show-preview .edp-preview { display: flex; }
  .edp-news { grid-template-columns: 1fr; }
  .edp-news__list { position: static; }
}
