
.mt-tone-gray { --mt-tone: var(--gray); --mt-tone-soft: var(--gray-soft); }
.mt-tone-blue { --mt-tone: var(--blue); --mt-tone-soft: var(--blue-soft); }
.mt-tone-teal { --mt-tone: var(--teal); --mt-tone-soft: var(--teal-soft); }
.mt-tone-violet { --mt-tone: var(--violet); --mt-tone-soft: var(--violet-soft); }
.mt-tone-amber { --mt-tone: var(--amber); --mt-tone-soft: var(--amber-soft); }
.mt-tone-green { --mt-tone: var(--green); --mt-tone-soft: var(--green-soft); }
.mt-tone-rose { --mt-tone: var(--rose); --mt-tone-soft: var(--rose-soft); }
.mt-tone-red { --mt-tone: var(--red); --mt-tone-soft: var(--red-soft); }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mt-tone, var(--border-strong)); flex: none; }

.mt-due { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-due-icon { width: 12px; height: 12px; }
.mt-due.is-soon, .mt-due.is-today { color: var(--amber); }
.mt-due.is-overdue { color: var(--red); }

.mt-side-dot { flex: none; }
.mt-side-dot.not_contacted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.mt-focus-icon { display: inline-flex; color: #c2621f; }
[data-theme="dark"] .mt-focus-icon { color: #f0a35e; }
.mt-pending { color: var(--amber); font-weight: 600; }
.mt-link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
.mt-link-btn:hover { text-decoration: underline; }
.mt-tag-soft { background: var(--surface-3); color: var(--text-2); }
.mt-select-fit { width: auto; max-width: 220px; }
.mt-score-lg { width: 52px; height: 52px; font-size: 16px; border-width: 2.5px; }
.mt-dlg-couple { font-size: 15px; font-weight: 600; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.mt-dlg-couple:empty { display: none; }
.mt-picker { display: block; width: 100%; }

.mt-toolbar { margin-bottom: 14px; }
.mt-toolbar-row { border-bottom: 0; }
.mt-toolbar .mt-search { max-width: 360px; }
.mt-filter-menu input[type="checkbox"], .mt-filter-menu input[type="radio"] { accent-color: var(--primary); width: 14px; height: 14px; margin: 0; }
.mt-chips { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }

.mt-board { grid-auto-columns: minmax(196px, 1fr); gap: 8px; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mt-board[style] { grid-template-columns: repeat(var(--mt-cols, 6), minmax(196px, 1fr)); }
.mt-board.has-closed[style] { grid-template-columns: repeat(var(--mt-cols, 6), minmax(196px, 1fr)) 60px; }
@media (max-width: 640px) {
  .mt-board[style] { grid-template-columns: repeat(var(--mt-cols, 6), min(82vw, 320px)); scroll-snap-type: x mandatory; scroll-padding-inline: 2px; }
  .mt-board.has-closed[style] { grid-template-columns: repeat(var(--mt-cols, 6), min(82vw, 320px)) 64px; }
  .mt-col { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
  .mt-card { padding: 11px 12px 12px; }
  .mt-card-name { font-size: 15px; }
}
.mt-col { max-height: calc(100vh - 300px); min-height: 220px; scroll-snap-align: start; }
.mt-col-head { padding: 10px 12px 8px; }
.mt-col-dot { background: var(--mt-tone); }
.mt-col-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-col-body { scrollbar-width: thin; }
.mt-col-empty { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-3); font-size: 12px; text-align: center; padding: 18px 8px; }
.mt-col-body:has(.mt-card) .mt-col-empty { display: none; }
.mt-col.drag-over .mt-col-empty { border-color: var(--primary); color: var(--primary); }
.mt-col-foot { padding: 6px 12px 10px; font-size: 11.5px; }
.mt-col-foot-link { color: var(--text-3); }
.mt-col-foot-link:hover { color: var(--primary); }

.mt-col-closed { min-height: 220px; width: 60px; background: transparent; border: 1.5px dashed var(--border-strong); }
.mt-closed-rail { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; color: var(--text-3); border-radius: inherit; }
.mt-closed-rail:hover { color: var(--primary); background: var(--surface-3); }
.mt-closed-label { writing-mode: vertical-rl; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--text-2); }
.mt-closed-count { font-size: 11.5px; font-weight: 700; min-width: 24px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.mt-col-closed.drag-over { border-color: var(--red); background: var(--red-soft); }
.mt-col-closed.drag-over .mt-closed-rail, .mt-col-closed.drag-over .mt-closed-label { color: var(--red); }

.mt-card { padding: 9px 11px 10px; cursor: pointer; }
.mt-card[draggable="true"] { cursor: grab; }
.mt-card[draggable="true"]:active { cursor: grabbing; }
.mt-card:focus-within { border-color: var(--border-strong); }
.mt-card.is-pending { border-color: #e7c27a; }
.mt-card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 18px; }
.mt-card-code { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0; }
.mt-card-days { margin-inline-start: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mt-card-names { display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.mt-card-names:hover .mt-card-name { color: var(--primary); }
.mt-card-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mt-card-mark { height: 15px; align-self: center; }
.mt-card-name { font-size: 14px; font-weight: 600; line-height: 1.3; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[dir="ltr"] .mt-card-name { text-align: left; }
.mt-ln { font-weight: 700; }
.mt-card-flag { display: flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 7px; border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 600; }
.mt-card-step { min-width: 0; }
.mt-card-step-icon { color: var(--text-3); }
.mt-card-step.overdue .mt-card-step-icon { color: var(--red); }
.mt-card-step.is-none { color: var(--text-3); font-style: italic; }
.mt-card-step.is-mazel, .mt-card-step.is-mazel .mt-card-step-icon { color: var(--green); font-weight: 600; }
.mt-card-meta { margin-top: 7px; }
.mt-card-dates { display: inline-flex; align-items: center; gap: 3px; }
.mt-card-shadchan { display: inline-flex; align-items: center; gap: 5px; max-width: 120px; color: var(--text-2); }

.mt-table td { white-space: nowrap; }
.mt-step-cell { white-space: normal; min-width: 200px; max-width: 320px; }
.mt-step-stack > * { white-space: normal; }
.mt-row-focus > td:first-child { box-shadow: inset 3px 0 0 #e8a96b; }
.mt-row-focus:dir(rtl) > td:first-child { box-shadow: inset -3px 0 0 #e8a96b; }
.mt-person-cell { min-width: 160px; max-width: 220px; }
.mt-person-body { min-width: 0; flex: 1; }
.mt-person-name { font-size: 13.5px; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mt-person-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.mt-person-meta > span { overflow: hidden; text-overflow: ellipsis; }
.mt-person-meta > span:last-child { flex: none; }
.mt-shadchan-cell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.mt-answers { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-2); }
.mt-answer { display: inline-flex; align-items: center; gap: 6px; }

.mt-head { overflow: hidden; }
.mt-head-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.mt-head-meta { font-size: 12px; color: var(--text-3); }
.mt-head-actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.mt-head-couple { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); align-items: stretch; }
.mt-head-side { padding: 18px 22px 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.mt-head-side::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--male); opacity: .8; }
.mt-head-side.is-female::before { background: var(--female); }
.mt-head-eyebrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mt-head-name { font-family: var(--font-serif); font-size: 27px; font-weight: 500; line-height: 1.15; letter-spacing: 0; text-align: start; }
[dir="ltr"] .mt-head-name { text-align: left; }
.mt-head-name-link:hover { color: var(--primary); }
.mt-strong { font-weight: 700; }
.mt-head-parents { font-size: 14.5px; color: var(--text-2); text-align: start; }
[dir="ltr"] .mt-head-parents { text-align: left; }
.mt-head-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 2px 0 0; }
.mt-head-fact { min-width: 0; }
.mt-head-fact.is-wide { grid-column: 1 / -1; }
.mt-head-fact-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.mt-head-fact-value { margin: 1px 0 0; font-size: 13px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.mt-head-fact-value.truncate { display: block; }
.mt-head-fact-text { font-size: 13.5px; }
.mt-head-phones { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-head-phone { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12.5px; color: var(--text); }
.mt-head-phone:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.mt-muted-icon { color: var(--text-3); }
.mt-head-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--text-2); }
.mt-head-note-icon { margin-top: 2px; color: var(--text-3); }
.mt-head-note.is-warn, .mt-head-note.is-warn .mt-head-note-icon { color: var(--amber); }
.mt-inline-link { color: var(--primary); }
.mt-head-answer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }
.mt-head-answer-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.mt-answer-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.mt-answer-btn:hover { border-color: var(--text-3); }
.mt-answer-btn.is-static { cursor: default; }
.mt-answer-btn.mt-tone-green, .mt-answer-btn.mt-tone-red, .mt-answer-btn.mt-tone-amber, .mt-answer-btn.mt-tone-blue { background: var(--mt-tone-soft); border-color: transparent; color: var(--mt-tone); }
.mt-menu-current { font-weight: 600; }
.mt-head-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-inline: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.mt-head-link-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.mt-head-heart { color: var(--text-3); }

.mt-stepper { list-style: none; margin: 0; padding: 12px 18px 14px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.mt-step { position: relative; display: flex; justify-content: center; }
.mt-step::before { content: ""; position: absolute; top: 13px; inset-inline-start: calc(-50% + 16px); inset-inline-end: calc(50% + 16px); height: 2px; background: var(--border); }
.mt-step:first-child::before { display: none; }
.mt-step.is-done::before, .mt-step.is-current::before { background: var(--primary); }
.mt-step-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; padding: 0 4px; cursor: default; color: var(--text-3); font: inherit; min-width: 0; }
.mt-step-btn.is-action { cursor: pointer; }
.mt-step-btn.is-action:hover .mt-step-dot { border-color: var(--primary); color: var(--primary); }
.mt-step-btn.is-action:hover .mt-step-label { color: var(--text); }
.mt-step-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-3); position: relative; z-index: 1; transition: border-color .12s, color .12s; }
.mt-step-label { font-size: 11.5px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mt-step.is-done .mt-step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.mt-step.is-done .mt-step-label { color: var(--text-2); }
.mt-step.is-current .mt-step-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.mt-step.is-current .mt-step-label { color: var(--text); font-weight: 700; }
.mt-stepper.is-closed .mt-step.is-done .mt-step-dot { background: var(--text-3); border-color: var(--text-3); }
.mt-stepper.is-closed .mt-step.is-done::before, .mt-stepper.is-closed .mt-step.is-current::before { background: var(--text-3); }
.mt-stepper.is-closed .mt-step.is-current .mt-step-dot { border-color: var(--text-3); color: var(--text-3); box-shadow: none; }

.mt-banner { align-items: center; }
.mt-banner-btn { flex: none; }

.mt-next-card.is-overdue { border-color: #f1c3be; box-shadow: 0 0 0 1px #f8dcd8; }
[data-theme="dark"] .mt-next-card.is-overdue { border-color: var(--red); box-shadow: none; }
.mt-next-text { font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.mt-next-due { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mt-next-due .mt-due { font-size: 12.5px; }
.mt-next-empty { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.mt-quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mt-chip-btn { height: 26px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); font-size: 12px; color: var(--text-2); cursor: pointer; }
.mt-chip-btn:hover { border-color: var(--text-3); color: var(--text); }
.mt-chip-btn.is-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.mt-meeting { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.mt-meeting:last-child { border-bottom: 0; }
.mt-meeting-when { display: flex; gap: 10px; align-items: flex-start; }
.mt-meeting-n { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: var(--radius); background: var(--violet-soft); color: var(--violet); font-weight: 700; font-size: 12.5px; flex: none; }
.mt-meeting-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mt-meeting-side { min-width: 0; }
.mt-meeting-mark { height: 14px; }
.mt-meeting-feedback { margin-top: 4px; font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.mt-meeting-actions { display: flex; gap: 2px; }
.mt-interest-seg { flex-wrap: wrap; }
.mt-interest-seg .mt-interest-opt { padding: 0 10px; }

.mt-composer { padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.mt-composer-input { min-height: 58px; background: var(--surface); }
.mt-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-ev-icon.mt-tone-blue, .mt-ev-icon.mt-tone-teal, .mt-ev-icon.mt-tone-violet, .mt-ev-icon.mt-tone-amber,
.mt-ev-icon.mt-tone-green, .mt-ev-icon.mt-tone-rose { background: var(--mt-tone-soft); color: var(--mt-tone); }
.mt-ev-icon.is-mazel { background: var(--green-soft); color: var(--green); }
.mt-ev-icon.is-reported { background: var(--amber-soft); color: var(--amber); }
.mt-ev-icon.is-note { background: var(--primary-soft); color: var(--primary); }
.mt-ev-icon.is-focus { color: #c2621f; }
.mt-st-from { color: var(--text-3); }

.mt-focus-switch-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.mt-prio-seg { width: 100%; }
.mt-prio-opt { flex: 1; }
.mt-prio-seg .mt-prio-text { justify-content: center; width: 100%; padding: 0 6px; }
.mt-kv-tight > dt, .mt-kv-tight > dd { padding: 6px 0; }
.mt-factors { display: flex; flex-direction: column; gap: 7px; }
.mt-factor { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 42px; gap: 8px; align-items: center; font-size: 12px; }
.mt-f-label { color: var(--text-2); }
.mt-f-bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.mt-f-fill { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.mt-f-val { text-align: end; color: var(--text-3); font-size: 11.5px; }
.mt-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.mt-reason { display: flex; gap: 7px; align-items: flex-start; }
.mt-reason-icon { margin-top: 2px; }
.mt-reason.is-good .mt-reason-icon { color: var(--green); }
.mt-reason.is-warn .mt-reason-icon { color: var(--amber); }

.mt-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); }
.mt-preview-body { display: flex; gap: 12px; align-items: flex-start; }

.mt-sugg-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.mt-sugg-rail { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
.mt-pick-list { max-height: 520px; overflow-y: auto; }
.mt-pick { padding: 8px 16px; color: var(--text); }
.mt-pick:hover { background: var(--surface-hover); }
.mt-pick.is-active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.mt-pick.is-active:dir(rtl) { box-shadow: inset -3px 0 0 var(--primary); }
.mt-subject-main { display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; }
.mt-subject-name { font-family: var(--font-serif); font-size: 24px; font-weight: 500; letter-spacing: 0; margin-top: 6px; text-align: start; }
[dir="ltr"] .mt-subject-name { text-align: left; }
.mt-subject-parents { text-align: start; }
[dir="ltr"] .mt-subject-parents { text-align: left; }
.mt-subject-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.mt-subject-fact { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.mt-subject-notes { border-top: 1px solid var(--border); padding: 10px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.mt-subject-note { display: flex; gap: 6px; align-items: flex-start; }
.mt-subject-note.is-warn, .mt-subject-note.is-warn .mt-head-note-icon { color: var(--amber); }
.mt-sugg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.mt-sugg:last-child { border-bottom: 0; }
.mt-sugg:hover { background: var(--surface-hover); }
.mt-sugg-name { font-size: 16px; color: var(--text); }
.mt-sugg-name:hover { color: var(--primary); }
.mt-families { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; margin-top: 5px; font-size: 12.5px; }
.mt-fam { display: flex; gap: 6px; min-width: 0; align-items: baseline; }
.mt-fam-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
.mt-fam-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); flex: none; }
.mt-sugg-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; font-size: 12.5px; color: var(--text-2); }
.mt-sep { color: var(--text-3); }
.mt-sugg-school { max-width: 300px; }
.mt-sugg-action { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }

.mt-tabs-row { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 20px; min-width: 0; }
.mt-tabs-row > .mt-tabs { flex: 1; min-width: 0; margin: 0; border-bottom: 0; }
.mt-view-tab > span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.mt-views { flex: none; }
.mt-views-btn { color: var(--text-3); }
.mt-views-menu { min-width: min(280px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
.mt-views-empty { padding: 4px 12px 8px; max-width: 260px; line-height: 1.45; }
.mt-view-summary { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }

.mt-filter-menu { width: min(600px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 160px)); overflow-y: auto; padding: 6px 8px 12px; }
.mt-fm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.mt-fm-col { min-width: 0; display: flex; flex-direction: column; }
.mt-fm-col > .menu-label { display: flex; align-items: center; gap: 6px; padding: 10px 4px 5px; }
.mt-fm-row { display: flex; align-items: flex-start; gap: 9px; padding: 6px 6px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text); cursor: pointer; }
.mt-fm-row:hover { background: var(--surface-hover); }
.mt-fm-row .i { color: var(--text-3); margin-top: 1px; }
.mt-fm-row input { accent-color: var(--primary); width: 14px; height: 14px; margin: 2px 0 0; flex: none; }
.mt-fm-hint { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.mt-fm-chips { gap: 5px; padding: 0 4px; }
.mt-fm-chips label > span { height: 27px; padding: 0 9px; font-size: 12px; gap: 5px; }
.mt-fm-chips .mt-side-dot { width: 7px; height: 7px; }
.mt-fm-chips input:checked + span .mt-side-dot.not_contacted { box-shadow: inset 0 0 0 1.5px var(--surface); }
.mt-fm-mark { height: 12px; align-self: center; }
.mt-fm-range { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.mt-fm-range .input { width: 84px; }

.mt-pick-grid { align-items: start; }
.mt-xpicker { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-xpicker-search { display: flex; gap: 6px; align-items: center; }
.mt-xpicker-search[hidden] { display: none; }
.mt-xpicker-ftoggle { position: relative; flex: none; }
.mt-xpicker-ftoggle.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mt-xpicker-fcount { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--primary); color: var(--surface); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.mt-xpicker-filters { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.mt-xpicker-filters[hidden] { display: none; }
.mt-xpicker-frow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-xpicker-flabel { width: 48px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.mt-xpicker-age { width: 72px; }
.mt-xpicker-avail { font-size: 12.5px; }
.mt-xpicker-results { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); max-height: 280px; overflow-y: auto; padding: 4px; box-shadow: var(--shadow-sm); }
.mt-xpicker-results[hidden] { display: none; }
.mt-xpicker-item { align-items: center; }
.mt-xpicker-item.active { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.mt-xpicker-item.is-busy .strong { color: var(--text-2); }
.mt-xpicker-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.mt-xpicker-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-xpicker-empty { padding: 12px 10px; font-size: 12.5px; color: var(--text-3); }
.mt-xpicker-more { padding: 4px 10px 6px; }
.mt-xpicker-add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 8px 10px; border: 0; border-top: 1px solid var(--border-soft); background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: start; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.mt-xpicker-add:hover { background: var(--accent-soft); }

.mt-qa { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: var(--radius); background: var(--surface); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.mt-qa[hidden] { display: none; }
.mt-qa-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.mt-qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.mt-qa-grid label { font-size: 11.5px; }
.mt-qa-wide { grid-column: 1 / -1; }
.mt-qa-gender { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.mt-qa-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mt-qa-dupes { display: flex; flex-direction: column; gap: 6px; }
.mt-qa-dupes[hidden] { display: none; }
.mt-qa-dupes-head { padding: 8px 10px; font-size: 12.5px; }
.mt-qa-dupes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-qa-dupe { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mt-qa-anyway { align-self: flex-start; }

.mt-meeting-tags { gap: 6px; align-items: center; }
.mt-fb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-fb-label { font-size: 12px; font-weight: 600; color: var(--text-2); min-width: 92px; }
.mt-stars { display: inline-flex; align-items: center; gap: 1px; }
.mt-star, .mt-star-clear { position: relative; cursor: pointer; }
.mt-star input, .mt-star-clear input { position: absolute; opacity: 0; pointer-events: none; }
.mt-star > span { display: inline-flex; padding: 3px; border-radius: var(--radius-sm); color: var(--border-strong); }
.mt-star .i { width: 20px; height: 20px; transition: color .1s, fill .1s; }
.mt-star:hover > span { color: var(--accent); }
.mt-star input:focus-visible + span, .mt-star-clear input:focus-visible + span { box-shadow: 0 0 0 2px var(--primary-ring); }
.mt-star-clear > span { margin-inline-start: 6px; font-size: 11.5px; color: var(--text-3); padding: 2px 6px; border-radius: var(--radius-sm); }
.mt-star-clear input:checked + span { color: var(--text-2); background: var(--surface-3); }
.mt-stars:has(input[value="1"]:checked) .mt-star:is([data-n="1"]) > span,
.mt-stars:has(input[value="2"]:checked) .mt-star:is([data-n="1"], [data-n="2"]) > span,
.mt-stars:has(input[value="3"]:checked) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"]) > span,
.mt-stars:has(input[value="4"]:checked) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"], [data-n="4"]) > span,
.mt-stars:has(input[value="5"]:checked) .mt-star > span { color: var(--accent); }
.mt-stars:has(input[value="1"]:checked) .mt-star:is([data-n="1"]) .i,
.mt-stars:has(input[value="2"]:checked) .mt-star:is([data-n="1"], [data-n="2"]) .i,
.mt-stars:has(input[value="3"]:checked) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"]) .i,
.mt-stars:has(input[value="4"]:checked) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"], [data-n="4"]) .i,
.mt-stars:has(input[value="5"]:checked) .mt-star .i { fill: currentColor; }
.mt-stars:has(.mt-star[data-n="2"]:hover) .mt-star:is([data-n="1"]) > span,
.mt-stars:has(.mt-star[data-n="3"]:hover) .mt-star:is([data-n="1"], [data-n="2"]) > span,
.mt-stars:has(.mt-star[data-n="4"]:hover) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"]) > span,
.mt-stars:has(.mt-star[data-n="5"]:hover) .mt-star:is([data-n="1"], [data-n="2"], [data-n="3"], [data-n="4"]) > span { color: var(--accent); }
.mt-again-seg label span { padding: 0 10px; }
.mt-stars-static { display: inline-flex; align-items: center; gap: 0; color: var(--border-strong); }
.mt-star-s { display: inline-flex; }
.mt-star-s .i { width: 13px; height: 13px; }
.mt-star-s.is-on { color: var(--accent); }
.mt-star-s.is-on .i { fill: currentColor; }
.mt-again .i { width: 11px; height: 11px; }
.mt-ev-feedback { display: flex; flex-direction: column; gap: 4px; }
.mt-ev-side { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.mt-sugg.is-started { background: var(--accent-soft); }
.mt-sugg.is-started:hover { background: var(--accent-soft); }
.mt-sugg-onboard { justify-content: center; }
.mt-sugg-open { justify-content: center; gap: 6px; }

@media (max-width: 1100px) {
  .mt-sugg-layout { grid-template-columns: minmax(0, 1fr); }
  .mt-sugg-rail { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .mt-head-couple { grid-template-columns: minmax(0, 1fr); }
  .mt-head-link { flex-direction: row; border-inline: 0; border-block: 1px solid var(--border); padding: 8px; }
  .mt-stepper { grid-template-columns: repeat(7, minmax(46px, 1fr)); overflow-x: auto; }
  .mt-step-label { font-size: 10.5px; }
  .mt-meeting { grid-template-columns: minmax(0, 1fr) auto; }
  .mt-meeting-sides { grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr); }
  .mt-sugg { grid-template-columns: auto minmax(0, 1fr); }
  .mt-sugg-action { grid-column: 1 / -1; flex-direction: row; }
  .mt-families { grid-template-columns: minmax(0, 1fr); }
  .mt-board { grid-auto-columns: minmax(240px, 82vw); }
  .mt-pick-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mt-filter-dd { position: static; }
  .mt-filter-menu { position: fixed; top: calc(var(--topbar-h, 56px) + 8px); inset-inline: 12px; width: auto; max-height: calc(100vh - 88px); }
  .mt-fm-grid { grid-template-columns: minmax(0, 1fr); }
  .mt-toolbar .mt-search { max-width: none; flex-basis: 100%; }
  .mt-toolbar .mt-select-fit { max-width: calc(50% - 6px); }
  .mt-qa-grid { grid-template-columns: minmax(0, 1fr); }
  .mt-fb-label { min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
  .mt-tabs-row { margin-bottom: 16px; }
  .mt-views-btn { padding: 0 10px; gap: 2px; font-size: 0; }
  .mt-views-btn .i { width: 16px; height: 16px; }
  .mt-stepper { grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; padding: 12px 8px 14px; }
  .mt-step-btn { padding: 0 1px; }
  .mt-step-label { font-size: 10.5px; line-height: 1.2; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; hyphens: auto; }
  .card-flush:has(> .table-wrap > .mt-table) { overflow: visible; }
  .table-wrap:has(> .mt-table) { overflow: visible; background: none; }
  .mt-table, .mt-table > tbody { display: block; width: 100%; }
  .mt-table > thead { display: none; }
  .mt-table > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); position: relative; }
  .mt-table > tbody > tr:last-child { border-bottom: 0; }
  .mt-table > tbody > tr:hover { background: var(--surface-hover); }
  .table.mt-table > tbody > tr > td { display: block; height: auto; padding: 0; border: 0; background: none; box-shadow: none; min-width: 0; max-width: none; white-space: normal; }
  .mt-row-focus { box-shadow: inset 3px 0 0 #e8a96b; }
  .mt-row-focus:dir(rtl) { box-shadow: inset -3px 0 0 #e8a96b; }
  .table.mt-table > tbody > tr > td.mt-c-code { order: 1; flex: 1 1 auto; }
  .table.mt-table > tbody > tr > td.mt-c-stage { order: 2; flex: none; }
  .mt-table td.mt-c-stage .cell-stack { align-items: flex-end; }
  .table.mt-table > tbody > tr > td.mt-person-cell { order: 3; flex: 1 1 100%; }
  .mt-table .mt-person-name { font-size: 15px; white-space: normal; }
  .mt-table .mt-person-meta { flex-wrap: wrap; white-space: normal; }
  .table.mt-table > tbody > tr > td.mt-step-cell { order: 4; flex: 1 1 100%; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); }
  .table.mt-table > tbody > tr > td.mt-step-cell:not(:has(.mt-step-stack)) { display: none; }
  .table.mt-table > tbody > tr > td.mt-c-answers { order: 5; flex: 1 1 auto; }
  .table.mt-table > tbody > tr:has(> td.mt-shadchan-cell) > td.mt-c-answers { flex-basis: 100%; }
  .mt-table .mt-answers { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
  .table.mt-table > tbody > tr > td.mt-shadchan-cell { order: 6; flex: 0 1 auto; max-width: 70%; }
  .table.mt-table > tbody > tr > td.mt-c-meet { display: none; }
  .table.mt-table > tbody > tr > td.mt-c-upd { order: 7; flex: none; margin-inline-start: auto; font-size: 12px; }
}
@media (max-width: 900px), (pointer: coarse) {
  .mt-head-phone { height: 38px; padding: 0 12px; }
  .mt-answer-btn { height: 38px; padding: 0 14px; }
}
@media (pointer: coarse) {
  .mt-board .mcard[draggable="true"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .mt-board .mcard.dragging { opacity: .85; transform: scale(1.03); box-shadow: var(--shadow-lg); }
}
@media print {
  .mt-head-actions, .mt-composer, .mt-meeting-actions, .mt-step-btn.is-action { display: none !important; }
}
