/* frn_adn 2.1 – header with centred tabs, link menu and update panel, in the style of HBlink4-FreeRadioID.
   Loaded after app.css, so these rules win. */
:root { --accent-rgb: 90, 200, 250; }

/* ---------- header: brand left, tabs centred, status and login right ---------- */
header { flex-wrap: nowrap; justify-content: flex-start; gap: 14px; padding: 8px 14px; border-radius: 20px; }
header .brand { flex: 0 1 auto; min-width: 0; }
header .brand > div { min-width: 0; }
header .brand h1 { white-space: nowrap; font-size: 19px; }
header .brand .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
header .tabs { margin: 0 auto; flex: 0 0 auto; padding: 3px; gap: 3px; background: rgba(255, 255, 255, 0.04); }
#userArea .btn, .links-trigger { white-space: nowrap; }
header .tabs button { padding: 6px 12px; font-size: 12.5px; }
header .chips { flex: 0 1 auto; justify-content: flex-end; flex-wrap: nowrap; }
.tabs button.active { background: rgba(var(--accent-rgb), 0.18); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.38); }
.tabs button:focus-visible, .links-trigger:focus-visible, .links-pop a:focus-visible, .links-bar a:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .8); outline-offset: 2px; }

@media (max-width: 1480px) {
    header .tabs button { padding: 6px 9px; }
    header .chips { margin-left: 6px; }
}
@media (max-width: 1180px) {
    header { flex-wrap: wrap; }
    header .brand { flex: 1 1 auto; }
    header .brand .sub { white-space: normal; }
    header .chips { flex-wrap: wrap; }
    header .tabs { order: 3; flex: 1 1 100%; width: 100%; margin: 2px 0 0; }
    header .tabs button { flex: 1 1 0; justify-content: center; }
}
@media (max-width: 600px) {
    header .tabs button { padding: 7px 2px; font-size: 12px; gap: 3px; }
    header .tabs .t-long { display: none; }
    header .tabs .t-short { display: inline; }
}

/* ---------- link menu (button + pop-over) and link bar ---------- */
.links-menu[hidden], .links-bar[hidden] { display: none !important; }
.links-trigger { border-radius: 999px; font-weight: 650; color: var(--text);
                 background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.4); }
.links-trigger:hover { background: rgba(var(--accent-rgb), 0.24); }
.links-menu.open .links-trigger { background: rgba(var(--accent-rgb), 0.26); }
.links-pop { min-width: 230px; padding: 6px; background: var(--theme-popover, rgba(16, 22, 40, 0.97)); }
.links-pop a { min-height: 38px; padding: 9px 11px; font-size: 13.5px; }
.links-pop a:hover, .links-pop a:focus-visible { background: rgba(var(--accent-rgb), 0.16); }
.li-ic { width: 22px; height: 22px; display: inline-grid; place-items: center; position: relative; flex: 0 0 22px; }
.li-ic img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; grid-area: 1 / 1; }
.li-ic .site-icon-fallback { grid-area: 1 / 1; }
.li-tx { min-width: 0; }
.links-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 2px 0; }
.links-bar a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text); text-decoration: none;
               padding: 6px 12px; border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.links-bar a:hover { border-color: rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.12); }

/* ---------- admin: link editor ---------- */
.links-editor { max-width: 1020px; }
.links-editor .ed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.links-editor .dirty-tag { display: none; font-size: 11px; font-weight: 700; color: #ffe36a; background: rgba(255, 214, 10, 0.16);
                           border: 1px solid rgba(255, 214, 10, 0.4); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.links-editor.is-dirty .dirty-tag { display: inline-block; }
.links-editor .ed-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 12px; align-items: center;
                        padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.links-editor .ed-row > label:first-child { font-weight: 650; font-size: 13.5px; margin: 0; }
.links-editor .ed-row.wide { grid-template-columns: minmax(0, 1fr); }
.links-editor .switch { justify-self: end; }
.links-editor input[type=text], .links-editor select, .ln-row input:not([type=checkbox]) {
    width: 100%; min-width: 0; padding: 8px 11px; border-radius: 11px; color: var(--text);
    background: var(--theme-input-bg, rgba(8, 12, 24, 0.55)); border: 1px solid var(--theme-input-border, var(--glass-border)); }
.links-editor select option { background: var(--theme-option-bg, #101628); color: var(--text); }
.links-editor input:focus-visible, .links-editor select:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .7); outline-offset: 1px; }
.ln-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ln-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.4fr) auto auto auto; gap: 6px; align-items: center;
          background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 6px; }
.ln-row .ln-icon { text-align: center; padding-inline: 4px; }
.links-editor .ln-newtab { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; white-space: nowrap; margin: 0 4px; line-height: 1; }
.links-editor .ln-site-icon { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:650; white-space:nowrap; margin:0 4px; line-height:1; }
.ln-site-preview { width:20px; height:20px; display:inline-grid; place-items:center; position:relative; }
.ln-site-preview img { width:18px; height:18px; object-fit:contain; border-radius:3px; grid-area:1 / 1; }
.ln-site-preview .site-icon-fallback { grid-area:1 / 1; }
.links-editor label.switch { display: block; margin: 0; }
.ln-newtab .switch { display: inline-block; flex: 0 0 46px; justify-self: auto; }
.ln-move { display: inline-flex; gap: 4px; }
.ln-move .btn[disabled] { opacity: .35; cursor: default; }
.ln-empty { padding: 14px; text-align: center; color: var(--text-dim); border: 1px dashed var(--glass-border); border-radius: 12px; }
.ln-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ed-note { font-size: 12px; margin: 10px 0 0; }
.ed-note code { background: rgba(0, 0, 0, .3); padding: 1px 6px; border-radius: 6px; }
.links-editor .actions { align-items: center; }
@media (max-width: 720px) {
    .links-editor .ed-row { grid-template-columns: minmax(0, 1fr); }
    .links-editor .switch { justify-self: start; }
    .ln-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .ln-row .ln-url { grid-column: 1 / -1; }
    .links-editor .ln-row .ln-site-icon { grid-column: 1; grid-row: 3; margin: 0; }
    .links-editor .ln-row .ln-newtab { grid-column: 2; grid-row: 3; margin: 0; }
    .ln-row .ln-move { grid-column: 3; grid-row: 3; justify-self: end; }
}

/* ---------- admin: software updates ---------- */
#updInfo { font-size: 13px; margin-top: 10px; }
.upd-row { padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); }
.upd-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.upd-top .upd-badge { margin-left: auto; }
.upd-ver { margin-top: 4px; color: var(--text-dim); }
.upd-new { margin-top: 6px; }
.upd-commits { margin: 6px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 12.5px; }
.upd-commits li { margin: 2px 0; overflow-wrap: anywhere; }
.upd-hint { margin-top: 6px; font-size: 12.5px; color: #ffe36a; overflow-wrap: anywhere; }
.upd-when { color: var(--text-faint); font-size: 12px; margin-top: 4px; }
.upd-badge { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--glass-border); white-space: nowrap; }
.upd-badge.ok { background: rgba(48, 209, 88, 0.2); color: #7ef0a0; border-color: rgba(48, 209, 88, 0.45); }
.upd-badge.new { background: rgba(10, 132, 255, 0.24); color: #9bd0ff; border-color: rgba(10, 132, 255, 0.5); }
.upd-badge.warn { background: rgba(255, 214, 10, 0.18); color: #ffe36a; border-color: rgba(255, 214, 10, 0.4); }
.upd-badge.bad { background: rgba(255, 69, 58, 0.22); color: #ff8a80; border-color: rgba(255, 69, 58, 0.45); }

.restart-overlay { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; background: rgba(5, 8, 18, 0.82);
                   -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.restart-box { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-radius: 18px; max-width: min(520px, 90vw);
               background: rgba(20, 26, 45, 0.95); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); font-weight: 650; }
.restart-spin { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: rgb(var(--accent-rgb));
                animation: restart-spin 0.9s linear infinite; }
@keyframes restart-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .restart-spin { animation-duration: 3s; } }

/* status strip (n8-header.css): "on air" lives there now */
.n8-strip #chipAir { display: inline-flex !important; }

/* 2.24: Admin → 📰 Portal (news) */
.news-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.news-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.news-tbl td.news-tt { white-space: normal; min-width: 260px; }
.news-tbl tr.news-draft td { opacity: .78; }
.news-tbl .news-act { text-align: right; }
.nc-cat { display: inline-block; border-radius: 999px; padding: 2px 10px; font-weight: 650; font-size: 11.5px; background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); }
.nc-cat.important { background: rgba(255,159,10,.2); border-color: rgba(255,159,10,.5); }
.nc-cat.tech { background: rgba(10,132,255,.2); border-color: rgba(10,132,255,.45); }
.nc-cat.event { background: rgba(191,90,242,.2); border-color: rgba(191,90,242,.45); }
.nc-cat.net { background: rgba(48,209,88,.18); border-color: rgba(48,209,88,.45); }
.modal.wide:has(.news-form) { width: min(1180px, 100%); }
.news-form .row { grid-template-columns: 1fr; border-bottom: 0; padding: 6px 0; }
.news-row3 { display: grid; grid-template-columns: 90px minmax(0, 1fr) 200px; gap: 12px; }
.news-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.news-form textarea { min-height: 320px; font-family: var(--n8-mono, var(--mono)); font-size: 13px; line-height: 1.5; }
.news-preview { min-height: 320px; max-height: 420px; overflow: auto; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid var(--glass-border); }
.news-preview p { margin: 8px 0; } .news-preview a { color: var(--accent); }
.news-preview code { font-family: var(--n8-mono, var(--mono)); background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 6px; }
.news-preview blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); color: var(--text-dim); }
.news-flags { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
@media (max-width: 860px) { .news-row3, .news-split { grid-template-columns: 1fr; } }
.tabs a.tab-link { background: transparent; border: 0; color: var(--text-dim); font-size: 14px; font-weight: 650; padding: 8px 18px; border-radius: 999px;
    white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.tabs a.tab-link:hover { color: var(--text); }
.tabs a.tab-link.hidden { display: none; }
@media (min-width: 721px) { .tabs a.tab-link { padding: 8px 12px; } }   /* 2.41: room for ✍️ authoring system – same width as the dashboard menu */
#admin-news a.btn, #admin-portalcfg a.btn { text-decoration: none; }
.tiles.tiles-even { align-items: stretch; }
.news-img-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; margin: 6px 0; }
.news-img { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.22); border: 1px dashed var(--glass-border);
    display: grid; place-items: center; text-align: center; color: var(--text-dim); font-size: 12px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-img-side .row { padding: 6px 0 0; }
.news-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; float: left; margin: 2px 10px 2px 0; }
@media (max-width: 860px) { .news-img-row { grid-template-columns: 1fr; } }

/* 🔐 2.34: database encryption – assistant (dbcrypt.js) */
.dbc-state { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-md, 14px); margin-top: 12px; }
.dbc-state.ok { background: linear-gradient(135deg, rgba(48, 209, 88, .22), rgba(48, 209, 88, .06)); border: 1px solid rgba(48, 209, 88, .45); }
.dbc-state.warn { background: linear-gradient(135deg, rgba(255, 159, 10, .24), rgba(255, 214, 10, .08)); border: 1px solid rgba(255, 214, 10, .45); }
.dbc-ico { font-size: 30px; line-height: 1; }
.dbc-list { margin: 10px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.dbc-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 12px 0 16px; flex-wrap: wrap; }
.dbc-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: var(--user-muted, rgba(235, 240, 250, .64)); }
.dbc-steps li .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: rgba(142, 142, 147, .35); color: #fff; }
.dbc-steps li.cur { color: var(--user-text, #f5f7fb); border-color: var(--theme-accent-border, rgba(90, 200, 250, .38)); background: var(--theme-accent-soft, rgba(90, 200, 250, .18)); }
.dbc-steps li.cur .n { background: var(--user-accent, #5ac8fa); color: #08101f; }
.dbc-steps li.done .n { background: #30d158; }
.dbc-body { min-height: 220px; }
.dbc-body p { margin: 0 0 10px; }
.dbc-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dbc-opt { display: block; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); cursor: pointer; }
.dbc-opt.on { border-color: var(--theme-accent-border, rgba(90, 200, 250, .38)); background: var(--theme-accent-soft, rgba(90, 200, 250, .18)); }
.dbc-opt input { margin-right: 6px; }
.dbc-opt .dim { margin-top: 4px; font-size: 12.5px; }
.dbc-salt { font-size: clamp(15px, 2.1vw, 22px); letter-spacing: .06em; padding: 16px 18px; border-radius: 12px; background: rgba(0, 0, 0, .32);
    border: 1px dashed var(--theme-accent-border, rgba(90, 200, 250, .38)); text-align: center; word-break: break-all; user-select: all; margin: 6px 0 10px; }
.dbc-salt.own { letter-spacing: .2em; user-select: none; }
.dbc-meter { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.dbc-meter span { display: block; height: 100%; width: 0; background: #ff453a; transition: width .2s; }
.dbc-meter span.ok { background: #30d158; }
html[data-theme-mode="light"] .dbc-salt { background: rgba(20, 40, 80, .06); }
html[data-theme-mode="light"] .dbc-steps li, html[data-theme-mode="light"] .dbc-opt { background: rgba(20, 40, 80, .04); border-color: rgba(20, 40, 80, .12); }
@media (max-width: 700px) { .dbc-choice { grid-template-columns: 1fr; } .dbc-steps li span:not(.n) { display: none; } .dbc-steps li { padding: 4px; } }

/* 🖼️ 2.34: pictures in the text of the news (portal page, admin preview) – ![description](bild:ID) */
.md-fig { margin: 14px 0; }
.md-fig a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-border); background: rgba(0, 0, 0, .2); }
.md-fig img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.md-fig figcaption { font-size: 13px; color: var(--text-dim); margin-top: 6px; text-align: center; }
.md-fig.md-left, .md-fig.md-right { width: min(45%, 360px); margin-top: 4px; }
.md-fig.md-left { float: left; margin-right: 16px; }
.md-fig.md-right { float: right; margin-left: 16px; }
.md-fig.md-small { width: min(60%, 420px); margin-left: auto; margin-right: auto; }
.md::after, .news-preview::after { content: ''; display: block; clear: both; }
.md-gallery { display: grid; gap: 10px; margin: 14px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-gallery.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-gallery.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-gallery .md-fig { margin: 0; }
.md-gallery .md-fig img { aspect-ratio: 4 / 3; object-fit: cover; max-height: none; }
.md-inline { height: 1.6em; vertical-align: middle; border-radius: 4px; }
@media (max-width: 640px) { .md-fig.md-left, .md-fig.md-right { float: none; width: 100%; margin: 14px 0; } .md-gallery.n3, .md-gallery.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.md-lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(4, 8, 18, .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.md-lightbox img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.md-lightbox .cap { color: #e9eef8; margin-top: 10px; text-align: center; font-size: 14px; }
.md-lightbox .nav { position: fixed; top: 50%; transform: translateY(-50%); font-size: 30px; color: #fff; background: rgba(255, 255, 255, .1); border: 0; border-radius: 50%; width: 52px; height: 52px; cursor: pointer; }
.md-lightbox .nav.prev { left: 16px; } .md-lightbox .nav.next { right: 16px; }
/* editor: pictures of the news item */
.news-pics { margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--glass-border); background: rgba(0, 0, 0, .12); }
.news-pics.drag { border-color: var(--accent); background: var(--theme-accent-soft, rgba(90, 200, 250, .18)); }
.news-pics-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.news-pics-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.news-pic { width: 128px; border-radius: 10px; overflow: hidden; border: 1px solid var(--glass-border); background: rgba(0, 0, 0, .2); font-size: 11.5px; }
.news-pic img { width: 100%; height: 80px; object-fit: cover; display: block; }
.news-pic .b { display: flex; gap: 4px; padding: 4px; flex-wrap: wrap; align-items: center; }
.news-pic .b .btn { padding: 2px 7px; font-size: 11.5px; }
.news-pic .used { color: #30d158; font-weight: 700; margin-left: auto; }
.news-pic .unused { color: var(--text-dim); margin-left: auto; }
.news-pic.up { display: grid; place-items: center; height: 108px; color: var(--text-dim); }
.md h3, .md h4, .md h5, .md hr, .md .md-gallery, .news-preview h3, .news-preview h4, .news-preview h5, .news-preview .md-gallery { clear: both; }
/* 2.36: picture sizes and text sizes in the news */
.md-fig.md-center { margin-left: auto; margin-right: auto; }
.md-fig.md-left, .md-fig.md-right { max-width: 100%; }
.md-size.md-s { font-size: .85em; }
.md-size.md-l { font-size: 1.3em; line-height: 1.35; }
.md-size.md-xl { font-size: 1.75em; line-height: 1.25; font-weight: 700; }
@media (max-width: 640px) { .md-fig[style] { width: 100% !important; } }
/* editor toolbar and picture options */
.news-tb { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.news-tb .btn { padding: 3px 9px; font-size: 12.5px; min-width: 30px; }
.news-tb .sep { width: 1px; background: var(--glass-border); margin: 2px 4px; }
.news-pic select { font-size: 11px; padding: 1px 2px; max-width: 58px; }
.news-img-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.news-img-opts .row { padding: 0; }
.news-img-opts select { width: 100%; }

/* 2.38: N8 Editor (webmail and news) and the context menu */
.n8ed { position: relative; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(0, 0, 0, .14); }
.n8ed.drag { border-color: var(--accent); box-shadow: 0 0 0 2px var(--theme-accent-soft, rgba(90, 200, 250, .25)); }
.n8ed-tb { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 6px; border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 2;
    background: var(--theme-popover, rgba(16, 22, 40, .97)); border-radius: 12px 12px 0 0; }
.n8ed-tb button, .n8ed-btn, .n8ed-col { min-width: 30px; height: 30px; padding: 0 7px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, .05);
    color: inherit; cursor: pointer; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; position: relative; }
.n8ed-tb button:hover, .n8ed-btn:hover, .n8ed-col:hover { border-color: var(--glass-border); background: rgba(255, 255, 255, .1); }
.n8ed-tb select { height: 30px; padding: 0 6px; font-size: 12.5px; max-width: 150px; }
.n8ed-tb .sep { width: 1px; height: 20px; background: var(--glass-border); margin: 0 3px; }
.n8ed-col input[type=color] { width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.n8ed-area { padding: 12px 14px; outline: none; line-height: 1.55; overflow-wrap: anywhere; font-size: 14.5px; }
.n8ed-area:empty::before { content: attr(data-ph); color: var(--text-dim); }
.n8ed-area img { max-width: 100%; cursor: pointer; border-radius: 6px; }
.n8ed-area blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--accent); color: var(--text-dim); }
.n8ed-area::after { content: ''; display: block; clear: both; }
.n8ed-imgbar { position: absolute; z-index: 5; display: flex; gap: 3px; padding: 4px; border-radius: 10px; background: var(--theme-popover, rgba(16, 22, 40, .97));
    border: 1px solid var(--glass-border); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.n8ed-imgbar[hidden] { display: none; }
.n8ed-imgbar button { min-width: 34px; height: 26px; border-radius: 7px; border: 1px solid transparent; background: rgba(255, 255, 255, .06); color: inherit; cursor: pointer; font-size: 12px; }
.n8ed-imgbar button.on { border-color: var(--accent); }
.n8ed-imgbar .sep { width: 1px; background: var(--glass-border); margin: 2px 3px; }
.n8ctx { position: fixed; z-index: 10000; }
.n8ctx-m { position: absolute; min-width: 210px; padding: 5px; border-radius: 12px; background: var(--theme-popover, rgba(16, 22, 40, .985));
    border: 1px solid var(--glass-border); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); backdrop-filter: blur(14px); }
.n8ctx > .n8ctx-m { position: relative; }
.n8ctx-m hr { border: 0; border-top: 1px solid var(--glass-border); margin: 4px 2px; }
.n8ctx-i { display: flex; width: 100%; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer;
    font-size: 13.5px; text-align: left; }
.n8ctx-i:hover:not(:disabled) { background: var(--theme-accent-soft, rgba(90, 200, 250, .18)); }
.n8ctx-i:disabled { opacity: .4; cursor: default; }
.n8ctx-i .ic { width: 18px; text-align: center; flex: none; }
.n8ctx-i kbd { margin-left: auto; font-size: 11px; opacity: .55; font-family: inherit; }
.n8ctx-i .car { margin-left: auto; opacity: .7; }
html[data-theme-mode="light"] .n8ed-tb, html[data-theme-mode="light"] .n8ctx-m, html[data-theme-mode="light"] .n8ed-imgbar { background: rgba(255, 255, 255, .98); }
.n8ed-imgbar { flex-direction: column; gap: 4px; }
.n8ed-imgbar .r { display: flex; gap: 3px; align-items: center; }
.n8ed-imgbar input[type=range] { width: 110px; }
.n8ed-imgbar b { font-size: 11.5px; min-width: 42px; font-weight: 600; }
.n8ed-imgbar span:not(.sep) { font-size: 13px; opacity: .8; padding: 0 2px; }
.n8ed-handle { position: absolute; z-index: 6; width: 14px; height: 14px; border-radius: 4px; background: var(--accent, #5ac8fa); border: 2px solid #fff; cursor: nwse-resize; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.n8ed-handle[hidden] { display: none; }

/* 2.39 – 🗂️ gallery of the authoring system (Admin → Portal → Gallery, picker in the editor) */
.gal-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.gal-bar input[type=search] { flex: 1 1 180px; min-width: 140px; }
.gal-bar select { width: auto; }
.gal-filters { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); flex-wrap: wrap; }
.gal-f { border: 0; background: transparent; color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 650; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.gal-f.active { background: var(--theme-accent-soft, rgba(90, 200, 250, .18)); color: var(--text); box-shadow: inset 0 0 0 1px var(--theme-accent-border, rgba(90, 200, 250, .38)); }
.gal-drop { border: 2px dashed rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px; text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 12px; transition: .15s; }
.gal-drop.on { border-color: var(--accent); background: var(--theme-accent-soft, rgba(90, 200, 250, .12)); color: var(--text); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gal-tile { position: relative; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); padding: 8px; cursor: pointer;
    display: flex; flex-direction: column; gap: 6px; outline: none; transition: border-color .15s, transform .15s; }
.gal-tile:hover, .gal-tile:focus { border-color: var(--theme-accent-border, rgba(90, 200, 250, .5)); transform: translateY(-1px); }
.gal-img { flex: none; height: 132px; display: grid; place-items: center; border-radius: 10px; overflow: hidden;
    background: repeating-conic-gradient(rgba(255,255,255,.05) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.gal-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gal-img.k-icon img { max-width: 56%; max-height: 64%; }
.gal-img.k-logo img { max-width: 92%; max-height: 92%; }
.gal-name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11.5px; }
.gal-meta .badge { font-size: 10.5px; }
.gal-acts { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.gal-tile:hover .gal-acts, .gal-tile:focus-within .gal-acts { opacity: 1; }
.gal-acts .btn { padding: 4px 7px; min-height: 0; backdrop-filter: blur(6px); }
.gal-empty { grid-column: 1 / -1; text-align: center; padding: 30px; }
.gal-preview { display: grid; place-items: center; min-height: 200px; max-height: 60vh; border-radius: 12px; padding: 12px; margin-bottom: 12px;
    background: repeating-conic-gradient(rgba(255,255,255,.05) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.gal-preview img { max-width: 100%; max-height: 56vh; }
.gal-preview.k-icon img { width: 160px; }
.gal-pick-ov { z-index: 260; }
.modal.gal-pick { width: min(1100px, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.gal-pick .gal-grid { overflow: auto; flex: 1; min-height: 200px; padding: 2px; grid-auto-rows: max-content; align-content: start; }
@media (max-width: 560px) { .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gal-acts { opacity: 1; } }
.gal-tile .gal-img img { width: auto; height: auto; max-width: 100%; max-height: 132px; object-fit: contain; margin: 0; }
.gal-tile .gal-img.k-logo img { max-width: 92%; max-height: 120px; }
.gal-tile .gal-img.k-icon img { max-width: 56%; max-height: 84px; }

/* 2.40 – 🤖 Claude & MCP */
.mcp-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; align-items: center; margin: 14px 0; font-size: 13.5px; }
.mcp-kv code { overflow-wrap: anywhere; }
.mcp-safe { margin-top: 10px; font-size: 13px; } .mcp-safe summary { cursor: pointer; font-weight: 650; } .mcp-safe ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.55; }
.mcp-how { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; } .mcp-how b { margin-top: 6px; }
.mcp-code { background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
    white-space: pre-wrap; word-break: break-all; margin: 0; font-family: var(--n8-mono, var(--mono, monospace)); }
.mcp-token { font-size: 15px; user-select: all; margin: 12px 0; }
.mcp-tbl td { vertical-align: top; font-size: 13px; } .mcp-tbl .badge { font-size: 11px; }
.mcp-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; font-size: 13px; }
.mcp-log { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; max-height: 360px; overflow: auto; }
.mcp-scopes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* 2.41 – ✍️ authoring system: hub with visitor statistics, world map, downloads */
.au-head { display: flex; flex-direction: column; gap: 12px; }
.au-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.au-facts { display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.au-range { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.au-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.au-kpi { border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); padding: 12px 14px; }
.au-kpi b { display: block; font-size: 28px; font-weight: 800; margin: 4px 0 2px; font-family: var(--n8-mono, var(--mono)); }
.au-kpi b small { font-size: 15px; color: var(--text-dim); }
.au-kpi .dim { font-size: 12px; }
.au-chart { width: 100%; }
.au-svg { width: 100%; height: 230px; display: block; }
.au-svg .g { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.au-svg .ax { fill: var(--text-dim); font-size: 11px; }
.au-svg rect.v { fill: var(--accent); opacity: .35; }
.au-svg rect.r { fill: var(--accent); }
.au-svg path.d { fill: none; stroke: #ffd60a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.au-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-dim); }
.au-legend .v { color: color-mix(in srgb, var(--accent) 45%, transparent); } .au-legend .r { color: var(--accent); } .au-legend .d { color: #ffd60a; }
.au-two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.au-map { position: relative; margin-top: 8px; }
.au-world { width: 100%; height: auto; display: block; }
.au-world path { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .14); stroke-width: .4; transition: fill .15s; }
.au-world path.on { fill: var(--accent); }
.au-world path:hover { stroke: #fff; stroke-width: .8; }
.au-tip { position: absolute; pointer-events: none; background: var(--panel-solid, #1b2333); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
    padding: 6px 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); white-space: nowrap; z-index: 5; }
.au-geo { margin-top: 8px; font-size: 12px; } .au-geo .err { color: #ff6b6b; }
.au-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.au-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.au-row .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-row .b { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; } .au-row .b i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.au-row .n { font-family: var(--n8-mono, var(--mono)); font-size: 12.5px; text-align: right; }
.au-top td { font-size: 13px; } .au-top td:not(:first-child), .au-top th:not(:first-child) { text-align: right; white-space: nowrap; }
.au-hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 10px; }
.au-hours i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.au-hours-x { display: flex; justify-content: space-between; font-size: 11px; margin-top: 4px; }
.au-privacy { margin-top: 14px; font-size: 12px; }
/* 🌐 2.45: every domain and subdomain */
.au-sites h4 { margin: 16px 0 6px; }
.au-peer { font-size: 12px; margin: 4px 0; }
.au-host { max-width: 260px; }
.au-hosts td, .au-matrix td { font-size: 13px; } .au-hosts td:nth-child(2), .au-hosts td:nth-child(3), .au-hosts td:nth-child(4),
.au-hosts th:nth-child(2), .au-hosts th:nth-child(3), .au-hosts th:nth-child(4) { text-align: right; white-space: nowrap; }
.au-matrix td:not(:first-child), .au-matrix th:not(:first-child) { text-align: right; white-space: nowrap; font-family: var(--n8-mono, var(--mono)); }
.au-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; } .au-chips span { white-space: nowrap; font-size: 12.5px; }
.au-sum td { border-top: 1px solid rgba(255, 255, 255, .14); font-weight: 600; }
.au-det { border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 8px 12px; margin: 6px 0; background: rgba(255, 255, 255, .025); }
.au-det summary { cursor: pointer; font-weight: 600; } .au-det .table-wrap { margin-top: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.linkish:hover { text-decoration: underline; }
.dl-logo { width: 28px; height: 28px; border-radius: 7px; }
.dl-tbl td { vertical-align: top; font-size: 13px; } .dl-desc { font-size: 12px; max-width: 420px; } .dl-url, .dl-sha { font-size: 11.5px; overflow-wrap: anywhere; max-width: 240px; }
.dl-tbl td.nowrap { padding-right: 4px; } .dl-tbl .btn.small { padding: 4px 7px; }
body.author-mode #tabAdminBtn.active { box-shadow: none; }
@media (max-width: 1000px) { .au-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .au-two { grid-template-columns: 1fr; } }

/* 2.41 – spacing: blocks of the authoring system, MCP and downloads stand apart like everywhere else */
#admin-author > * + *, #admin-mcp > * + *, #admin-downloads > * + *, #admin-gallery > * + * { margin-top: 16px; }
#admin-author .tiles, #admin-mcp .tiles { gap: 16px; }
#admin-author .tile, #admin-mcp .tile { padding: 20px 22px; }
.au-head h3, #admin-author .tile h3 { margin: 0 0 4px; }
#admin-author .tile-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
#admin-author h4 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.au-two > .tile { display: flex; flex-direction: column; }
.au-two .au-map { margin-top: 10px; }
.au-geo { margin-top: auto; padding-top: 12px; }
.au-legend { margin-top: 8px; }
.au-quick .btn { min-height: 38px; }
.au-facts { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
.au-cols .au-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 72px 56px; column-gap: 14px; }
.au-th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.au-list.au-cols { gap: 8px; }
.au-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.au-grid2 .au-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; }
@media (max-width: 700px) { .au-grid2 { grid-template-columns: 1fr; } }
.modal .row[hidden], .modal [hidden] { display: none !important; }
#dfD { min-height: 84px; height: 96px; resize: vertical; }
.dl-form { display: flex; flex-direction: column; gap: 14px; }
.dl-form .row { margin: 0; }
.dl-form .switch-row { margin-top: 2px; }
.dl-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mcp-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(90, 200, 250, .08); border: 1px solid rgba(90, 200, 250, .25); } .mcp-url code { font-size: 14px; font-weight: 700; }

/* 🖼️ 2.49: pictures in the N8 Editor and over MCP – caption frame, gallery, full width, looks (shadow, round, frame) */
.n8-fig { margin: 12px auto; max-width: 100%; box-sizing: border-box; }
.n8-fig img { display: block; width: 100%; height: auto; margin: 0; }
.n8-fig figcaption { font-size: 13px; line-height: 1.4; color: var(--text-dim); margin-top: 6px; text-align: center; font-style: italic; }
.n8-gallery { display: grid !important; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; box-sizing: border-box; }
.n8-gallery.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.n8-gallery.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.n8-gallery > img, .n8-gallery > .n8-fig { float: none !important; width: auto !important; margin: 0 !important; display: block !important; }
.n8-gallery > img, .n8-gallery > .n8-fig > img { width: 100% !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.n8-gallery .n8-gcap { grid-column: 1 / -1; display: block; text-align: center; font-style: italic; color: var(--text-dim); font-size: 13px; }
.md-html .n8-gallery, .n8ed-area .n8-gallery { clear: both; }
.md-html .n8-gallery[data-wrap="left"], .md-html .n8-gallery[data-wrap="right"], .n8ed-area .n8-gallery[data-wrap="left"], .n8ed-area .n8-gallery[data-wrap="right"] { clear: none; }
img.n8-shadow, .n8-shadow > img, .n8-gallery.n8-shadow img { box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
img.n8-round, .n8-round > img, .n8-gallery.n8-round img { border-radius: 18px !important; }
img.n8-frame, .n8-fig.n8-frame, .n8-gallery.n8-frame { padding: 6px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .05); border-radius: 12px; }
html[data-theme-mode="light"] img.n8-shadow, html[data-theme-mode="light"] .n8-shadow > img, html[data-theme-mode="light"] .n8-gallery.n8-shadow img { box-shadow: 0 10px 26px rgba(20, 40, 80, .22); }
.n8ed-area .n8-fig figcaption { outline: 1px dashed var(--glass-border); outline-offset: 2px; cursor: text; }
.n8ed-area .n8-gallery { outline: 1px dashed var(--glass-border); outline-offset: 4px; }
@media (max-width: 640px) {
    .md-html img[style*="float"], .md-html .n8-fig[style*="float"], .md-html .n8-gallery[style*="float"] { float: none !important; width: 100% !important; margin: 12px 0 !important; }
    .n8-gallery.n3, .n8-gallery.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.n8ed-area h1, .n8ed-area h2, .n8ed-area h3, .n8ed-area h4, .n8ed-area hr { clear: both; }
