:root { --ink: #222; --muted: #666; --bg: #f3f4f6; --card: #fff; --line: #dfe2e6; --acc: #1f6fd1; --acc2: #1857a8; --ok: #2e7d32; --err: #c62828; --warn: #b26a00; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--acc2); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 600; text-decoration: none; color: var(--ink); }
.who { color: var(--muted); font-size: 14px; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 120px; }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.help { color: var(--muted); max-width: 70ch; }
.crumbs { margin: 0 0 6px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; background: var(--acc); color: #fff; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--acc2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-quiet { background: #eceef1; color: var(--ink); font-weight: 500; padding: 7px 12px; }
.btn-quiet:hover { background: #e0e3e7; }
.login { max-width: 380px; margin: 10vh auto; display: grid; gap: 14px; }
.login label { display: grid; gap: 4px; }
.err { color: var(--err); }
input, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #c9ced4; border-radius: 6px; background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: transparent; }
.site-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.ext { font-size: 14px; font-weight: 400; margin-left: 8px; }
.pub { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pubstate { font-size: 14px; color: var(--muted); }
.pubstate[data-state="ok"] { color: var(--ok); }
.pubstate[data-state="error"] { color: var(--err); font-weight: 600; }
.pubstate[data-state="running"] { color: var(--warn); }
.unpub { color: var(--warn); font-size: 14px; }
.unpub .fa { font-size: 9px; vertical-align: 2px; }
.log { background: #111; color: #ddd; padding: 12px; border-radius: 6px; max-height: 300px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.sections { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.sections a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); background: #fafbfc; }
.sections a:hover { border-color: var(--acc); background: #fff; }
.f { display: block; margin: 0 0 16px; }
.lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang { display: flex; gap: 6px; align-items: flex-start; }
.flag { flex: none; font-size: 11px; font-weight: 700; background: #eceef1; border-radius: 4px; padding: 3px 5px; margin-top: 9px; }
.obj { background: #fff; }
.list details.item { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 10px; }
.list summary { cursor: pointer; padding: 12px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list details[open] > summary { border-bottom: 1px solid var(--line); }
.list details > .obj { padding: 16px 14px 4px; }
.tools button, .im figcaption button { border: 0; background: #eceef1; border-radius: 4px; width: 30px; height: 28px; cursor: pointer; }
.tools button:disabled, .im figcaption button:disabled { opacity: .35; cursor: default; }
.tools .del, .im .del { color: var(--err); }
.one-img { display: flex; gap: 14px; align-items: center; }
.one-img img { width: 180px; height: 120px; object-fit: cover; border-radius: 6px; background: #eee; }
.imgname { font-size: 13px; color: var(--muted); }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.im { margin: 0; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.im img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.im figcaption { display: flex; justify-content: center; gap: 4px; padding: 6px; }
.addimg { border: 2px dashed #c9ced4; border-radius: 6px; background: #fff; min-height: 120px; cursor: pointer; color: var(--muted); font: inherit; }
.addimg:hover { border-color: var(--acc); color: var(--acc2); }
.mdbox .EasyMDEContainer { background: #fff; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 20px; display: flex; justify-content: flex-end; align-items: center; gap: 16px; z-index: 20; }
#savestate { font-size: 14px; color: var(--muted); }
#savestate.ok { color: var(--ok); } #savestate.err { color: var(--err); font-weight: 600; } #savestate.warn { color: var(--warn); }
dialog#picker { width: min(1000px, 95vw); height: min(80vh, 800px); border: 0; border-radius: 10px; padding: 0; }
dialog#picker::backdrop { background: rgb(0 0 0 / .5); }
.picker-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.picker-head b { flex: 1; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 16px; }
.pick { border: 2px solid transparent; border-radius: 6px; padding: 0; background: #fafbfc; cursor: pointer; text-align: left; font-size: 11px; color: var(--muted); overflow: hidden; }
.pick img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.pick span { display: block; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick:hover, .pick.picked { border-color: var(--acc); }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } .one-img { flex-direction: column; align-items: flex-start; } }
.narrow { max-width: 520px; }
.okmsg { color: var(--ok); font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; }
.mt { margin-top: 32px; }
.chk { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-weight: 400; }
.chk input { width: auto; }
.btn-danger { background: #fdecea; color: var(--err); font-weight: 500; padding: 7px 12px; }
.btn-danger:hover { background: #f9d6d2; }
.userops { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; padding: 16px 14px; align-items: start; }
.obj-group { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin: 0 0 18px; }
.obj-group > .grp-title { font-weight: 700; margin-bottom: 8px; }
.switch { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; }
.switch input { width: 20px; height: 20px; }
