.mt-doc > * { scroll-margin-top: calc(var(--cfx-top-h, 44px) + var(--cc-sticky, 66px) + 16px); }
.mt-lock { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(239, 68, 68, .25); border-radius: 14px; background: rgba(239, 68, 68, .05); }
.mt-lock[hidden] { display: none; }
.mt-lock-ico { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(239, 68, 68, .12); color: #EF4444; font-size: 14px; }
.mt-lock div { display: grid; gap: 2px; min-width: 0; }
.mt-lock b { font-size: .86rem; color: var(--cc-ink); }
.mt-lock span:not(.mt-lock-ico) { font-size: .74rem; line-height: 1.5; color: var(--cc-ink-2); }

.mt-card { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--cc-line); border-radius: 16px; background: var(--cc-card); min-width: 0; }
.mt-card[hidden] { display: none; }
.mt-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.mt-card-t { display: grid; gap: 2px; min-width: 0; }
.mt-card-t b { font-size: .92rem; font-weight: 700; color: var(--cc-ink); }
.mt-card-t span { font-size: .72rem; line-height: 1.45; color: var(--cc-ink-3); }
.mt-card-a { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mt-card-a .pm-hbtn { height: 34px; padding: 0 11px; border: 1px solid var(--cc-line); border-radius: 999px; font-size: .74rem; }
.mt-card-a .pm-hbtn i { font-size: 12px; }
.mt-card-a .pm-hbtn:disabled { opacity: .4; pointer-events: none; }
.mt-card-a .mt-clear:hover { border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); color: #EF4444; }
html:not(.cf-light) .mt-card-a .mt-clear:hover { color: #F87171; }

.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.mt-f { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; }
.mt-wide { grid-column: 1 / -1; }
.mt-f-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.mt-f-h label { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; color: var(--cc-ink-2); }
.mt-f-h label small { font-size: .68rem; font-weight: 400; color: var(--cc-ink-3); }
.mt-f-h label small:empty { display: none; }
.mt-f-h label #mtKwCount { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .66rem; font-weight: 700; text-align: center; }
html:not(.cf-light) .mt-f-h label #mtKwCount { color: var(--cc-bright); }
.mt-f.is-chg .mt-f-h label::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cc-teal); }
html:not(.cf-light) .mt-f.is-chg .mt-f-h label::after { background: var(--cc-bright); }
.mt-undo { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--cc-ink-3); font-size: 11px; cursor: pointer; transition: background .2s, color .2s; }
.mt-undo:hover { background: var(--cc-teal-soft); color: var(--cc-teal); }
.mt-undo[hidden] { display: none; }

.mt-f input, .mt-f textarea { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--cc-line); border-radius: 11px; outline: 0; background: var(--cc-soft); color: var(--cc-ink); font: 500 .84rem/1.3 'Poppins', sans-serif; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.mt-f textarea { display: block; height: auto; min-height: 66px; padding: 10px 12px; resize: none; line-height: 1.5; }
.mt-f input::placeholder, .mt-f textarea::placeholder { font-size: .8rem; font-weight: 400; color: var(--cc-ink-3); opacity: .8; }
.mt-f input:focus, .mt-f textarea:focus { border-color: var(--cc-teal); background: var(--cc-card); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.mt-f.is-chg input, .mt-f.is-chg textarea, .mt-f.is-chg .mt-kw { border-color: rgba(6, 147, 139, .45); }
.mt-dt { position: relative; display: block; min-width: 0; }
.mt-f .mt-dt-txt { padding-right: 44px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mt-f .mt-dt-txt.is-bad { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.mt-dt-btn { position: absolute; top: 50%; right: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; transform: translateY(-50%); border-radius: 8px; color: var(--cc-ink-3); font-size: 14px; pointer-events: none; transition: background .2s, color .2s; }
.mt-f .mt-dt .mt-dt-native { position: absolute; top: 50%; right: 6px; width: 32px; height: 32px; min-height: 0; padding: 0; transform: translateY(-50%); border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.mt-f .mt-dt .mt-dt-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.mt-dt:hover .mt-dt-btn { background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .mt-dt:hover .mt-dt-btn { color: var(--cc-bright); }
.mt-f .mt-dt-native:disabled { cursor: not-allowed; }
.mt-f.is-auto .mt-dt:hover .mt-dt-btn { background: transparent; color: var(--cc-ink-3); }
.mt-f input:disabled { -webkit-text-fill-color: var(--cc-ink-3); }
.mt-f input:disabled { opacity: .55; cursor: not-allowed; }
.mt-f-note { font-size: .68rem; color: var(--cc-ink-3); }
.mt-f-note[hidden] { display: none; }

.mt-kw { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px; border: 1px solid var(--cc-line); border-radius: 11px; background: var(--cc-soft); cursor: text; transition: border-color .2s, box-shadow .2s, background .2s; }
.mt-kw.is-focus { border-color: var(--cc-teal); background: var(--cc-card); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.mt-f .mt-kw input { flex: 1 1 140px; width: 0; min-width: 110px; height: 28px; padding: 0 6px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.mt-f .mt-kw input:focus { background: transparent; box-shadow: none; }
.mt-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 28px; padding: 0 3px 0 10px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .74rem; font-weight: 600; }
html:not(.cf-light) .mt-chip { color: var(--cc-bright); }
.mt-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-chip button { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 10px; cursor: pointer; transition: background .2s, color .2s; }
.mt-chip button:hover { background: rgba(239, 68, 68, .12); color: #EF4444; }

.mt-props { display: grid; gap: 8px; }
.mt-props[hidden] { display: none; }
.mt-prop { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) 36px; align-items: center; gap: 8px; }
.mt-prop input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--cc-line); border-radius: 10px; outline: 0; background: var(--cc-soft); color: var(--cc-ink); font: 500 .82rem 'Poppins', sans-serif; transition: border-color .2s, box-shadow .2s, background .2s; }
.mt-prop .mt-pk { font-weight: 600; }
.mt-prop input::placeholder { font-weight: 400; font-size: .78rem; color: var(--cc-ink-3); opacity: .8; }
.mt-prop input:focus { border-color: var(--cc-teal); background: var(--cc-card); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.mt-prop input.is-bad { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.mt-prop .mt-pdel { grid-area: auto; width: 36px; height: 36px; }
.mt-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px dashed var(--cc-line); border-radius: 12px; background: transparent; color: var(--cc-ink-3); font: 600 .78rem 'Poppins', sans-serif; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.mt-empty:hover { border-color: var(--cc-teal); background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .mt-empty:hover { color: var(--cc-bright); }
.mt-empty[hidden] { display: none; }

.mt-diff { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mt-diff[hidden] { display: none; }
.mt-diff li { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-card); font-size: .74rem; }
.mt-diff li span { font-weight: 600; color: var(--cc-ink-3); }
.mt-diff li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--cc-ink); }
.mt-diff li.is-del b { color: #EF4444; }
.mt-diff li.is-add b { color: var(--cc-teal); }
html:not(.cf-light) .mt-diff li.is-add b { color: var(--cc-bright); }

.mt-page .pm-dl-row #mtShareFile, .mt-page .pm-dl-row #mtRedo { flex: 1 1 0; }

.mt-page .qg-toast-text.pm-tt { display: flex; min-width: 0; overflow: hidden; }
.mt-page .pm-tt-pre, .mt-page .pm-tt-ext { flex-shrink: 0; white-space: pre; }
.mt-page .pm-tt-stem { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 761px) {
    .mt-page .qg-note { gap: 6px; font-size: .68rem; white-space: nowrap; letter-spacing: -.01em; }
}
@media (max-width: 760px) {
    .mt-mode-k:not([hidden]) { display: block; margin: 2px 0 -6px; font-size: .8rem; font-weight: 600; color: var(--cc-ink-2); }
    .mt-page .pm-tt-pre { display: none; }
    .mt-f input, .mt-f textarea, .mt-prop input { font-size: 16px; }
    .mt-f input, .mt-kw { min-height: 46px; }
    .mt-f input { height: 46px; }
    .mt-f .mt-kw input { height: 32px; font-size: 16px; }
    .mt-prop input { height: 44px; }
    .mt-f input::placeholder, .mt-f textarea::placeholder, .mt-prop input::placeholder { font-size: .84rem; }
}
@media (max-width: 600px) {
    .mt-card { padding: 14px 12px; border-radius: 14px; }
    .mt-card-h { align-items: flex-start; }
    .mt-card-t span { font-size: .7rem; }
    .mt-card-a .pm-hbtn { width: 34px; padding: 0; justify-content: center; }
    .mt-card-a .pm-hbtn span { display: none; }
    .mt-grid { grid-template-columns: 1fr; gap: 12px; }
    .mt-prop { grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: 'k d' 'v v'; gap: 6px 8px; padding: 10px; border: 1px solid var(--cc-line); border-radius: 12px; }
    .mt-prop .mt-pk { grid-area: k; }
    .mt-prop .mt-pv { grid-area: v; }
    .mt-prop .mt-pdel { grid-area: d; }
    .mt-diff li { grid-template-columns: 74px minmax(0, 1fr); }
}

.mt-app:not(.is-edit) .mt-edit-only { display: none; }


.mt-diff.is-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-diff.is-chips li { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-color: rgba(239, 68, 68, .25); border-radius: 999px; color: #DC2626; font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, .5); }
html:not(.cf-light) .mt-diff.is-chips li { color: #F87171; }

.mt-mode { scroll-margin-top: calc(var(--cfx-top-h, 44px) + var(--cc-sticky, 66px) + 16px); }
.mt-mode[hidden] { display: none; }
.mt-mode-k { display: none; }
.mt-mode button { flex: 1 1 0; min-width: 0; height: 40px; gap: 8px; }
.mt-mode button i { font-size: 13px; }
.mt-mode button[data-v="remove"].is-on { color: #DC2626; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .35); }
html:not(.cf-light) .mt-mode button[data-v="remove"].is-on { color: #F87171; }

.mt-rm { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(239, 68, 68, .25); border-radius: 14px; background: rgba(239, 68, 68, .05); }
.mt-rm[hidden] { display: none; }
.mt-rm-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mt-rm-ico { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(239, 68, 68, .12); color: #EF4444; font-size: 14px; }
.mt-rm-h div { display: grid; gap: 2px; min-width: 0; }
.mt-rm-h b { font-size: .86rem; color: var(--cc-ink); }
.mt-rm-h span:not(.mt-rm-ico) { font-size: .72rem; line-height: 1.45; color: var(--cc-ink-2); }
.mt-diff.mt-rm-list li { background: var(--cc-card); text-decoration: none; }

@media (max-width: 600px) {
    .mt-mode button { gap: 6px; padding: 0 6px; font-size: .78rem; }
    .mt-rm { padding: 12px; }
    .mt-diff.is-chips li { height: 28px; padding: 0 10px; font-size: .7rem; }
}
@media (max-width: 400px) {
    .mt-mode .mt-lg { display: none; }
}