/* MemoViewController's plain page, presented as a repeating native UI scene. */
#memoPanel { min-width: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Segoe UI", sans-serif; }
.md-frame { color-scheme: light; position: relative; min-width: 0; overflow: hidden; border: 1px solid #d1d1d6; border-radius: 13px; color: #000; background: #fff; box-shadow: 0 3px 12px #00000008, 0 20px 38px -25px #0004; }
.md-header { display: grid; place-items: center; min-height: 58px; padding: 0 12px; border-bottom: 1px solid #e5e5ea; background: #fff; }
.md-title { color: #000; font-size: 17px; font-weight: 600; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.md-paper { position: relative; height: 365px; background: #fff; }
.md-updated { margin: 0; padding: 12px 12px 10px; color: #737378; font-size: 12px; line-height: 18px; text-align: center; }
.md-editor { margin: 0; padding: 8px 17px 24px; color: #000; font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Segoe UI", sans-serif; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; user-select: text; }
.md-editor.md-typing::after { content: ''; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: #007aff; animation: md-caret .8s step-end infinite; }
.md-selected { position: relative; padding: 2px 0; color: #000; background: #b6d7ff; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.md-selected::before, .md-selected::after { content: ''; position: absolute; width: 2px; height: 1.6em; background: #007aff; }
.md-selected::before { top: 0; left: -1px; border-radius: 5px 5px 0 0; }
.md-selected::after { bottom: 0; right: -1px; border-radius: 0 0 5px 5px; }
.md-edit-menu { position: absolute; z-index: 3; display: flex; align-items: stretch; max-width: calc(100% - 24px); border-radius: 9px; color: #fff; background: #262628; box-shadow: 0 3px 8px #0003; font-size: 13px; line-height: 1.4; animation: md-menu-in .2s ease-out both; pointer-events: none; }
.md-edit-menu::after { content: ''; position: absolute; bottom: -5px; left: calc(50% - 5px); width: 10px; height: 10px; background: #262628; transform: rotate(45deg); }
.md-edit-menu span { display: grid; place-items: center; min-height: 34px; padding: 6px 15px; overflow-wrap: anywhere; }
.md-edit-menu .md-menu-ai { position: relative; z-index: 1; border-left: 1px solid #ffffff35; border-radius: 0 9px 9px 0; transition: background .2s; }
.md-edit-menu.md-menu-pressed .md-menu-ai { background: #58585d; }
.md-ai-page { position: absolute; z-index: 4; inset: 0; overflow: hidden; background: #fff; animation: md-page-in .4s ease-out both; pointer-events: none; }
.md-ai-page.md-ai-leaving { animation: md-page-out .4s ease-in both; }
.md-ai-header { display: grid; place-items: center; min-height: 58px; padding: 0 12px; border-bottom: 1px solid #e5e5ea; background: #fff; }
.md-ai-body { padding: 22px 16px; }
.md-ai-user { width: fit-content; max-width: 75%; margin: 0 0 28px auto; padding: 10px 12px; border-radius: 16px; color: #000; background: #f2f2f7; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.md-result-card { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: #f2f2f7; box-shadow: 0 3px 10px #00000008; }
.md-result-calendar { flex: 0 0 18px; color: #007aff; }
.md-result-calendar svg { display: block; width: 18px; height: 18px; }
.md-result-summary { flex: 1; min-width: 0; margin: 0; color: #000; font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.md-result-actions { flex: 0 0 auto; display: grid; gap: 5px; min-width: 54px; max-width: 30%; }
.md-result-actions span { display: grid; place-items: center; min-height: 32px; padding: 5px 8px; border-radius: 10px; font-size: 12px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.md-result-edit { color: #007aff; background: #007aff1a; }
.md-result-save { color: #fff; background: #007aff; font-weight: 600; }
.md-edit-menu[hidden], .md-ai-page[hidden] { display: none; }
@keyframes md-caret { 50% { opacity: 0; } }
@keyframes md-menu-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes md-page-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes md-page-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (max-width: 420px) {
  .md-header { padding-inline: 8px; }
  .md-title { font-size: 16px; }
  .md-result-summary { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .md-edit-menu, .md-ai-page, .md-ai-page.md-ai-leaving, .md-editor.md-typing::after { animation: none; }
  .md-edit-menu .md-menu-ai { transition: none; }
}
