/* page-memo-m: 메모 폰 화면(memo-m.js). 폭 640px 이하에서만 적용된다 — 컴퓨터 화면은 page-memo.css 그대로.
   시안: 메모 목록 · 메모 편집. 메모 색 번호 1~6 = 왼쪽 띠(--mm-b1~6). 색만으로 구분하지 않도록 편집 화면의 색 칸에 번호를 같이 쓴다.
   목록 카드는 64px(제목 한 줄 + 미리보기 한 줄 + 날짜) — 한 화면에 7개 이상. 글자 보조 13px 이상, 눌리는 곳 48px 이상. */
@media (max-width: 640px) {
  .mp-top { padding: 8px 16px; }
  .mp-bar { display: flex; align-items: center; gap: 8px; }
  .mp-bar h1 { flex: none; margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.25; }
  .mp-bar .grow { flex: 1; }
  .mp-trashbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 48px; min-height: 48px; padding: 0 2px; border: 0; background: transparent; color: var(--ps-text); font-size: 14px; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; transition: transform 144ms, opacity 144ms; }
  .mp-trashbtn:active { opacity: .6; transform: scale(.94); }
  .mp-trashbtn .mp-tc:empty { display: none; }
  .mp-search { position: relative; flex: 1; min-width: 0; margin: 0; }
  .mp-search .mp-q { padding-left: 40px; }
  .mp-si { position: absolute; left: 10px; top: 13px; color: var(--ps-muted); display: inline-flex; pointer-events: none; }
  .mp .m-body { padding-bottom: 72px; }
  .mp-sec { margin: 0; }
  .mp-sech { display: flex; justify-content: space-between; align-items: center; margin: 0; min-height: 34px; font-size: 13px; font-weight: 500; color: var(--ps-text2); border-top: 2px solid var(--ps-rule); }
  .mp-secn { font-weight: 400; color: var(--ps-muted); font-variant-numeric: tabular-nums; }
  .mp-card { align-items: stretch; min-height: 64px; height: 64px; padding: 6px 0; gap: 12px; }
  .mp-card .grow { display: flex; flex-direction: column; justify-content: center; }
  .mp-band { flex: none; width: 4px; background: var(--mm-band, var(--mm-b1)); }
  .mp-card[data-c="1"], .mp-trow[data-c="1"] { --mm-band: var(--mm-b1); }
  .mp-card[data-c="2"], .mp-trow[data-c="2"] { --mm-band: var(--mm-b2); }
  .mp-card[data-c="3"], .mp-trow[data-c="3"] { --mm-band: var(--mm-b3); }
  .mp-card[data-c="4"], .mp-trow[data-c="4"] { --mm-band: var(--mm-b4); }
  .mp-card[data-c="5"], .mp-trow[data-c="5"] { --mm-band: var(--mm-b5); }
  .mp-card[data-c="6"], .mp-trow[data-c="6"] { --mm-band: var(--mm-b6); }
  .mp-l1 { display: flex; align-items: baseline; gap: 8px; }
  .mp-card .t { flex: 1; min-width: 0; font-size: 16px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp-date { flex: none; font-size: 13px; line-height: 1.3; color: var(--ps-muted); white-space: nowrap; }
  .mp-pv { display: block; margin-top: 2px; font-size: 14px; line-height: 1.3; color: var(--ps-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp-none { margin: 0; padding: 16px 0; font-size: 15px; color: var(--ps-text2); word-break: keep-all; }
  .mp-back { flex: none; min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--ps-text); transition: opacity 144ms; }
  .mp-back:active { opacity: .6; }
  .mp-bar .mp-back { margin-left: -12px; }
  .mp-trow { border-bottom: 1px solid var(--ps-hair); padding-bottom: 8px; }
  .mp-trow .mp-tcard { border-bottom: 0; }
  .mp-tact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-left: 16px; }
  .mp-tact .m-btn2 { min-height: 48px; font-size: 15px; }
  /* 편집 전체 화면 */
  .mp-eh { flex: none; display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 16px 0 4px; }
  .mp-stat { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ps-muted); }
  .mp-sd { width: 8px; height: 8px; flex: none; background: var(--ps-good); }
  .mp-stat.wait .mp-sd, .mp-stat.new .mp-sd { background: var(--ps-muted); }
  .mp-stat.bad { color: var(--ps-bad); font-weight: 500; }
  .mp-stat.bad .mp-sd { background: var(--ps-bad); }
  .mp-stat.bad span::before { content: "✕ "; }
  .mp-retry { min-height: 48px; padding: 0 8px; border: 0; background: transparent; color: var(--ps-ac-ink); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
  .mp-cnt { flex: none; font-size: 13px; color: var(--ps-muted); }
  .mp-ebody { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px; }
  .mp-t { flex: none; width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--ps-hair); border-radius: 0; background: transparent; color: var(--ps-text); font: inherit; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; outline: none; }
  .mp-t::placeholder, .mp-b::placeholder { color: var(--ps-muted); }
  .m-layer .mp-t:focus-visible, .m-layer .mp-b:focus-visible { outline: none; }
  .mp-t:focus { border-bottom-color: var(--ps-text); }      /* 글 쓰는 칸은 깜빡이는 커서가 표시라 윤곽을 따로 그리지 않는다 */
  .mp-b { flex: 1; min-height: 0; width: 100%; padding: 14px 0; border: 0; background: transparent; color: var(--ps-text2); font: inherit; font-size: 16px; line-height: 1.7; resize: none; outline: none; }
  .mp-tools { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 2px solid var(--ps-rule); background: var(--ps-bg); }
  .mp-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; border: 0; background: transparent; color: var(--ps-muted); font-size: 13px; -webkit-tap-highlight-color: transparent; transition: transform 144ms, opacity 144ms; }
  .mp-tool:active { opacity: .6; transform: scale(.95); }
  .mp-tool[aria-pressed="true"] { color: var(--ps-text); font-weight: 500; box-shadow: inset 0 3px 0 var(--ps-ac); }
  .mp-tool[aria-pressed="true"] svg { fill: currentColor; }
  .mp-tool-del { color: var(--ps-bad); }
  .mp-colorsw { width: 18px; height: 18px; display: block; background: var(--mm-b1); }
  .mp-colorsw[data-c="2"] { background: var(--mm-b2); } .mp-colorsw[data-c="3"] { background: var(--mm-b3); } .mp-colorsw[data-c="4"] { background: var(--mm-b4); } .mp-colorsw[data-c="5"] { background: var(--mm-b5); } .mp-colorsw[data-c="6"] { background: var(--mm-b6); }
  .mp-sws { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
  .mp-sw { min-height: 52px; border: 1px solid var(--ps-rule); border-radius: 2px; background: var(--mm-b1); color: var(--mm-f1); font-size: 16px; font-variant-numeric: tabular-nums; transition: transform 144ms, opacity 144ms; }
  .mp-sw:active { opacity: .7; transform: scale(.95); }
  .mp-sw[data-c="2"] { background: var(--mm-b2); color: var(--mm-f2); } .mp-sw[data-c="3"] { background: var(--mm-b3); color: var(--mm-f3); } .mp-sw[data-c="4"] { background: var(--mm-b4); color: var(--mm-f4); } .mp-sw[data-c="5"] { background: var(--mm-b5); color: var(--mm-f5); } .mp-sw[data-c="6"] { background: var(--mm-b6); color: var(--mm-f6); }
  .mp-sw[aria-checked="true"] { outline: 2px solid var(--ps-text); outline-offset: 2px; font-weight: 500; }
  .mp-sw[aria-checked="true"]::after { content: " ✓"; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .mp-trashbtn, .mp-back, .mp-tool, .mp-sw { transition: none !important; }
  .mp-trashbtn:active, .mp-tool:active, .mp-sw:active { transform: none; }
}
