.cm-shell{max-width:780px;margin:28px auto;padding:0 18px 48px;overflow-wrap:anywhere}.cm-panel,.cm-reply,.cm-message{padding:20px;border:1px solid var(--line,#dce4ee);border-radius:12px;background:var(--surface,#fff);margin:16px 0}.cm-shell h1{font-size:clamp(26px,5vw,36px)}.cm-shell fieldset{border:0;margin:0;padding:0;min-width:0}.cm-shell label,.cm-thread label{display:block;margin:14px 0 6px}.cm-shell input:not([type=checkbox]),.cm-shell textarea,.cm-thread textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;padding:12px;border:1px solid var(--line,#aab6c4);border-radius:8px;background:var(--surface,#fff);color:inherit;font:inherit}.cm-shell textarea{min-height:150px}.cm-shell button,.cm-thread button,.cm-thread a{min-height:44px}.cm-shell button,.cm-thread button{font:inherit;cursor:pointer;padding:10px 18px;margin:6px 0;border:1px solid var(--line,#aab6c4);border-radius:8px;color:inherit;background:var(--surface,#fff)}.cm-shell button[type=submit],.cm-shell #confirmAccess{background:#173d65;color:white}.cm-shell button:disabled{opacity:.65;cursor:default}.cm-shell :focus-visible,.cm-thread :focus-visible{outline:3px solid #357cbf;outline-offset:3px}.cm-body{white-space:pre-wrap;overflow-wrap:anywhere}.cm-message--mine{border-left:4px solid #357cbf}.cm-message h3,.cm-reply h3{font-size:1rem;margin:0 0 8px}.cm-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.cm-muted{font-size:.9rem;color:var(--muted,#52647a)}.cm-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.cm-shell [hidden],.cm-thread [hidden]{display:none!important}.cm-consent{display:flex!important;gap:12px;align-items:flex-start}.cm-consent input{margin-top:5px;flex-shrink:0}.cm-shell [role=status]{white-space:pre-line;min-height:1.5em}.cm-thread{margin-top:24px;text-align:left}.cm-thread .cm-reply time{font-size:.85rem}.cm-thread .cm-reply{box-shadow:none}

/* Private conversations keep the history and send feedback next to the draft. */
#conversationPanel .cm-actions{gap:8px}
#conversationUpdates{min-height:1.5em;margin:8px 0}
#privateMessages{max-height: min(55vh, 620px);min-height:120px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px 8px 4px 4px;border:1px solid var(--line,#dce4ee);border-radius:12px;background:var(--surface-muted,#f3f6fa)}
#privateMessages:empty::before{content:'メッセージはまだありません。';display:block;padding:16px;color:var(--muted,#52647a)}
#privateMessages .cm-message{margin:8px 0;padding:16px}
#privateMessages .cm-message--mine{margin-left:24px}
#privateMessages .cm-message:not(.cm-message--mine){margin-right:24px}
#privateMessages time{display:block;font-size:.85rem;color:var(--muted,#52647a)}
#privateMessages .cm-body{margin:10px 0}
#privateMessages .cm-message button{font-size:.85rem;padding:6px 10px}
#messageForm{margin-top:12px}
#messageForm label{margin-top:0}
#messageBody{min-height:112px;resize:vertical}
#messageStatus{margin:8px 0 0;min-height:1.5em}
#showNewMessages{width:100%;background:#173d65;color:#fff}
@media(max-width:480px){#conversationPanel .cm-actions button{font-size:.9rem;padding:8px 10px}.cm-shell .cm-panel{padding:16px}#privateMessages{max-height:48vh}#privateMessages .cm-message{padding:12px}#privateMessages .cm-message--mine{margin-left:12px}#privateMessages .cm-message:not(.cm-message--mine){margin-right:12px}#messageForm button[type=submit]{width:100%}}

/* Inline composer: native radio semantics with a two-part toggle appearance. */
.cm-thread{scroll-margin-top:100px;min-width:0;overflow-wrap:anywhere}.cm-compose{margin-top:28px;padding:24px;border:2px solid #95adca;border-radius:12px;background:var(--surface,#fff);color:var(--text,#17304e);min-width:0}.cm-compose[data-visibility=private]{border-color:#497c70;background:var(--surface,#f6faf8)}.cm-compose>fieldset{padding:0;border:0;min-width:0}.cm-compose>fieldset>legend{font-size:1.3rem;font-weight:800;margin-bottom:16px}.cm-compose .cm-mode{border:0;padding:0;display:flex;gap:0;min-width:0}.cm-mode legend{font-weight:800;margin-bottom:8px}.cm-compose .cm-mode label{display:flex;flex:1;align-items:center;justify-content:center;margin:0;position:relative;min-width:0}.cm-mode input{position:absolute;inset:0;z-index:1;opacity:0;width:100%!important;height:100%!important;margin:0;cursor:pointer}.cm-mode span{box-sizing:border-box;width:100%;padding:12px;text-align:center;border:1px solid #7b8fa8;background:var(--surface,#fff);font-weight:800}.cm-mode label:first-of-type span{border-radius:8px 0 0 8px}.cm-mode label:last-of-type span{border-radius:0 8px 8px 0}.cm-mode input:checked+span{background:#173d65;color:white}.cm-mode input[value=private]:checked+span{background:#285d50}.cm-mode input:focus-visible+span{outline:3px solid #357cbf;outline-offset:3px}.cm-mode-notice{padding:12px;border-radius:8px;background:var(--surface-muted,#edf3fa)}.cm-target-context{padding:12px;border-left:4px solid #357cbf;background:var(--surface-muted,#edf3fa);margin-top:8px}.cm-target-context blockquote{margin:8px 0 0;font-size:.95rem;white-space:pre-wrap}.cm-compose input:not([type=radio]):not([type=checkbox]),.cm-compose textarea,.cm-reply input{display:block;width:100%;max-width:100%;box-sizing:border-box;padding:12px;border:1px solid #8a9bb1;border-radius:8px;background:var(--surface,#fff);color:inherit;font:inherit}.cm-compose textarea{min-height:160px;resize:vertical}.cm-compose label{font-weight:700}.cm-compose [type=submit]{background:#173d65;color:white;min-width:140px}.cm-compose button:disabled{opacity:.6;cursor:default}.cm-compose [role=status]{white-space:pre-line;margin-top:12px}.cm-reply form{padding:14px;border-top:1px solid #dce4ee;margin-top:14px}.cm-highlight{outline:3px solid #357cbf;outline-offset:3px}.cm-thread [hidden]{display:none!important}.cm-compose .cm-consent{font-weight:normal}.cm-compose input[type=checkbox]{width:20px;height:20px}.cm-thread button,.cm-thread a{touch-action:manipulation}.cm-thread fieldset:disabled{opacity:.65}@media(max-width:480px){.cm-compose{padding:16px}.cm-reply{padding:16px}.cm-actions{gap:6px}.cm-mode span{padding:12px 6px}.cm-target-context{padding:10px}}

.cm-compose,.cm-reply,.cm-mode input{scroll-margin-top:110px;scroll-margin-bottom:80px}
