/* The look of the panel's editors (Catálogo and Tarjetas): one stylesheet, so they stay the same. */
:root {
  --bg: #0b1020; --card: #121a33; --line: #26304f; --text: #e8ecf8; --muted: #a4adc8;
  --blue: #2a86ff; --green: #22b14c; --red: #f0392f; --yellow: #f2c94c; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 6px; }
p { margin: 0 0 8px; }
a { color: var(--blue); }
.muted { color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
input[type=text], textarea, select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 4.2em; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 10px 0 4px; }
label .count { float: right; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
label .count.over { color: var(--red); font-weight: 600; }
button.act, button.ghost { background: var(--text); color: var(--bg); border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 5px 11px; font-weight: 400; font-size: .88rem; }
button.publish { background: var(--green); color: #04130a; }
button.danger { color: var(--red); border-color: rgba(240, 57, 47, .5); }
button:disabled { opacity: .4; cursor: not-allowed; }
/* the actions stay in reach while the page scrolls (wide screens only: on a phone they would take the page) */
.actions { margin-top: 16px; }
@media (min-width: 761px) { .actions { position: sticky; top: 0; z-index: 5; } }
.note { min-height: 1.4em; margin: 8px 0 0; color: var(--green); }
.note:empty { display: none; }
.conflict { border: 1px solid rgba(242, 201, 76, .5); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.conflict p { margin: 4px 0; overflow-wrap: anywhere; }
.conflict .row { margin-top: 6px; }
.conflict button[aria-pressed=true] { background: var(--text); color: var(--bg); }
.conflict.done { border-color: var(--line); opacity: .75; }
.note.bad { color: var(--red); }
.note.warn { color: var(--yellow); }
.msgs { margin: 8px 0 0; padding-left: 20px; }
.msgs.errors li { color: var(--red); }
.msgs.warnings li { color: var(--yellow); }
.msgs li { margin: 2px 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 12px; }
.tabs button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs .n { color: var(--muted); font-size: .8em; margin-left: 4px; }
.tabs button[aria-selected=true] .n { color: var(--bg); }
.tabpanel > .muted { margin-bottom: 10px; }
details.branch { margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
details.branch > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style-position: inside; }
details.branch > summary .muted { font-weight: 400; margin-left: 6px; }
details.branch > .body { padding: 0 16px 16px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(255, 255, 255, .02); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
.item.dragging { opacity: .45; }
.item.over-up { box-shadow: 0 -2px 0 var(--blue); }
.item.over-down { box-shadow: 0 2px 0 var(--blue); }
.item.is-new { border-color: rgba(34, 177, 76, .6); }
.item.is-gone { opacity: .5; }
.grip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; }
.handle { cursor: grab; color: var(--muted); padding: 2px 6px; user-select: none; font-size: 1.1rem; }
.handle:active { cursor: grabbing; }
button.mv { padding: 1px 7px; }
.fields { min-width: 0; }
.fields > label:first-child { margin-top: 0; }
.item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-top: 8px; }
.tag { display: inline-block; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; }
.tag.new { color: var(--green); border-color: rgba(34, 177, 76, .6); }
.tag.pend { color: var(--yellow); border-color: rgba(242, 201, 76, .6); }
.tag.bad { color: var(--red); border-color: rgba(240, 57, 47, .6); }
.ids { font-size: .82rem; color: var(--muted); margin-top: 4px; word-break: break-all; }
.ids code { color: var(--text); }
details.langs { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.langs > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.lang { margin-top: 10px; padding: 8px 10px; border-left: 3px solid var(--line); }
.lang.pending { border-left-color: var(--yellow); }
.lang.machine { border-left-color: var(--blue); }
.tag.machine { color: #8fc0ff; border-color: rgba(42, 134, 255, .7); }
button.tiny { padding: 1px 8px; font-size: .72rem; margin-left: 6px; }
.tr-row { margin-top: 8px; }
.lang h4 { margin: 0 0 2px; font-size: .88rem; }
.lang h4 .tag { margin-left: 8px; }
.lang label:first-of-type { margin-top: 4px; }
.checkrow { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 10px 0 0; }
.checkrow input { accent-color: var(--blue); margin: 0; }
.adder { margin-top: 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.adder .row > input { flex: 1; min-width: 180px; }
.links { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
#status h3 { margin-top: 0; }
#versions { margin-top: 16px; }
#versions ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
#versions li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#diff li { color: var(--text); }
.stripe { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(242, 201, 76, .1); border: 1px solid rgba(242, 201, 76, .45); font-size: .9rem; }
.stripe:empty { display: none; }
.hide { display: none !important; }
@media (max-width: 760px) {
  main { padding: 16px 12px 56px; }
  .item { grid-template-columns: minmax(0, 1fr); }
  .grip { flex-direction: row; justify-content: flex-start; }
  .card { padding: 14px; }
}

/* ---- Tarjetas ---- */
.scene-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 4px 20px; align-items: start; }
.scene-edit .side { min-width: 0; position: sticky; top: 76px; }
.pv-bar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 4px 0 6px; }
.pv-bar button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.pv-bar button[aria-pressed=true] { background: var(--text); color: var(--bg); }
.pv-bar button.bad { border-color: var(--red); color: var(--red); }
.pv-bar button.bad[aria-pressed=true] { background: var(--red); color: #fff; }
.pv-box { max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #0b1020; }
.pv-box.crop { width: 560px; }
.pv-box + .pv-cap { margin: 2px 0 10px; }
.card-frame { display: block; border: 0; background: #0b1020; max-width: none; }
.flag { color: var(--red); font-weight: 600; font-size: .82rem; margin-left: 6px; }
.flag.ok { color: var(--green); font-weight: 400; }
.fit { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.fit.bad { border-color: rgba(240, 57, 47, .6); }
.fit.good { border-color: rgba(34, 177, 76, .5); }
.chips-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.art { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.art h4 { margin: 0 0 6px; font-size: .9rem; }
.art-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .72rem; cursor: pointer; }
.slot[aria-expanded=true] { border-color: var(--blue); }
.slot img, .choice img { width: 76px; height: 52px; object-fit: contain; background: #0b1020; border-radius: 6px; }
.slot.hero img { width: 108px; height: 72px; }
.slot.hero { width: 124px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 8px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .7rem; cursor: pointer; }
.choice[aria-pressed=true] { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.choice img { width: 100%; }
.where { font-size: .8rem; color: var(--muted); margin: 0 0 4px; }
@media (max-width: 980px) { .scene-edit { grid-template-columns: minmax(0, 1fr); } .scene-edit .side { position: static; } }

/* ---- Correos ---- */
.mail-card { margin-top: 16px; }
#pv-frame { display: block; width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #f3f3f7; }
.confirm { margin-top: 12px; padding: 12px; border: 1px solid rgba(242, 201, 76, .5); border-radius: 10px; }
.confirm p { margin: 0 0 8px; }
#count-out p { margin: 8px 0 0; }
@media (max-width: 760px) { #pv-frame { height: 480px; } }

/* ---- Blog ---- */
.runs { list-style: none; margin: 10px 0 0; padding: 0; font-size: .85rem; color: var(--muted); display: grid; gap: 2px; }
.runs a { color: var(--muted); }
.post-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; width: 100%; text-align: left; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; align-items: center; }
.post-row:hover, .post-row:focus-visible, .post-row[aria-current=true] { border-color: var(--blue); outline: none; }
.post-title { font-weight: 600; overflow-wrap: anywhere; }
.post-date { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.post-row .chips { grid-column: 1 / -1; }
.queue-list { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 8px; }
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 210px) auto; gap: 8px 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.queue-name { overflow-wrap: anywhere; }
.queue-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.queue-add label { margin-top: 0; }
.blk { margin-top: 4px; }
.blk-kind { margin: 14px 0 0; font-weight: 600; color: var(--muted); font-size: .85rem; }
input[readonly] { opacity: .7; }
.pv-article { margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #1a1a24; max-width: 760px; overflow-wrap: anywhere; }
.pv-article h1 { font-size: 1.5rem; margin: 10px 0 6px; line-height: 1.2; }
.pv-article h2 { font-size: 1.15rem; margin: 18px 0 6px; }
.pv-article p, .pv-article li { color: #26263a; }
.pv-article .pv-meta { color: #5a5a72; font-style: italic; }
.pv-article summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.pv-cover { display: block; max-width: 100%; height: auto; border-radius: 8px; background: #e8ecf8; }
.mk { background: rgba(42, 134, 255, .15); color: #1b5fc4; border-radius: 4px; padding: 0 4px; font-size: .9em; }
@media (max-width: 760px) {
  .queue-item, .queue-add { grid-template-columns: minmax(0, 1fr); }
  .post-row { grid-template-columns: minmax(0, 1fr); }
}
