[data-memo-cat="before"] { --mc: var(--brand); --mc-soft: var(--brand-soft); --mc-ink: var(--brand-soft-text); }
[data-memo-cat="city"] { --mc: var(--accent-teal); --mc-soft: var(--accent-teal-soft); --mc-ink: var(--accent-teal-soft-text); }
[data-memo-cat="food"] { --mc: var(--accent-sunset); --mc-soft: var(--accent-sunset-soft); --mc-ink: var(--accent-sunset-soft-text); }
[data-memo-cat="shopping"] { --mc: var(--accent-violet); --mc-soft: var(--accent-violet-soft); --mc-ink: var(--accent-violet-soft-text); }
[data-memo-cat="contact"] { --mc: var(--accent-coral); --mc-soft: var(--accent-coral-soft); --mc-ink: var(--accent-coral-soft-text); }
[data-memo-cat="etc"] { --mc: var(--text-faint); --mc-soft: var(--bg-sunken); --mc-ink: var(--text-muted); }
.mm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 12px; }
.mm-search { position: relative; display: block; height: var(--ctl-h); flex: 1 1 220px; max-width: 340px; min-width: 0; }
.mm-search .icon-inline { position: absolute; left: 11px; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; }
.mm-search .icon { width: 16px; height: 16px; color: var(--text-muted); }
.mm-search input { display: block; width: 100%; height: var(--ctl-h); margin: 0; padding: 0 12px 0 34px; border: 1px solid var(--border-strong); border-radius: var(--radius-md, 12px); background: var(--card); color: var(--text); font: inherit; font-size: 13.5px; }
.mm-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.mm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--chip-h);
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--card);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.mm-chip .icon { width: 16px; height: 16px; flex: none; color: var(--mc-ink, var(--text-muted)); }
.mm-chip:hover { background: var(--mc-soft, var(--bg-sunken)); }
.mm-chip .mono-num { font-size: 11.5px; color: var(--text-muted); }
.mm-chip.is-empty:not(.selected) { opacity: 0.6; }
.mm-chip.selected { border-color: var(--mc, var(--text)); background: var(--mc-soft, var(--text)); color: var(--mc-ink, var(--bg)); font-weight: 600; box-shadow: 0 0 0 1px var(--mc, var(--text)); }
.mm-chip.selected .icon,
.mm-chip.selected .mono-num { color: var(--mc-ink, var(--bg)); }
.mm-chip[data-memo-filter="all"].selected { border-color: var(--text); background: var(--text); color: var(--bg); box-shadow: none; }
.mm-chip[data-memo-filter="all"].selected .mono-num { color: var(--bg); }
.mm-board { column-width: 300px; column-gap: 16px; }
.mm-board > * { break-inside: avoid; margin: 0 0 16px; }
.mm-empty { column-span: all; }
.mm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 20px);
  background: var(--card);
  overflow: hidden;
}
.mm-card__head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--mc-soft); color: var(--mc-ink); }
.mm-card__head .icon { width: 16px; height: 16px; flex: none; }
.mm-card__cat { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; }
.mm-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; font-size: 11px; font-weight: 700; }
.mm-card__actions { display: flex; gap: 4px; flex: none; opacity: 0; transition: opacity 0.12s; }
.mm-card:hover .mm-card__actions,
.mm-card:focus-within .mm-card__actions { opacity: 1; }
@media (hover: none) { .mm-card__actions { opacity: 1; } }
.mm-card__body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px; }
.mm-title { font-size: 16px; font-weight: 700; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.mm-text { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.mm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; font-size: 11.5px; color: var(--text-muted); }
.mm-progress { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.mm-checks { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mm-check { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 5px 0; border: none; background: none; font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--text); text-align: left; cursor: pointer; }
.mm-check[disabled] { cursor: default; }
.mm-check__box { display: grid; place-items: center; width: 19px; height: 19px; flex: none; margin-top: 1px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--card); }
.mm-check__box .icon { width: 13px; height: 13px; }
.mm-check[aria-checked="true"] .mm-check__box { border-color: var(--mc); background: var(--mc); }
.mm-check[aria-checked="true"] .mm-check__label { color: var(--text-muted); text-decoration: line-through; }
.mm-check__label { min-width: 0; overflow-wrap: anywhere; }
.mm-link { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 11px; border: none; border-radius: var(--radius-card); background: var(--bg-sunken); font: inherit; font-size: 12.5px; color: var(--text-secondary); text-align: left; cursor: pointer; }
.mm-link .icon { width: 14px; height: 14px; flex: none; color: var(--mc-ink); }
.mm-link:hover { background: var(--mc-soft); }
.mm-phone { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--bg-sunken); }
.mm-phone a { min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.mm-phone a:hover { text-decoration: underline; }
.mm-phone .mm-phone__empty { font-size: 13px; color: var(--text-muted); }
.mm-info { padding: 14px; gap: 10px; background: var(--brand-soft); border-color: transparent; color: var(--brand-soft-text); }
.mm-info__head { display: flex; align-items: center; gap: 10px; }
.mm-info__globe { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--radius-card); background: var(--card); color: var(--brand-soft-text); }
.mm-info__globe .icon { width: 20px; height: 20px; }
.mm-info__headtext { display: flex; flex-direction: column; min-width: 0; }
.mm-info__eyebrow { font-size: 11.5px; font-weight: 700; opacity: 0.8; }
.mm-info__title { font-size: 17px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.mm-info__rows { display: flex; flex-direction: column; gap: 8px; }
.mm-info__row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--card); color: var(--text); }
.mm-info__icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand-soft-text); }
.mm-info__icon .icon { width: 17px; height: 17px; }
.mm-info__text { min-width: 0; flex: 1; }
.mm-info__label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mm-info__val { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.mm-info__temp { font-size: 17px; margin-right: 6px; }
.mm-info__tag { display: inline-block; margin: 0 4px 2px 0; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-soft-text); font-size: 11.5px; font-weight: 700; vertical-align: 2px; }
.mm-info__sentence { margin: 4px 0 2px; font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.mm-info__muted { font-size: 11.5px; color: var(--text-muted); }
.mm-info__consular { margin-top: 3px; font-size: 12px; color: var(--text-secondary); }
.mm-info__consular a { color: var(--brand-soft-text); font-weight: 600; }
.mm-info__note { margin: 0; font-size: 11px; line-height: 1.45; opacity: 0.8; }
.mm-info__link { display: block; padding: 9px 14px; border: 1px solid var(--brand-soft-text); border-radius: 999px; font-size: 13px; font-weight: 600; text-align: center; color: var(--brand-soft-text); text-decoration: none; }
.mm-info__link:hover { background: var(--card); }
.mm-notice { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); font-size: 12.5px; line-height: 1.5; }
.mm-legacy { margin-bottom: 16px; }
.mm-legacy textarea { width: 100%; }
.mm-modal { width: 560px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.mm-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 16px; background: var(--mc-soft); color: var(--mc-ink); }
.mm-modal__title { margin: 0; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.mm-modal__body { padding: 16px 22px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.mm-modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--border-subtle); }
.mm-modal__foot-note { flex: 1 1 200px; font-size: 12px; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }
.mm-modal__actions { display: flex; gap: 8px; margin-left: auto; }
.mm-modal__body input,
.mm-modal__body select,
.mm-modal__body textarea { width: 100%; min-width: 0; }
.mm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mm-field__label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.mm-cats { display: flex; flex-wrap: nowrap; gap: 5px; }
.mm-cats .mm-chip { flex: none; height: 32px; padding: 0 9px; gap: 4px; font-size: 12.5px; }
.mm-cats .mm-chip .icon { width: 15px; height: 15px; }
.mm-kind { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: var(--radius); background: var(--bg-sunken); }
.mm-kind button { height: 30px; padding: 0 14px; border: none; border-radius: var(--radius-sm); background: none; font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.mm-kind button[aria-checked="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.mm-draft-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mm-draft-row .mm-check__box { cursor: pointer; }
.mm-draft-row input { flex: 1; }
.mm-draft-check { display: grid; place-items: center; width: 19px; height: 19px; flex: none; padding: 0; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--card); cursor: pointer; }
.mm-draft-check .icon { width: 13px; height: 13px; }
.mm-draft-check[aria-checked="true"] { border-color: var(--mc); background: var(--mc); }
@media (max-width: 560px) {
  .mm-modal__body, .mm-modal__head, .mm-modal__foot { padding-left: 16px; padding-right: 16px; }
  .mm-board { column-width: 100%; }
  .mm-cats { flex-wrap: wrap; }
}
.mm-hint { margin: 0; padding: 8px 11px; border-radius: var(--radius-md); background: var(--bg-sunken); font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.mm-modal [hidden],
.mm-toolbar [hidden],
.mm-notice[hidden],
.mm-legacy[hidden],
.mm-board [hidden] { display: none !important; }
.lc-wrap { max-width: 760px; }
.lc-wrap .mm-info { margin: 0 0 20px; }
.lc-contacts__head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.lc-contacts__title { flex: 1; display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; font-weight: 700; }
.lc-contacts__title .icon { width: 18px; height: 18px; color: var(--brand-fg); }
.lc-contacts__head .btn { display: inline-flex; align-items: center; gap: 4px; }
.lc-contacts__head .btn .icon { width: 14px; height: 14px; }
.lc-contacts__list { column-width: 260px; }
.lc-contacts__empty { margin: 0; font-size: 13.5px; line-height: 1.6; text-wrap: pretty; }
@media (min-width: 1100px) {
  .lc-wrap { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .lc-wrap .mm-info { margin: 0; }
  .lc-contacts__list { column-width: auto; column-count: 1; }
}
.mm-toolbar > .btn { min-height: var(--ctl-h); }
#tab-panel-etc .mm-empty { margin-top: 14px; }
