.type-name:has(.plan-memo-button) { display:flex; align-items:center; gap:2px; }
.type-name:has(.plan-memo-button) .type-label { min-width:0; flex:1; }
.type-name .plan-memo-button { position:relative; display:inline-grid; place-items:center; flex:none; width:22px; height:20px; min-height:0; margin:-2px 0; padding:2px; border:0; border-radius:4px; background:#ffffff20; color:#fff; cursor:pointer; touch-action:manipulation; }
.plan-memo-button svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.plan-memo-button.unread::after { content:''; position:absolute; top:0; right:0; width:6px; height:6px; border:1px solid white; border-radius:50%; background:#ff8c28; }
.plan-memo-button:focus-visible { outline:2px solid #fff; outline-offset:1px; }
.ticket-memo-wrap{position:relative;display:block;min-width:0;width:100%}
.ticket-memo-wrap>.record-chip{display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0;width:100%}
.ticket-memo-wrap>.record-chip .record-name{display:block;width:100%;flex:none;line-height:1.3;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.ticket-memo-wrap>.record-chip .record-ticket{min-height:22px;line-height:22px;padding-left:0;padding-right:25px}
.ticket-memo-wrap .ticket-memo-button,.ticket-memo-placeholder .ticket-memo-button{position:relative;display:flex;align-items:center;justify-content:center;gap:3px;min-width:24px;min-height:22px;padding:2px 4px;border:1px solid #d6dce4;border-radius:5px;background:#f5f7fa;color:#8490a0;font:inherit;font-size:10px;cursor:pointer;touch-action:manipulation}
.ticket-memo-button.unread{border-color:#dfb06e;background:#fff2d9;color:#9a5a09}
.ticket-memo-wrap>.ticket-memo-button{position:absolute;right:3px;bottom:4px}
.ticket-memo-placeholder{display:block;min-width:0;width:100%;margin-top:2px}
.ticket-memo-placeholder .ticket-memo-button{width:100%;justify-content:space-between;border-style:dashed}
.ticket-memo-player{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ticket-memo-placeholder svg{flex:none}
.ticket-memo-button:focus-visible{outline:2px solid #7b58a0;outline-offset:1px}
.plan-memo-dialog { box-sizing:border-box; width:min(440px,calc(100% - 24px)); max-height:calc(100dvh - 32px); overflow:auto; padding:18px; border:1px solid #cab6df; border-radius:14px; background:#fff; color:#30243d; box-shadow:0 15px 60px #1b102650; font-family:inherit; }
.plan-memo-dialog::backdrop { background:#11182788; }
.plan-memo-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.plan-memo-heading h2 { margin:0; font-size:18px; }
.plan-memo-dialog button { min-height:38px; padding:6px 14px; border:1px solid #c9bfd4; border-radius:8px; background:#f6f2fa; color:#46275d; font:inherit; cursor:pointer; }
.plan-memo-location { color:#6c537d; font-size:13px; }
.plan-memo-label { display:grid; gap:6px; font-size:13px; }
.plan-memo-label textarea { box-sizing:border-box; width:100%; resize:vertical; min-height:120px; padding:10px; border:1px solid #ab99bd; border-radius:8px; font:inherit; font-size:16px; }
.plan-memo-dialog [hidden] { display:none!important; }
.plan-memo-message { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.plan-memo-count { text-align:right; font-size:11px; color:#776486; }
.plan-memo-error { color:#b42338; font-size:12px; }
.plan-memo-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.plan-memo-actions [data-memo-save] { background:#65377f; color:#fff; }
.plan-memo-dialog button:disabled { opacity:.5; cursor:default; }
.plan-memo-bubble{box-sizing:border-box;position:fixed;inset:auto;margin:0;display:flex;flex-direction:column;max-height:var(--memo-max-height,calc(100dvh - 16px));overflow:visible;z-index:250;width:min(360px,calc(100vw - 16px));padding:12px;border:1px solid #c4b3d2;border-radius:12px;background:#fff;color:#30243d;box-shadow:0 6px 22px #27163930;font-family:inherit;outline:none}
.plan-memo-bubble[hidden]{display:none!important}
.plan-memo-bubble::before{content:'';position:absolute;left:calc(var(--memo-arrow-x,24px) - 6px);top:-7px;width:12px;height:12px;transform:rotate(45deg);border-top:1px solid #c4b3d2;border-left:1px solid #c4b3d2;background:#fff}
.plan-memo-bubble[data-side="above"]::before{top:auto;bottom:-7px;transform:rotate(225deg)}
.plan-memo-bubble[data-side="left"]::before{left:auto;right:-7px;top:calc(var(--memo-arrow-y,24px) - 6px);bottom:auto;transform:rotate(135deg)}
.plan-memo-bubble[data-side="right"]::before{left:-7px;right:auto;top:calc(var(--memo-arrow-y,24px) - 6px);bottom:auto;transform:rotate(-45deg)}
.plan-memo-bubble-head{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.plan-memo-bubble-head strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.plan-memo-bubble-head button{display:grid;place-items:center;flex:none;width:30px;height:30px;padding:0;border:0;border-radius:6px;background:#f4eff8;color:#633b7b;font:inherit;font-size:20px;cursor:pointer}
.plan-memo-bubble-head button:focus-visible{outline:2px solid #7b58a0;outline-offset:1px}
.plan-memo-bubble-body{min-height:0;max-height:max(24px,calc(var(--memo-max-height,360px) - 64px));overflow:auto;overscroll-behavior:contain;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.65}
@media(max-width:759px) { .type-name .plan-memo-button { width:17px; height:19px; padding:0; } .plan-memo-button svg { width:14px; height:14px; } }

