/* One panel width, including long replies, attachment names and the keyboard. */
.momo-panel{box-sizing:border-box;max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain}
.momo-panel>*{min-width:0;max-width:100%;flex-shrink:0}
.momo-header>div{min-width:0;flex:1}
.momo-header small,.momo-answer,.momo-note{overflow-wrap:anywhere}
.momo-header .momo-orb,.momo-header button{flex-shrink:0}
.momo-content{min-width:0;min-height:80px;flex:1 1 auto;overflow:auto;overflow-wrap:anywhere}
.momo-panel .compose input{width:0;min-width:0;font-size:16px}
.momo-panel input[type=file]{width:100%;min-width:0}
.momo-suggestions button{min-width:0;max-width:100%;white-space:normal;text-align:left}
[data-planning-momo]{min-width:0;max-width:100%;overflow-wrap:anywhere}
[data-planning-momo] header>div{min-width:0;flex:1}
[data-planning-momo] textarea{font-size:16px}
.chat-filters{display:flex!important;flex-wrap:nowrap;gap:8px;padding:12px 0;overflow-x:auto;max-width:100%;min-width:0;overscroll-behavior-x:contain;scrollbar-width:none;scroll-padding:8px}
/* Reserve the controls' height even when hundreds of conversation rows load.
   Only the list may consume and scroll the remaining sidebar space. */
.social-chat .chat-sidebar{min-width:0;overflow:hidden}
.social-chat .chat-sidebar>:not(.chat-list){flex-shrink:0}
.social-chat .chat-filters{flex:0 0 auto;min-height:68px;box-sizing:border-box}
.social-chat .chat-list{flex:1 1 0;min-height:0;overscroll-behavior-y:contain}
.chat-filters button{flex:0 0 auto!important;min-height:44px;padding:10px 15px!important;font-size:15px!important;white-space:nowrap}
.chat-signal-phase{display:flex;gap:6px;padding:0 0 12px;flex-wrap:wrap}
.chat-signal-phase[hidden]{display:none}
.chat-signal-phase button{padding:7px 12px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:var(--panel);min-height:36px}
.chat-signal-phase button[aria-pressed=true]{background:var(--text);color:var(--bg)}
.chat-context-note{margin:0 0 12px;font-size:12px;color:var(--muted);line-height:1.5}
.signal-requests-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.signal-requests-intro p{font-size:13px;max-width:34ch;margin:0;line-height:1.6}
.profile-signal>.mooment-glyph{width:32px;height:32px;flex-shrink:0}
@media(max-width:760px){
 .momo-panel{left:12px;right:12px;width:auto;bottom:calc(var(--mobile-bar-total,78px) + 8px);height:540px;max-height:calc(var(--keyboard-viewport,100dvh) - var(--mobile-bar-total,78px) - env(safe-area-inset-top,0px) - 24px);border-radius:24px}
 .momo-header{padding:14px;gap:10px}
 .momo-header small{font-size:12px;line-height:1.4}
 .momo-content{padding:14px}
 .momo-note{font-size:11px;line-height:1.5;margin:6px 14px 12px}
 .momo-panel .compose{padding:12px}
 .momo-panel .compose button{min-width:44px;min-height:44px;flex-shrink:0}
 .momo-suggestions{padding:8px 12px}
 .momo-suggestions button{font-size:13px;padding:9px 12px}
 .chat-filters{margin-right:-4px;padding-right:16px}
 .chat-filters button{min-width:fit-content}
 html[data-keyboard-open] .momo-panel{top:8px;bottom:auto;height:calc(var(--keyboard-viewport) - 16px);max-height:calc(var(--keyboard-viewport) - 16px)}
}

.calendar-entry>span .mooment-glyph{width:28px;height:28px}.calendar-day small .mooment-glyph{display:inline-block;width:14px;height:14px;vertical-align:middle}.calendar-legend .mooment-glyph{width:18px;height:18px;vertical-align:middle}

/* iOS Safari enlarges focused fields below 16px. Keep every editable web
   control readable without changing the user's chosen zoom level. */
@media(max-width:760px),(pointer:coarse){
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=button]):not([type=submit]),textarea,select{font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
}

.chat-filters::-webkit-scrollbar{display:none}.momo-header button{min-width:44px;min-height:44px}

/* Give the conversation and composer priority while a phone keyboard is open. */
@media(max-width:760px){
 html[data-keyboard-open] .momo-suggestions,html[data-keyboard-open] .momo-note{display:none}
 html[data-keyboard-open] .momo-content{min-height:40px}
}
@media(max-width:760px) and (max-height:500px){
 .momo-panel .momo-suggestions,.momo-panel .momo-note{display:none}
 .momo-content{min-height:40px}
}

/* Shared, non-blocking progress stays visible above dialogs and on small screens. */
.action-progress{position:fixed;inset:auto 12px calc(var(--bottom-nav-height,74px) + env(safe-area-inset-bottom,0px) + 14px);margin:0 auto;width:max-content;max-width:calc(100vw - 32px);box-sizing:border-box;padding:12px 18px;display:flex;align-items:center;gap:10px;border:1px solid #bda4e6;border-radius:99px;background:#211a2d;color:#fff;font-size:16px;line-height:1.3;box-shadow:0 8px 32px #0005;z-index:2147483000;pointer-events:none;overflow-wrap:anywhere}
.action-progress i,.action-pending::after{width:16px;height:16px;border:2px solid #c7a9e955;border-top-color:#e7d7ff;border-radius:50%;animation:action-spin .75s linear infinite;flex:none}
button.action-pending{position:relative;cursor:progress;opacity:.7}
button.action-pending::after{content:"";position:absolute;right:5px;top:5px;background:#211a2d;box-sizing:border-box;pointer-events:none}
@keyframes action-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.action-progress i,.action-pending::after{animation:none;border-color:#c7a9e9;border-top-color:#fff}}

/* Mooment direction marks: crisp vectors instead of platform emoji glyphs. */
.mooment-glyph.mooment-direction{display:inline-block;width:1.2em;height:1.2em;min-width:1.2em;flex-shrink:0;vertical-align:-.18em;fill:none;stroke:currentColor;stroke-width:2.2;overflow:visible}
.creation-card,.creation-tools .creation-card{padding-right:58px}
.creation-card .creation-arrow{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--line);border-radius:12px;background:var(--control);color:var(--brand-accent,var(--text));transform:rotate(-6deg)}
.creation-arrow .mooment-direction{width:23px;height:23px;min-width:23px;transform:rotate(6deg)}
.chat-composer .mooment-direction{width:25px;height:25px;min-width:25px}
