/* =========================================================================
   Trình soạn Journal (J2 + J3): dàn ý | soạn theo mục | xem trước trực tiếp.
   Chỉ dùng token của hệ Classical (tokens-core.css + màu nhấn tokens-sci.css), tự đổi theo sáng / tối.
   Riêng "giấy" của bản xem trước có token riêng (--je-paper*) để giống bản in ở nền sáng và dịu mắt ở nền tối.
   ========================================================================= */
/* Màu "giấy" của bản xem trước (--je-paper*) khai ở tokens-sci.css cùng các màu khác của app. */
:root { --je-serif: "Times New Roman", "STIX Two Text", "Tinos", "Liberation Serif", Georgia, serif; --je-outline-w: 252px; }

/* ---- khung ---- */
.je { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - var(--header-height, 64px) - 40px); min-height: 560px; }
.je-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.je-top-spacer { flex: 1 1 auto; }
.je-save { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); max-width: 46ch; min-width: 0; }
.je-save span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.je-save.is-saved i { color: var(--success-color); }
.je-save.is-dirty i, .je-save.is-saving i { color: var(--accent, var(--gold)); }
.je-save.is-offline i, .je-save.is-info i { color: var(--info-color); }
.je-save.is-error { color: var(--danger-color); }
.je-seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: var(--radius-pill); padding: 2px; background: var(--surface); }
.je-seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-secondary); padding: 5px 12px; border-radius: var(--radius-pill); font: inherit; font-size: 13px; cursor: pointer; }
.je-seg-btn:hover { color: var(--text-primary); }
.je-seg-btn[aria-pressed="true"] { background: var(--card-bg-elevated); color: var(--accent-text, var(--text-primary)); box-shadow: var(--shadow-sm); font-weight: 600; }
.je-seg-btn:focus-visible, .je-tb-btn:focus-visible, .je-icon-btn:focus-visible, .je-ol-link:focus-visible, .je-outline-add:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 2px; }

.je-body { flex: 1 1 auto; min-height: 0; display: grid; gap: 12px; grid-template-columns: var(--je-outline-w) minmax(0, 1fr); }
.je-body[data-view="split"] { grid-template-columns: var(--je-outline-w) minmax(0, 1fr) minmax(0, 1fr); }
.je-body[data-view="page"] { grid-template-columns: var(--je-outline-w) minmax(0, 1fr); }
.je-body[data-view="write"] .je-preview { display: none; }
.je-body[data-view="page"] .je-main { display: none; }

/* ---- dàn ý ---- */
.je-outline { display: flex; flex-direction: column; min-height: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px 8px 10px; }
.je-outline-head { display: flex; flex-direction: column; gap: 2px; padding: 0 8px 8px; border-bottom: 1px solid var(--border-light, var(--border-color)); }
.je-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.je-outline-struct { font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; }
.je-outline-list { list-style: none; margin: 6px 0; padding: 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.je-ol-item { position: relative; }
.je-ol-item.je-l2 { padding-left: 14px; }
.je-ol-item.je-l3 { padding-left: 28px; }
.je-ol-link { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--text-primary); text-align: left; font: inherit; font-size: 13.5px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.je-ol-link:hover { background: var(--hover-bg); }
.je-ol-item.is-active > .je-ol-link { background: var(--accent-wash, var(--gold-dim)); color: var(--gold-deep); font-weight: 600; }
.je-ol-item.is-drag { opacity: .45; }
.je-ol-item.is-over::before { content: ""; position: absolute; left: 6px; right: 6px; top: -1px; height: 2px; background: var(--accent, var(--gold)); border-radius: 2px; }
.je-ol-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-muted); flex: none; }
.je-ol-dot.st-draft { border-color: var(--warning-color); background: color-mix(in srgb, var(--warning-color) 35%, transparent); }
.je-ol-dot.st-done { border-color: var(--success-color); background: var(--success-color); }
.je-ol-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.je-ol-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.je-ol-cm { font-size: 11.5px; color: var(--info-color); display: inline-flex; gap: 3px; align-items: center; }
.je-ol-words { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.je-outline-add { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--border-strong, var(--border-color)); background: transparent; color: var(--text-secondary); border-radius: var(--radius-sm); padding: 7px; font: inherit; font-size: 13px; cursor: pointer; margin: 2px 4px 8px; }
.je-outline-add:hover { color: var(--accent-text, var(--text-primary)); border-color: var(--accent, var(--gold)); }
.je-outline-total { border-top: 1px solid var(--border-light, var(--border-color)); padding: 8px 8px 0; display: grid; gap: 4px; font-size: 12.5px; }
.je-tot-row { display: flex; justify-content: space-between; gap: 8px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.je-tot-row strong { color: var(--text-primary); font-weight: 600; }
.je-tot-sm { font-size: 11.5px; color: var(--text-muted); }
.je-progress { height: 5px; border-radius: var(--radius-pill); background: var(--surface); overflow: hidden; margin: 3px 0 1px; }
.je-progress span { display: block; height: 100%; background: var(--success-color); border-radius: inherit; transition: width var(--dur) var(--ease); }

/* ---- vùng soạn ---- */
.je-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.je-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border-color); background: var(--card-bg-elevated); }
.je-tb-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; font: inherit; }
.je-tb-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.je-tb-btn:active { transform: scale(.94); }
.je-tb-glyph { font-family: var(--je-serif); font-size: 17px; font-weight: 700; line-height: 1; }
.je-tb-sep { width: 1px; height: 20px; background: var(--border-color); margin: 0 4px; }
.je-scroll { flex: 1 1 auto; overflow-y: auto; padding: 28px 24px 80px; scroll-padding-top: 16px; }
.je-paper { max-width: 820px; margin: 0 auto; font-family: var(--font-prose); color: var(--text-primary); }
.je-title { display: block; width: 100%; border: 0; outline: none; resize: none; overflow: hidden; background: transparent; color: inherit; font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; text-align: center; padding: 6px 8px; border-radius: var(--radius-sm); text-wrap: balance; }
.je-title:focus { background: var(--surface); }
.je-meta { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.je-meta-input { border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 14.5px; text-align: center; padding: 4px 8px; border-radius: var(--radius-sm); min-width: min(100%, 420px); }
.je-meta-date { min-width: 0; width: auto; }
.je-meta-input:focus { outline: none; background: var(--surface); color: var(--text-primary); }
.je-sections { display: flex; flex-direction: column; gap: 6px; }
.je-sec { border-radius: var(--radius-md); padding: 8px 10px 6px; transition: background-color var(--dur) var(--ease); }
.je-sec.is-active { background: color-mix(in srgb, var(--accent, var(--gold)) 5%, transparent); }
.je-sec.je-l2 { margin-left: 18px; }
.je-sec.je-l3 { margin-left: 36px; }
.je-sec-head { display: flex; align-items: center; gap: 8px; }
.je-sec-num { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--text-muted); font-variant-numeric: lining-nums tabular-nums; }
.je-sec-title { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--text-primary); font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; padding: 2px 4px; border-radius: var(--radius-xs); }
.je-l2 .je-sec-title, .je-l2 .je-sec-num { font-size: 18px; }
.je-l3 .je-sec-title, .je-l3 .je-sec-num { font-size: 16px; font-style: italic; }
.je-sec-title:focus { outline: none; background: var(--surface); }
.je-sec-words { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-body); }
.je-sec-status { font: inherit; font-family: var(--font-body); font-size: 12px; border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--card-bg); color: var(--text-secondary); padding: 2px 8px; cursor: pointer; }
.je-sec-status.st-draft { border-color: color-mix(in srgb, var(--warning-color) 55%, var(--border-color)); color: var(--warning-color); }
.je-sec-status.st-done { border-color: color-mix(in srgb, var(--success-color) 55%, var(--border-color)); color: var(--success-color); }
.je-icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.je-icon-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.je-sec-body { display: block; width: 100%; border: 0; outline: none; resize: none; overflow: hidden; background: transparent; color: var(--text-primary); font-family: var(--font-prose); font-size: 16.5px; line-height: 1.7; padding: 6px 4px 8px; min-height: 72px; tab-size: 2; }
.je-sec-body::placeholder { color: var(--text-muted); font-style: italic; }
.je-k-abstract .je-sec-body { font-style: italic; }
.je-k-references .je-sec-body { font-size: 14.5px; line-height: 1.55; }
.je-sec:not(.is-active) .je-sec-status, .je-sec:not(.is-active) .je-icon-btn { opacity: .55; }
.je-sec:hover .je-sec-status, .je-sec:hover .je-icon-btn { opacity: 1; }
.je-add-row { display: flex; justify-content: center; padding: 14px 0 0; }

/* ---- bản xem trước ---- */
.je-preview { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.je-preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border-color); background: var(--card-bg-elevated); min-height: 45px; }
.je-preview-tpl { font-size: 12.5px; color: var(--text-secondary); }
.je-preview-warn { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.je-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-secondary); }
.je-chip-warn { background: var(--warning-bg); color: var(--warning-color); border-color: color-mix(in srgb, var(--warning-color) 40%, transparent); }
.je-preview-scroll { flex: 1 1 auto; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.je-body[data-view="page"] .je-preview-scroll { padding: 28px 36px 60px; }
.je-pv-err { color: var(--danger-color); }

.pv-paper { background: var(--je-paper); color: var(--je-paper-ink); font-family: var(--je-serif); font-size: 15.5px; line-height: 1.55; max-width: 800px; margin: 0 auto; padding: 56px 64px 64px; box-shadow: var(--shadow-md); border-radius: 2px; hyphens: auto; }
.pv-paper :is(h1, h2, h3, h4) { font-family: var(--je-serif); color: var(--je-paper-ink); text-wrap: balance; }
.pv-head { text-align: center; margin-bottom: 18px; }
.pv-title { font-size: 25px; font-weight: 700; line-height: 1.25; margin: 0 0 12px; letter-spacing: 0; }
.pv-authors { margin: 0 0 4px; font-size: 15.5px; }
.pv-affs, .pv-corr, .pv-date { margin: 0 0 3px; font-size: 13px; color: var(--je-paper-muted); font-style: italic; }
.pv-abstract { margin: 16px 36px 20px; font-size: 14.5px; }
.pv-abs-h { font-size: 14.5px; font-weight: 700; text-align: center; margin: 0 0 4px; }
.pv-abstract p { margin: 0 0 6px; text-align: justify; }
.pv-kw { font-size: 14px; }
.pv-sec { margin: 0 0 6px; scroll-margin-top: 14px; }
.pv-sec > h2 { font-size: 17.5px; font-weight: 700; margin: 18px 0 6px; }
.pv-sec > h3 { font-size: 15.5px; font-weight: 700; margin: 14px 0 5px; }
.pv-sec > h4 { font-size: 15.5px; font-weight: 400; font-style: italic; margin: 12px 0 4px; }
.pv-num { margin-right: .45em; }
.pv-sec p, .pv-sec li { text-align: justify; }
.pv-sec p { margin: 0 0 8px; }
.pv-paper ul, .pv-paper ol { padding-left: 1.6em; margin: 4px 0 8px; }
.pv-paper .pv-refs { padding-left: 0; }
.pv-paper blockquote { margin: 8px 28px; font-size: 14.5px; }
.pv-paper code, .pv-paper pre { font-family: var(--font-mono); font-size: 13px; }
.pv-paper pre { background: color-mix(in srgb, var(--je-paper-ink) 6%, transparent); padding: 8px 10px; border-radius: 3px; overflow-x: auto; white-space: pre-wrap; }
.pv-paper .sm-raw { border-left: 3px solid var(--je-paper-rule); }
.pv-paper a { color: inherit; text-decoration-color: var(--je-paper-rule); text-underline-offset: 2px; }
.pv-paper .pv-cite, .pv-paper .pv-ref { text-decoration: none; color: var(--gold-text); }
.pv-missing { color: var(--danger-color) !important; background: var(--danger-bg); border-radius: 3px; padding: 0 3px; font-family: var(--font-mono); font-size: .85em; }
.pv-ph { color: var(--je-paper-muted); font-style: italic; }
.pv-empty > p.pv-ph { font-size: 13.5px; }
.sm-eq { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; position: relative; overflow-x: auto; }
.sm-eq .sm-eqno { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.sm-eq .katex-display { margin: 0; }
.sm-math { font-family: var(--font-mono); font-size: .9em; background: color-mix(in srgb, var(--je-paper-ink) 6%, transparent); padding: 0 3px; border-radius: 3px; }
.je-math-err { font-family: var(--font-mono); font-size: .88em; color: var(--danger-color); background: var(--danger-bg); padding: 0 3px; border-radius: 3px; cursor: help; }
.sm-table, .pv-fig { margin: 14px auto; text-align: center; break-inside: avoid; }
.sm-table figcaption, .pv-fig figcaption { font-size: 13.5px; margin: 4px 0; }
.sm-table table { margin: 0 auto; border-collapse: collapse; font-size: 14px; border-top: 1.5px solid var(--je-paper-ink); border-bottom: 1.5px solid var(--je-paper-ink); }
.sm-table thead th { border-bottom: 1px solid var(--je-paper-ink); font-weight: 600; }
.sm-table th, .sm-table td { padding: 3px 12px; text-align: left; }
.pv-fig img { max-width: 100%; max-height: 420px; object-fit: contain; }
.pv-fig-ph { display: grid; place-items: center; min-height: 120px; border: 1px dashed var(--je-paper-rule); color: var(--je-paper-muted); font-style: italic; font-size: 13.5px; padding: 12px; }
.pv-refs { padding-left: 0; list-style: none; font-size: 14px; }
.pv-refs li { display: grid; grid-template-columns: 2.6em 1fr; gap: 4px; margin: 0 0 4px; text-align: left; }
.pv-refs-ay li { display: block; padding-left: 2em; text-indent: -2em; }
.pv-refno { font-variant-numeric: tabular-nums; }
.sm-footnotes { font-size: 13px; padding-left: 1.4em; }
.sm-fn a { text-decoration: none; color: var(--gold-text); }
.pv-runin, .sm-runin { margin: 8px 0 4px; }

/* mẫu nhà xuất bản */
.pv-tpl-ieee { font-size: 13.5px; padding: 44px 40px; max-width: 860px; }
.pv-tpl-ieee .pv-body { column-count: 2; column-gap: 26px; }
.pv-tpl-ieee .pv-abstract { margin: 10px 0 14px; font-weight: 700; font-size: 13px; }
.pv-tpl-ieee .pv-abs-h { display: inline; font-style: italic; }
.pv-tpl-ieee .pv-abs-h::after { content: "—"; }
.pv-tpl-ieee .pv-abstract p { display: inline; }
.pv-tpl-ieee .pv-sec > h2 { font-size: 13.5px; font-variant: small-caps; text-align: center; }
.pv-tpl-ieee .pv-sec > h3 { font-size: 13.5px; font-style: italic; font-weight: 400; }
.pv-tpl-ieee .pv-sec > h2, .pv-tpl-ieee .pv-sec > h3 { break-after: avoid; }
.pv-tpl-springer { max-width: 640px; font-size: 14.5px; }
.pv-tpl-springer .pv-abstract { margin: 14px 24px; font-size: 13.5px; }
.pv-tpl-elsevier .pv-abstract { margin: 16px 0; border-top: 1px solid var(--je-paper-rule); border-bottom: 1px solid var(--je-paper-rule); padding: 10px 0; }
.pv-tpl-elsevier .pv-abs-h { text-align: left; }
.pv-tpl-apa { line-height: 2; font-size: 15px; }
.pv-tpl-apa .pv-sec > h2 { text-align: center; font-size: 15px; }
.pv-tpl-apa .pv-sec > h3 { font-size: 15px; }
.pv-tpl-apa .pv-sec p { text-indent: 2.5em; }
.pv-tpl-apa .pv-abstract p { text-indent: 0; }

/* ---- menu nổi, gợi ý @, hộp thoại ---- */
.je-menu { position: fixed; z-index: 1300; min-width: 220px; max-width: 340px; background: var(--card-bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px; }
.je-menu-list { display: flex; flex-direction: column; }
.je-menu-list button { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13.5px; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.je-menu-list button i { width: 16px; color: var(--text-muted); }
.je-menu-list button small { margin-left: auto; color: var(--text-muted); font-size: 11.5px; }
.je-menu-list button:hover:not([disabled]), .je-menu-list button:focus-visible { background: var(--hover-bg); outline: none; }
.je-menu-list button[disabled] { color: var(--text-muted); cursor: not-allowed; opacity: .55; }
.je-menu-list hr { border: 0; border-top: 1px solid var(--border-color); margin: 4px 2px; }
.je-menu-note { font-size: 11.5px; color: var(--text-muted); margin: 4px 8px 2px; }
.je-sym-grid { display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; }
.je-sym { height: 34px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-primary); font-family: var(--je-serif); font-size: 17px; cursor: pointer; }
.je-sym:hover, .je-sym:focus-visible { background: var(--accent-wash, var(--gold-dim)); outline: none; }
.je-ac { position: fixed; z-index: 1300; background: var(--card-bg-elevated); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 4px; max-height: 340px; overflow-y: auto; }
.je-ac-item { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 6px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.je-ac-item small { grid-column: 2; color: var(--text-muted); font-family: var(--font-mono); font-size: 11.5px; }
.je-ac-kind { grid-row: span 2; color: var(--text-muted); padding-top: 2px; }
.je-ac-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.je-ac-item.is-sel { background: var(--accent-wash, var(--gold-dim)); }
.je-ac-foot { font-size: 11.5px; color: var(--text-muted); padding: 5px 8px 3px; border-top: 1px solid var(--border-color); margin-top: 3px; }

.je-swal .je-new-field { display: grid; gap: 4px; text-align: left; margin: 0 0 10px; font-size: 14px; }
.je-swal .je-new-field > span { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.je-new { display: grid; grid-template-columns: 1fr 200px; gap: 0 12px; }
.je-structs { grid-column: 1 / -1; border: 0; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; text-align: left; }
.je-structs legend { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; }
.je-struct { position: relative; cursor: pointer; }
.je-struct input { position: absolute; opacity: 0; pointer-events: none; }
.je-struct-card { display: grid; gap: 4px; height: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--card-bg); transition: border-color var(--dur) var(--ease); }
.je-struct-card strong { font-size: 14px; }
.je-struct-card small { color: var(--text-secondary); font-size: 12.5px; line-height: 1.35; }
.je-struct-secs { color: var(--text-muted) !important; font-size: 11.5px !important; }
.je-struct input:checked + .je-struct-card { border-color: var(--accent, var(--gold)); background: var(--accent-wash, var(--gold-dim)); box-shadow: 0 0 0 1px var(--accent, var(--gold)); }
.je-struct input:focus-visible + .je-struct-card { outline: 2px solid var(--accent, var(--gold)); outline-offset: 2px; }
.je-mono { font-family: var(--font-mono) !important; font-size: 13.5px !important; }
.je-eq-prev { min-height: 64px; display: grid; place-items: center; border: 1px dashed var(--border-color); border-radius: var(--radius-sm); margin: 0 0 10px; padding: 10px; overflow-x: auto; background: var(--surface); }
.je-snips { display: flex; flex-wrap: wrap; gap: 6px; }
.je-snip { border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-secondary); border-radius: var(--radius-pill); padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.je-snip:hover { border-color: var(--accent, var(--gold)); color: var(--text-primary); }
.je-tbl-size { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.je-cite-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 4px; text-align: left; font-size: 13.5px; }
.je-cite-opts .form-control { flex: 1 1 180px; width: auto; }
.je-cite-opts label { display: inline-flex; gap: 6px; align-items: center; }
.cite-pick-item.is-picked { border-color: var(--accent, var(--gold)); background: var(--accent-wash, var(--gold-dim)); }
.je-hint { color: var(--text-muted); font-size: 12.5px; text-align: left; margin: 6px 0 0; }
.je-help td, .je-help th { text-align: left; font-size: 13px; }
.je-help code { font-family: var(--font-mono); font-size: 12.5px; }
.je-conflict, .je-conflict-list { text-align: left; font-size: 14px; }
.je-print-frame { position: fixed; width: 0; height: 0; border: 0; right: 0; bottom: 0; }

/* bản in (PDF nhanh) */
.je-print-body { background: white; margin: 0; }
@media print {
  .je-print-body .pv-paper { box-shadow: none; padding: 0; max-width: none; background: white; color: black; }
  @page { size: A4; margin: 22mm 20mm; }
}

/* ---- màn hẹp ---- */
@media (max-width: 1100px) {
  .je-body, .je-body[data-view="split"], .je-body[data-view="page"] { grid-template-columns: minmax(0, 1fr); }
  .je-outline { display: none; }
  .je-body[data-view="split"] .je-preview { display: none; }
}
@media (max-width: 720px) {
  .je { height: auto; min-height: 0; }
  .je-scroll { padding: 16px 10px 60px; }
  .je-title { font-size: 24px; }
  .pv-paper { padding: 28px 18px; }
  .je-seg-btn span { display: none; }
  .je-new { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .je-preview-scroll { scroll-behavior: auto; }
  .je-sec, .je-progress span, .je-struct-card { transition: none; }
}

/* ---- J4: trình soạn bảng dạng lưới, tra DOI, thêm hình ---- */
.je-grid-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.je-grid-wrap { overflow: auto; max-height: 46vh; border: 1px solid var(--border-color); border-radius: var(--radius-sm); margin-bottom: 10px; }
.je-grid { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.je-grid th, .je-grid td { border: 1px solid var(--border-light, var(--border-color)); padding: 0; }
.je-grid thead th { background: var(--surface); padding: 3px; }
.je-grid-al { width: 100%; font: inherit; font-size: 12px; border: 0; background: transparent; color: var(--text-secondary); }
.je-grid-rn, .je-grid-corner { width: 64px; background: var(--surface); color: var(--text-muted); font-size: 11.5px; font-weight: 500; text-align: center; padding: 0 4px; }
.je-grid-in { width: 100%; min-width: 90px; border: 0; background: transparent; color: var(--text-primary); font: inherit; padding: 6px 8px; }
.je-grid-in:focus { outline: 2px solid var(--accent, var(--gold)); outline-offset: -2px; background: var(--card-bg-elevated); }
.je-grid-head .je-grid-in { font-weight: 600; }
.je-grid-paste { text-align: left; margin: 0 0 10px; font-size: 13px; }
.je-grid-paste summary { cursor: pointer; color: var(--text-secondary); margin-bottom: 6px; }
.je-grid-paste .je-snip { margin-top: 6px; }
.je-lookup { display: flex; gap: 8px; margin: 0 0 6px; }
.je-lookup .form-control { flex: 1 1 auto; }
.je-lookup-res { margin: 0 0 10px; display: grid; gap: 6px; text-align: left; }
.je-err { color: var(--danger-color); }
.je-fig-prev { display: block; max-width: 100%; max-height: 260px; margin: 0 auto 12px; object-fit: contain; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--surface); }

/* ---- J5: kiểm tra bài, chế độ tập trung ---- */
body.je-open #main-content { padding-bottom: 16px; }
.je-tb-btn { position: relative; }
.je-tb-badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--warning-color); color: var(--on-accent); font-size: 10px; font-weight: 700; line-height: 16px; font-family: var(--font-body); }
.je-tb-btn.has-error .je-tb-badge { background: var(--danger-color); }
.je-ck-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.je-ck-c-error { background: var(--danger-bg); color: var(--danger-color); border-color: color-mix(in srgb, var(--danger-color) 35%, transparent); }
.je-ck-c-warn { background: var(--warning-bg); color: var(--warning-color); border-color: color-mix(in srgb, var(--warning-color) 35%, transparent); }
.je-ck-words { margin-left: auto; font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.je-ck-lim { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; text-align: left; }
.je-ck-lim label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.je-ck-lim .form-control { width: 96px; }
.je-ck-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; text-align: left; }
.je-ck-item { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; width: 100%; text-align: left; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--card-bg); color: var(--text-primary); font: inherit; font-size: 13.5px; padding: 8px 10px; cursor: pointer; }
.je-ck-item:hover, .je-ck-item:focus-visible { border-color: var(--accent, var(--gold)); outline: none; }
.je-ck-item i { padding-top: 2px; }
.je-ck-error i { color: var(--danger-color); }
.je-ck-warn i { color: var(--warning-color); }
.je-ck-info i { color: var(--info-color); }
.je-ck-msg small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.je-ck-lv { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.je-ck-ok { color: var(--success-color); text-align: center; padding: 18px 0; }
.je-ck-abbr { text-align: left; margin-top: 12px; font-size: 13.5px; }
.je-ck-abbr summary { cursor: pointer; color: var(--text-secondary); margin-bottom: 6px; }
.je-ck-abbr .btn { margin-top: 8px; }
body.je-focus #app-sidebar { display: none; }
body.je-focus .je-outline { display: none; }
body.je-focus .je-body, body.je-focus .je-body[data-view="page"] { grid-template-columns: minmax(0, 1fr); }
body.je-focus .je-body[data-view="split"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.je-focus .je-paper { max-width: 760px; }
.pv-tpl-vancouver { line-height: 2; }
.pv-tpl-vancouver .pv-abstract { margin: 16px 0; }
.pv-tpl-vancouver .pv-abs-h { text-align: left; }

/* ---- J7: danh sách bài dạng thẻ ---- */
.je-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.je-cards > .empty-state { grid-column: 1 / -1; }
.je-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.je-card:hover { border-color: color-mix(in srgb, var(--accent, var(--gold)) 45%, var(--border-color)); box-shadow: var(--shadow-sm); }
.je-card-skel { min-height: 150px; background: linear-gradient(90deg, var(--surface), var(--hover-bg), var(--surface)); background-size: 200% 100%; animation: je-skel 1.4s ease-in-out infinite; }
@keyframes je-skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.je-card-main { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; text-align: left; border: 0; background: transparent; color: var(--text-primary); font: inherit; padding: 14px 16px 12px; cursor: pointer; }
.je-card-main:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: -2px; }
.je-card-kicker { font-size: 11.5px; letter-spacing: .04em; color: var(--text-muted); text-transform: uppercase; }
.je-card-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.3; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.je-card-authors { font-size: 13.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.je-card .je-progress { margin-top: 4px; }
.je-card-meta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.je-card-acts { display: flex; gap: 2px; justify-content: flex-end; padding: 4px 8px 6px; border-top: 1px solid var(--border-light, var(--border-color)); }
@media (prefers-reduced-motion: reduce) { .je-card-skel { animation: none; } .je-card { transition: none; } }

/* ---- C1–C3: cộng tác khi viết (journal-collab.js) ---- */
/* lớp tô màu nằm khít dưới ô soạn: cùng phông, lề, cách xuống dòng; chữ trong lớp trong suốt, chỉ hiện nền của vùng được tô */
.je-ta-wrap { position: relative; }
.je-ta-wrap .je-sec-body { position: relative; z-index: 1; }
.je-ta-hl { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
  font-family: var(--font-prose); font-size: 16.5px; line-height: 1.7; padding: 6px 4px 8px; tab-size: 2; }
.je-k-abstract .je-ta-hl { font-style: italic; }
.je-k-references .je-ta-hl { font-size: 14.5px; line-height: 1.55; }
.je-ta-hl mark { color: transparent; padding: 0; border-radius: 2px; background: transparent; }
.je-ta-hl mark.hl-cm { background: var(--je-hl-comment); box-shadow: 0 2px 0 0 color-mix(in srgb, var(--warning-color) 70%, transparent); }
.je-ta-hl mark.hl-cm.is-focus { background: var(--je-hl-comment-focus); }
.je-ta-hl mark.hl-my-ins { background: var(--je-hl-ins); box-shadow: 0 2px 0 0 var(--je-hl-ins-line); }
.je-ta-hl mark.hl-sg-del { background: var(--je-hl-del); text-decoration: line-through; text-decoration-color: var(--je-hl-del-line); text-decoration-thickness: 2px; color: transparent; }
.je-ta-hl span[class^="mk-"], .je-ta-hl span[class*=" mk-"] { position: relative; }
.je-ta-hl .mk-my-del::after, .je-ta-hl .mk-sg-ins::after { content: ""; position: absolute; left: -1px; top: -0.95em; height: 1.15em; border-left: 2px solid var(--je-hl-del-line); }
.je-ta-hl .mk-sg-ins::after { border-left-color: var(--je-hl-ins-line); border-left-width: 3px; }
body.je-suggest .je-sec-body { caret-color: var(--je-hl-ins-line); }
body.je-suggest .je-sec { box-shadow: inset 3px 0 0 0 color-mix(in srgb, var(--je-hl-ins-line) 55%, transparent); }
body.je-suggest .je-sec-title[readonly] { cursor: default; }

/* thanh trên: người đang mở bài, chế độ sửa, nút Góp ý */
.je-presence { display: inline-flex; align-items: center; }
.je-presence[hidden], .je-mode[hidden], .je-review-btn[hidden] { display: none; }
.je-who { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--on-accent); background: var(--je-who-0); border: 2px solid var(--card-bg); margin-left: -6px; font-family: var(--font-body); flex: none; }
.je-presence .je-who:first-child { margin-left: 0; }
.je-who.is-suggest { box-shadow: 0 0 0 2px var(--je-hl-ins-line); }
.je-who-sm { width: 22px; height: 22px; font-size: 10px; margin-left: 0; border-width: 0; }
.je-who-0 { background: var(--je-who-0); }
.je-who-1 { background: var(--je-who-1); }
.je-who-2 { background: var(--je-who-2); }
.je-who-3 { background: var(--je-who-3); }
.je-who-4 { background: var(--je-who-4); }
.je-who-5 { background: var(--je-who-5); }
.je-mode-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-secondary); padding: 5px 12px; border-radius: var(--radius-pill); font: inherit; font-size: 13px; cursor: pointer; }
.je-mode-btn:hover { color: var(--text-primary); }
.je-mode-btn[aria-pressed="true"] { background: var(--card-bg-elevated); color: var(--accent-text, var(--text-primary)); box-shadow: var(--shadow-sm); font-weight: 600; }
.je-mode-btn[data-mode="suggest"][aria-pressed="true"] { color: var(--je-hl-ins-line); }
.je-mode-btn:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 2px; }
.je-review-btn { position: relative; }
.je-review-btn .je-tb-badge { top: -6px; right: -6px; }
.je-review-btn[aria-expanded="true"] { border-color: var(--accent, var(--gold)); color: var(--accent-text, var(--text-primary)); }
.je-ol-who, .je-sec-who { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--on-accent); border-radius: var(--radius-pill); padding: 1px 7px; font-family: var(--font-body); white-space: nowrap; }
.je-sec-who { font-weight: 500; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }

/* khung Góp ý / Đề xuất sửa (cột phải) */
.je-body.has-review { grid-template-columns: var(--je-outline-w) minmax(0, 1fr) minmax(300px, 360px); }
.je-body.has-review[data-view="split"] { grid-template-columns: var(--je-outline-w) minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 340px); }
.je-review { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.je-review[hidden] { display: none; }
.je-rv-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border-color); background: var(--card-bg-elevated); }
.je-rv-tabs { display: flex; gap: 2px; flex: 1 1 auto; }
.je-rv-tab { border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 13.5px; padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.je-rv-tab[aria-selected="true"] { color: var(--text-primary); font-weight: 600; background: var(--surface); }
.je-rv-tab:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 1px; }
.je-rv-n { font-size: 11px; font-weight: 700; min-width: 18px; padding: 0 5px; line-height: 18px; border-radius: var(--radius-pill); background: var(--accent, var(--gold)); color: var(--on-accent); text-align: center; }
.je-rv-body { flex: 1 1 auto; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.je-rv-tip, .je-rv-empty { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.je-rv-empty { text-align: center; padding: 24px 8px; }
.je-rv-mode p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; }
.je-th, .je-sg { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 8px 10px; background: var(--card-bg); display: flex; flex-direction: column; gap: 6px; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.je-th.is-focus { border-color: var(--warning-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warning-color) 25%, transparent); }
.je-th.is-resolved { opacity: .72; }
.je-th-draft { border-style: dashed; border-color: var(--accent, var(--gold)); }
.je-th-where { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; text-align: left; }
.je-th-where:hover { color: var(--accent-text, var(--text-primary)); }
.je-th-quote { margin: 0; padding: 2px 0 2px 8px; border-left: 3px solid color-mix(in srgb, var(--warning-color) 70%, transparent); font-family: var(--font-prose); font-size: 13.5px; color: var(--text-secondary); font-style: italic; max-height: 4.6em; overflow: hidden; }
.je-th-msg + .je-th-msg { border-top: 1px dashed var(--border-light, var(--border-color)); padding-top: 6px; }
.je-th-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; }
.je-th-time { color: var(--text-muted); font-size: 11.5px; margin-left: auto; }
.je-th-x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: 2px 4px; border-radius: var(--radius-xs); }
.je-th-x:hover { color: var(--danger-color); }
.je-th-text { font-size: 13.5px; line-height: 1.5; color: var(--text-primary); margin: 2px 0 0; overflow-wrap: anywhere; }
.je-mention { color: var(--accent-text, var(--info-color)); font-weight: 600; }
.je-th-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.je-rv-reply { flex: 1 1 140px; font-size: 13px; padding: 4px 8px; min-height: 30px; }
.je-rv-input { font-size: 13.5px; }
.je-rv-ac { display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--card-bg-elevated); box-shadow: var(--shadow-sm); }
.je-rv-ac[hidden] { display: none; }
.je-rv-ac-item { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; font-size: 13px; padding: 6px 8px; text-align: left; cursor: pointer; color: var(--text-primary); }
.je-rv-ac-item:hover, .je-rv-ac-item:focus-visible { background: var(--hover-bg); outline: none; }
.je-rv-done summary { cursor: pointer; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.je-rv-done .je-th { margin-bottom: 8px; }
.je-sg-stat { text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.je-sg-hunks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.je-sg-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: start; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface); }
.je-sg-h.is-stale { opacity: .8; }
.je-sg-h small { grid-column: 1 / -1; }
.je-sg-diff { font-family: var(--font-prose); font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.je-sg-diff ins, .je-sg-full ins { text-decoration: none; background: var(--je-hl-ins); box-shadow: 0 1.5px 0 0 var(--je-hl-ins-line); border-radius: 2px; }
.je-sg-diff del, .je-sg-full del { text-decoration: line-through; text-decoration-color: var(--je-hl-del-line); background: var(--je-hl-del); border-radius: 2px; }
.je-dctx { color: var(--text-muted); }
.je-sg-diff del + ins, .je-sg-full del + ins { margin-left: 3px; }
.je-sg-btns { display: inline-flex; gap: 4px; }
.je-sg-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; color: var(--text-secondary); }
.je-sg-btn.is-ok:hover:not(:disabled) { color: var(--success-color); border-color: var(--success-color); }
.je-sg-btn.is-no:hover { color: var(--danger-color); border-color: var(--danger-color); }
.je-sg-btn:disabled { opacity: .4; cursor: not-allowed; }
.je-sg-btn:focus-visible { outline: 2px solid var(--accent, var(--gold)); outline-offset: 1px; }
.je-sg-full { text-align: left; white-space: pre-wrap; font-family: var(--font-prose); font-size: 14.5px; line-height: 1.7; max-height: 60vh; overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
/* hộp gộp khi cùng sửa một câu */
.je-cf { text-align: left; margin-bottom: 12px; }
.je-cf h4 { font-family: var(--font-display); font-size: 17px; margin: 6px 0; }
.je-cf-item { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 8px; display: grid; gap: 6px; }
.je-cf-item legend { font-size: 12px; color: var(--text-muted); padding: 0 4px; float: none; width: auto; margin: 0; }
.je-cf-opt { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13.5px; }
.je-cf-opt > span { display: flex; flex-direction: column; gap: 2px; }
.je-cf-text { font-family: var(--font-prose); color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .je-body.has-review, .je-body.has-review[data-view="split"] { grid-template-columns: minmax(0, 1fr); }
  .je-review { position: fixed; z-index: 60; top: calc(var(--header-height, 64px) + 8px); right: 8px; bottom: 8px; width: min(380px, calc(100vw - 16px)); box-shadow: var(--shadow-lg, var(--shadow-sm)); }
}
@media (prefers-reduced-motion: reduce) { .je-th, .je-sg { transition: none; } }

/* ---- C4–C5: nhập bài từ Word / Markdown (journal-import.js) ---- */
.je-new-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.je-new-import { text-align: left; margin: 12px 0 0; font-size: 13.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ji { text-align: left; display: flex; flex-direction: column; gap: 10px; }
.ji-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 10px; }
.ji-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ji-h { font-family: var(--font-display); font-size: 16px; margin: 4px 0 0; }
.ji-secs { list-style: none; margin: 0; padding: 0; max-height: 38vh; overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.ji-secs li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 5px 10px; border-bottom: 1px solid var(--border-light, var(--border-color)); font-size: 13.5px; }
.ji-secs li:last-child { border-bottom: 0; }
.ji-secs li.je-l2 { padding-left: 26px; }
.ji-secs li.je-l3 { padding-left: 42px; font-style: italic; }
.ji-sec-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ji-sec-k { font-size: 12px; color: var(--accent-text, var(--text-secondary)); }
.ji-sec-w { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ji-changes { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.ji-changes legend { font-size: 13px; color: var(--text-secondary); float: none; width: auto; padding: 0 4px; margin: 0; }
.ji-changes label, .ji-opt { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13.5px; }
.ji-warn { list-style: none; margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warning-color) 10%, transparent); display: grid; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.ji-warn i { color: var(--warning-color); }
@media (max-width: 720px) { .ji-row { grid-template-columns: 1fr; } }
